Watch firewall reload in sysconfigwatcher#1185
Watch firewall reload in sysconfigwatcher#1185zshi-redhat wants to merge 2 commits intoopenshift:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zshi-redhat The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
b65f05f to
499e54c
Compare
499e54c to
79941fb
Compare
|
resolved merge conflict. |
79941fb to
178ad89
Compare
|
This change is LGTM, but we need to wait until 4.12 branch is created. |
dhellmann
left a comment
There was a problem hiding this comment.
For CSI, we drew a boundary so there was a clear line between the system configuration the user had to provide (volume groups and the lvmd.conf file) and the setup that MicroShift did (a default lvmd.conf if none is provided). Can we create a similar boundary for CNI so that we do not need to monitor the firewall rules, IP, or other networking changes?
pkg/config/config.go
Outdated
There was a problem hiding this comment.
Do we need to expose this field to users or can it be an internal value?
There was a problem hiding this comment.
It will be for internal use only. Captured when microshift main process starts.
Agree on the boundary statement between microshift and plugins, I thought about adding this in CNI implementation only. |
Is there a way to organize the system so that we do not need to restart MicroShift when firewall rules change at all? Can we isolate the rule sets that users manage from the ones that MicroShift manages somehow? |
178ad89 to
694a167
Compare
@dhellmann I moved the iptable detection logic to infrastructure manager service which only reloads affected microshift components (router and ovnk). This avoids microshift restart. For application workload that uses hostPort, this won't help since the iptable rules for hostPort are injected by cri-o during pod sandbox creation, these rules won't be reconciled periodically unless recreating the workload. So current patch takes care of microshift components when firewall reload happens, we probably want to document that user workload with hostPort could be impacted by user action (reload firewall). wdyt? |
|
/retest |
|
@zshi-redhat: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/hold cancel |
| } | ||
|
|
||
| if err := assets.ApplyDeployments(apps, renderTemplate, renderParamsFromConfig(cfg, nil), kubeconfigPath); err != nil { | ||
| extraParams := assets.RenderParams{ |
There was a problem hiding this comment.
I guess that for a decoupled CNI-plugin we may need to call the CNI plugin (know it's a CNI plugin) and call it to re-create the deployment.
We could make that part of a plugin interface i.e. have a "restart" call to the plugin which would add creation timestamps to the objects that need re-creation in the event of necessity.
Hmmmmm
There was a problem hiding this comment.
This is one reason to have MicroShift run the plugin scripts, instead of relying solely on systemd. @fzdarsky
|
@dhellmann I left a comment inside about could we make something like this work with pluggable CNI. |
|
/hold I believe I found an alternative to make firewalld leave iptables alone (not flushing them) |
|
/hold |
|
I think since we took #1306 we no longer need this. Please reopen the PR if I misunderstood. /close |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@dhellmann: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Related-Issue: https://issues.redhat.com/browse/NP-641