Michael Kublin has posted comments on this change.

Change subject: engine: Remove IsValidVDSCommand (Preporation for removing 
global lock on SPM ops)
......................................................................


Patch Set 1: (5 inline comments)

"some general notes: 1. You have the "getStoragePool() == null || 
getStoragePool().getstatus() != StoragePoolStatus.Up" block repeating itself 
quite often. Perhaps it's worth while extracting it to a helper method 
somewhere." - it is, but now it repeated less than it was before and I don't 
think that it is needed at all, but these is a code more related to storage 
flows and full optimization of storage flows is not a main purpose of patch. 
The purpose of patch stop parallel SPM election.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
Line 84:         try {
Line 85:             updateVmInSpm(getVm().getstorage_pool_id(),
Line 86:                     Arrays.asList(getVm()));
Line 87:         } catch (Exception e) {
Line 88:             // DO nothing
Logging will be inside of updateVmInSpm(). What actually should be done, it is 
rewrite of updateVmInSpm() but these is not related to patch
Line 89:         }
Line 90:         setSucceeded(true);
Line 91:     }
Line 92: 


....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
Line 517:                                         new 
SpmStopVDSCommandParameters(mCurrentVdsId, _storagePoolId)).getSucceeded();
Line 518:                     } else {
Line 519:                         performFailover = true;
Line 520:                     }
Line 521:                 } catch (Exception ex) {
It is not, but these code is here around 3 years, so I decided to fix it
Line 522:                     // try to failover to another host if failed to 
get spm
Line 523:                     // status or stop spm
Line 524:                     // (in case mCurrentVdsId has wrong id for some 
reason)
Line 525:                     log.errorFormat("Could not get spm status on host 
{0} for spmStop.", mCurrentVdsId);


....................................................
Commit Message
Line 8: 
Line 9: The following patch will remove IsValidVDSCommand.
Line 10: The following command was used in order to check if pool is up and we 
have spm.
Line 11: First of all the using of command at canDoaction is wrong, a simple 
check for status of pool or status
Line 12: of domain should be enought.
Done
Line 13: But the most exciting part is that the following command can trigger 
SPM election and it is done with out
Line 14: any synchronization, so we can easilly have couple spm elections 
simenteniously.
Line 15: The code at IsValidVDSCommand was 
getCurrentIrsProxyData().getIsValid(), which is actually code at IrsProxyData:
Line 16: getIrsProxy() != null, where getIrsProxy() is elect SPM if we have not 
one.


Line 9: The following patch will remove IsValidVDSCommand.
Line 10: The following command was used in order to check if pool is up and we 
have spm.
Line 11: First of all the using of command at canDoaction is wrong, a simple 
check for status of pool or status
Line 12: of domain should be enought.
Line 13: But the most exciting part is that the following command can trigger 
SPM election and it is done with out
Done
Line 14: any synchronization, so we can easilly have couple spm elections 
simenteniously.
Line 15: The code at IsValidVDSCommand was 
getCurrentIrsProxyData().getIsValid(), which is actually code at IrsProxyData:
Line 16: getIrsProxy() != null, where getIrsProxy() is elect SPM if we have not 
one.
Line 17: 


Line 10: The following command was used in order to check if pool is up and we 
have spm.
Line 11: First of all the using of command at canDoaction is wrong, a simple 
check for status of pool or status
Line 12: of domain should be enought.
Line 13: But the most exciting part is that the following command can trigger 
SPM election and it is done with out
Line 14: any synchronization, so we can easilly have couple spm elections 
simenteniously.
Done
Line 15: The code at IsValidVDSCommand was 
getCurrentIrsProxyData().getIsValid(), which is actually code at IrsProxyData:
Line 16: getIrsProxy() != null, where getIrsProxy() is elect SPM if we have not 
one.
Line 17: 
Line 18: Change-Id: I73c0fa0fd66f2f14132594a0b0450a7ecd7cf166


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I73c0fa0fd66f2f14132594a0b0450a7ecd7cf166
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to