Change in ovirt-engine[ovirt-engine-4.1]: backend: make vdsId mandatory in SyncLunsInfo cmd

Code Review gerrit at ovirt.org
Thu Jun 29 12:21:05 UTC 2017


>From Tal Nisan <tnisan at redhat.com>:

Tal Nisan has submitted this change and it was merged. ( https://gerrit.ovirt.org/78805 )

Change subject: backend: make vdsId mandatory in SyncLunsInfo cmd
......................................................................


backend: make vdsId mandatory in SyncLunsInfo cmd

Previously, SyncLunsInfoForBlockStorageDomainCommand could optionally
get a VDS ID as a parameter.
When passed, it was used to call GetVGInfo, and when it wasn't, a random
and active VDS in the storage pool was chosen to do that.

The problem is that refreshMetadataDevicesInfoIfNeeded counts on the
existence of this VDS ID in the parameters. When it's null, the method
logs that the metadata devices refresh was skipped.
The method's comments say that "Currently all the flows...pass the vds
id...", but it's not true when upgrading the storage pool (was
introduced by ca8f351f1b4fef1f134eae0790bc07b1eab32aa4).

Since comments don't run, and since we don't want to skip the metadata
refresh, this patch adds the VDS ID parameter to all the constructors of
SyncLunsInfoForBlockStorageDomainCommand to make it mandatory.
Thus it makes sure that an active VDS ID is passed to it when
called from SyncStorageDomainsLunsCommand, which is used on the upgrade
storage pool flow.

Change-Id: I473e7d54570afcf39fc31d578a60fa9499f97920
Bug-Url: https://bugzilla.redhat.com/1465839
Signed-off-by: Idan Shaby <ishaby at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsEventListener.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/connection/FCPStorageHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/connection/ISCSIStorageHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/SyncLunsInfoForBlockStorageDomainCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/pool/SyncStorageDomainsLunsCommand.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/domain/SyncLunsInfoForBlockStorageDomainCommandTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/SyncLunsInfoForBlockStorageDomainParameters.java
7 files changed, 62 insertions(+), 28 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Allon Mureinik: Looks good to me, approved
  Idan Shaby: Verified



-- 
To view, visit https://gerrit.ovirt.org/78805
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I473e7d54570afcf39fc31d578a60fa9499f97920
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.1
Gerrit-Owner: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list