Martin Sivák has uploaded a new change for review. Change subject: Fix setup of additional host - it used the old backend API ......................................................................
Fix setup of additional host - it used the old backend API Change-Id: I57143f2104232aecf1fc92bbe32b07e8cdf4c9ad Signed-off-by: Martin Sivak <[email protected]> --- M ovirt-hosted-engine-setup.spec.in M src/plugins/ovirt-hosted-engine-setup/storage/storage.py 2 files changed, 8 insertions(+), 31 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup refs/changes/84/26084/1 diff --git a/ovirt-hosted-engine-setup.spec.in b/ovirt-hosted-engine-setup.spec.in index fbc3641..90abcc2 100644 --- a/ovirt-hosted-engine-setup.spec.in +++ b/ovirt-hosted-engine-setup.spec.in @@ -49,7 +49,7 @@ Requires: openssl Requires: sudo Requires: bind-utils -Requires: ovirt-hosted-engine-ha +Requires: ovirt-hosted-engine-ha >= 1.2.1 Requires: sanlock >= 2.8 Requires: sanlock-python >= 2.8 Requires: lsof diff --git a/src/plugins/ovirt-hosted-engine-setup/storage/storage.py b/src/plugins/ovirt-hosted-engine-setup/storage/storage.py index 58e6915..20aedae 100644 --- a/src/plugins/ovirt-hosted-engine-setup/storage/storage.py +++ b/src/plugins/ovirt-hosted-engine-setup/storage/storage.py @@ -22,7 +22,6 @@ Local storage domain plugin. """ -import glob import os import re import uuid @@ -156,34 +155,6 @@ ) return rc - def _get_dom_md_path(self): - """ - Return path of storage domain holding engine vm - """ - domain_path = os.path.join( - ohostedcons.FileLocations.SD_MOUNT_PARENT_DIR, - '*', - self.environment[ohostedcons.StorageEnv.SD_UUID], - ) - if self.environment[ohostedcons.StorageEnv.DOMAIN_TYPE] == 'glusterfs': - domain_path = os.path.join( - ohostedcons.FileLocations.SD_MOUNT_PARENT_DIR, - 'glusterSD', - '*', - self.environment[ohostedcons.StorageEnv.SD_UUID], - ) - domains = glob.glob(domain_path) - if not domains: - raise RuntimeError( - _( - 'Path to storage domain {sd_uuid} not found in {root}' - ).format( - sd_uuid=self.environment[ohostedcons.StorageEnv.SD_UUID], - root=ohostedcons.FileLocations.SD_MOUNT_PARENT_DIR, - ) - ) - return domains[0] - def _re_deploying_host(self): interactive = self.environment[ohostedcons.CoreEnv.RE_DEPLOY] is None if interactive: @@ -280,9 +251,15 @@ ): ha_cli = client.HAClient() all_host_stats = ha_cli.get_all_host_stats_direct( - dom_path=self._get_dom_md_path(), + dom_type=self.environment[ + ohostedcons.StorageEnv.DOMAIN_TYPE + ], + sd_uuid=self.environment[ + ohostedcons.StorageEnv.SD_UUID + ], service_type=self.environment[ ohostedcons.SanlockEnv.LOCKSPACE_NAME + + ".metadata" ], ) if ( -- To view, visit http://gerrit.ovirt.org/26084 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I57143f2104232aecf1fc92bbe32b07e8cdf4c9ad Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-setup Gerrit-Branch: master Gerrit-Owner: Martin Sivák <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
