Issue


VS provisioning failed with the following message:

Running: LOCK_FILE=/onapp/backups/templates/ubuntu-14.04-x64-1.7-
xen.kvm.kvm_virtio.tar.gz.lock;EXTRACTING_ATTEMPTS=300;[ -f $LOCK_FILE ] && echo 'Template is 
temporary locked due to extracting.' || exit 0;i=0;echo -n "$EXTRACTING_ATTEMPTS unlock 
attempts.";while [ -f $LOCK_FILE -a $i -lt $EXTRACTING_ATTEMPTS ]; do sleep 1; echo -n "."; 
i=$((${i}+1));done;echo '';[ -f $LOCK_FILE ] && exit 1 || exit 0
Template is temporary locked due to extracting.

300 unlock attempts....................................................................................................................................................
.........................................................................................................................................................

Fatal: Provisioning failed. The template has not been extracted yet. Try again. If this problem repeats, contact your administrator.
CODE


Environment


OnApp 4.x or later

Linux template


Resolution


To resolve it:

  1. Make sure no other virtual servers are currently provisioning or using the affected template.
  2. Remove the lock file. This file is on the backup server. If you have more than one backup server, check the remote server's IP from the failed log to find which one to run it on:

    cd /onapp/backups/templates
    
    rm ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz.lock
    
    (The Ubuntu 14.04 template is just being used here as an example)
    CODE
  3. Try provisioning again.

If the provisioning fails again, there may be an issue with the template itself and you should download the most recent version of this template.


Additional Information


Linux templates are compressed tar files which contain all of the system files for the operating system. Provisioning includes extracting those files and copying them to the virtual server's disk. The compressed template files exist in /onapp/templates/ by default and the extracted templates exist in /onapp/backups/templates/.

Provisioning of the second virtual server with the same template may take less time since the extracted files may still be there (thus, skipping the extraction part of provisioning).

Optionally, you may extract the template manually:

touch /onapp/backups/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz.lock

mkdir -p /onapp/backups/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz

tar -xzpf /onapp/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz -C /onapp/backups/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz

rm /onapp/backups/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz.lock
CODE