Bug 1972272 - [master] "baremetalhost.metal3.io/detached" uses boolean value where string is expected
Summary: [master] "baremetalhost.metal3.io/detached" uses boolean value where string i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: assisted-installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.9.0
Assignee: Mat Kowalski
QA Contact: Yuri Obshansky
URL:
Whiteboard: AI-Team-Platform
Depends On:
Blocks: 1972262
TreeView+ depends on / blocked
 
Reported: 2021-06-15 14:39 UTC by Mat Kowalski
Modified: 2021-10-18 17:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-18 17:34:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift assisted-service pull 1974 0 None closed NO-ISSUE: Change default value for BMH_DETACHED_ANNOTATION 2021-06-15 14:39:52 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:34:45 UTC

Description Mat Kowalski 2021-06-15 14:39:01 UTC
In the baremetal-operator the "baremetalhost.metal3.io/detached" annotation is a string value with the following behaviour

- existence of the label defines host as detached
- missing label defines the host as not detached

This has the following consequence - the value of the annotation is always ignored (this was a design decision).

In assisted-service we are setting value to "true" what may create an implicit assumption that the value is a boolean and setting it to "false" would reverse the behaviour. This is not the case and `baremetalhost.metal3.io/detached: "false"` still causes the host to be treated as detached.

The issue has been already fixed on master via https://github.com/openshift/assisted-service/pull/1974 so that we are setting `baremetalhost.metal3.io/detached: "assisted-service-controller"`

Comment 1 Mat Kowalski 2021-06-18 07:34:12 UTC
I have verified the bug after merging to master, QE confirmation/approval would be appreciated

```
# oc -n assisted-installer-manual-bundle describe bmh ostest-extraworker-0
Name:         ostest-extraworker-0                       
Namespace:    assisted-installer-manual-bundle            
Labels:       infraenvs.agent-install.openshift.io=myinfraenv
Annotations:  baremetalhost.metal3.io/detached: assisted-service-controller
              inspect.metal3.io: disabled
API Version:  metal3.io/v1alpha1
Kind:         BareMetalHost      
[...]
```

Comment 5 errata-xmlrpc 2021-10-18 17:34:18 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 Container Platform 4.9.0 bug fix and security 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-2021:3759


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