Validate when Cilium is in ENI mode that IPv4 is enabled#11328
Validate when Cilium is in ENI mode that IPv4 is enabled#11328tgraf merged 1 commit intocilium:masterfrom
Conversation
|
Please set the appropriate release note label. |
There was a problem hiding this comment.
if you invert this if statement this function can return earlier and we can avoid touching the remaining code of this function.
There was a problem hiding this comment.
if you invert this if statement this function can return earlier and we can avoid touching the remaining code of this function.
d4a6ad0 to
cdcd948
Compare
|
test-me-please Edit: vagrant failure https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/19499/ |
There was a problem hiding this comment.
Thanks for the PR! Overall, I think the changes are good. There's currently this PR pending which should be merging pretty soon. I'd like to get that in before merging this. #11208
I am wondering though if just validating whether we have option.Config.EnableIPv4 and option.Config.IPAM == option.IPAMENI at the daemon level is enough. We could just have it be fatal if the above condition does not hold. 🤔 /cc @aanm
@joestringer I recall we had a conversation about this in another PR. Any thoughts?
|
restart-ginkgo Edit: weird flake with vagrant index |
@christarazi @joestringer At the daemon level there is already a check between IPAMMode and IPv6 and throws an error if IPv6 is configured along with IPAMMode, so I think indirectly it is testing for the IPv4 with IPAMMode there. But there was comment in this bug that said that we are not validating in the calling function. Let me know your thoughts. Also I had added couple of comments in two files where we can split. Let me if that is required. |
There was a problem hiding this comment.
Same as the other similar spot.
|
restart-ginkgo |
If we're already validating the commandline arguments to ensure that this case won't be hit, then I think we're satisfying the main concern here. It's slightly nicer to make sure that this errors out if the wrong address type is specified just to future-proof a bit but I wouldn't expect commandline argument combinations to be validated this deep; it should be occurring much earlier in the initial daemon configuration checks. |
2d4f5c5 to
cb84e53
Compare
christarazi
left a comment
There was a problem hiding this comment.
Some minor nits. There also seems to be a conflict, please rebase.
6d32e8f to
e99a9e2
Compare
christarazi
left a comment
There was a problem hiding this comment.
Looking good, a few minor comments. Also, please add test coverage now that there's an extra case for both functions.
9c0e709 to
e69fa05
Compare
christarazi
left a comment
There was a problem hiding this comment.
Just a minor change and we should be good to go!
The patch checks the Cilium ENI mode and IPv4 when ENI functions are called. Fixes: cilium#11272 Signed-off-by: Swaminathan Vasudevan <svasudevan@suse.com>
e69fa05 to
f62a4a0
Compare
|
test-me-please |
|
Added backport label as I'd like to backport this to 1.7 since it'll be a branch we support for a while and this PR has changed code which was recently backported, so it'll be good to keep the divergence to a minimum. |
The patch checks the Cilium ENI mode and IPv4 when ENI functions
are called.
Fixes: #11272
Signed-off-by: Swaminathan Vasudevan svasudevan@suse.com