-
Notifications
You must be signed in to change notification settings - Fork 742
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
Update readme on stdout support for plugin log file #1251
Conversation
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.
Thanks @jayanthvn, Minor comments inline.
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.
/lgtm
{ | ||
log_in_json info "Validating env variables ..." | ||
if [[ "${AWS_VPC_K8S_PLUGIN_LOG_FILE,,}" == "stdout" ]]; then | ||
log_in_json error "AWS_VPC_K8S_PLUGIN_LOG_FILE cannot be set to stdout" |
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 add a hint that the value "stderr" is the only valid value? Because the docs points to stdout and it works for the other log.
Btw the user guide still says stdout: https://docs.aws.amazon.com/eks/latest/userguide/cni-env-vars.html
https://github.com/awsdocs/amazon-eks-user-guide/edit/master/doc_source/cni-env-vars.md
What type of PR is this?
Bug
Which issue does this PR fix:
#1248
What does this PR do / Why do we need it:
This PR flags an error when
stdout
is set forAWS_VPC_K8S_PLUGIN_LOG_FILE
. Stdout cannot be used for redirecting plugin logs since the plugin expects the network configuration in JSON format must be streamed through stdin and output on success streamed back to stdout. Ref - https://github.com/containernetworking/cni/blob/master/SPEC.md#resultIf an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:
Attached logs and analysis in #1248
Testing done on this change:
UT 1 -> if stdout is set as plugin log file
UT 2 - Setting stderr as plugin log file
Delete and add running pods -
UT 3 - Added interface type which will help during EFA debugging -
UT 4 - Uppercase of STDOUT
UT 5 - file name is uppercase, should be retained
Automation added to e2e:
No
Will this break upgrades or downgrades. Has updating a running cluster been tested?:
UT 6 - Upgrade 1.7.4 to 1.7.5
On upgrade -
Does this change require updates to the CNI daemonset config files to work?:
It will work with kubectl patch(ref UT 3)
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.