New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mount OVS socket unconditionally #861
Conversation
cluster/sync-operator.sh
Outdated
| @@ -6,12 +6,28 @@ kubectl=./cluster/kubectl.sh | |||
|
|
|||
| source ./cluster/sync-common.sh | |||
|
|
|||
| function __yq() { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we enable this by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It requires OVS to be installed, otherwise handlers fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make it to fail gracefully / detect OVS on runtime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe detect whether the OVS socket is available while starting and based on it, set the variable. (I don't know how it is implemented now, so sorry if I'm totally off)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've discussed with @qinqon that it would probably make sense to expose this knob
to the user, to decide whether or not the handlers should attempt to mount the ovs socket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENABLE_OVS causes us to try to mount the OVS socket from the host, and if nmstate finds the socket, it tries to use it, right?
I think we could make the mount unconditioned, possibly by mounting the whole directory with DirectoryOrCreate. That should be enough, no? It is not great that we would create a directory on host, but it would give us this flexibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting point. According to the docs, specifying no type at all performs no checks, which would also solve the empty directory (although that should be harmless).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be even better o/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But what will do nmstate it find that we have a fake socket for ovs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There would be no socket, Kubernetes will only mount an empty directory.
Mout ovs socket with unspecified type, which doesn't check it's actual existence on the host. Signed-off-by: Radim Hrazdil <rhrazdil@redhat.com>
6d905e0
to
7df5d5f
Compare
|
/hold |
|
@rhrazdil: The following test failed, say
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. I understand the commands that are listed here. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qinqon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
|
We'll want to extend our e2e test with a scenario that creates ovs-bridge with primary nic connected to it as a port as well as a veth pair connecting linux-bride to the ovs-bridge. |
|
You might want please to change PR title, it is outdated comparing to the commit that was pushed as part of this PR (just saw while trying to learn the flow) |
|
This PR looks to have broken non OVS providers (specifically calico) is there a way to revert it? |
|
@relyt0925 I believe that this PR is the one that fixed that usecase. With removal of "type: Socket", the mount does not fail when the socket does not exist. |
Signed-off-by: Radim Hrazdil rhrazdil@redhat.com
Is this a BUG FIX or a FEATURE ?:
What this PR does / why we need it:
Special notes for your reviewer:
Release note: