cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yvsubhash <...@git.apache.org>
Subject [GitHub] cloudstack pull request #914: BUG-ID CLOUDSTACK-8939 VM Snapshot size with m...
Date Fri, 31 Mar 2017 09:35:31 GMT
Github user yvsubhash commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/914#discussion_r109123538
  
    --- 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 --
    
    @sudhansu7 exception needs to be caught at the callers otherwise it would end up setting
zero size


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