Sandro Bonazzola has uploaded a new change for review. Change subject: glusterfs: add support for glusterfs 3.7 ......................................................................
glusterfs: add support for glusterfs 3.7 - handle the missing glusterfsd service in gluster 3.7 Change-Id: I31970924b7a9a7a59a2c44962d353f6586aec8cf Signed-off-by: Sandro Bonazzola <sbona...@redhat.com> --- M src/plugins/ovirt-hosted-engine-setup/storage/glusterfs.py 1 file changed, 13 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup refs/changes/00/39600/1 diff --git a/src/plugins/ovirt-hosted-engine-setup/storage/glusterfs.py b/src/plugins/ovirt-hosted-engine-setup/storage/glusterfs.py index 99651d6..34d5454 100644 --- a/src/plugins/ovirt-hosted-engine-setup/storage/glusterfs.py +++ b/src/plugins/ovirt-hosted-engine-setup/storage/glusterfs.py @@ -51,6 +51,7 @@ def __init__(self, context): super(Plugin, self).__init__(context=context) self._checker = ohosteddomains.DomainChecker() + self._gluster_services = [ohostedcons.Const.GLUSTERD_SERVICE] def _configure_glusterfs_service(self): """ @@ -209,6 +210,16 @@ ) @plugin.event( + stage=plugin.Stages.STAGE_SETUP, + ) + def _setup(self): + if self.services.exists(ohostedcons.Const.GLUSTERFSD_SERVICE): + # glusterfsd is not provided in glusterfs-server >= 3.7 + self._gluster_services.append( + ohostedcons.Const.GLUSTERFSD_SERVICE + ) + + @plugin.event( stage=plugin.Stages.STAGE_CUSTOMIZATION, name=ohostedcons.Stages.GLUSTER_PROVISIONING, after=( @@ -315,10 +326,7 @@ """ self._configure_glusterfs_service() self.logger.info(_('Starting GlusterFS services')) - for service in ( - ohostedcons.Const.GLUSTERD_SERVICE, - ohostedcons.Const.GLUSTERFSD_SERVICE, - ): + for service in self._gluster_services: self.services.state( name=service, state=True, @@ -336,10 +344,7 @@ Enable GlusterFS services if GlusterFS provisioning was requested """ self.logger.info(_('Enabling GlusterFS services')) - for service in ( - ohostedcons.Const.GLUSTERD_SERVICE, - ohostedcons.Const.GLUSTERFSD_SERVICE, - ): + for service in self._gluster_services: self.services.startup( name=service, state=True, -- To view, visit https://gerrit.ovirt.org/39600 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31970924b7a9a7a59a2c44962d353f6586aec8cf Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-setup Gerrit-Branch: master Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches