[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


rhtyd commented on issue #793: CLOUDSTACK-8827: Move the VM snapshots stuck in 
transitional states to stable states during managment server restart
URL: https://github.com/apache/cloudstack/pull/793#issuecomment-350786746
 
 
   @anshul1886 is this still relevant, if so please fix conflicts and rebase 
against latest master?


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


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user blueorangutan commented on the issue:

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


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user rhtyd commented on the issue:

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


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user anshul1886 commented on the issue:

https://github.com/apache/cloudstack/pull/793
  
@koushik-das @sateesh-chodapuneedi @ramkatru @karuturi @rhtyd  Regarding 
unit tests, I can't see any useful tests can be written here which I have 
already specified the reason for. Also we have already lot of unit tests which 
are wasting time to fix. Every now and then I am coming across unit tests which 
are not written in proper way and leads to waste of effort. As far as my 
understanding of unit test goes they are to reduce effort not increase. One 
example is in this PR's last jenkins run. That build was failed because one 
test is trying to download/copy file and that failed. As per my understanding 
unit tests should not do any thing which are dependent on external environments 
failure. As those kind of failures are bound to happen. As when those happen we 
have to go and check why that is failed wasting some time to understand. So 
ultimately we are wasting lot of effort currently because of tests not properly 
written.


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user anshul1886 commented on the issue:

https://github.com/apache/cloudstack/pull/793
  
@rhtyd Rebased the branch to latest master.


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user anshul1886 commented on the issue:

https://github.com/apache/cloudstack/pull/793
  
@serg38 That case is already handled. Issue arises if management server 
goes down then we didn't get chance to clean things up.


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user anshul1886 closed the pull request at:

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


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


GitHub user anshul1886 reopened a pull request:

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

CLOUDSTACK-8827: Move the VM snapshots stuck in transitional states to 
stable states during managment server restart

i.e. If snapshot in creating state move it to Error state and if it is in 
reverting state move it to Ready state.

Manual tests performed

Take VM snapshot of VM
stop the management server
Verify in DB that VM snapshot is in  creating state
Start the management server
Verify that snapshot moves to ERROR state.


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

$ git pull https://github.com/anshul1886/cloudstack-1 CLOUDSTACK-8827

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

https://github.com/apache/cloudstack/pull/793.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 #793


commit 656e855792737318b7bb5c84eea7a2a30eb6ad71
Author: Anshul Gangwar 
Date:   2015-09-09T08:51:15Z

CLOUDSTACK-8827: Move the VM snapshots stuck in transitional states to 
stable state during managment server restart
i.e. If snapshot in creating state move it to Error state and if it is in 
reverting state move it to Ready state.




> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user serg38 commented on the issue:

https://github.com/apache/cloudstack/pull/793
  
@anshul1886 I am curious if there is a way to cancel stuck vmsnapshot jobs 
without restarting management server. E.g. VM deployment go to error start upon 
any failure in the process.


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user cloudmonger commented on the issue:

https://github.com/apache/cloudstack/pull/793
  
### ACS CI BVT Run
 **Sumarry:**
 Build Number 436
 Hypervisor xenserver
 NetworkType Advanced
 Passed=103
 Failed=2
 Skipped=7

_Link to logs Folder (search by build_no):_ 
https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0


**Failed tests:**
* test_non_contigiousvlan.py

 * test_extendPhysicalNetworkVlan Failed

* test_routers_network_ops.py

 * test_01_isolate_network_FW_PF_default_routes_egress_true Failed


**Skipped tests:**
test_01_test_vm_volume_snapshot
test_vm_nic_adapter_vmxnet3
test_static_role_account_acls
test_11_ss_nfs_version_on_ssvm
test_nested_virtualization_vmware
test_3d_gpu_support
test_deploy_vgpu_enabled_vm

**Passed test suits:**
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_service_offerings.py
test_routers_iptables_default_policy.py
test_loadbalance.py
test_routers.py
test_reset_vm_on_reboot.py
test_deploy_vms_with_varied_deploymentplanners.py
test_network.py
test_router_dns.py
test_login.py
test_deploy_vm_iso.py
test_list_ids_parameter.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_regions.py
test_affinity_groups.py
test_network_acl.py
test_pvlan.py
test_volumes.py
test_nic.py
test_deploy_vm_root_resize.py
test_resource_detail.py
test_secondary_storage.py
test_vm_life_cycle.py
test_disk_offerings.py


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2016-06-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user anshul1886 commented on the issue:

https://github.com/apache/cloudstack/pull/793
  
### ACS CI BVT Run
 **Sumarry:**
 Build Number 129
 Hypervisor xenserver
 NetworkType Advanced
 Passed=73
 Failed=0
 Skipped=3

_Link to logs Folder (search by build_no):_ 
https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0


**Failed tests:**

**Skipped tests:**
test_vm_nic_adapter_vmxnet3
test_static_role_account_acls
test_deploy_vgpu_enabled_vm

**Passed test suits:**
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_vpc_vpn.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_service_offerings.py
test_routers_iptables_default_policy.py
test_routers.py
test_reset_vm_on_reboot.py
test_snapshots.py
test_deploy_vms_with_varied_deploymentplanners.py
test_login.py
test_list_ids_parameter.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_regions.py
test_affinity_groups.py
test_network_acl.py
test_pvlan.py
test_volumes.py
test_nic.py
test_deploy_vm_root_resize.py
test_resource_detail.py
test_secondary_storage.py
test_vm_life_cycle.py
test_disk_offerings.py


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2016-05-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/793#issuecomment-216188660
  
@anshul1886 please rebase against latest master and push -f, update on 
status of your PR

Can you add unit test for the changes, thanks.


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: Future
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

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

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user bhaisaab commented on the pull request:

https://github.com/apache/cloudstack/pull/793#issuecomment-175666104
  
@anshul1886 ping


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.1
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2015-09-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user anshul1886 commented on the pull request:

https://github.com/apache/cloudstack/pull/793#issuecomment-143647389
  
Rebased the PR to current master.

Regarding unit tests, method doesn't have input or output as a unit. It has 
output only in terms of DB updation so for me useful unit tests for these 
methods can not be written.


http://www.petrikainulainen.net/programming/testing/writing-tests-for-data-access-code-unit-tests-are-waste/



> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.0
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2015-09-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/793#issuecomment-143590468
  
@anshul1886 Any update on this?


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.0
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2015-09-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user karuturi commented on the pull request:

https://github.com/apache/cloudstack/pull/793#issuecomment-140003171
  
@anshul1886 I do not agree to your statement and hence I already tried to 
explain what you can test in this piece of code. If you still dont get it(or 
dont want to understand it) I cannot explain. 
 I really dont understand why you dont see a value in unittests. I dont 
want to explain the benefits of unit testing here (I neither have time nor do I 
have belief that you will understand). 

Please add a marvin test on what you are achieving by this change. As much 
as possible, we need an automated way to test new code. 

Also, add information what tests you already performed to ensure the code 
works.


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.0
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2015-09-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user anshul1886 commented on the pull request:

https://github.com/apache/cloudstack/pull/793#issuecomment-139989420
  
@karuturi I don't get what will be validate by adding above kind of tests 
other than what I have mentioned in my previous comment.


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.0
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2015-09-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


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

https://github.com/apache/cloudstack/pull/793#discussion_r39367811
  
--- Diff: server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java ---
@@ -1046,4 +1046,51 @@ private VmWorkJobVO createPlaceHolderWork(long 
instanceId) {
 
 return workJob;
 }
+
+@Override
+public void cleanupVmSnapshotJobs(){
+List jobs = 
_jobMgr.findFailureAsyncJobs(VmWorkCreateVMSnapshot.class.getName(), 
VmWorkRevertToVMSnapshot.class.getName());
+
+for (AsyncJobVO job : jobs) {
+try {
+if 
(job.getCmd().equalsIgnoreCase(VmWorkCreateVMSnapshot.class.getName())) {
+VmWorkCreateVMSnapshot work = 
VmWorkSerializer.deserialize(VmWorkCreateVMSnapshot.class, job.getCmdInfo());
+cleanupVmSnapshotCreateFailure(work.getVmSnapshotId());
+} else 
if(job.getCmd().equalsIgnoreCase(VmWorkRevertToVMSnapshot.class.getName())) {
+VmWorkRevertToVMSnapshot work = 
VmWorkSerializer.deserialize(VmWorkRevertToVMSnapshot.class, job.getCmdInfo());
+cleanupVmSnapshotRevertFailure(work.getVmSnapshotId());
+}
+} catch (Exception e) {
--- End diff --

Basically I don't care about specific exception I am getting here and in 
any case of exception I will continue. That's why I am catching generic 
exception and logging the specific exception in logs for debugging purposes. 


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.0
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2015-09-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user karuturi commented on the pull request:

https://github.com/apache/cloudstack/pull/793#issuecomment-139980724
  
you are decreasing the code coverage with these changes. especially with 
interface changes and new methods, I think unittests should be there.

This is not the final state of this code. It will go through multiple 
iterations with different developers touching it and there should be a check 
that the code you have written behaves in the expected way even after those 
changes.

for unittests, you could mock jobMgr to return failed jobs with 
snapshots(and some other jobs as well) in different states and then assert what 
you are expecting the code to do actually happens. There can be some cases 
where the deserialization might fail etc. you could test those cases as well. 

For example, the current code will fail with NPE if 
jobMgr.findFailureAsyncJobs returns null. I dont know if it can, there is not 
javadoc describing its return value. It will be good to write a unit test for 
this case and assert that you code doesnt cause system error if that happens.

You could also add marvin test case to cover this scenario. Basically, 
there should be an automated way to test the code you have written.

Also, please post the test results(manual or automatic) you already 
executed.



> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.0
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2015-09-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


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

https://github.com/apache/cloudstack/pull/793#discussion_r39365314
  
--- Diff: server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java ---
@@ -1046,4 +1046,51 @@ private VmWorkJobVO createPlaceHolderWork(long 
instanceId) {
 
 return workJob;
 }
+
+@Override
+public void cleanupVmSnapshotJobs(){
+List jobs = 
_jobMgr.findFailureAsyncJobs(VmWorkCreateVMSnapshot.class.getName(), 
VmWorkRevertToVMSnapshot.class.getName());
+
+for (AsyncJobVO job : jobs) {
+try {
+if 
(job.getCmd().equalsIgnoreCase(VmWorkCreateVMSnapshot.class.getName())) {
+VmWorkCreateVMSnapshot work = 
VmWorkSerializer.deserialize(VmWorkCreateVMSnapshot.class, job.getCmdInfo());
+cleanupVmSnapshotCreateFailure(work.getVmSnapshotId());
+} else 
if(job.getCmd().equalsIgnoreCase(VmWorkRevertToVMSnapshot.class.getName())) {
+VmWorkRevertToVMSnapshot work = 
VmWorkSerializer.deserialize(VmWorkRevertToVMSnapshot.class, job.getCmdInfo());
+cleanupVmSnapshotRevertFailure(work.getVmSnapshotId());
+}
+} catch (Exception e) {
--- End diff --

what exception do you expect here? Is it the deserialization failure or any 
thing else? Can you catch specific exceptions?


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.0
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2015-09-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user anshul1886 commented on the pull request:

https://github.com/apache/cloudstack/pull/793#issuecomment-139975023
  
@bhaisaab Here we are just accessing and updating the DB and not much logic 
is involved. So I can think of tests which does data validation of DB which 
will basically mean we are testing different unit then the unit which we have 
at hand. So to me unit tests will not add any value here.


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.0
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2015-09-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


Github user bhaisaab commented on the pull request:

https://github.com/apache/cloudstack/pull/793#issuecomment-139524505
  
@anshul1886 LGTM, can you add some unit test for the new methods?


> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.0
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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


[jira] [Commented] (CLOUDSTACK-8827) VM snapshot stuck in Creating state when management service is stopped

2015-09-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8827:


GitHub user anshul1886 opened a pull request:

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

CLOUDSTACK-8827: Move the VM snapshots stuck in transitional states to 
stable states during managment server restart


i.e. If snapshot in creating state move it to Error state and if it is in 
reverting state move it to Ready state.

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

$ git pull https://github.com/anshul1886/cloudstack-1 CLOUDSTACK-8827

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

https://github.com/apache/cloudstack/pull/793.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 #793


commit c19bdcaf0847d23e3a5ee1daf374bf9173d86290
Author: Anshul Gangwar 
Date:   2015-09-09T08:51:15Z

CLOUDSTACK-8827: Move the VM snapshots stuck in transitional states to 
stable state during managment server restart
i.e. If snapshot in creating state move it to Error state and if it is in 
reverting state move it to Ready state.




> VM snapshot stuck in Creating state when management service is stopped
> --
>
> Key: CLOUDSTACK-8827
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8827
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
> Fix For: 4.6.0
>
>
> If we stop cloudstack-managment service while a VM snapshot is in progress, 
> the snapshot will be stuck in "Creating" state forever, even after the 
> service is started.
> This will leave the snapshot in unusable state (we can't delete it or it 
> won't go into Error state etc).
> Repro steps:
> ==
> Create an instance.
> Take a VM snapshot and stop the cloudstack-managment service while the 
> snapshot is in progress.
> Check the snapshot state in DB and it will be creating.
> Start the management service and check the snapshot state.
> It will be creating forever.



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