-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Capture CNI logs in istioctl bug-report #45712
Conversation
Hi @syw14. Thanks for your PR. I'm waiting for a istio 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. |
for _, cs := range r.Pod[PodKey(namespace, pod)].Status.ContainerStatuses { | ||
func (r *Resources) ContainerRestarts(namespace, pod, container string, isCniPod bool) int { | ||
var podItem *corev1.Pod | ||
if isCniPod { |
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.
do we need this? I thought r.Pod is a superset of r.CniPod
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.
I added CniPod as a new field in Resource
due to there's some pre defined config that will exclude all pods in namespace kube-system
for r.Pod
when building the "resource tree" of namespace/pod/container.
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.
I see...
It seems like a bit weird to have CNI code in ContainerRestarts, a bit fragile. Maybe it makes sense to have an AllPods one that isn't filtered...
Or we can keep this, not a big deal
/ok-to-test |
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! Supporting other namespace would be great, can add in a followup if you want
for _, cs := range r.Pod[PodKey(namespace, pod)].Status.ContainerStatuses { | ||
func (r *Resources) ContainerRestarts(namespace, pod, container string, isCniPod bool) int { | ||
var podItem *corev1.Pod | ||
if isCniPod { |
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.
I see...
It seems like a bit weird to have CNI code in ContainerRestarts, a bit fragile. Maybe it makes sense to have an AllPods one that isn't filtered...
Or we can keep this, not a big deal
Issue #45466
Fetch Cni logs from
kube-system
namespace pods selected byk8s-app=istio-cni-node
.The logs are written into
cni.log
file per pod (not per container)