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

sysdump: Add kvstore data to dumps. #972

Conversation

tommyp1ckles
Copy link
Contributor

@tommyp1ckles tommyp1ckles commented Jul 13, 2022

When running sysdump, if kvstore is detected then various kvstore paths are added to the dump.

This is intended to be used by the debug-ability tools to help diagnose issues.

Signed-off-by: Tom Hadlaw tom.hadlaw@isovalent.com

@tommyp1ckles tommyp1ckles temporarily deployed to ci July 13, 2022 23:40 Inactive
ps, err := c.Client.ListPods(ctx, c.Options.CiliumNamespace, metav1.ListOptions{
LabelSelector: c.Options.CiliumLabelSelector,
})
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: loop over pods, pick one that is scheduled and (ideally) has all containers running.

prefix: "state/services",
},
} {
stdout, stderr, err := c.Client.ExecInPodWithStderr(ctx, pod.Namespace, pod.Name, defaults.AgentContainerName, []string{
Copy link
Contributor

Choose a reason for hiding this comment

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

I just committed a function, ensureExecTarget, which you may find useful here (albeit a bit overkill).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh very nice, ill take a look at.

@tommyp1ckles tommyp1ckles force-pushed the pr/tommyp1ckles/include-kvstore-data-in-sysdump branch from 20f0599 to 2f3f01b Compare August 2, 2022 21:23
@tommyp1ckles tommyp1ckles temporarily deployed to ci August 2, 2022 21:23 Inactive
@tommyp1ckles tommyp1ckles force-pushed the pr/tommyp1ckles/include-kvstore-data-in-sysdump branch from 2f3f01b to 4eb9033 Compare August 2, 2022 21:44
@tommyp1ckles tommyp1ckles temporarily deployed to ci August 2, 2022 21:44 Inactive
When running sysdump, if kvstore is detected then various kvstore
paths are added to the dump.

Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
@tommyp1ckles tommyp1ckles force-pushed the pr/tommyp1ckles/include-kvstore-data-in-sysdump branch from 4eb9033 to f37f8a1 Compare August 2, 2022 21:50
@tommyp1ckles tommyp1ckles temporarily deployed to ci August 2, 2022 21:50 Inactive
@tommyp1ckles tommyp1ckles marked this pull request as ready for review August 2, 2022 21:51
@tommyp1ckles tommyp1ckles requested review from a team as code owners August 2, 2022 21:51
Copy link
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

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

Thanks

@tklauser tklauser merged commit 59b9bfe into cilium:master Aug 3, 2022
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.

None yet

3 participants