StarlingX Installation/Update/Patching/Backup/Restore
Go to file
Steven Webster 6adc828b84 sw-patch: remove explicit bind on outgoing socket.
This commit fixes an issue seen during a k8s upgrade from 1.18.1
to 1.19.13.  It was noticed that after upgrading kubelet to 1.19.13,
the sw-patch-controller process would continually restart.

It was found via packet tracing and logging that traffic from the
management interface to the localhost address at port 5489 was being
blocked.  This indicated a likely issue in iptables.

Comparing the iptables rules in 1.18.1 to 1.19.13 shows the reason
why:

Chain KUBE-FIREWALL (2 references)
target prot opt source      destination
DROP   all  --  !loopback/8 loopback/8  \
                                ! ctstate RELATED,ESTABLISHED,DNAT

That is, drop all packets _not_ from the loopback interface _to_
the loopback interface that do not have an existing connection
state.

It was found that this rule was added in the following commit:

https://github.com/kubernetes/kubernetes/pull/91569/files

Which was added to address the security concern identified here:

https://github.com/kubernetes/kubernetes/issues/90259

It appears that the PatchMessageHelloAgent periodically sends
messages to both the patch controller's agent address as well
as to the localhost address.  Since the outgoing socket used
for all messages is explicitly bound to the management
address, the traffic to the localhost address will hit the
drop rule noted above.

The solution in this commit is to not explicitly bind the
outgoing socket to the management address, so as to have the
kernel choosed the correct outgoing interface for both
messages.

Story: 2008972
Task: 43244

Testing:

AIO-SX (unicast traffic), AIO-DX, Standard (multicast traffic).
	Ensure sw-patch-controller stays up after k8s upgrade.
	Install a patch on all nodes.

Signed-off-by: Steven Webster <steven.webster@windriver.com>
Change-Id: I93912b934986dc28196c9ba50f2803bf0fe01513
2021-09-08 10:07:08 -04:00
api-ref/source Switch to newer openstackdocstheme and reno versions 2020-06-04 14:40:40 +02:00
cgcs-patch sw-patch: remove explicit bind on outgoing socket. 2021-09-08 10:07:08 -04:00
devstack Subdirectories 'tsconfig ' relocated to repo 'stx-config' 2019-09-05 13:04:59 -04:00
doc Switch to newer openstackdocstheme and reno versions 2020-06-04 14:40:40 +02:00
enable-dev-patch Add auto-version for remaining stx/update packages 2020-12-17 13:17:58 -05:00
extras/scripts Add setup_patch_repo.sh for patch-iso 2020-02-12 14:38:01 -05:00
patch-alarm Merge "py3: Add support for python3.9" 2021-08-31 13:45:23 +00:00
patch-boot-args StarlingX open source release updates 2018-05-31 07:37:12 -07:00
patch-scripts add dcmanager-audit-worker to sample restart script 2021-03-04 19:01:05 -05:00
releasenotes Switch to newer openstackdocstheme and reno versions 2020-06-04 14:40:40 +02:00
.gitignore Adding unit tests to tsconfig and clean it up a bit 2019-03-04 19:16:05 +00:00
.gitreview OpenDev Migration Patch 2019-04-19 19:52:36 +00:00
.zuul.yaml py3: Add support for python3.9 2021-08-27 11:36:42 -04:00
CONTRIBUTORS.wrs StarlingX open source release updates 2018-05-31 07:37:12 -07:00
LICENSE StarlingX open source release updates 2018-05-31 07:37:12 -07:00
README.rst StarlingX open source release updates 2018-05-31 07:37:12 -07:00
centos_build_layer.cfg Build layering, add layer build config file 2019-10-15 12:56:44 +08:00
centos_dev_wheels.inc Config file changes to remove 'tsconfig ' after relocation to 'stx-config' 2019-09-04 15:36:52 -04:00
centos_iso_image.inc Config file changes to remove 'tsconfig ' after relocation to 'stx-config' 2019-09-04 15:36:52 -04:00
centos_pkg_dirs Add an example restart script for distributed cloud 2020-11-02 16:25:57 -06:00
centos_stable_wheels.inc Config file changes to remove 'tsconfig ' after relocation to 'stx-config' 2019-09-04 15:36:52 -04:00
pylint.rc Enable Unused Variable 2019-07-19 10:28:00 -04:00
requirements.txt Add Zuul test foundation 2018-07-25 08:48:07 -05:00
test-requirements.txt Cap bandit to v1.6.2 2021-02-22 09:44:17 -05:00
tox.ini Specify the nodeset zuul jobs 2021-05-28 11:24:04 -04:00

README.rst

stx-update

StarlingX Software Management