-
Notifications
You must be signed in to change notification settings - Fork 55
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
CNI config errors retured as error instead of logging warning #30
Conversation
While loading CNI config, if any config file have syntax error, it is returned as error instead of logging as warning. This will fix early detection of CNI errors and report user exact error instead of generic error while requesting CNI network. Signed-off-by: Kunal Kushwaha <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kunalkushwaha If they are not already assigned, you can assign the PR to them by writing 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 |
Hi @kunalkushwaha. Thanks for your PR. I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
This fix is in reference with podman issue: containers/podman#2909. What it does: what will be affected
|
@rajatchopra @sameo @dcbw PTAL |
Looking at the code loadNetworks() only gets called by syncNetworkConfig(). That is only called by monitorConfDir() which does log the error, and initCNI() which throws the error away. I don't quite see how this will change the current behavior of logging the error? Second issue is that if any file in the conf dir has an error, no other files will be processed even if they might be valid and could be the requested default network. The original code was permissive and tried to allow that, I think by choice. I think the code should definitely make sure it logs syntax errors, but I don't think that should prevent it from finding valid files, especially in the case that a default network has been explicitly specified. I guess I can see how you'd want to error earlier if no default network was specified (eg the behavior of picking first in the directory), but we don't want to break the case of a random file preventing the explicitly specified network from being found. |
error returned by initCNI() are not in case of cni - config file error.
I had also similar view initially. This solution was suggested by @mheon Also I observed other container runtime like |
Any movement on this? |
Friendly ping. I'm going through libpod issues and containers/podman#2909 requires this PR. |
@vrothberg Is this still needed? |
Given the age, I don't think so. |
While loading CNI config, if any config file have syntax error,
it is returned as error instead of logging as warning.
This will fix early detection of CNI errors and report user exact
error instead of generic error while requesting CNI network.
Signed-off-by: Kunal Kushwaha [email protected]