Bug 2059185 - must-gather: Must-gather gather_vms_details is not working when used with a list of vms
Summary: must-gather: Must-gather gather_vms_details is not working when used with a ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Logging
Version: 4.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.10.1
Assignee: Nahshon Unna-Tsameret
QA Contact: Debarati Basu-Nag
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-28 12:53 UTC by Debarati Basu-Nag
Modified: 2022-05-18 20:27 UTC (History)
2 users (show)

Fixed In Version: CNV v4.10.0-704
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-18 20:27:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
must-gather output (29.28 KB, text/plain)
2022-02-28 12:53 UTC, Debarati Basu-Nag
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt must-gather pull 124 0 None open Fix bug where the script wrongly processed the VM var 2022-02-28 14:31:14 UTC
Red Hat Product Errata RHSA-2022:4668 0 None None None 2022-05-18 20:27:23 UTC

Description Debarati Basu-Nag 2022-02-28 12:53:35 UTC
Created attachment 1863582 [details]
must-gather output

Description of problem: When attempting to gather vm information for a list of vms using  gather_vms_details, it does not gather vm specific information


Version-Release number of selected component (if applicable):
4.10.0

How reproducible:
100%

Steps to Reproduce:
1. Create a few vms in a namespace
2. Run must gather `oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8@sha256:ad5129b71f9a4fbc1dee6a801bd5da626d9bed34d12980a0d61a6d08fc0baa79 --  NS=mg-ns VM="mg-vm-0-1645919225-6124628,mg-vm-2-1645919228-4782374", gather_vms_details`
3. Error message is seen in command output and information associated with the vms are not collected under namespace/<specific_namespace>/

