Simone Tiraboschi has uploaded a new change for review. Change subject: packaging: setup: keeping NFS ports open in case of preexisting exports ......................................................................
packaging: setup: keeping NFS ports open in case of preexisting exports Looking for preexisting NFS exports in order to correctly evaluate how to configure NFS related rules on the firewall. Change-Id: Id99ac88af780c6239655676b5290230076d0284b Bug-Url: https://bugzilla.redhat.com/1109326 Signed-off-by: Simone Tiraboschi <stira...@redhat.com> --- M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py 1 file changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/67/32867/1 diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py index 9ec2788..418195b 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py +++ b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py @@ -85,6 +85,22 @@ ) self._enabled = True + self._foundpreextnfs = False + + @plugin.event( + stage=plugin.Stages.STAGE_PROGRAMS, + ) + def _checkexistingexports(self): + rc, stdout, stderr = self.execute( + ( + self.command.get('exportfs'), + ), + raiseOnError=False, + ) + if rc == 0: + for line in stdout: + if line[0] == '\\': + self._foundpreextnfs = True @plugin.event( stage=plugin.Stages.STAGE_LATE_SETUP, @@ -199,7 +215,9 @@ oenginecons.Stages.SYSTEM_NFS_CONFIG_AVAILABLE, ), # must be run before firewall_manager plugin - condition=lambda self: self._enabled, + condition=lambda self: ( + self._enabled or self._foundpreextnfs + ), # must be always enabled to create examples ) def _firewall(self): -- To view, visit http://gerrit.ovirt.org/32867 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id99ac88af780c6239655676b5290230076d0284b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Simone Tiraboschi <stira...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches