Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-16658

[2058925] Must-gather: for vms with longer name, gather_vms_details fails to collect qemu, dump xml logs

XMLWordPrintable

    • CNV I/U Operators Sprint 217, CNV I/U Operators Sprint 218, CNV I/U Operators Sprint 219, CNV I/U Operators Sprint 220, CNV I/U Operators Sprint 221, CNV I/U Operators Sprint 222

      Description of problem: For vms with longer names, gather_vms_details fails to collect qemu, dump xml logs. Problem seems to be in gather_vm_by_pod_name() of https://github.com/kubevirt/must-gather/blob/main/collection-scripts/gather_vms_details#L57

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

      How reproducible:
      100%

      Steps to Reproduce:
      1. Create vms with longer name, e.g. "must-gather-alternate-vm-0-1645914515-3829353", "must-gather-alternate-vm-1-1645914516-4957256" and "must-gather-alternate-vm-2-1645914517-5781033", in namespace: "must-gather-alternate-unprivileged"
      2. Run must gather script "oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8@sha256:ad5129b71f9a4fbc1dee6a801bd5da626d9bed34d12980a0d61a6d08fc0baa79 – gather_vms_details"
      3. Validate that for the above vms qemu and dumpxml files are empty.

      Actual results:
      from must-gather output
      =======================
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.269160117Z sh -c gather_vm_by_pod_name $1 – must-gather-alternate-unprivileged_virt-launcher-must-gather-alternate-vm-0-1645914515-3829352q9vt
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.269160117Z sh -c gather_vm_by_pod_name $1 – must-gather-alternate-unprivileged_virt-launcher-must-gather-alternate-vm-1-1645914516-495725m5rrx
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.269160117Z sh -c gather_vm_by_pod_name $1 – must-gather-alternate-unprivileged_virt-launcher-must-gather-alternate-vm-2-1645914517-578103zzqq2
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.269160117Z sh -c gather_vm_by_pod_name $1 – node-gather-unprivileged_virt-launcher-must-gather-vm-1645914381-3732803-l7fh7
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.280479341Z inspecting must-gather-alternate-vm-1-1645914516
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.281301463Z inspecting must-gather-vm-1645914381-3732803
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.301879700Z inspecting must-gather-alternate-vm-2-1645914517
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.505544921Z Wrote inspect data to /must-gather.
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.514110272Z Wrote inspect data to /must-gather.
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.530177210Z Wrote inspect data to /must-gather.
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.548382558Z Wrote inspect data to /must-gather.
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.706507494Z Error from server (NotFound): virtualmachineinstances.kubevirt.io "must-gather-alternate-vm-1-1645914516" not found
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.755581294Z Wrote inspect data to /must-gather.
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.761502617Z Error from server (NotFound): virtualmachineinstances.kubevirt.io "must-gather-alternate-vm-2-1645914517" not found
      [must-gather-kxrjb] POD 2022-02-26T22:34:11.765013922Z Error from server (NotFound): virtualmachineinstances.kubevirt.io "must-gather-alternate-vm-0-1645914515" not found
      [must-gather-kxrjb] POD 2022-02-26T22:34:12.524118910Z error: failed to get domain 'must-gather-alternate-unprivileged_must-gather-alternate-vm-2-1645914517'
      [must-gather-kxrjb] POD 2022-02-26T22:34:12.315193717Z error: failed to get domain 'must-gather-alternate-unprivileged_must-gather-alternate-vm-1-1645914516'
      [must-gather-kxrjb] POD 2022-02-26T22:34:12.341134069Z command terminated with exit code 1
      [must-gather-kxrjb] POD 2022-02-26T22:34:12.524118910Z error: failed to get domain 'must-gather-alternate-unprivileged_must-gather-alternate-vm-0-1645914515'
      [must-gather-kxrjb] POD 2022-02-26T22:34:12.530432780Z command terminated with exit code 1
      [must-gather-kxrjb] POD 2022-02-26T22:34:12.530432780Z command terminated with exit code 1
      [must-gather-kxrjb] POD 2022-02-26T22:34:12.754122038Z cat: /var/log/libvirt/qemu/must-gather-alternate-unprivileged_must-gather-alternate-vm-1-1645914516.log: No such file or directory
      [must-gather-kxrjb] POD 2022-02-26T22:34:12.756879309Z command terminated with exit code 1
      [must-gather-kxrjb] POD 2022-02-26T22:34:12.983146862Z cat: /var/log/libvirt/qemu/must-gather-alternate-unprivileged_must-gather-alternate-vm-2-1645914517.log: No such file or directory
      [must-gather-kxrjb] POD 2022-02-26T22:34:13.000909039Z command terminated with exit code 1
      [must-gather-kxrjb] POD 2022-02-26T22:34:13.007900570Z cat: /var/log/libvirt/qemu/must-gather-alternate-unprivileged_must-gather-alternate-vm-0-1645914515.log: No such file or directory
      [must-gather-kxrjb] POD 2022-02-26T22:34:13.021278144Z command terminated with exit code 1
      [must-gather-kxrjb] POD 2022-02-26T22:34:14.895345163Z Error from server (NotFound): virtualmachineinstances.kubevirt.io "must-gather-alternate-vm-1-1645914516" not found
      [must-gather-kxrjb] POD 2022-02-26T22:34:15.147782499Z Error from server (NotFound): virtualmachineinstances.kubevirt.io "must-gather-alternate-vm-2-1645914517" not found
      [must-gather-kxrjb] POD 2022-02-26T22:34:15.188491955Z Defaulted container "virt-handler" out of: virt-handler, virt-launcher (init)
      [must-gather-kxrjb] POD 2022-02-26T22:34:15.283093065Z error: pod, type/name or --filename must be specified
      [must-gather-kxrjb] POD 2022-02-26T22:34:15.447092057Z error: pod, type/name or --filename must be specified
      [must-gather-kxrjb] POD 2022-02-26T22:34:15.496093501Z Error from server (NotFound): virtualmachineinstances.kubevirt.io "must-gather-alternate-vm-0-1645914515" not found
      [must-gather-kxrjb] POD 2022-02-26T22:34:15.830699755Z error: pod, type/name or --filename must be specified
      =============================
      gather_vm_by_pod_name(), line 57 determined the vm name to be "must-gather-alternate-vm-1-1645914516", "must-gather-alternate-vm-2-1645914517" and "must-gather-alternate-vm-0-1645914515", while the actual vm names are:
      =============================
      [cnv-qe-jenkins@c01-dbn-410-jxsmg-executor ~]$ kubectl get vm -A
      NAMESPACE NAME AGE STATUS READY
      must-gather-alternate-unprivileged must-gather-alternate-vm-0-1645914515-3829353 38m Running True
      must-gather-alternate-unprivileged must-gather-alternate-vm-1-1645914516-4957256 38m Running True
      must-gather-alternate-unprivileged must-gather-alternate-vm-2-1645914517-5781033 38m Running True
      ============================

      Expected results:
      Correct vm data would be collected.

      Additional info:

            nunnatsa Nahshon Unna Tsameret
            rhn-support-dbasunag Debarati Basu-Nag
            Ohad Revah Ohad Revah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: