cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudhansu7 <...@git.apache.org>
Subject [GitHub] cloudstack pull request #914: BUG-ID CLOUDSTACK-8939 VM Snapshot size with m...
Date Mon, 05 Dec 2016 06:45:48 GMT
Github user sudhansu7 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/914#discussion_r90809764
  
    --- Diff: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
---
    @@ -3206,25 +3206,33 @@ public long getVMSnapshotChainSize(final Connection conn, final
VolumeObjectTO v
                 }
             }
             if (volumeTo.getVolumeType() == Volume.Type.ROOT) {
    -            final Map<VM, VM.Record> allVMs = VM.getAllRecords(conn);
    -            // add size of memory snapshot vdi
    -            if (allVMs != null && allVMs.size() > 0) {
    -                for (final VM vmr : allVMs.keySet()) {
    -                    try {
    -                        final String vName = vmr.getNameLabel(conn);
    -                        if (vName != null && vName.contains(vmName) &&
vmr.getIsASnapshot(conn)) {
    -                            final VDI memoryVDI = vmr.getSuspendVDI(conn);
    -                            if (!isRefNull(memoryVDI)) {
    -                                size = size + memoryVDI.getPhysicalUtilisation(conn);
    -                                final VDI pMemoryVDI = memoryVDI.getParent(conn);
    -                                if (!isRefNull(pMemoryVDI)) {
    -                                    size = size + pMemoryVDI.getPhysicalUtilisation(conn);
    +            VM vm = getVM(conn, vmName);
    --- End diff --
    
    @yvsubhash  getVm() raises CloudRuntimeException if Vm is not found. 
    
    Scenario:
    
        Deploy a vm and ensure its in running state.
        Take a VM snapshot ( either disk or disk + memory ) for VM.
        After snapshot operation is sucessful , destroy the VM.
    
    Observation :
    
        VM destroy Fails with reason VM with name: i-2-7-VM does not exist.
        SNapshot moves to Expunging state , and VM moves to stopped state.
    
    Solution : Place your changes within a try.. catch block



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message