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, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/74/32874/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..9bd5f01 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,7 @@ ) self._enabled = True + self._foundpreextnfs = False @plugin.event( stage=plugin.Stages.STAGE_LATE_SETUP, @@ -126,6 +127,17 @@ self.environment[ oenginecons.SystemEnv.NFS_CONFIG_ENABLED_LEGACY_IN_POSTINSTALL ] = False + + 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_CUSTOMIZATION, @@ -199,7 +211,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/32874 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id99ac88af780c6239655676b5290230076d0284b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Simone Tiraboschi <stira...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches