[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2018-01-03 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310744#comment-16310744
 ] 

ASF subversion and git services commented on CLOUDSTACK-9607:
-

Commit 25b63f5e737aba00067e39ee0003f4b52713d6d6 in cloudstack's branch 
refs/heads/master from Mowgli
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=25b63f5 ]

CLOUDSTACK-9607: Preventing template deletion when template is in use (#1773)

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.

> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310743#comment-16310743
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


rhtyd closed pull request #1773: CLOUDSTACK-9607: Preventing template deletion 
when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
 
b/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
old mode 100644
new mode 100755
index 98d53be836e..95b3059
--- 
a/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
@@ -52,6 +52,9 @@
 @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, 
entityType = ZoneResponse.class, description = "the ID of zone of the template")
 private Long zoneId;
 
+@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, 
required = false, description = "Force delete a template.", since = "4.9+")
+private Boolean forced;
+
 /
 /// Accessors ///
 /
@@ -64,6 +67,9 @@ public Long getZoneId() {
 return zoneId;
 }
 
+public boolean isForced() {
+return (forced != null) ? forced : true;
+}
 /
 /// API Implementation///
 /
diff --git a/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java 
b/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java
old mode 100644
new mode 100755
index 3c5024b833e..69efea42df9
--- a/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java
+++ b/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java
@@ -53,6 +53,14 @@
  */
 List listByPodId(long podId);
 
