Bug 1380141

Summary: Updating iptables-services breaks working systems
Product: Red Hat Enterprise Linux 7 Reporter: Eric Paris <eparis>
Component: iptablesAssignee: Phil Sutter <psutter>
Status: CLOSED ERRATA QA Contact: Tomas Dolezal <todoleza>
Severity: medium Docs Contact:
Priority: high    
Version: 7.3CC: atragler, cww, egarver, eparis, erich, fwestpha, igkioka, iptables-maint-list, jneedle, lmiksik, perobins, redhat-bugzilla, todoleza, xtian
Target Milestone: rcKeywords: Reopened, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: iptables-1.4.21-20.el7 Doc Type: Known Issue
Doc Text:
In Red Hat Enterprise Linux 7.3, the iptables-services package contained a post-uninstall script that caused iptables, the ip6tables services, or both to restart. As a consequence, the current configuration was replaced with a manually saved configuration in the /etc/sysconfig/ip6tables file. This update removes the "service restart" command from the post-uninstall script. As a result, updates to the package do not cause a service restart.
Story Points: ---
Clone Of:
: 1491961 (view as bug list) Environment:
Last Closed: 2018-04-10 11:28:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1375561, 1400961, 1420851, 1481207, 1491961    

Description Eric Paris 2016-09-28 18:36:31 UTC
see: https://bugzilla.redhat.com/show_bug.cgi?id=1378693

It appears that iptables-services includes the following:
```
if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall
   /bin/systemctl try-restart iptables.service >/dev/null 2>&1 || :
   /bin/systemctl try-restart ip6tables.service >/dev/null 2>&1 || :
fi
```

Problem is that OpenShift runs a daemon that dynamically add/removes iptables rules at run time. If one then updates iptables-services the run time rules get deleted. Since these added rules are dynamic they should not be saved and restored on reboot (or across restart)

We have to tell customers to update iptables-services, which will break all of their traffic, then they have to restart docker, then they have to restart kubernetes/OpenShift.

Why does iptables-services include the restart at all? It seems that it should be removed from the --scripts entirely...

Comment 1 Eric Rich 2016-09-28 19:09:23 UTC
Why is OpenShift not able to cope with core service restarts? This really seems like an OpenShift (dependency) specific issue. 

Is it possible for OpenShift to provide systems scripts/triggers that could combat this? IE: Watch for restarts in iptables, and restart docker/openshift?

Comment 2 Eric Paris 2016-09-28 20:01:19 UTC
OpenShift could likely add some sort of trigger to restart when iptables-services is restarted. But it doesn't change the fact that iptables-services may not need to restart on update at all.

Comment 3 Thomas Woerner 2016-09-29 09:30:57 UTC
There has not been a change in the spec file of iptables since RHEL-7.0 regarding the services sub package.

There is this since 1.4.21-5 (Jan 15 2014):

%postun services
/sbin/ldconfig
%systemd_postun_with_restart iptables.service ip6tables.service

I agree though that the use of "_with_restart" might not be good.

Comment 4 Thomas Woerner 2016-09-29 09:32:57 UTC
This has not been introduced with 7.3 - it is there since 7.0.

Comment 17 errata-xmlrpc 2018-04-10 11:28:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0715