Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1976983

Summary: [master] [assisted operator][docs] Setting automatedCleaningMode: metadata in BMH is overridden to disabled
Product: OpenShift Container Platform Reporter: nshidlin <nshidlin>
Component: assisted-installerAssignee: Mat Kowalski <mko>
assisted-installer sub component: Deployment Operator QA Contact: bjacot
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: low CC: aos-bugs, asegurap, fpercoco, mko, sasha
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AI-Team-Platform
Fixed In Version: OCP-Metal-v1.0.23.1 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1978744 (view as bug list) Environment:
Last Closed: 2021-10-18 17:36:53 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:
Bug Depends On:    
Bug Blocks: 1978744    

Description nshidlin 2021-06-28 16:58:03 UTC
Description of problem:
When setting "automatedCleaningMode: metadata" in bmh resource it is overridden to disabled. If user sets this in the bmh as outlined https://github.com/metal3-io/baremetal-operator/blob/master/docs/api.md#automatedcleaningmode this should be as the user set.  

example bmh CR:
---
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
  name: sno-0-bmh
  namespace: sno-0
  annotations:
    inspect.metal3.io: disabled
    bmac.agent-install.openshift.io/hostname: "sno-0-0"
  labels:
    infraenvs.agent-install.openshift.io: "sno-0"
spec:
  bmc:
    address: redfish-virtualmedia+https://[fd2e:6f44:5dd8::1]:8000/redfish/v1/Systems/54f15ac5-00e2-4eb6-bd8d-35d60e29c5c1                                                  
    credentialsName: sno-0-bmc-secret
    disableCertificateVerification: true
  bootMACAddress: 52:54:00:02:7a:ff
  automatedCleaningMode: metadata
  online: true

How reproducible:
Every time

Steps to Reproduce:
1. Create bmh setting automatedCleaningMode: metadata
2. Inspect the state of the bmh

Actual results:
automatedCleaningMode: disabled is set on the bmh

Expected results:
The user set value should be set

Comment 2 Flavio Percoco 2021-06-29 06:42:25 UTC
`automatedCleaningMode: disabled` is set by BMAC to prevent Ironic from doing any cleaning, or touching the node in any way. The motivations are similar to the ones behind setting `inspect: disabled` and to detaching the node. The goal is to have full control of the node, at least during this first release.

We can explore changing this behavior by simply keeping whatever has been set in the BMH definition. This, however, will introduce latency in the deployment process as Ironic will do the cleaning of the disks, which takes some time.

I would not do this change for 4.8, unless we find out disabling cleaning is causing a really bad user experience or other critical issues.

Comment 8 errata-xmlrpc 2021-10-18 17:36:53 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