Skip to content
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

supplement log with stringified version of StdinData to enhance debug #1215

Conversation

DennisPeriquet
Copy link
Contributor

In a job like this, we a have failure log like the one below (note the StdinData:[123 34 98 ... 34 125]} []byte which, as-is, is not as helpful for debugging as it could be:

: [sig-network] pods should successfully create sandboxes by adding pod to network expand_less | 0s
-- | --
{  1 failures to create the sandbox  namespace/e2e-deployment-9011 node/ci-op-ggi2sw56-08da5-pvlps-worker-westus-ncbwh pod/webserver-556cc9d77-pbbkd hmsg/c8f1f77703 - 7.83 seconds after deletion - interesting/true reason/FailedCreatePodSandBox Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox
 k8s_webserver-556cc9d77-pbbkd_e2e-deployment-9011_ee30da87-8670-4b7e-b59f-6936fafca599_0(16c0f727ca5ce4b8819ad519ec29b30145e116cf7d78aeacfe3f1128546d1267): error adding pod e2e-deployment-9011_webserver-556cc9d77-pbbkd to CNI network "multus-cni-network": plugin type="multus-shim" name="multus-cni-network" failed (add): CmdAdd (shim): CNI request failed with status 400:
 '&{ContainerID:16c0f727ca5ce4b8819ad519ec29b30145e116cf7d78aeacfe3f1128546d1267 Netns:/var/run/netns/c4864d9a-7928-4af9-b79d-6d4e206dee0e IfName:eth0 Args:IgnoreUnknown=1;K8S_POD_NAMESPACE=e2e-deployment-9011;K8S_POD_NAME=webserver-556cc9d77-pbbkd;K8S_POD_INFRA_CONTAINER_ID=16c0f727ca5ce4b8819ad519ec29b30145e116cf7d78aeacfe3f1128546d1267;K8S_POD_UID=ee30da87-8670-4b7e-b59f-6936fafca599 
Path: StdinData:[123 34 98 ... 34 125]} ContainerID:"16c0f727ca5ce4b8819ad519ec29b30145e116cf7d78aeacfe3f1128546d1267" Netns:"/var/run/netns/c4864d9a-7928-4af9-b79d-6d4e206dee0e" IfName:"eth0" Args:"IgnoreUnknown=1;K8S_POD_NAMESPACE=e2e-deployment-9011;K8S_POD_NAME=webserver-556cc9d77-pbbkd;K8S_POD_INFRA_CONTAINER_ID=16c0f727ca5ce4b8819ad519ec29b30145e116cf7d78aeacfe3f1128546d1267;K8S_POD_UID=ee30da87-8670-4b7e-b59f-6936fafca599" 
Path:"" ERRORED: error configuring pod [e2e-deployment-9011/webserver-556cc9d77-pbbkd] networking: Multus: [e2e-deployment-9011/webserver-556cc9d77-pbbkd/ee30da87-8670-4b7e-b59f-6936fafca599]: error waiting for pod: pods "webserver-556cc9d77-pbbkd" not found '}

This change supplements that byte slice with a stringified version which will help aid in debugging.

@coveralls
Copy link

Coverage Status

coverage: 63.688% (+0.3%) from 63.432%
when pulling cad8c09 on DennisPeriquet:supplment_log_for_stdindata
into 6812ce0 on k8snetworkplumbingwg:master.

@maiqueb maiqueb requested a review from s1061123 January 25, 2024 08:18
Copy link
Collaborator

@maiqueb maiqueb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Copy link
Member

@s1061123 s1061123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let's merge that.

@s1061123 s1061123 merged commit 6c982f3 into k8snetworkplumbingwg:master Jan 25, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants