----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/27000/ -----------------------------------------------------------
Review request for cloudstack, anthony xu and Chandan Purushothama. Bugs: CLOUDSTACK-7762 https://issues.apache.org/jira/browse/CLOUDSTACK-7762 Repository: cloudstack-git Description ------- test_02_revert_vm_snapshots in smoke/test_vm_snapshots.py fails in BVT runs with the following exception: 2014-10-20 16:41:00,497 INFO [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-120:ctx-83b738d9 job-459) Add job-459 into job monitoring 2014-10-20 16:41:00,497 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-120:ctx-83b738d9 job-459) Executing AsyncJobVO {id:459, userId: 2, accountId: 2, instanceType: None, instanceId: null, cmd: org.apache.cloudstack.api.command.admin.vmsnapshot.RevertToVMSnapshotCmdByAdmin, cmdInfo: {"response":"json","ctxDetails":" {\"com.cloud.vm.snapshot.VMSnapshot\":\"12280973-a1e4-43e3-80b3-3afacd607909\"} ","cmdEventType":"VMSNAPSHOT.REVERTTO","ctxUserId":"2","httpmethod":"GET","vmsnapshotid":"12280973-a1e4-43e3-80b3-3afacd607909","ctxAccountId":"2","ctxStartEventId":"1406","apiKey":"aJwkScf5ziRwz8gKQ9HB0Ce6hSsTJTUtmUDUQ_U2teV3vVmuLQRLad8xqAgr7CrFOEQbywdVpKSt2yC_ORXLYg","signature":"cYBxgg8eBfktovmCaHYox2xoTE8\u003d"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 11489258594360, completeMsid: null, lastUpdated: null, lastPolled: null, created: null} 2014-10-20 16:41:00,529 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-120:ctx-83b738d9 job-459) Unexpected exception while executing org.apache.cloudstack.api.command.admin.vmsnapshot.RevertToVMSnapshotCmdByAdmin com.cloud.exception.InvalidParameterValueException: VM Snapshot revert not allowed. This will result in VM state change. You can revert running VM to disk and memory type snapshot and stopped VM to disk type snapshot at com.cloud.vm.snapshot.VMSnapshotManagerImpl.revertToSnapshot(VMSnapshotManagerImpl.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) Root Cause : reverting Snapshots is allowed only when there is no vm state change associated with it. Following are the 2 scenarios allowed: 1.Revert a "Running" VM to a "Disk and Memory" Snapshot ( with and without "quiesce" option). 2.Revert a "Stopped" VM to a "Disk " Snapshot ( with and without "quiesce" option). In this test case , we are testing reverting to a Disk " Snapshot. Introduced a Vm stop before performing the revert operation. Diffs ----- test/integration/smoke/test_vm_snapshots.py 131da99 Diff: https://reviews.apache.org/r/27000/diff/ Testing ------- Tested with advanced zone set up with Xenserver hosts: Test to create VM snapshots ... === TestName: test_01_create_vm_snapshots | Status : SUCCESS === ok Test to revert VM snapshots ... === TestName: test_02_revert_vm_snapshots | Status : SUCCESS === ok Test to delete vm snapshots ... === TestName: test_03_delete_vm_snapshots | Status : SUCCESS === ok ---------------------------------------------------------------------- Ran 3 tests in 795.005s OK Thanks, sangeetha hariharan