Bug 1841886

Summary: must-gather is missing collecting BareMetalHost records
Product: OpenShift Container Platform Reporter: Stephen Benjamin <stbenjam>
Component: Cloud ComputeAssignee: Beth White <beth.white>
Cloud Compute sub component: BareMetal Provider QA Contact: Polina Rabinovich <prabinov>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: nyehia, prabinov, stbenjam
Version: 4.5Keywords: Triaged
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
BareMetalHost records are now included in as part of must-gather.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:01:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen Benjamin 2020-05-29 17:58:12 UTC
Description of problem:

When looking at a must-gather, BareMetalHost records are not collected.

Either in the new SLO, or in MAO, we need to add these as relatedObjects so must-gather collects them.

See this code in MAO: https://github.com/openshift/machine-api-operator/blob/master/pkg/operator/status.go#L159-L195

Here's the gather script: https://github.com/openshift/must-gather/blob/master/collection-scripts/gather#L24


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

4.5

How reproducible:

Always

Steps to Reproduce:
1. oc adm must-gather

Actual results:

No baremetalhosts are in the gather data

Expected results:

baremetalhost CR's should be in the openshift-machine-api namespace

Additional info:

Comment 1 Nir 2020-07-02 13:01:54 UTC
I hope it's okay I took over this issue.
Submitted a PR:
https://github.com/openshift/machine-api-operator/pull/630

Comment 2 Nir 2020-07-06 12:01:53 UTC
PR was merged

Comment 5 Polina Rabinovich 2020-08-18 06:27:11 UTC
I checked must-gather and BareMetalHost records are collected.

[kni@provisionhost-0-0 openshift-machine-api]$ ls
apps               autoscaling  build.openshift.io  image.openshift.io    metal3.io              openshift-machine-api.yaml  rbac.authorization.k8s.io
apps.openshift.io  batch        core                machine.openshift.io  monitoring.coreos.com  pods                        route.openshift.io
[kni@provisionhost-0-0 openshift-machine-api]$ cd metal3.io/
[kni@provisionhost-0-0 metal3.io]$ cd baremetalhosts/
[kni@provisionhost-0-0 baremetalhosts]$ ls
openshift-master-0-0.yaml  openshift-master-0-1.yaml  openshift-master-0-2.yaml  openshift-worker-0-0.yaml  openshift-worker-0-1.yaml
[kni@provisionhost-0-0 baremetalhosts]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-08-16-072105   True        False         18h     Cluster version is 4.6.0-0.nightly-2020-08-16-072105

Comment 7 errata-xmlrpc 2020-10-27 16:01:56 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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196