Michael Kublin has posted comments on this change. Change subject: core: Run upgradeStoragePool on cluster compatibility change ......................................................................
Patch Set 16: I would prefer that you didn't submit this (10 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java Line 31: Infra: mark a command as nontransactive - in order to disable a global transaction. You are performing two vdsm calls the time for transaction is too long. Line 52: updateDefaultQuota(); Perform update only at case of vdsm call successes, also use only one time updatePartia() . Also change updatePartial() , can also update storage pool format type Line 54: if (getStoragePool().getstatus() == StoragePoolStatus.Up) { These check is bug, it is strange that the flow is working till now. getStoragePool() it is pool which was passed by gui or rest, should be used _oldStoragePool Line 113: StorageType spType = storagePool.getstorage_pool_type(); I think these check is good candidate for canDoaction error message Line 121: getStoragePoolDAO().update(storagePool); use updatePartitial(), also it is wrong to use update(), like I said these is not a full object and it passed from gui Line 130: // as VDSM will silently ignore the request Don't need a varible and at any case should be inside if block Line 145: Log should be written only when update is perfomed Line 152: } These is more code stile, but I think it is easy to understand: if (sdType == StorageDomainType.Data || sdType == StorageDomainType.Master) { log.infoFormat("Updating storage domain {0} (type {1}) to format {2}", domain.getId(), sdType, targetFormat); domain.setStorageFormat(targetFormat); sdStatDao.update(domain); } Line 164: @Override There are no any new error message at canDoAction() for illegal storage format type, at case that someone will try to upgrade at 2.2/3.0 pool we should fail action Line 167: _oldStoragePool = getStoragePoolDAO().get(getStoragePool().getId()); also bug , not related to your patch, but if you already here : checkStoragePool() is not needed, and we should check that _oldStoragePool is not null -- To view, visit http://gerrit.ovirt.org/2441 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85201624bbb2f8c41cf3b184b89a8e199ff50e99 Gerrit-PatchSet: 16 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi <smizr...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches