Yedidyah Bar David has uploaded a new change for review. Change subject: packaging: setup: do not delete iptables on cleanup ......................................................................
packaging: setup: do not delete iptables on cleanup Prevent /etc/sysconfig/iptables from being deleted by cleanup after it was updated by setup using otopi. Change-Id: I03f6ea7050aa6dd27809738c588c9778aaa03bce Signed-off-by: Yedidyah Bar David <[email protected]> --- M packaging/setup/ovirt_engine_setup/constants.py M packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py 2 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/94/18594/1 diff --git a/packaging/setup/ovirt_engine_setup/constants.py b/packaging/setup/ovirt_engine_setup/constants.py index 7078426..aa820ca 100644 --- a/packaging/setup/ovirt_engine_setup/constants.py +++ b/packaging/setup/ovirt_engine_setup/constants.py @@ -103,6 +103,12 @@ 'iptables.default.in' ) + SYSCONFIG_IPTABLES = os.path.join( + SYSCONFDIR, + 'sysconfig', + 'iptables', + ) + OVIRT_FIREWALLD_CONFIG = os.path.join( OVIRT_ENGINE_DATADIR, 'firewalld', diff --git a/packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py b/packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py index d347fb3..904da87 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py +++ b/packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py @@ -219,6 +219,16 @@ self.environment[ otopicons.NetEnv.IPTABLES_RULES ] = self._createIptablesConfig() + # This file is updated by otopi. Here we just prevent it from + # being deleted on cleanup. + # TODO: copy/move some uninstall code from the engine to otopi + # to allow just adding lines to iptables instead of replacing + # the file and also remove these lines on cleanup. + self.environment[ + osetupcons.CoreEnv.UNINSTALL_UNREMOVABLE_FILES + ].append( + osetupcons.FileLocations.SYSCONFIG_IPTABLES, + ) self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append( filetransaction.FileTransaction( -- To view, visit http://gerrit.ovirt.org/18594 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03f6ea7050aa6dd27809738c588c9778aaa03bce Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
