
From Allon Mureinik <amureini@redhat.com>:
Allon Mureinik has submitted this change and it was merged. 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@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, 61 insertions(+), 29 deletions(-) Approvals: Jenkins CI: Passed CI tests Maor Lipchuk: Looks good to me, approved Idan Shaby: Verified -- To view, visit https://gerrit.ovirt.org/78126 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I473e7d54570afcf39fc31d578a60fa9499f97920 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Idan Shaby <ishaby@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Daniel Erez <derez@redhat.com> Gerrit-Reviewer: Idan Shaby <ishaby@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipchuk@redhat.com> Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: Yaniv Kaul <ykaul@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>