Bug 1972262 - [4.8.0] "baremetalhost.metal3.io/detached" uses boolean value where string is expected
Summary: [4.8.0] "baremetalhost.metal3.io/detached" uses boolean value where string is...
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.8.0
Assignee: Mat Kowalski
QA Contact: Yuri Obshansky
URL:
Whiteboard: AI-Team-Platform
Depends On: 1972272
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-15 14:27 UTC by Mat Kowalski
Modified: 2021-07-27 23:13 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 23:12:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift assisted-service pull 2011 0 None closed Bug 1972262: Change default value for BMH_DETACHED_ANNOTATION 2021-06-23 06:56:21 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:13:35 UTC

Description Mat Kowalski 2021-06-15 14:27:02 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 4 nshidlin 2021-06-29 17:37:36 UTC
this bug doesn't block OCP4.8.0 -release -  the fix will be delivered the the ACM channel on the AI-operator add verified then

Comment 6 Chad Crum 2021-07-09 18:11:23 UTC
I have validated the fix.

- hub cluster 4.8.0-fc.7
- acm ds snapshot 2.3.0-DOWNSTREAM-2021-07-06-05-34-53


Steps:
- Deployed a SNO cluster using standard spoke cluster CRDs
- Validated that "assisted-service-controller", rather than "true", is set in the bmh annotation of a deployed spoke cluster


apiVersion: v1
items:
- apiVersion: metal3.io/v1alpha1
  kind: BareMetalHost
  metadata:
    annotations:
      baremetalhost.metal3.io/detached: assisted-service-controller
      inspect.metal3.io: disabled

Comment 9 errata-xmlrpc 2021-07-27 23:12:54 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.8.2 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:2438


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