Michael Kublin has posted comments on this change.

Change subject: core: ReconstructMasterDomain - refresh storage pool before 
connect(#841525)
......................................................................


Patch Set 3: Do not submit

(2 inline comments)

First of all the patch is bad, it introduces a errors and also make code more 
unreadable. Yes, if a code is bad it is no important how many comments were 
added, code still will be bad. Also, please explain why these should be done : 
"refresh storage pool command should be sent before connect storage pool 
command to the hosts" , these is required behaviour for version 3.0 and there 
are some changes in 3.1 that such change should be done? What about 3.0
Also as I know refresh should be done also after connectstoragepool or these is 
no need any more?
And except all of these you are fixing a wrong bug. 
1. From logs a connect usually successes if for that host was send disconnect, 
as far I remember the connect should usually success and there was request not 
to send a disconnect to host side.
2. The host which actually successes was not chosen as SPM and that is a main 
cause for reconstruct loop. These what should be fixed, as SPM should be chosen 
a host which successes during a whole flow. I think it obvious that there are 
usually can be a case when one of the hosts will fail and it will be chosen as 
SPM and these will cause again for reconstruct loop.
-2 because a solution is wrong for the bug and will introduce a new regressions

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java
Line 219:                 try {
Line 220:                     VDSReturnValue returnValue = null;
Line 221:                     // refresh command shouldn't be executed for the 
reconstruct initiating host
Line 222:                     if (!_isLastMaster && commandSucceeded && 
!getVds().equals(vds)) {
Line 223:                         returnValue = 
executeRefreshStoragePoolCommand(vds);
These condition will never will be true.
You know that if refresh storage pool will failed an exception will be thrown. 
In order to understand why u can look on code or at least during verifying your 
code.
Line 224:                         if (!returnValue.getSucceeded()) {
Line 225:                             log.errorFormat("Post reconstruct actions 
(refreshPool) did not complete on host {0} in the pool. error {1}",
Line 226:                                     vds.getId(),
Line 227:                                     
returnValue.getVdsError().getMessage());


Line 228:                         }
Line 229:                     }
Line 230:                     // the host that executed the reconstruct command 
doesn't perform refresh
Line 231:                     // so even if refresh command wasn't executed in 
the loop (returnValue == null), we need to
Line 232:                     // connect to the storage pool.
Please explain to me when you will get returnValue == null, if you will get it 
is a bug and should be fixed, and not by adding some condition
Line 233:                     if (returnValue == null || 
returnValue.getSucceeded()) {
Line 234:                         returnValue = 
executeConnectStoragePoolCommand(vds);
Line 235:                         if (!returnValue.getSucceeded()) {
Line 236:                             log.errorFormat("Post reconstruct actions 
(connectPool) did not complete on host {0} in the pool. error {1}",


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9b1b6c32ecb1c0d3c0a9ef14beef333e442c6ccf
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to