Actual results:
==============
[must-gather-xb9jf] POD 2022-02-27T00:53:57.287565228Z ++ echo mg-vm-0-1645919225-6124628,mg-vm-2-1645919228-4782374,
[must-gather-xb9jf] POD 2022-02-27T00:53:57.287565228Z ++ tr , ' '
[must-gather-xb9jf] POD 2022-02-27T00:53:57.289071011Z + mapfile -t PODS
[must-gather-xb9jf] POD 2022-02-27T00:53:57.289564046Z ++ oc get pod -n mg-ns --no-headers -o custom-columns=name:metadata.name
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z + for vm in "${VMS[@]}"
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z ++ echo virt-launcher-mg-vm-0-1645919225-6124628-8h85c virt-launcher-mg-vm-1-1645919227-2380638-ns98j virt-launcher-mg-vm-2-1645919228-4782374-76pqb
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z ++ tr ' ' '\n'
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z ++ grep -E 'virt-launcher-mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 -[^-]+$'
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z + POD=
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z + gather_vm_info mg-ns '' 'mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 '
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z + ocproject=mg-ns
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z + ocvm=
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z + vmname='mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 '
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z + vm_collection_path='/must-gather/namespaces/mg-ns/vms/mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 '
[must-gather-xb9jf] POD 2022-02-27T00:53:57.475096275Z + mkdir -p '/must-gather/namespaces/mg-ns/vms/mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 '
[must-gather-xb9jf] POD 2022-02-27T00:53:57.487434561Z + /usr/bin/oc adm inspect --dest-dir /must-gather -n mg-ns pod ''
[must-gather-xb9jf] POD 2022-02-27T00:53:57.566107713Z error: resource name may not be empty
[must-gather-xb9jf] POD 2022-02-27T00:53:57.574701348Z + /usr/bin/oc adm inspect --dest-dir /must-gather -n mg-ns virtualmachineinstances 'mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 '
[must-gather-xb9jf] POD 2022-02-27T00:53:57.731366587Z Error from server (NotFound): virtualmachineinstances.kubevirt.io "mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 " not found
[must-gather-xb9jf] POD 2022-02-27T00:53:57.744430633Z + /usr/bin/oc exec '' -n mg-ns -c compute -- virsh dumpxml 'mg-ns_mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 '
[must-gather-xb9jf] POD 2022-02-27T00:53:57.842144841Z error: pod, type/name or --filename must be specified
[must-gather-xb9jf] POD 2022-02-27T00:53:57.849265493Z + /usr/bin/oc exec '' -n mg-ns -c compute -- cat '/var/log/libvirt/qemu/mg-ns_mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 .log'
[must-gather-xb9jf] POD 2022-02-27T00:53:57.932168408Z error: pod, type/name or --filename must be specified
[must-gather-xb9jf] POD 2022-02-27T00:53:57.937022990Z + /usr/bin/oc exec '' -n mg-ns -c compute -- ip a
[must-gather-xb9jf] POD 2022-02-27T00:53:58.062392716Z + echo '###################################'
[must-gather-xb9jf] POD 2022-02-27T00:53:58.062392716Z + echo 'brctl show:'
[must-gather-xb9jf] POD 2022-02-27T00:53:58.062465593Z + echo '###################################'
[must-gather-xb9jf] POD 2022-02-27T00:53:58.062465593Z + /usr/bin/oc exec '' -n mg-ns -c compute -- brctl show
[must-gather-xb9jf] POD 2022-02-27T00:53:58.146941868Z + echo '###################################'
[must-gather-xb9jf] POD 2022-02-27T00:53:58.147081800Z + echo 'bridge fdb show:'
[must-gather-xb9jf] POD 2022-02-27T00:53:58.147081800Z + echo '###################################'
[must-gather-xb9jf] POD 2022-02-27T00:53:58.147081800Z + /usr/bin/oc exec '' -n mg-ns -c compute -- bridge fdb show
[must-gather-xb9jf] POD 2022-02-27T00:53:58.222063260Z + echo '###################################'
[must-gather-xb9jf] POD 2022-02-27T00:53:58.222063260Z + echo 'bridge vlan show:'
[must-gather-xb9jf] POD 2022-02-27T00:53:58.222063260Z + echo '###################################'
[must-gather-xb9jf] POD 2022-02-27T00:53:58.222063260Z + /usr/bin/oc exec '' -n mg-ns -c compute -- bridge vlan show
[must-gather-xb9jf] POD 2022-02-27T00:53:58.344480320Z + get_vm_rule_tables mg-ns 'mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 '
[must-gather-xb9jf] POD 2022-02-27T00:53:58.344480320Z + ocproject=mg-ns
[must-gather-xb9jf] POD 2022-02-27T00:53:58.344480320Z + vmname='mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 '
[must-gather-xb9jf] POD 2022-02-27T00:53:58.344480320Z ++ /usr/bin/oc get vmi -n mg-ns 'mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 ' -o=custom-columns=UID:.metadata.uid,NODE:.status.nodeName --no-headers
[must-gather-xb9jf] POD 2022-02-27T00:53:58.488025086Z Error from server (NotFound): virtualmachineinstances.kubevirt.io "mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 " not found
[must-gather-xb9jf] POD 2022-02-27T00:53:58.495566006Z + vminfo=
======================


[must-gather-xb9jf] OUT namespaces/mg-ns/vms/mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 /
[must-gather-xb9jf] OUT namespaces/mg-ns/vms/mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 /.bridge.txt
[must-gather-xb9jf] OUT namespaces/mg-ns/vms/mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 /.dumpxml.xml
[must-gather-xb9jf] OUT namespaces/mg-ns/vms/mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 /.ip.txt
[must-gather-xb9jf] OUT namespaces/mg-ns/vms/mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 /.qemu.log
[must-gather-xb9jf] OUT namespaces/mg-ns/vms/mg-vm-0-1645919225-6124628 mg-vm-2-1645919228-4782374 /.ruletables.txt
[must-gather-xb9jf] OUT namespaces/node-gather-unprivileged/

Expected results:
List of vms would be translated right and appropriate information should be collected for them.

Additional info:

Comment 1 Debarati Basu-Nag 2022-04-05 22:26:06 UTC
Verified against CNV-v4.10.1-50
On passing a list of 3 vms out of 5, only 3 vm's had bridge, dumpxml, ip, qemu and rules table

Comment 7 errata-xmlrpc 2022-05-18 20:27:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Virtualization 4.10.1 Images security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:4668


Note You need to log in before you can comment on or make changes to this bug.