Roy Golan has posted comments on this change.

Change subject: core: throw canDo if no space for stateless VM snapshots 
(#852647)
......................................................................


Patch Set 3: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmRunHandler.java
Line 192:         Integer minSnapshotSize = Config.<Integer> 
GetValue(ConfigValues.InitStorageSparseSizeInGB);
Line 193:         for (storage_domains domain : map.keySet()) {
Line 194:             if (!StorageDomainSpaceChecker.hasSpaceForRequest(domain,
Line 195:                     minSnapshotSize * map.get(domain))) {
Line 196:                 log.error("not enough space to create snapshot on 
domain {0}" + domain.getId());
Done
Line 197:                 return false;
Line 198:             }
Line 199:         }
Line 200:         return true;


Line 207:      * @return
Line 208:      */
Line 209:     public Map<storage_domains, Integer> 
mapStorageDomainsToNumOfDisks(VM vm) {
Line 210:         Map<storage_domains, Integer> map = new 
HashMap<storage_domains, Integer>();
Line 211:         for (Disk disk : getPluggedDisks(vm)) {
I stay with the plain check
Line 212: 
Line 213:             if (disk.isAllowSnapshot()) {
Line 214:                 for (storage_domains domain : 
getStorageDomainDAO().getAllStorageDomainsByImageId(((DiskImage) 
disk).getImageId())) {
Line 215:                     map.put(domain, map.containsKey(domain) ? 
Integer.valueOf(map.get(domain) + 1) : Integer.valueOf(1));


....................................................
Commit Message
Line 5: CommitDate: 2012-09-12 13:37:57 +0300
Line 6: 
Line 7: core: throw canDo if no space for stateless VM snapshots (#852647)
Line 8: 
Line 9: https://bugzilla.redhat.com/852647
Done
Line 10: 
Line 11: For each pluggable disk of stateless VM, check we have enough space to
Line 12: create a snapshot otherwise throw a canDo.
Line 13: 


--
To view, visit http://gerrit.ovirt.org/7929
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie15cce8ded9172f37be28fd8b3d7b299628ee43e
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to