Bug 1777966

Summary: Registered hosts from the GUI are created under the default namespace instead of openshift-machine-api
Product: OpenShift Container Platform Reporter: Udi Kalifon <ukalifon>
Component: Console Metal3 PluginAssignee: Jiri Tomasek <jtomasek>
Status: CLOSED ERRATA QA Contact: Udi Kalifon <ukalifon>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, jtomasek, vlaad, yanpzhan
Target Milestone: ---   
Target Release: 4.4.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-26 16:50:30 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 Udi Kalifon 2019-11-28 20:07:05 UTC
Description of problem:
I registered another worker using the GUI, and it never got passed the "powering up" stage. From the CLI I could see that it was registered in the "default" namespace:

$ oc get baremetalhosts --all-namespaces
NAMESPACE               NAME         
default                 worker-1

This problem, in turn, also makes it impossible to delete the host from the GUI (the "delete" command is not available)


Version-Release number of selected component (if applicable):
4.4.0-0.ci-2019-11-28-063411


How reproducible:
100%


Steps to Reproduce:
1. Register a node from the GUI

Comment 1 Jiri Tomasek 2019-12-02 10:12:32 UTC
The host is registered in currently active project as expected. It seems that a host has to be created in openshift-machine-api to be acted upon by MAO or BMO (?). When user goes to Machines page, the UI switches the namespace to openshift-machine-api. We can do the same with baremetal hosts page, but it doesn't prevent user from subseguently change the namespace (project) to something different. Same applies to CLI. The exact same issue can be observed on Machines, so I guess that's expected but not very user friendly.

Comment 2 Udi Kalifon 2019-12-03 07:54:20 UTC
Allowing the user to register the hosts in the wrong namespace makes no sense. Can we just always run the registration in the right namespace? The same goes for reading the hosts - regardless of which namespace is currently selected in the UI, we should get the data from openshift-machine-api. This should be fixed in 4.3 as well.

Comment 5 Yanping Zhang 2020-05-21 06:48:02 UTC
Checked on 4.4 cluster with payload: 4.4.0-0.nightly-2020-05-18-164758
Goto "Bare Metal Hosts" page, it will switch to namespace "openshift-machine-api" by default, and adding host from console will also create host in namespace "openshift-machine-api" by default now.
The bug is fixed.

Comment 8 errata-xmlrpc 2020-05-26 16:50:30 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, 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:2180