Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-9607

Preventing template deletion when template is in use.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • Security Level: Public (Anyone can view this level - this is the default.)
    • None

    Description

      Consider this scenario:
      1. User launches a VM from Template and keep it running
      2. Admin logins and deleted that template [CloudPlatform does not check existing / running VM etc. while the deletion is done]
      3. User resets the VM
      4. CloudPlatform fails to star the VM as it cannot find the corresponding template.

      It throws error as
      java.lang.RuntimeException: Job failed due to exception Resource [Host:11] is unreachable: Host 11: Unable to start instance due to can't find ready template: 209 for data center 1
      at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:113)
      at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:495)

      Client is requesting better handing of this scenario. We need to check existing / running VM's when the template is deleted and warn admin about the possible issue that may occur.

      REPRO STEPS
      ==================
      1. Launches a VM from Template and keep it running
      2. Now delete that template
      3. Reset the VM
      4. CloudPlatform fails to star the VM as it cannot find the corresponding template.

      EXPECTED BEHAVIOR
      ==================
      Cloud platform should throw some warning message while the template is deleted if that template is being used by existing / running VM's

      ACTUAL BEHAVIOR
      ==================
      Cloud platform does not throw as waring etc.

      Attachments

        Activity

          People

            priyank Priyank Parihar
            priyank Priyank Parihar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: