[ 
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)

Reply via email to