From 8e09af0db3bd7e5e7aaa96ddfa2ca97fa2b6489d Mon Sep 17 00:00:00 2001 From: shibaPuppy Date: Wed, 31 May 2023 21:04:07 +0900 Subject: [PATCH] Change the power control of bmh --- baremetal/metal3machine_manager.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/baremetal/metal3machine_manager.go b/baremetal/metal3machine_manager.go index 7de1fecb01..1eb6599590 100644 --- a/baremetal/metal3machine_manager.go +++ b/baremetal/metal3machine_manager.go @@ -1156,7 +1156,9 @@ func (m *MachineManager) setHostSpec(ctx context.Context, host *bmov1alpha1.Bare } } - host.Spec.Online = true + if host.Status.Provisioning.State != bmov1alpha1.StateProvisioned { + host.Spec.Online = true + } return nil }