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

Fix Targeted error for non-existing NS #13

Merged
merged 1 commit into from Oct 13, 2021
Merged

Conversation

aufi
Copy link
Collaborator

@aufi aufi commented Oct 13, 2021

Adding check to targeted gathering if the provided NS exists.

This should avoid errors caused by not existing NS when getting Plans/VMs in later parts of the targeted gathering script.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1996360

Adding check to targeted gathering if the provided NS exist. This should
avoid errors caused by not existing NS when getting Plans/VMs in later
parts of the targeted gathering script.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1996360
@aufi
Copy link
Collaborator Author

aufi commented Oct 13, 2021

Tested locally with forked-repo image: [must-gather-b9cqx] POD 2021-10-13T09:54:13.628043324Z ERROR: Specified NS doesn't exist, targeted gathering cannot...

$ oc adm must-gather --image=quay.io/maufart/forklift-must-gather:latest -- NS=ns1 PLAN=plan1 VM=vm-3345 /usr/bin/targeted
[must-gather      ] OUT Using must-gather plug-in image: quay.io/maufart/forklift-must-gather:latest
[must-gather      ] OUT namespace/openshift-must-gather-nmc7f created
[must-gather      ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-zckhd created
[must-gather      ] OUT pod for plug-in image quay.io/maufart/forklift-must-gather:latest created
[must-gather-b9cqx] POD 2021-10-13T09:54:13.387311810Z Targeted gathering for Forklift in namespaces [konveyor-forklift]
[must-gather-b9cqx] POD 2021-10-13T09:54:13.402848828Z Targeted gathering for Namespace: ns1
[must-gather-b9cqx] POD 2021-10-13T09:54:13.628043324Z ERROR: Specified NS doesn't exist, targeted gathering cannot continue. Set NS to an existing namespace.
[must-gather-b9cqx] OUT waiting for gather to complete
[must-gather-b9cqx] OUT downloading gather output
[must-gather-b9cqx] OUT receiving incremental file list
[must-gather-b9cqx] OUT ./
[must-gather-b9cqx] OUT 
[must-gather-b9cqx] OUT sent 27 bytes  received 40 bytes  44.67 bytes/sec
[must-gather-b9cqx] OUT total size is 0  speedup is 0.00
[must-gather      ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-zckhd deleted
[must-gather      ] OUT namespace/openshift-must-gather-nmc7f deleted

@aufi aufi merged commit cc1b2d9 into kubev2v:main Oct 13, 2021
@aufi aufi deleted the fix_notexist_ns branch October 13, 2021 09:56
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

1 participant