origin: hostPort iptables rule is lost after node restarts
[provide a description of the issue] hostPort mapped by daemonset will disappear after node (or just docker) restarts. But I am not sure if it is still present in latest version.
Version
[provide output of the openshift version or oc version command]
OpenShift origin v3.6.1+008f2d5
Steps To Reproduce
- Create a DaemonSet with hostMap, example https://gist.github.com/vfreex/fc768e2ecdd6c18047bb9be5e5e707aa
- A iptables rule will be added to the
KUNE-HT-*chain ofnattable. - Restart docker on a particular node.
Current Result
After several minutes, the hostport on that node will become unreachable and the iptables rule in KUNE-HT-* chain will disappear.
Expected Result
the hostport will be mapped to the new Pod.
Additional Information
- If the iptables rule is added to the DOCKER chain, this bug will not happen. Although I don’t know how OpenShift/Kubernetes makes this decision.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 25 (19 by maintainers)
Investigated and was able to reproduce locally (at least a variant of the issue) using the nginx daemonset and restarting docker. Analysis:
It’s currently unclear what should be done about this; it’s a completely upstream problem. We’ve fixed a number of upstream issues with PLEG status racing with SyncPod in the past.