+/**
+ * Lists non-expunged VMs by  templateId
+ * @param templateId
+ * @return list of VMInstanceVO deployed from the specified template, that 
are not expunged
+ */
+public List listNonExpungedByTemplate(long templateId);
+
+
 /**
  * Lists non-expunged VMs by zone ID and templateId
  * @param zoneId
diff --git a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java 
b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
old mode 100644
new mode 100755
index 7065350a57e..6e97d1275a6
--- a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
@@ -72,6 +72,7 @@
 protected SearchBuilder IdStatesSearch;
 protected SearchBuilder AllFieldsSearch;
 protected SearchBuilder ZoneTemplateNonExpungedSearch;
+protected SearchBuilder TemplateNonExpungedSearch;
 protected SearchBuilder NameLikeSearch;
 protected SearchBuilder StateChangeSearch;
 protected SearchBuilder TransitionSearch;
@@ -165,6 +166,12 @@ protected void init() {
 ZoneTemplateNonExpungedSearch.and("state", 
ZoneTemplateNonExpungedSearch.entity().getState(), Op.NEQ);
 ZoneTemplateNonExpungedSearch.done();
 
+
+TemplateNonExpungedSearch = createSearchBuilder();
+TemplateNonExpungedSearch.and("template", 
TemplateNonExpungedSearch.entity().getTemplateId(), Op.EQ);
+TemplateNonExpungedSearch.and("state", 
TemplateNonExpungedSearch.entity().getState(), Op.NEQ);
+TemplateNonExpungedSearch.done();
+
 NameLikeSearch = createSearchBuilder();
 NameLikeSearch.and("name", NameLikeSearch.entity().getHostName(), 
Op.LIKE);
 NameLikeSearch.done();
@@ -334,6 +341,15 @@ protected void init() {
 return listBy(sc);
 }
 
+@Override
+public List listNonExpungedByTemplate(long templateId) {
+SearchCriteria sc = TemplateNonExpungedSearch.create();
+
+sc.setParameters("template", templateId);
+sc.setParameters("state", State.Expunging);
+return listBy(sc);
+}
+
 @Override
 public List listNonExpungedByZoneAndTemplate(long zoneId, 
long templateId) {
 SearchCriteria sc = 
ZoneTemplateNonExpungedSearch.create();
diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java 
b/server/src/com/cloud/template/TemplateManagerImpl.java
old mode 100644
new mode 100755
index f6494c3b77e..41f11af68d0
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -38,6 +38,7 @@
 import com.cloud.utils.DateUtil;
 

[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310742#comment-16310742
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


rhtyd commented on issue #1773: CLOUDSTACK-9607: Preventing template deletion 
when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-35520
 
 
   Merging this based on code review lgtms and test results.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310066#comment-16310066
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


blueorangutan commented on issue #1773: CLOUDSTACK-9607: Preventing template 
deletion when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-355094518
 
 
   Trillian test result (tid-1983)
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 37390 seconds
   Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1773-t1983-kvm-centos7.zip
   Intermitten failure detected: 
/marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
   Smoke tests completed. 66 look OK, 0 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309293#comment-16309293
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


blueorangutan commented on issue #1773: CLOUDSTACK-9607: Preventing template 
deletion when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-354958497
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been 
kicked to run smoke tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309289#comment-16309289
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


rhtyd commented on issue #1773: CLOUDSTACK-9607: Preventing template deletion 
when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-354958330
 
 
   @blueorangutan test


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16308051#comment-16308051
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


blueorangutan commented on issue #1773: CLOUDSTACK-9607: Preventing template 
deletion when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-354767129
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1540


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16307984#comment-16307984
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


rhtyd commented on issue #1773: CLOUDSTACK-9607: Preventing template deletion 
when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-354760691
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16307985#comment-16307985
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


blueorangutan commented on issue #1773: CLOUDSTACK-9607: Preventing template 
deletion when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-354760722
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-12-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16305361#comment-16305361
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


blueorangutan commented on issue #1773: CLOUDSTACK-9607: Preventing template 
deletion when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-354274885
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1514


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-12-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16305263#comment-16305263
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


blueorangutan commented on issue #1773: CLOUDSTACK-9607: Preventing template 
deletion when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-354262259
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-12-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16305258#comment-16305258
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


rhtyd commented on issue #1773: CLOUDSTACK-9607: Preventing template deletion 
when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-354262107
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-12-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16303694#comment-16303694
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


blueorangutan commented on issue #1773: CLOUDSTACK-9607: Preventing template 
deletion when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-353946168
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1498


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-12-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16303591#comment-16303591
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


blueorangutan commented on issue #1773: CLOUDSTACK-9607: Preventing template 
deletion when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-353930668
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-12-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16303589#comment-16303589
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


rhtyd commented on issue #1773: CLOUDSTACK-9607: Preventing template deletion 
when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-353930588
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296158#comment-16296158
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


rhtyd commented on issue #1773: CLOUDSTACK-9607: Preventing template deletion 
when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-352632889
 
 
   @priyankparihar fix conflicts please. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-11-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16264792#comment-16264792
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


blueorangutan commented on issue #1773: CLOUDSTACK-9607: Preventing template 
deletion when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-346700119
 
 
   Packaging result: ✖centos6 ✖centos7 ✖debian. JID-1292


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-11-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16264768#comment-16264768
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


blueorangutan commented on issue #1773: CLOUDSTACK-9607: Preventing template 
deletion when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-346697655
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-11-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16264767#comment-16264767
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


rhtyd commented on issue #1773: CLOUDSTACK-9607: Preventing template deletion 
when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-346697635
 
 
   @blueorangutan package 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-03-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15893746#comment-15893746
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user priyankparihar commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@karuturi This seems to be ready for merge (tag:mergeready).
It has 3 LGTMs and tests are passed. 


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-03-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15889857#comment-15889857
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user ustcweizhou commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
LGTM


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1546#comment-1546
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user serg38 commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Thanks @priyankparihar . We verified in our environment that all is working 
fine  including UI part.
LGTM
I think this one is 
tag:mergeready



> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15888411#comment-15888411
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user priyankparihar commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Hi @koushik-das, @borisroman,  @serg38,  @jburwell and @ustcweizhou
Things are modified and added according to your suggestions. I think, Now 
LGTM comment should be provided.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15879343#comment-15879343
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Trillian test result (tid-886)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 29913 seconds
Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1773-t886-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: 
/marvin/tests/smoke/test_routers_iptables_default_policy.py
Intermitten failure detected: /marvin/tests/smoke/test_snapshots.py
Test completed. 47 look ok, 2 have error(s)


Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_04_rvpc_privategw_static_routes | `Failure` | 356.24 | 
test_privategw_acl.py
test_02_list_snapshots_with_removed_data_store | `Error` | 0.04 | 
test_snapshots.py
test_01_vpc_site2site_vpn | Success | 145.04 | test_vpc_vpn.py
test_01_vpc_remote_access_vpn | Success | 56.20 | test_vpc_vpn.py
test_01_redundant_vpc_site2site_vpn | Success | 235.76 | test_vpc_vpn.py
test_02_VPC_default_routes | Success | 262.29 | test_vpc_router_nics.py
test_01_VPC_nics_after_destroy | Success | 506.28 | test_vpc_router_nics.py
test_05_rvpc_multi_tiers | Success | 481.20 | test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics | Success | 1398.43 | 
test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | 
Success | 543.40 | test_vpc_redundant.py
test_02_redundant_VPC_default_routes | Success | 744.83 | 
test_vpc_redundant.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | Success | 1265.04 | 
test_vpc_redundant.py
test_09_delete_detached_volume | Success | 156.78 | test_volumes.py
test_08_resize_volume | Success | 156.51 | test_volumes.py
test_07_resize_fail | Success | 156.53 | test_volumes.py
test_06_download_detached_volume | Success | 156.51 | test_volumes.py
test_05_detach_volume | Success | 155.88 | test_volumes.py
test_04_delete_attached_volume | Success | 151.74 | test_volumes.py
test_03_download_attached_volume | Success | 156.96 | test_volumes.py
test_02_attach_volume | Success | 124.66 | test_volumes.py
test_01_create_volume | Success | 728.69 | test_volumes.py
test_03_delete_vm_snapshots | Success | 275.27 | test_vm_snapshots.py
test_02_revert_vm_snapshots | Success | 100.76 | test_vm_snapshots.py
test_01_create_vm_snapshots | Success | 161.93 | test_vm_snapshots.py
test_deploy_vm_multiple | Success | 268.32 | test_vm_life_cycle.py
test_deploy_vm | Success | 0.04 | test_vm_life_cycle.py
test_advZoneVirtualRouter | Success | 0.07 | test_vm_life_cycle.py
test_10_attachAndDetach_iso | Success | 26.64 | test_vm_life_cycle.py
test_09_expunge_vm | Success | 125.19 | test_vm_life_cycle.py
test_08_migrate_vm | Success | 56.01 | test_vm_life_cycle.py
test_07_restore_vm | Success | 0.13 | test_vm_life_cycle.py
test_06_destroy_vm | Success | 125.88 | test_vm_life_cycle.py
test_03_reboot_vm | Success | 125.92 | test_vm_life_cycle.py
test_02_start_vm | Success | 10.17 | test_vm_life_cycle.py
test_01_stop_vm | Success | 40.34 | test_vm_life_cycle.py
test_CreateTemplateWithDuplicateName | Success | 45.48 | test_templates.py
test_08_list_system_templates | Success | 0.03 | test_templates.py
test_07_list_public_templates | Success | 0.04 | test_templates.py
test_05_template_permissions | Success | 0.06 | test_templates.py
test_04_extract_template | Success | 5.18 | test_templates.py
test_03_delete_template | Success | 5.11 | test_templates.py
test_02_edit_template | Success | 90.10 | test_templates.py
test_01_create_template | Success | 55.65 | test_templates.py
test_10_destroy_cpvm | Success | 161.67 | test_ssvm.py
test_09_destroy_ssvm | Success | 133.15 | test_ssvm.py
test_08_reboot_cpvm | Success | 131.71 | test_ssvm.py
test_07_reboot_ssvm | Success | 133.65 | test_ssvm.py
test_06_stop_cpvm | Success | 131.75 | test_ssvm.py
test_05_stop_ssvm | Success | 163.95 | test_ssvm.py
test_04_cpvm_internals | Success | 1.25 | test_ssvm.py
test_03_ssvm_internals | Success | 3.40 | test_ssvm.py
test_02_list_cpvm_vm | Success | 0.12 | test_ssvm.py
test_01_list_sec_storage_vm | Success | 0.13 | test_ssvm.py
test_01_snapshot_root_disk | Success | 11.11 | test_snapshots.py
test_04_change_offering_small | Success | 239.68 | test_service_offerings.py
test_03_delete_service_offering | Success | 0.04 | test_service_offerings.py
test_02_edit_service_offering | Success | 0.07 | 

[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878360#comment-15878360
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user priyankparihar commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@borisroman and @serg38 Sure.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878311#comment-15878311
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user serg38 commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@priyankparihar Well. API use cases can be recoded but not UI. Presently we 
can delete templates in UI even with active VMs. With your changes there will 
be no recourse.  An easy option will be to   add a checkbox 'Forced' into 
Delete template confirmation dialog. I am -1 until UI supports deletion of 
templates with active VMs.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878290#comment-15878290
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user priyankparihar commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@serg38  
 
>A part is still missing that will use forced option in UI but give a user 
option to cancel deletion if active VMs exist.

I think it will be good to take all additional changes in separate PR. 


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878247#comment-15878247
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user serg38 commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@priyankparihar A part is still missing  that will use forced option in UI 
but give a user option to cancel deletion if active VMs exist


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878233#comment-15878233
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has 
been kicked to run smoke tests


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878232#comment-15878232
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user borisstoyanov commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@blueorangutan test


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878231#comment-15878231
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-528


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878192#comment-15878192
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep 
you posted as I make progress.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878188#comment-15878188
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user borisstoyanov commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@blueorangutan package


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878178#comment-15878178
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user priyankparihar commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Hi @serg38 @ustcweizhou @koushik-das @jburwell @borisstoyanov ,
Thanks for valuable insight. Code is modified according to your suggestion. 
:)


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878017#comment-15878017
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user koushik-das commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
I think changing the default API behaviour for fixing a bug should be ok as 
long as documented properly. Also in this case the deletion criteria is made 
more strict, so there is no unwanted data loss.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-21 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876737#comment-15876737
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user serg38 commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@jburwell That was default behavior for few years to allow deletion of the 
template even if active VMs exist. Deletion of the template on secondary 
doesn't remove the template copy on primary storage so all existing VM function 
work just fine. 
From my prospective if we allow forced deletion from the UI I am fine with 
switching default to forced=no and documenting it in Release Notes. 


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-21 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876613#comment-15876613
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Trillian test result (tid-875)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 27492 seconds
Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1773-t875-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_snapshots.py
Test completed. 47 look ok, 2 have error(s)


Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_04_rvpc_privategw_static_routes | `Failure` | 325.34 | 
test_privategw_acl.py
test_02_list_snapshots_with_removed_data_store | `Error` | 0.04 | 
test_snapshots.py
test_01_vpc_site2site_vpn | Success | 149.78 | test_vpc_vpn.py
test_01_vpc_remote_access_vpn | Success | 66.19 | test_vpc_vpn.py
test_01_redundant_vpc_site2site_vpn | Success | 226.19 | test_vpc_vpn.py
test_02_VPC_default_routes | Success | 259.80 | test_vpc_router_nics.py
test_01_VPC_nics_after_destroy | Success | 518.66 | test_vpc_router_nics.py
test_05_rvpc_multi_tiers | Success | 510.72 | test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics | Success | 1302.14 | 
test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | 
Success | 533.12 | test_vpc_redundant.py
test_02_redundant_VPC_default_routes | Success | 754.46 | 
test_vpc_redundant.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | Success | 1284.66 | 
test_vpc_redundant.py
test_09_delete_detached_volume | Success | 151.34 | test_volumes.py
test_08_resize_volume | Success | 156.35 | test_volumes.py
test_07_resize_fail | Success | 156.41 | test_volumes.py
test_06_download_detached_volume | Success | 156.27 | test_volumes.py
test_05_detach_volume | Success | 155.83 | test_volumes.py
test_04_delete_attached_volume | Success | 146.14 | test_volumes.py
test_03_download_attached_volume | Success | 156.23 | test_volumes.py
test_02_attach_volume | Success | 124.17 | test_volumes.py
test_01_create_volume | Success | 711.19 | test_volumes.py
test_03_delete_vm_snapshots | Success | 275.21 | test_vm_snapshots.py
test_02_revert_vm_snapshots | Success | 95.72 | test_vm_snapshots.py
test_01_create_vm_snapshots | Success | 163.70 | test_vm_snapshots.py
test_deploy_vm_multiple | Success | 272.73 | test_vm_life_cycle.py
test_deploy_vm | Success | 0.03 | test_vm_life_cycle.py
test_advZoneVirtualRouter | Success | 0.02 | test_vm_life_cycle.py
test_10_attachAndDetach_iso | Success | 26.62 | test_vm_life_cycle.py
test_09_expunge_vm | Success | 125.31 | test_vm_life_cycle.py
test_08_migrate_vm | Success | 35.84 | test_vm_life_cycle.py
test_07_restore_vm | Success | 0.14 | test_vm_life_cycle.py
test_06_destroy_vm | Success | 125.82 | test_vm_life_cycle.py
test_03_reboot_vm | Success | 125.85 | test_vm_life_cycle.py
test_02_start_vm | Success | 10.16 | test_vm_life_cycle.py
test_01_stop_vm | Success | 40.29 | test_vm_life_cycle.py
test_CreateTemplateWithDuplicateName | Success | 35.39 | test_templates.py
test_08_list_system_templates | Success | 0.03 | test_templates.py
test_07_list_public_templates | Success | 0.04 | test_templates.py
test_05_template_permissions | Success | 0.06 | test_templates.py
test_04_extract_template | Success | 5.14 | test_templates.py
test_03_delete_template | Success | 5.10 | test_templates.py
test_02_edit_template | Success | 90.18 | test_templates.py
test_01_create_template | Success | 35.38 | test_templates.py
test_10_destroy_cpvm | Success | 136.43 | test_ssvm.py
test_09_destroy_ssvm | Success | 163.10 | test_ssvm.py
test_08_reboot_cpvm | Success | 101.51 | test_ssvm.py
test_07_reboot_ssvm | Success | 133.59 | test_ssvm.py
test_06_stop_cpvm | Success | 131.69 | test_ssvm.py
test_05_stop_ssvm | Success | 133.64 | test_ssvm.py
test_04_cpvm_internals | Success | 1.39 | test_ssvm.py
test_03_ssvm_internals | Success | 3.76 | test_ssvm.py
test_02_list_cpvm_vm | Success | 0.12 | test_ssvm.py
test_01_list_sec_storage_vm | Success | 0.12 | test_ssvm.py
test_01_snapshot_root_disk | Success | 11.11 | test_snapshots.py
test_04_change_offering_small | Success | 239.57 | test_service_offerings.py
test_03_delete_service_offering | Success | 0.04 | test_service_offerings.py
test_02_edit_service_offering | Success | 0.05 | test_service_offerings.py
test_01_create_service_offering | Success | 0.10 | test_service_offerings.py

[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-21 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876604#comment-15876604
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Trillian test result (tid-874)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34092 seconds
Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1773-t874-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_snapshots.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Test completed. 47 look ok, 2 have error(s)


Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_04_rvpc_privategw_static_routes | `Failure` | 355.70 | 
test_privategw_acl.py
test_02_list_snapshots_with_removed_data_store | `Error` | 0.04 | 
test_snapshots.py
test_01_vpc_site2site_vpn | Success | 160.18 | test_vpc_vpn.py
test_01_vpc_remote_access_vpn | Success | 71.18 | test_vpc_vpn.py
test_01_redundant_vpc_site2site_vpn | Success | 246.46 | test_vpc_vpn.py
test_02_VPC_default_routes | Success | 289.60 | test_vpc_router_nics.py
test_01_VPC_nics_after_destroy | Success | 533.70 | test_vpc_router_nics.py
test_05_rvpc_multi_tiers | Success | 512.87 | test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics | Success | 1406.40 | 
test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | 
Success | 544.89 | test_vpc_redundant.py
test_02_redundant_VPC_default_routes | Success | 749.53 | 
test_vpc_redundant.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | Success | 1290.57 | 
test_vpc_redundant.py
test_09_delete_detached_volume | Success | 156.51 | test_volumes.py
test_08_resize_volume | Success | 156.44 | test_volumes.py
test_07_resize_fail | Success | 161.58 | test_volumes.py
test_06_download_detached_volume | Success | 156.31 | test_volumes.py
test_05_detach_volume | Success | 155.74 | test_volumes.py
test_04_delete_attached_volume | Success | 151.24 | test_volumes.py
test_03_download_attached_volume | Success | 156.34 | test_volumes.py
test_02_attach_volume | Success | 95.61 | test_volumes.py
test_01_create_volume | Success | 716.35 | test_volumes.py
test_03_delete_vm_snapshots | Success | 275.22 | test_vm_snapshots.py
test_02_revert_vm_snapshots | Success | 100.67 | test_vm_snapshots.py
test_01_create_vm_snapshots | Success | 158.69 | test_vm_snapshots.py
test_deploy_vm_multiple | Success | 257.71 | test_vm_life_cycle.py
test_deploy_vm | Success | 0.03 | test_vm_life_cycle.py
test_advZoneVirtualRouter | Success | 0.02 | test_vm_life_cycle.py
test_10_attachAndDetach_iso | Success | 26.73 | test_vm_life_cycle.py
test_09_expunge_vm | Success | 125.25 | test_vm_life_cycle.py
test_08_migrate_vm | Success | 40.98 | test_vm_life_cycle.py
test_07_restore_vm | Success | 0.10 | test_vm_life_cycle.py
test_06_destroy_vm | Success | 125.82 | test_vm_life_cycle.py
test_03_reboot_vm | Success | 125.82 | test_vm_life_cycle.py
test_02_start_vm | Success | 10.39 | test_vm_life_cycle.py
test_01_stop_vm | Success | 40.34 | test_vm_life_cycle.py
test_CreateTemplateWithDuplicateName | Success | 60.60 | test_templates.py
test_08_list_system_templates | Success | 0.03 | test_templates.py
test_07_list_public_templates | Success | 0.04 | test_templates.py
test_05_template_permissions | Success | 0.06 | test_templates.py
test_04_extract_template | Success | 5.17 | test_templates.py
test_03_delete_template | Success | 5.11 | test_templates.py
test_02_edit_template | Success | 90.16 | test_templates.py
test_01_create_template | Success | 50.53 | test_templates.py
test_10_destroy_cpvm | Success | 166.62 | test_ssvm.py
test_09_destroy_ssvm | Success | 168.72 | test_ssvm.py
test_08_reboot_cpvm | Success | 101.61 | test_ssvm.py
test_07_reboot_ssvm | Success | 133.52 | test_ssvm.py
test_06_stop_cpvm | Success | 131.71 | test_ssvm.py
test_05_stop_ssvm | Success | 133.80 | test_ssvm.py
test_04_cpvm_internals | Success | 1.19 | test_ssvm.py
test_03_ssvm_internals | Success | 3.36 | test_ssvm.py
test_02_list_cpvm_vm | Success | 0.13 | test_ssvm.py
test_01_list_sec_storage_vm | Success | 0.13 | test_ssvm.py
test_01_snapshot_root_disk | Success | 11.11 | test_snapshots.py
test_04_change_offering_small | Success | 239.70 | test_service_offerings.py
test_03_delete_service_offering | Success | 0.04 | test_service_offerings.py
test_02_edit_service_offering | Success | 0.05 | test_service_offerings.py

[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-21 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876010#comment-15876010
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user jburwell commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@priyankparihar I agree with @ustcweizhou regarding the default value of 
`forced` in terms of backwards compatibility.

Also, why we permit deletion of a template when it is associated with one 
or more active volumes?  It seems like we are giving the user the means to 
corrupt their system.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-21 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875574#comment-15875574
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user priyankparihar commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Hi @koushik-das  @rajesh-battala ,

>The default value of forced is false, might cause issue on backwards 
compatibility.

Should i make changes according to @serg38 and @ustcweizhou suggestion ? ( 
or current code LGT you, Please notify. )   


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875019#comment-15875019
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has 
been kicked to run smoke tests


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875017#comment-15875017
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user borisstoyanov commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@blueorangutan test


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875008#comment-15875008
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-515


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874988#comment-15874988
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep 
you posted as I make progress.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874985#comment-15874985
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user borisstoyanov commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@blueorangutan package


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874755#comment-15874755
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user serg38 commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@ustcweizhou @priyankparihar @borisstoyanov The default behavior was always 
equivalent of force=true. We seem to agree that the UI behavior should remain 
forced=true but with extra warning. We can either change default  confirmation 
"Please confirm that you want to delete this template." e.g. to "Please confirm 
that you want to delete this template.  Features that depends on the template 
presence might no longer work". But I think the better option will be to have 
response tag in listTemplate call to indicate if active VMs exists or not. Then 
warning can be given only to such templates.
As for API side we might still change default behavior but we need to 
explicitly document it in Release Notes so users can get prepared and change 
instances of deleteTemplate execution to use forced=true or not as needed.



> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874526#comment-15874526
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user ustcweizhou commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@priyankparihar the default behaviour is forced=true from few years ago. If 
the template is removed, the user vm is not impacted which is very good. There 
is indeed an issue when reinstall the vm. For you it could be a very risky 
issue. For us at least it is not a big issue as we provide some other templates 
for vm reinstallation.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874329#comment-15874329
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user priyankparihar commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Hi @ustcweizhou,
By default enabling force option(force=true) will be very risky, same is 
mentioned by @borisstoyanov.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874272#comment-15874272
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user priyankparihar commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Hi @ustcweizhou @serg38 and @borisroman,
Thanks for your valuable suggestions. 

> @ustcweizhou  the default value of forced is false, might cause issue on 
backwards compatibility.

If the force option is enabled by default API call will go and delete the 
all selected templates without any warning so default value of forced is kept 
'false'.

> @ustcweizhou In the vm installation, as the template is still in use , so 
we can find it in the storage pool where the root disk is located. We need to 
improve it by using the existing template image on storage pool, or copying the 
template from storage pool where the root disk is located to another new 
storage pool (pool of allocated new root disk).

I think it will be good to take it in separate PR. 


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874201#comment-15874201
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user borisstoyanov commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
I agree with @serg38 and @ustcweizhou that upon deletion user should be 
displayed with an yes/no dialogue if there are deployed VMs, but a lot of CS 
user aren't using UI, but just the APIs. If the force option is enabled by 
default I guess the API call will go and delete the all selected templates 
without any warning. I think the `force=true` should only stay with the UI 
call. 


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872394#comment-15872394
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user ustcweizhou commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@serg38 yes, your approach is the best solution for now.

By the way, I've implemented the copy of template between storage pools on 
kvm/nfs in our branch, not implemented for other situations yet. The missing 
template also impact storage migration (live/offline).


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872181#comment-15872181
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user serg38 commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@priyankparihar @ustcweizhou There seems to be just one case where it will 
affect resetVM operations. If template is deleted and root disk is migrated to 
another PS where there is no template copy at destination and the reset VM wont 
work. It is probably not easy to implement copying a base template from on PS 
to another as a part of migrate volume command. I think the right approach 
would be just to have a check in resetVM and if no local template copy is 
available then find another PS with template copy and reset root disk over 
there or if at that point there is no PS with template copy  gracefully error 
out resetVM command.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872087#comment-15872087
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user serg38 commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@priyankparihar I agree with @ustcweizhou . Default behavior should remain 
forced. And in this case Web UI we should give a warning with "yes and no" if 
template has deployed VM so users can cancel the operation if they need to.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15871751#comment-15871751
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user priyankparihar commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Hi @jburwell , 
Would like to add something on @ustcweizhou comment ?


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15871745#comment-15871745
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user ustcweizhou commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
@priyankparihar 
1. the file change from 10644 to 10755 is not necessary
2. the default value of forced is false, might cause issue on backwards 
compatibility
3. In the vm installation, as the template is still in use , so we can find 
it in the storage pool where the root disk is located. We need to improve it by 
using the existing template image on storage pool, or copying the template from 
storage pool where the root disk is located to another new storage pool (pool 
of allocated new root disk).


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2017-02-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15871730#comment-15871730
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user priyankparihar commented on the issue:

https://github.com/apache/cloudstack/pull/1773
  
Hi @jburwell ,
Thanks for teaching me something new. Test is also added. 


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2016-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15712395#comment-15712395
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1773#discussion_r90481980
  
--- Diff: 
api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java 
---
@@ -52,6 +52,9 @@
 @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, 
entityType = ZoneResponse.class, description = "the ID of zone of the template")
 private Long zoneId;
 
+@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, 
required = false, description = "Force delete a template.")
--- End diff --

Please add `since` to this annotation to indicate that this parameter is 
available in 4.9+.


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2016-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15712394#comment-15712394
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1773#discussion_r90480678
  
--- Diff: server/src/com/cloud/template/TemplateManagerImpl.java ---
@@ -1176,6 +1176,23 @@ public boolean deleteTemplate(DeleteTemplateCmd cmd) 
{
 throw new InvalidParameterValueException("unable to find 
template with id " + templateId);
 }
 
+List vmInstanceVOList;
+if(cmd.getZoneId() != null) {
+vmInstanceVOList = 
_vmInstanceDao.listNonExpungedByZoneAndTemplate(cmd.getZoneId(), templateId);
+}
+else {
+vmInstanceVOList = 
_vmInstanceDao.listNonExpungedByTemplate(templateId);
+}
+if(!cmd.isForced() && 
CollectionUtils.isNotEmpty(vmInstanceVOList)) {
+StringBuilder s  = new StringBuilder("Unable to delete 
template with id: " + templateId + " because some VM instances are using it. ");
+for (VMInstanceVO elm : vmInstanceVOList) {
+s.append(elm.getInstanceName() + ", ");
+}
+
+s_logger.warn(s.substring(0,s.length()-2));
+throw new 
InvalidParameterValueException(s.substring(0,s.length()-2));
--- End diff --

Lines 1187-1193 should replaced with the following to be DRY and improve 
clarity:
```java
final String message = String.format("Unable to delete template with id: 
%1$s because VM instances: [%2$s] are using it.",  templateId, 
Joiner.on(",").join(vmInstanceVOList));
s_logger.warn(message);
throw new InvalidParameterValueException(message);
```


> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9607) Preventing template deletion when template is in use.

2016-11-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15692876#comment-15692876
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9607:


GitHub user priyankparihar opened a pull request:

https://github.com/apache/cloudstack/pull/1773

CLOUDSTACK-9607: Preventing template deletion when template is in use.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/priyankparihar/cloudstack CLOUDSTACK-9607

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/1773.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1773


commit cd367dc46a2edc9732b08b0117320252394fd33d
Author: Priyank Parihar 
Date:   2016-09-27T04:03:58Z

CLOUDSTACK-9607: Preventing template deletion when template is in use.
Reviewed-by: Koushik Das




> Preventing template deletion when template is in use.
> -
>
> Key: CLOUDSTACK-9607
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9607
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Priyank Parihar
>Assignee: Priyank Parihar
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)