Repository: metal3-io/baremetal-operator
Pull request #766 (2021-01-18 15:22:25)

Bump controller-tools to v0.4.1
Signed-off-by: s3rj1k <evasive.gyron@gmail.com>

metal3-io-bot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/metal3-io/baremetal-operator/pull/766#" title="Author self-approved">s3rj1k</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **maelk**
You can assign the PR to them by writing `/assign @maelk` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=metal3-io%2Fbaremetal-operator).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/metal3-io/baremetal-operator/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["maelk"]} -->
metal3-io-bot: Hi @s3rj1k. Thanks for your PR.

I'm waiting for a [metal3-io](https://github.com/orgs/metal3-io/people) member to verify that this patch is reasonable to test. If it is, they should reply with `/ok-to-test` on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should [join the org](https://github.com/orgs/metal3-io/people) to skip this step.

Once the patch is verified, the new status will be reflected by the `ok-to-test` label.

I understand the commands that are listed [here](https://go.k8s.io/bot-commands?repo=metal3-io%2Fbaremetal-operator).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>

s3rj1k: /assign @maelk
dhellmann: /ok-to-test

This looks fine. If there is something specific motivating the change, it would be nice to have it in the commit message for later.
s3rj1k: @dhellmann Thanks.

This bugfix `Don't generate schema with Any in it, its not supported` from controller-tools [upstream](https://github.com/kubernetes-sigs/controller-tools/releases/tag/v0.4.1).

Patch:
diff --git a/Makefile b/Makefile
index 80634709..e50f330e 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ COVER_PROFILE = cover.out
 BIN_DIR := bin
 
 CRD_OPTIONS ?= "crd:trivialVersions=false,allowDangerousTypes=true,crdVersions=v1"
-CONTROLLER_TOOLS_VERSION=v0.4.0
+CONTROLLER_TOOLS_VERSION=v0.4.1
 CONTROLLER_GEN := $(BIN_DIR)/controller-gen
 GOLANGCI_LINT := $(BIN_DIR)/golangci-lint
 KUSTOMIZE := $(BIN_DIR)/kustomize
diff --git a/apis/metal3.io/v1alpha1/baremetalhost_types.go b/apis/metal3.io/v1alpha1/baremetalhost_types.go
index 8865d6f7..aa63aefb 100644
--- a/apis/metal3.io/v1alpha1/baremetalhost_types.go
+++ b/apis/metal3.io/v1alpha1/baremetalhost_types.go
@@ -123,9 +123,6 @@ const (
 type ErrorType string
 
 const (
-	// ProvisionedRegistrationError is an error condition occurring when the controller
-	// is unable to re-register an already provisioned host.
-	ProvisionedRegistrationError ErrorType = "provisioned registration error"
 	// RegistrationError is an error condition occurring when the
 	// controller is unable to connect to the Host's baseboard management
 	// controller.
@@ -300,18 +297,15 @@ type Image struct {
 	URL string `json:"url"`
 
 	// Checksum is the checksum for the image.
-	Checksum string `json:"checksum,omitempty"`
+	Checksum string `json:"checksum"`
 
 	// ChecksumType is the checksum algorithm for the image.
 	// e.g md5, sha256, sha512
 	ChecksumType ChecksumType `json:"checksumType,omitempty"`
 
-	// DiskFormat contains the format of the image (raw, qcow2, ...).
-	// Needs to be set to raw for raw images streaming.
-	// Note live-iso means an iso referenced by the url will be live-booted
-	// and not deployed to disk, and in this case the checksum options
-	// are not required and if specified will be ignored.
-	// +kubebuilder:validation:Enum=raw;qcow2;vdi;vmdk;live-iso
+	// DiskFormat contains the format of the image (raw, qcow2, ...)
+	// Needs to be set to raw for raw images streaming
+	// +kubebuilder:validation:Enum=raw;qcow2;vdi;vmdk
 	DiskFormat *string `json:"format,omitempty"`
 }
 
@@ -528,7 +522,7 @@ type BareMetalHostStatus struct {
 
 	// ErrorType indicates the type of failure encountered when the
 	// OperationalStatus is OperationalStatusError
-	// +kubebuilder:validation:Enum=provisioned registration error;registration error;inspection error;provisioning error;power management error
+	// +kubebuilder:validation:Enum=registration error;inspection error;provisioning error;power management error
 	ErrorType ErrorType `json:"errorType,omitempty"`
 
 	// LastUpdated identifies when this status was last observed.
@@ -818,12 +812,6 @@ func (image *Image) GetChecksum() (checksum, checksumType string, ok bool) {
 		return
 	}
 
-	if image.DiskFormat != nil && *image.DiskFormat == "live-iso" {
-		// Checksum is not required for live-iso
-		ok = true
-		return
-	}
-
 	if image.Checksum == "" {
 		// Return empty if checksum is not provided
 		return
diff --git a/config/crd/bases/metal3.io_baremetalhosts.yaml b/config/crd/bases/metal3.io_baremetalhosts.yaml
index 2ef56a59..5e1ed806 100644
--- a/config/crd/bases/metal3.io_baremetalhosts.yaml
+++ b/config/crd/bases/metal3.io_baremetalhosts.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.4.0
+    controller-gen.kubebuilder.io/version: v0.4.1
   creationTimestamp: null
   name: baremetalhosts.metal3.io
 spec:
@@ -141,18 +141,18 @@ spec:
                     - sha512
                     type: string
                   format:
-                    description: DiskFormat contains the format of the image (raw, qcow2, ...). Needs to be set to raw for raw images streaming. Note live-iso means an iso referenced by the url will be live-booted and not deployed to disk, and in this case the checksum options are not required and if specified will be ignored.
+                    description: DiskFormat contains the format of the image (raw, qcow2, ...) Needs to be set to raw for raw images streaming
                     enum:
                     - raw
                     - qcow2
                     - vdi
                     - vmdk
-                    - live-iso
                     type: string
                   url:
                     description: URL is a location of an image to deploy.
                     type: string
                 required:
+                - checksum
                 - url
                 type: object
               metaData:
@@ -262,7 +262,6 @@ spec:
               errorType:
                 description: ErrorType indicates the type of failure encountered when the OperationalStatus is OperationalStatusError
                 enum:
-                - provisioned registration error
                 - registration error
                 - inspection error
                 - provisioning error
@@ -555,18 +554,18 @@ spec:
                         - sha512
                         type: string
                       format:
-                        description: DiskFormat contains the format of the image (raw, qcow2, ...). Needs to be set to raw for raw images streaming. Note live-iso means an iso referenced by the url will be live-booted and not deployed to disk, and in this case the checksum options are not required and if specified will be ignored.
+                        description: DiskFormat contains the format of the image (raw, qcow2, ...) Needs to be set to raw for raw images streaming
                         enum:
                         - raw
                         - qcow2
                         - vdi
                         - vmdk
-                        - live-iso
                         type: string
                       url:
                         description: URL is a location of an image to deploy.
                         type: string
                     required:
+                    - checksum
                     - url
                     type: object
                   rootDeviceHints:
diff --git a/config/render/capm3.yaml b/config/render/capm3.yaml
index 20ceb5dc..af148d8b 100644
--- a/config/render/capm3.yaml
+++ b/config/render/capm3.yaml
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.4.0
+    controller-gen.kubebuilder.io/version: v0.4.1
   creationTimestamp: null
   name: baremetalhosts.metal3.io
 spec:
@@ -139,18 +139,18 @@ spec:
                     - sha512
                     type: string
                   format:
-                    description: DiskFormat contains the format of the image (raw, qcow2, ...). Needs to be set to raw for raw images streaming. Note live-iso means an iso referenced by the url will be live-booted and not deployed to disk, and in this case the checksum options are not required and if specified will be ignored.
+                    description: DiskFormat contains the format of the image (raw, qcow2, ...) Needs to be set to raw for raw images streaming
                     enum:
                     - raw
                     - qcow2
                     - vdi
                     - vmdk
-                    - live-iso
                     type: string
                   url:
                     description: URL is a location of an image to deploy.
                     type: string
                 required:
+                - checksum
                 - url
                 type: object
               metaData:
@@ -260,7 +260,6 @@ spec:
               errorType:
                 description: ErrorType indicates the type of failure encountered when the OperationalStatus is OperationalStatusError
                 enum:
-                - provisioned registration error
                 - registration error
                 - inspection error
                 - provisioning error
@@ -553,18 +552,18 @@ spec:
                         - sha512
                         type: string
                       format:
-                        description: DiskFormat contains the format of the image (raw, qcow2, ...). Needs to be set to raw for raw images streaming. Note live-iso means an iso referenced by the url will be live-booted and not deployed to disk, and in this case the checksum options are not required and if specified will be ignored.
+                        description: DiskFormat contains the format of the image (raw, qcow2, ...) Needs to be set to raw for raw images streaming
                         enum:
                         - raw
                         - qcow2
                         - vdi
                         - vmdk
-                        - live-iso
                         type: string
                       url:
                         description: URL is a location of an image to deploy.
                         type: string
                     required:
+                    - checksum
                     - url
                     type: object
                   rootDeviceHints:
diff --git a/controllers/metal3.io/baremetalhost_controller.go b/controllers/metal3.io/baremetalhost_controller.go
index d5967ce2..502116e2 100644
--- a/controllers/metal3.io/baremetalhost_controller.go
+++ b/controllers/metal3.io/baremetalhost_controller.go
@@ -280,11 +280,10 @@ func recordActionFailure(info *reconcileInfo, errorType metal3v1alpha1.ErrorType
 	setErrorMessage(info.host, errorType, errorMessage)
 
 	eventType := map[metal3v1alpha1.ErrorType]string{
-		metal3v1alpha1.ProvisionedRegistrationError: "ProvisionedRegistrationError",
-		metal3v1alpha1.RegistrationError:            "RegistrationError",
-		metal3v1alpha1.InspectionError:              "InspectionError",
-		metal3v1alpha1.ProvisioningError:            "ProvisioningError",
-		metal3v1alpha1.PowerManagementError:         "PowerManagementError",
+		metal3v1alpha1.RegistrationError:    "RegistrationError",
+		metal3v1alpha1.InspectionError:      "InspectionError",
+		metal3v1alpha1.ProvisioningError:    "ProvisioningError",
+		metal3v1alpha1.PowerManagementError: "PowerManagementError",
 	}[errorType]
 
 	counter := actionFailureCounters.WithLabelValues(eventType)
@@ -468,8 +467,7 @@ func (r *BareMetalHostReconciler) registerHost(prov provisioner.Provisioner, inf
 	// Reaching this point means the credentials are valid and worked,
 	// so clear any previous error and record the success in the
 	// status block.
-	registeredNewCreds := !info.host.Status.GoodCredentials.Match(*info.bmcCredsSecret)
-	if registeredNewCreds {
+	if !info.host.Status.GoodCredentials.Match(*info.bmcCredsSecret) {
 		info.log.Info("updating credentials success status fields")
 		info.host.UpdateGoodCredentials(*info.bmcCredsSecret)
 		info.publishEvent("BMCAccessValidated", "Verified access to BMC")
@@ -477,10 +475,9 @@ func (r *BareMetalHostReconciler) registerHost(prov provisioner.Provisioner, inf
 	} else {
 		info.log.Info("verified access to the BMC")
 	}
-
-	if info.host.Status.ErrorType == metal3v1alpha1.RegistrationError || registeredNewCreds {
+	if clearError(info.host) {
 		info.log.Info("clearing previous error message")
-		dirty = clearError(info.host)
+		dirty = true
 	}
 
 	if dirty {
@@ -615,28 +612,26 @@ func clearHostProvisioningSettings(host *metal3v1alpha1.BareMetalHost) {
 }
 
 func (r *BareMetalHostReconciler) actionDeprovisioning(prov provisioner.Provisioner, info *reconcileInfo) actionResult {
-	if info.host.Status.Provisioning.Image.URL != "" {
-		// Adopt the host in case it has been re-registered during the
-		// deprovisioning process before it completed
-		provResult, err := prov.Adopt(info.host.Status.ErrorType == metal3v1alpha1.ProvisionedRegistrationError)
-		if err != nil {
-			return actionError{err}
-		}
-		if provResult.ErrorMessage != "" {
-			return recordActionFailure(info, metal3v1alpha1.ProvisionedRegistrationError, provResult.ErrorMessage)
-		}
-		if provResult.Dirty {
-			result := actionContinue{provResult.RequeueAfter}
-			if clearError(info.host) {
-				return actionUpdate{result}
-			}
-			return result
+	// Adopt the host in case it has been re-registered during the
+	// deprovisioning process before it completed
+	provResult, err := prov.Adopt(info.host.Status.ErrorType == metal3v1alpha1.RegistrationError)
+	if err != nil {
+		return actionError{err}
+	}
+	if provResult.ErrorMessage != "" {
+		return recordActionFailure(info, metal3v1alpha1.RegistrationError, provResult.ErrorMessage)
+	}
+	if provResult.Dirty {
+		result := actionContinue{provResult.RequeueAfter}
+		if clearError(info.host) {
+			return actionUpdate{result}
 		}
+		return result
 	}
 
 	info.log.Info("deprovisioning")
 
-	provResult, err := prov.Deprovision(info.host.Status.ErrorType == metal3v1alpha1.ProvisioningError)
+	provResult, err = prov.Deprovision(info.host.Status.ErrorType == metal3v1alpha1.ProvisioningError)
 	if err != nil {
 		return actionError{errors.Wrap(err, "failed to deprovision")}
 	}
@@ -761,12 +756,12 @@ func (r *BareMetalHostReconciler) manageHostPower(prov provisioner.Provisioner,
 // action. We use the Adopt() API to make sure that the provisioner is aware of
 // the provisioning details. Then we monitor its power status.
 func (r *BareMetalHostReconciler) actionManageSteadyState(prov provisioner.Provisioner, info *reconcileInfo) actionResult {
-	provResult, err := prov.Adopt(info.host.Status.ErrorType == metal3v1alpha1.ProvisionedRegistrationError)
+	provResult, err := prov.Adopt(info.host.Status.ErrorType == metal3v1alpha1.RegistrationError)
 	if err != nil {
 		return actionError{err}
 	}
 	if provResult.ErrorMessage != "" {
-		return recordActionFailure(info, metal3v1alpha1.ProvisionedRegistrationError, provResult.ErrorMessage)
+		return recordActionFailure(info, metal3v1alpha1.RegistrationError, provResult.ErrorMessage)
 	}
 	if provResult.Dirty {
 		result := actionContinue{provResult.RequeueAfter}
diff --git a/docs/api.md b/docs/api.md
index f5011ff5..3a16ea43 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -92,10 +92,8 @@ The sub-fields are
   only `md5`, `sha256`, `sha512` are recognized. If nothing is specified
   `md5` is assumed.
 * *format* -- This is the disk format of the image. It can be one of `raw`,
-  `qcow2`, `vdi`, `vmdk`, `live-iso` or be left unset.
-  Setting it to raw enables raw image streaming in Ironic agent for that image.
-  Setting it to live-iso enables iso images to live boot without deploying
-  to disk, in this case the checksum fields are ignored.
+  `qcow2`, `vdi`, `vmdk`, or be left unset. Setting it to raw enables raw
+  image streaming in Ironic agent for that image.
 
 Even though the image sub-fields are required by Ironic,
 when the host provisioning is managed externally via `externallyProvisioned: true`,
diff --git a/go.mod b/go.mod
index 36883bb8..0dfab0c9 100644
--- a/go.mod
+++ b/go.mod
@@ -16,7 +16,7 @@ require (
 	k8s.io/client-go v0.20.0
 	k8s.io/utils v0.0.0-20201110183641-67b214c5f920
 	sigs.k8s.io/controller-runtime v0.6.2
-	sigs.k8s.io/controller-tools v0.4.0
+	sigs.k8s.io/controller-tools v0.4.1
 	sigs.k8s.io/kustomize/kustomize/v3 v3.8.5
 	sigs.k8s.io/yaml v1.2.0
 )
diff --git a/go.sum b/go.sum
index 9e394227..3c377fb5 100644
--- a/go.sum
+++ b/go.sum
@@ -1219,8 +1219,8 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
 sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0=
 sigs.k8s.io/controller-runtime v0.6.2 h1:jkAnfdTYBpFwlmBn3pS5HFO06SfxvnTZ1p5PeEF/zAA=
 sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E=
-sigs.k8s.io/controller-tools v0.4.0 h1:9zIdrc6q9RKke8+DnVPVBVZ+cfF9L0TwM01cxNnklYo=
-sigs.k8s.io/controller-tools v0.4.0/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU=
+sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w=
+sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU=
 sigs.k8s.io/kustomize/api v0.6.3 h1:CX9Vot48rKRYZXzDkYJ7aJ4pEfjl8u7W8MPysbfYWps=
 sigs.k8s.io/kustomize/api v0.6.3/go.mod h1:mTwLqPB2uqh7LOcYoJKKHIfP5ioS6t3NfZ8lvia4NJY=
 sigs.k8s.io/kustomize/cmd/config v0.8.2 h1:TjKaTODb30/Ai0lFtzt0l9yfmkxpE7/GZsxV9TJbLAA=
diff --git a/hack/install-controller-gen.sh b/hack/install-controller-gen.sh
index ff317d99..60e7c2b0 100755
--- a/hack/install-controller-gen.sh
+++ b/hack/install-controller-gen.sh
@@ -13,7 +13,7 @@ then
 fi
 
 
-CMDPATH="$GOPATH/pkg/mod/sigs.k8s.io/controller-tools@v0.4.0/cmd/controller-gen"
+CMDPATH="$GOPATH/pkg/mod/sigs.k8s.io/controller-tools@${1:-v0.4.1}/cmd/controller-gen"
 
 if [ ! -f "$CMDPATH" ]
 then
diff --git a/pkg/provisioner/ironic/ironic.go b/pkg/provisioner/ironic/ironic.go
index 9e364fcb..8dc7c6fe 100644
--- a/pkg/provisioner/ironic/ironic.go
+++ b/pkg/provisioner/ironic/ironic.go
@@ -372,7 +372,6 @@ func (p *ironicProvisioner) ValidateManagementAccess(credentialsChanged, force b
 				BootInterface:       p.bmcAccess.BootInterface(),
 				Name:                p.host.Name,
 				DriverInfo:          driverInfo,
-				DeployInterface:     p.deployInterface(),
 				InspectInterface:    "inspector",
 				ManagementInterface: p.bmcAccess.ManagementInterface(),
 				PowerInterface:      p.bmcAccess.PowerInterface(),
@@ -722,7 +721,7 @@ func (p *ironicProvisioner) UpdateHardwareState() (hwState provisioner.HardwareS
 }
 
 func (p *ironicProvisioner) getImageUpdateOptsForNode(ironicNode *nodes.Node, imageData *metal3v1alpha1.Image) (updates nodes.UpdateOpts, err error) {
-	checksum, checksumType, ok := imageData.GetChecksum()
+	checksum, checksumType, ok := p.host.GetImageChecksum()
 	if !ok {
 		p.log.Info("image/checksum not found for host")
 		return
@@ -737,72 +736,8 @@ func (p *ironicProvisioner) getImageUpdateOptsForNode(ironicNode *nodes.Node, im
 			Value: string(p.host.ObjectMeta.UID),
 		},
 	)
-	// live-iso format
-	var op nodes.UpdateOp
-	if imageData.DiskFormat != nil && *imageData.DiskFormat == "live-iso" {
-		if _, ok := ironicNode.InstanceInfo["boot_iso"]; !ok {
-			op = nodes.AddOp
-			p.log.Info("adding boot_iso")
-		} else {
-			op = nodes.ReplaceOp
-			p.log.Info("updating boot_iso")
-		}
-		updates = append(
-			updates,
-			nodes.UpdateOperation{
-				Op:    op,
-				Path:  "/instance_info/boot_iso",
-				Value: imageData.URL,
-			},
-		)
-		updates = append(
-			updates,
-			nodes.UpdateOperation{
-				Op:    nodes.ReplaceOp,
-				Path:  "/deploy_interface",
-				Value: "ramdisk",
-			},
-		)
-		// remove any image_source or checksum options
-		removals := []string{
-			"image_source", "image_os_hash_value", "image_os_hash_algo", "image_checksum"}
-		op = nodes.RemoveOp
-		for _, item := range removals {
-			if _, ok := ironicNode.InstanceInfo[item]; ok {
-				p.log.Info("removing " + item)
-				updates = append(
-					updates,
-					nodes.UpdateOperation{
-						Op:   op,
-						Path: "/instance_info/" + item,
-					},
-				)
-			}
-		}
-		return updates, nil
-	}
-
-	// Set deploy_interface direct when not booting a live-iso
-	updates = append(
-		updates,
-		nodes.UpdateOperation{
-			Op:    nodes.ReplaceOp,
-			Path:  "/deploy_interface",
-			Value: "direct",
-		},
-	)
-	// Remove any boot_iso field
-	if _, ok := ironicNode.InstanceInfo["boot_iso"]; ok {
-		p.log.Info("removing boot_iso")
-		updates = append(
-			updates,
-			nodes.UpdateOperation{
-				Op:   nodes.RemoveOp,
-				Path: "/instance_info/boot_iso",
-			},
-		)
-	}
 	// image_source
+	var op nodes.UpdateOp
 	if _, ok := ironicNode.InstanceInfo["image_source"]; !ok {
 		op = nodes.AddOp
 		p.log.Info("adding image_source")
@@ -905,13 +840,34 @@ func (p *ironicProvisioner) getUpdateOptsForNode(ironicNode *nodes.Node) (update
 	}
 	updates = append(updates, imageOpts...)
 
+	// root_gb
+	//
+	// FIXME(dhellmann): We have to provide something for the disk
+	// size until https://storyboard.openstack.org/#!/story/2005165 is
+	// fixed in ironic.
+	var op nodes.UpdateOp
+	if _, ok := ironicNode.InstanceInfo["root_gb"]; !ok {
+		op = nodes.AddOp
+		p.log.Info("adding root_gb")
+	} else {
+		op = nodes.ReplaceOp
+		p.log.Info("updating root_gb")
+	}
+	updates = append(
+		updates,
+		nodes.UpdateOperation{
+			Op:    op,
+			Path:  "/instance_info/root_gb",
+			Value: hwProf.RootGB,
+		},
+	)
+
 	// root_device
 	//
 	// FIXME(dhellmann): We need to specify the root device to receive
 	// the image. That should come from some combination of inspecting
 	// the host to see what is available and the hardware profile to
 	// give us instructions.
-	var op nodes.UpdateOp
 	if _, ok := ironicNode.Properties["root_device"]; !ok {
 		op = nodes.AddOp
 		p.log.Info("adding root_device")
@@ -1081,14 +1037,6 @@ func (p *ironicProvisioner) setUpForProvisioning(ironicNode *nodes.Node, hostCon
 	return
 }
 
-func (p *ironicProvisioner) deployInterface() (result string) {
-	result = "direct"
-	if p.host.Spec.Image != nil && p.host.Spec.Image.DiskFormat != nil && *p.host.Spec.Image.DiskFormat == "live-iso" {
-		result = "ramdisk"
-	}
-	return result
-}
-
 // Adopt allows an externally-provisioned server to be adopted by Ironic.
 func (p *ironicProvisioner) Adopt(force bool) (result provisioner.Result, err error) {
 	var ironicNode *nodes.Node
@@ -1131,30 +1079,6 @@ func (p *ironicProvisioner) Adopt(force bool) (result provisioner.Result, err er
 	return operationComplete()
 }
 
-func (p *ironicProvisioner) ironicHasSameImage(ironicNode *nodes.Node) (sameImage bool) {
-	// To make it easier to test if ironic is configured with
-	// the same image we are trying to provision to the host.
-	if p.host.Spec.Image != nil && p.host.Spec.Image.DiskFormat != nil && *p.host.Spec.Image.DiskFormat == "live-iso" {
-		sameImage = (ironicNode.InstanceInfo["boot_iso"] == p.host.Spec.Image.URL)
-		p.log.Info("checking image settings",
-			"boot_iso", ironicNode.InstanceInfo["boot_iso"],
-			"same", sameImage,
-			"provisionState", ironicNode.ProvisionState)
-	} else {
-		checksum, checksumType, _ := p.host.GetImageChecksum()
-		sameImage = (ironicNode.InstanceInfo["image_source"] == p.host.Spec.Image.URL &&
-			ironicNode.InstanceInfo["image_os_hash_algo"] == checksumType &&
-			ironicNode.InstanceInfo["image_os_hash_value"] == checksum)
-		p.log.Info("checking image settings",
-			"source", ironicNode.InstanceInfo["image_source"],
-			"image_os_hash_algo", checksumType,
-			"image_os_has_value", checksum,
-			"same", sameImage,
-			"provisionState", ironicNode.ProvisionState)
-	}
-	return sameImage
-}
-
 // Provision writes the image from the host spec to the host. It may
 // be called multiple times, and should return true for its dirty flag
 // until the deprovisioning operation is completed.
@@ -1170,7 +1094,20 @@ func (p *ironicProvisioner) Provision(hostConf provisioner.HostConfigData) (resu
 
 	p.log.Info("provisioning image to host", "state", ironicNode.ProvisionState)
 
-	ironicHasSameImage := p.ironicHasSameImage(ironicNode)
+	checksum, checksumType, _ := p.host.GetImageChecksum()
+
+	// Local variable to make it easier to test if ironic is
+	// configured with the same image we are trying to provision to
+	// the host.
+	ironicHasSameImage := (ironicNode.InstanceInfo["image_source"] == p.host.Spec.Image.URL &&
+		ironicNode.InstanceInfo["image_os_hash_algo"] == checksumType &&
+		ironicNode.InstanceInfo["image_os_hash_value"] == checksum)
+	p.log.Info("checking image settings",
+		"source", ironicNode.InstanceInfo["image_source"],
+		"image_os_hash_algo", checksumType,
+		"image_os_has_value", checksum,
+		"same", ironicHasSameImage,
+		"provisionState", ironicNode.ProvisionState)
 
 	// Ironic has the settings it needs, see if it finds any issues
 	// with them.
@@ -1392,7 +1329,7 @@ func (p *ironicProvisioner) Deprovision(force bool) (result provisioner.Result,
 		p.log.Info("cleaning")
 		return operationContinuing(deprovisionRequeueDelay)
 
-	case nodes.Active, nodes.DeployFail:
+	case nodes.Active:
 		p.log.Info("starting deprovisioning")
 		p.publisher("DeprovisioningStarted", "Image deprovisioning started")
 		return p.changeNodeProvisionState(


Test patch:
diff --git a/controllers/metal3.io/host_state_machine_test.go b/controllers/metal3.io/host_state_machine_test.go
index 58d9a3d2..51c1a971 100644
--- a/controllers/metal3.io/host_state_machine_test.go
+++ b/controllers/metal3.io/host_state_machine_test.go
@@ -289,59 +289,6 @@ func TestErrorCountCleared(t *testing.T) {
 	}
 }
 
-func TestErrorClean(t *testing.T) {
-
-	tests := []struct {
-		Scenario    string
-		Host        *metal3v1alpha1.BareMetalHost
-		SecretName  string
-		ExpectError bool
-	}{
-		{
-			Scenario: "clean-after-registration-error",
-			Host: host(metal3v1alpha1.StateInspecting).
-				SetStatusError(metal3v1alpha1.OperationalStatusError, metal3v1alpha1.RegistrationError, "some error", 1).
-				build(),
-		},
-		{
-			Scenario: "not-clean-after-provisioned-registration-error",
-			Host: host(metal3v1alpha1.StateInspecting).
-				SetStatusError(metal3v1alpha1.OperationalStatusError, metal3v1alpha1.ProvisionedRegistrationError, "some error", 1).
-				build(),
-			ExpectError: true,
-		},
-		{
-			Scenario: "clean-after-creds-change",
-			Host: host(metal3v1alpha1.StateReady).
-				SetStatusError(metal3v1alpha1.OperationalStatusError, metal3v1alpha1.InspectionError, "some error", 1).
-				build(),
-			SecretName: "NewCreds",
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.Scenario, func(t *testing.T) {
-			prov := &mockProvisioner{}
-			hsm := newHostStateMachine(tt.Host, &BareMetalHostReconciler{}, prov, true)
-
-			info := makeDefaultReconcileInfo(tt.Host)
-			if tt.SecretName != "" {
-				info.bmcCredsSecret.Name = tt.SecretName
-			}
-
-			hsm.ReconcileState(info)
-
-			if tt.ExpectError {
-				assert.Equal(t, tt.Host.Status.ErrorType, v1alpha1.ProvisionedRegistrationError)
-				assert.NotEmpty(t, tt.Host.Status.ErrorMessage)
-			} else {
-				assert.Equal(t, tt.Host.Status.OperationalStatus, v1alpha1.OperationalStatusOK)
-				assert.Empty(t, tt.Host.Status.ErrorType)
-				assert.Empty(t, tt.Host.Status.ErrorMessage)
-			}
-		})
-	}
-}
-
 type hostBuilder struct {
 	metal3v1alpha1.BareMetalHost
 }
@@ -387,15 +334,6 @@ func (hb *hostBuilder) SetImageURL(url string) *hostBuilder {
 	return hb
 }
 
-func (hb *hostBuilder) SetStatusError(opStatus metal3v1alpha1.OperationalStatus, errType metal3v1alpha1.ErrorType, errMsg string, errCount int) *hostBuilder {
-	hb.Status.OperationalStatus = opStatus
-	hb.Status.ErrorType = errType
-	hb.Status.ErrorMessage = errMsg
-	hb.Status.ErrorCount = errCount
-
-	return hb
-}
-
 func makeDefaultReconcileInfo(host *metal3v1alpha1.BareMetalHost) *reconcileInfo {
 	return &reconcileInfo{
 		log:     logf.Log.WithName("controllers").WithName("BareMetalHost").WithName("host_state_machine"),
diff --git a/pkg/provisioner/ironic/ironic_test.go b/pkg/provisioner/ironic/ironic_test.go
index f4d7bb7c..864609a3 100644
--- a/pkg/provisioner/ironic/ironic_test.go
+++ b/pkg/provisioner/ironic/ironic_test.go
@@ -71,12 +71,5 @@ func makeHost() metal3v1alpha1.BareMetalHost {
 	}
 }
 
-func makeHostLiveIso() (host metal3v1alpha1.BareMetalHost) {
-	host = makeHost()
-	format := "live-iso"
-	host.Spec.Image.DiskFormat = &format
-	return host
-}
-
 // Implements provisioner.EventPublisher to swallow events for tests.
 func nullEventPublisher(reason, message string) {}
diff --git a/pkg/provisioner/ironic/provision_test.go b/pkg/provisioner/ironic/provision_test.go
index 7f578915..947cecab 100644
--- a/pkg/provisioner/ironic/provision_test.go
+++ b/pkg/provisioner/ironic/provision_test.go
@@ -8,7 +8,6 @@ import (
 	"github.com/gophercloud/gophercloud/openstack/baremetalintrospection/v1/introspection"
 	"github.com/stretchr/testify/assert"
 
-	"github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1"
 	"github.com/metal3-io/baremetal-operator/pkg/bmc"
 	"github.com/metal3-io/baremetal-operator/pkg/provisioner/fixture"
 	"github.com/metal3-io/baremetal-operator/pkg/provisioner/ironic/clients"
@@ -146,15 +145,6 @@ func TestDeprovision(t *testing.T) {
 			expectedRequestAfter: 10,
 			expectedDirty:        true,
 		},
-		{
-			name: "deploy failed state",
-			ironic: testserver.NewIronic(t).WithDefaultResponses().Node(nodes.Node{
-				ProvisionState: string(nodes.DeployFail),
-				UUID:           nodeUUID,
-			}),
-			expectedRequestAfter: 10,
-			expectedDirty:        true,
-		},
 		{
 			name: "error state",
 			ironic: testserver.NewIronic(t).WithDefaultResponses().Node(nodes.Node{
@@ -238,136 +228,3 @@ func TestDeprovision(t *testing.T) {
 		})
 	}
 }
-
-func TestIronicHasSameImage(t *testing.T) {
-	nodeUUID := "33ce8659-7400-4c68-9535-d10766f07a58"
-	cases := []struct {
-		name             string
-		expected         bool
-		node             nodes.Node
-		liveImage        bool
-		hostImage        string
-		hostChecksum     string
-		hostChecksumType v1alpha1.ChecksumType
-	}{
-		{
-			name:      "image same",
-			expected:  true,
-			liveImage: false,
-			node: nodes.Node{
-				InstanceInfo: map[string]interface{}{
-					"image_source":        "theimage",
-					"image_os_hash_value": "thechecksum",
-					"image_os_hash_algo":  "md5",
-				},
-			},
-			hostImage:        "theimage",
-			hostChecksum:     "thechecksum",
-			hostChecksumType: v1alpha1.MD5,
-		},
-		{
-			name:      "image different",
-			expected:  false,
-			liveImage: false,
-			node: nodes.Node{
-				InstanceInfo: map[string]interface{}{
-					"image_source":        "theimage",
-					"image_os_hash_value": "thechecksum",
-					"image_os_hash_algo":  "md5",
-				},
-			},
-			hostImage:        "different",
-			hostChecksum:     "thechecksum",
-			hostChecksumType: v1alpha1.MD5,
-		},
-		{
-			name:      "image checksum different",
-			expected:  false,
-			liveImage: false,
-			node: nodes.Node{
-				InstanceInfo: map[string]interface{}{
-					"image_source":        "theimage",
-					"image_os_hash_value": "thechecksum",
-					"image_os_hash_algo":  "md5",
-				},
-			},
-			hostImage:        "theimage",
-			hostChecksum:     "different",
-			hostChecksumType: v1alpha1.MD5,
-		},
-		{
-			name:      "image checksum type different",
-			expected:  false,
-			liveImage: false,
-			node: nodes.Node{
-				InstanceInfo: map[string]interface{}{
-					"image_source":        "theimage",
-					"image_os_hash_value": "thechecksum",
-					"image_os_hash_algo":  "md5",
-				},
-			},
-			hostImage:        "theimage",
-			hostChecksum:     "thechecksum",
-			hostChecksumType: v1alpha1.SHA512,
-		},
-		{
-			name:      "live image same",
-			liveImage: true,
-			expected:  true,
-			node: nodes.Node{
-				InstanceInfo: map[string]interface{}{
-					"boot_iso": "theimage",
-				},
-			},
-			hostImage: "theimage",
-		},
-		{
-			name:      "live image different",
-			liveImage: true,
-			expected:  false,
-			node: nodes.Node{
-				InstanceInfo: map[string]interface{}{
-					"boot_iso": "theimage",
-				},
-			},
-			hostImage: "different",
-		},
-	}
-
-	for _, tc := range cases {
-		t.Run(tc.name, func(t *testing.T) {
-			ironic := testserver.NewIronic(t).WithDefaultResponses().Node(tc.node)
-			ironic.Start()
-			defer ironic.Stop()
-
-			inspector := testserver.NewInspector(t).Ready().WithIntrospection(nodeUUID, introspection.Introspection{
-				Finished: false,
-			})
-			inspector.Start()
-			defer inspector.Stop()
-
-			var host v1alpha1.BareMetalHost
-			if tc.liveImage {
-				host = makeHostLiveIso()
-				host.Spec.Image.URL = tc.hostImage
-			} else {
-				host = makeHost()
-				host.Spec.Image.URL = tc.hostImage
-				host.Spec.Image.Checksum = tc.hostChecksum
-				host.Spec.Image.ChecksumType = tc.hostChecksumType
-			}
-			publisher := func(reason, message string) {}
-			auth := clients.AuthConfig{Type: clients.NoAuth}
-			prov, err := newProvisionerWithSettings(host, bmc.Credentials{}, publisher,
-				ironic.Endpoint(), auth, inspector.Endpoint(), auth,
-			)
-			if err != nil {
-				t.Fatalf("could not create provisioner: %s", err)
-			}
-
-			prov.status.ID = nodeUUID
-			sameImage := prov.ironicHasSameImage(&tc.node)
-			assert.Equal(t, tc.expected, sameImage)
-		})
-	}
-}
diff --git a/pkg/provisioner/ironic/testserver/ironic.go b/pkg/provisioner/ironic/testserver/ironic.go
index e5e825a2..6a3dea91 100644
--- a/pkg/provisioner/ironic/testserver/ironic.go
+++ b/pkg/provisioner/ironic/testserver/ironic.go
@@ -151,7 +151,7 @@ func (m *IronicMock) WithNodeStatesProvision(nodeUUID string) *IronicMock {
 	return m.withNodeStatesProvision(nodeUUID, http.MethodGet)
 }
 
-// WithNodeStatesProvisionUpdate configures the server with a valid response for [PATCH] /v1/nodes/<node>/states/provision
+// WithNodeStatesProvision configures the server with a valid response for [PATCH] /v1/nodes/<node>/states/provision
 func (m *IronicMock) WithNodeStatesProvisionUpdate(nodeUUID string) *IronicMock {
 	return m.withNodeStatesProvision(nodeUUID, http.MethodPut)
 }
diff --git a/pkg/provisioner/ironic/updateopts_test.go b/pkg/provisioner/ironic/updateopts_test.go
index 92fce010..d712064f 100644
--- a/pkg/provisioner/ironic/updateopts_test.go
+++ b/pkg/provisioner/ironic/updateopts_test.go
@@ -153,6 +153,10 @@ func TestGetUpdateOptsForNodeVirtual(t *testing.T) {
 			Path:  "/instance_uuid",
 			Value: "27720611-e5d1-45d3-ba3a-222dcfaa4ca2",
 		},
+		{
+			Path:  "/instance_info/root_gb",
+			Value: 10,
+		},
 		{
 			Path:  "/properties/cpu_arch",
 			Value: "x86_64",
@@ -249,6 +253,10 @@ func TestGetUpdateOptsForNodeDell(t *testing.T) {
 			Path:  "/instance_uuid",
 			Value: "27720611-e5d1-45d3-ba3a-222dcfaa4ca2",
 		},
+		{
+			Path:  "/instance_info/root_gb",
+			Value: 10,
+		},
 		{
 			Path:  "/properties/cpu_arch",
 			Value: "x86_64",
@@ -278,216 +286,3 @@ func TestGetUpdateOptsForNodeDell(t *testing.T) {
 		})
 	}
 }
-
-func TestGetUpdateOptsForNodeLiveIso(t *testing.T) {
-	eventPublisher := func(reason, message string) {}
-	auth := clients.AuthConfig{Type: clients.NoAuth}
-
-	prov, err := newProvisionerWithSettings(makeHostLiveIso(), bmc.Credentials{}, eventPublisher,
-		"https://ironic.test", auth, "https://ironic.test", auth,
-	)
-	if err != nil {
-		t.Fatal(err)
-	}
-	ironicNode := &nodes.Node{}
-
-	patches, err := prov.getUpdateOptsForNode(ironicNode)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	t.Logf("patches: %v", patches)
-
-	expected := []struct {
-		Path  string         // the node property path
-		Key   string         // if value is a map, the key we care about
-		Value interface{}    // the value being passed to ironic (or value associated with the key)
-		Op    nodes.UpdateOp // The operation add/replace/remove
-	}{
-		{
-			Path:  "/instance_info/boot_iso",
-			Value: "not-empty",
-			Op:    nodes.AddOp,
-		},
-		{
-			Path:  "/deploy_interface",
-			Value: "ramdisk",
-			Op:    nodes.ReplaceOp,
-		},
-	}
-
-	for _, e := range expected {
-		t.Run(e.Path, func(t *testing.T) {
-			t.Logf("expected: %v", e)
-			var update nodes.UpdateOperation
-			for _, patch := range patches {
-				update = patch.(nodes.UpdateOperation)
-				if update.Path == e.Path {
-					break
-				}
-			}
-			if update.Path != e.Path {
-				t.Errorf("did not find %q in updates", e.Path)
-				return
-			}
-			t.Logf("update: %v", update)
-			assert.Equal(t, e.Value, update.Value, fmt.Sprintf("%s does not match", e.Path))
-		})
-	}
-}
-
-func TestGetUpdateOptsForNodeImageToLiveIso(t *testing.T) {
-	eventPublisher := func(reason, message string) {}
-	auth := clients.AuthConfig{Type: clients.NoAuth}
-
-	prov, err := newProvisionerWithSettings(makeHostLiveIso(), bmc.Credentials{}, eventPublisher,
-		"https://ironic.test", auth, "https://ironic.test", auth,
-	)
-	if err != nil {
-		t.Fatal(err)
-	}
-	ironicNode := &nodes.Node{
-		InstanceInfo: map[string]interface{}{
-			"image_source":        "oldimage",
-			"image_os_hash_value": "thechecksum",
-			"image_os_hash_algo":  "md5",
-		},
-	}
-
-	patches, err := prov.getUpdateOptsForNode(ironicNode)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	t.Logf("patches: %v", patches)
-
-	expected := []struct {
-		Path  string         // the node property path
-		Key   string         // if value is a map, the key we care about
-		Value interface{}    // the value being passed to ironic (or value associated with the key)
-		Op    nodes.UpdateOp // The operation add/replace/remove
-	}{
-		{
-			Path:  "/instance_info/boot_iso",
-			Value: "not-empty",
-			Op:    nodes.AddOp,
-		},
-		{
-			Path:  "/deploy_interface",
-			Value: "ramdisk",
-			Op:    nodes.ReplaceOp,
-		},
-		{
-			Path: "/instance_info/image_source",
-			Op:   nodes.RemoveOp,
-		},
-		{
-			Path: "/instance_info/image_os_hash_algo",
-			Op:   nodes.RemoveOp,
-		},
-		{
-			Path: "/instance_info/image_os_hash_value",
-			Op:   nodes.RemoveOp,
-		},
-	}
-
-	for _, e := range expected {
-		t.Run(e.Path, func(t *testing.T) {
-			t.Logf("expected: %v", e)
-			var update nodes.UpdateOperation
-			for _, patch := range patches {
-				update = patch.(nodes.UpdateOperation)
-				if update.Path == e.Path {
-					break
-				}
-			}
-			if update.Path != e.Path {
-				t.Errorf("did not find %q in updates", e.Path)
-				return
-			}
-			t.Logf("update: %v", update)
-			assert.Equal(t, e.Value, update.Value, fmt.Sprintf("%s value does not match", e.Path))
-			assert.Equal(t, e.Op, update.Op, fmt.Sprintf("%s operation does not match", e.Path))
-		})
-	}
-}
-
-func TestGetUpdateOptsForNodeLiveIsoToImage(t *testing.T) {
-	eventPublisher := func(reason, message string) {}
-	auth := clients.AuthConfig{Type: clients.NoAuth}
-
-	host := makeHost()
-	host.Spec.Image.URL = "newimage"
-	host.Spec.Image.Checksum = "thechecksum"
-	host.Spec.Image.ChecksumType = metal3v1alpha1.MD5
-	prov, err := newProvisionerWithSettings(host, bmc.Credentials{}, eventPublisher,
-		"https://ironic.test", auth, "https://ironic.test", auth,
-	)
-	if err != nil {
-		t.Fatal(err)
-	}
-	ironicNode := &nodes.Node{
-		InstanceInfo: map[string]interface{}{
-			"boot_iso": "oldimage",
-		},
-	}
-
-	patches, err := prov.getUpdateOptsForNode(ironicNode)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	t.Logf("patches: %v", patches)
-
-	expected := []struct {
-		Path  string         // the node property path
-		Key   string         // if value is a map, the key we care about
-		Value interface{}    // the value being passed to ironic (or value associated with the key)
-		Op    nodes.UpdateOp // The operation add/replace/remove
-	}{
-		{
-			Path: "/instance_info/boot_iso",
-			Op:   nodes.RemoveOp,
-		},
-		{
-			Path:  "/deploy_interface",
-			Value: "direct",
-			Op:    nodes.ReplaceOp,
-		},
-		{
-			Path:  "/instance_info/image_source",
-			Value: "newimage",
-			Op:    nodes.AddOp,
-		},
-		{
-			Path:  "/instance_info/image_os_hash_algo",
-			Value: "md5",
-			Op:    nodes.AddOp,
-		},
-		{
-			Path:  "/instance_info/image_os_hash_value",
-			Value: "thechecksum",
-			Op:    nodes.AddOp,
-		},
-	}
-
-	for _, e := range expected {
-		t.Run(e.Path, func(t *testing.T) {
-			t.Logf("expected: %v", e)
-			var update nodes.UpdateOperation
-			for _, patch := range patches {
-				update = patch.(nodes.UpdateOperation)
-				if update.Path == e.Path {
-					break
-				}
-			}
-			if update.Path != e.Path {
-				t.Errorf("did not find %q in updates", e.Path)
-				return
-			}
-			t.Logf("update: %v", update)
-			assert.Equal(t, e.Value, update.Value, fmt.Sprintf("%s value does not match", e.Path))
-			assert.Equal(t, e.Op, update.Op, fmt.Sprintf("%s operation does not match", e.Path))
-		})
-	}
-}
diff --git a/pkg/provisioner/ironic/validatemanagementaccess_test.go b/pkg/provisioner/ironic/validatemanagementaccess_test.go
index 0ab315c6..378d62ff 100644
--- a/pkg/provisioner/ironic/validatemanagementaccess_test.go
+++ b/pkg/provisioner/ironic/validatemanagementaccess_test.go
@@ -8,7 +8,6 @@ import (
 	"github.com/gophercloud/gophercloud/openstack/baremetal/v1/ports"
 	"github.com/stretchr/testify/assert"
 
-	metal3v1alpha1 "github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1"
 	"github.com/metal3-io/baremetal-operator/pkg/bmc"
 	"github.com/metal3-io/baremetal-operator/pkg/provisioner/ironic/clients"
 	"github.com/metal3-io/baremetal-operator/pkg/provisioner/ironic/testserver"
@@ -71,12 +70,11 @@ func TestValidateManagementAccessMACOptional(t *testing.T) {
 	assert.Equal(t, "", result.ErrorMessage)
 }
 
-func TestValidateManagementAccessCreateNodeNoImage(t *testing.T) {
+func TestValidateManagementAccessCreateNode(t *testing.T) {
 	// Create a host without a bootMACAddress and with a BMC that
 	// does not require one.
 	host := makeHost()
 	host.Spec.BootMACAddress = ""
-	host.Spec.Image = nil
 	host.Status.Provisioning.ID = "" // so we don't lookup by uuid
 
 	var createdNode *nodes.Node
@@ -104,166 +102,6 @@ func TestValidateManagementAccessCreateNodeNoImage(t *testing.T) {
 	assert.Equal(t, "", result.ErrorMessage)
 	assert.NotEqual(t, "", createdNode.UUID)
 	assert.Equal(t, createdNode.UUID, provID)
-	assert.Equal(t, createdNode.DeployInterface, "direct")
-}
-
-func TestValidateManagementAccessCreateWithImage(t *testing.T) {
-	// Create a host with Image specified in the Spec
-	host := makeHost()
-	host.Status.Provisioning.ID = "" // so we don't lookup by uuid
-	host.Spec.Image.URL = "theimagefoo"
-	host.Spec.Image.Checksum = "thechecksumxyz"
-
-	var createdNode *nodes.Node
-
-	createCallback := func(node nodes.Node) {
-		createdNode = &node
-	}
-
-	ironic := testserver.NewIronic(t).Ready().CreateNodes(createCallback).NoNode(host.Name)
-	ironic.AddDefaultResponse("/v1/nodes/node-0", "PATCH", http.StatusOK, "{}")
-	ironic.Start()
-	defer ironic.Stop()
-
-	auth := clients.AuthConfig{Type: clients.NoAuth}
-	prov, err := newProvisionerWithSettings(host, bmc.Credentials{}, nullEventPublisher,
-		ironic.Endpoint(), auth, testserver.NewInspector(t).Endpoint(), auth,
-	)
-	if err != nil {
-		t.Fatalf("could not create provisioner: %s", err)
-	}
-
-	result, provID, err := prov.ValidateManagementAccess(false, false)
-	if err != nil {
-		t.Fatalf("error from ValidateManagementAccess: %s", err)
-	}
-	assert.Equal(t, "", result.ErrorMessage)
-	assert.Equal(t, createdNode.UUID, provID)
-	assert.Equal(t, createdNode.DeployInterface, "direct")
-	updates, _ := ironic.GetLastRequestFor("/v1/nodes/node-0", http.MethodPatch)
-	assert.Contains(t, updates, "/instance_info/image_source")
-	assert.Contains(t, updates, host.Spec.Image.URL)
-	assert.Contains(t, updates, "/instance_info/image_checksum")
-	assert.Contains(t, updates, host.Spec.Image.Checksum)
-}
-
-func TestValidateManagementAccessCreateWithLiveIso(t *testing.T) {
-	// Create a host with Image specified in the Spec
-	host := makeHostLiveIso()
-	host.Status.Provisioning.ID = "" // so we don't lookup by uuid
-
-	var createdNode *nodes.Node
-
-	createCallback := func(node nodes.Node) {
-		createdNode = &node
-	}
-
-	ironic := testserver.NewIronic(t).Ready().CreateNodes(createCallback).NoNode(host.Name)
-	ironic.AddDefaultResponse("/v1/nodes/node-0", "PATCH", http.StatusOK, "{}")
-	ironic.Start()
-	defer ironic.Stop()
-
-	auth := clients.AuthConfig{Type: clients.NoAuth}
-	prov, err := newProvisionerWithSettings(host, bmc.Credentials{}, nullEventPublisher,
-		ironic.Endpoint(), auth, testserver.NewInspector(t).Endpoint(), auth,
-	)
-	if err != nil {
-		t.Fatalf("could not create provisioner: %s", err)
-	}
-
-	result, provID, err := prov.ValidateManagementAccess(false, false)
-	if err != nil {
-		t.Fatalf("error from ValidateManagementAccess: %s", err)
-	}
-	assert.Equal(t, "", result.ErrorMessage)
-	assert.Equal(t, createdNode.UUID, provID)
-	assert.Equal(t, createdNode.DeployInterface, "ramdisk")
-	updates, _ := ironic.GetLastRequestFor("/v1/nodes/node-0", http.MethodPatch)
-	assert.Contains(t, updates, "/instance_info/boot_iso")
-	assert.Contains(t, updates, host.Spec.Image.URL)
-}
-
-func TestValidateManagementAccessCreateNodeImageSpecOrStatus(t *testing.T) {
-	cases := []struct {
-		name        string
-		specImage   *metal3v1alpha1.Image
-		statusImage metal3v1alpha1.Image
-		expected    string
-	}{
-		{
-			name: "image-from-spec",
-			specImage: &metal3v1alpha1.Image{
-				URL:      "image-from-spec",
-				Checksum: "image-checksum",
-			},
-			statusImage: metal3v1alpha1.Image{},
-			expected:    "image-from-spec",
-		},
-		{
-			name:      "image-from-status",
-			specImage: nil,
-			statusImage: metal3v1alpha1.Image{
-				URL:      "image-from-status",
-				Checksum: "image-checksum",
-			},
-			expected: "image-from-status",
-		},
-		{
-			name: "image-from-both",
-			specImage: &metal3v1alpha1.Image{
-				URL:      "image-from-spec",
-				Checksum: "image-checksum",
-			},
-			statusImage: metal3v1alpha1.Image{
-				URL:      "image-from-status",
-				Checksum: "image-checksum",
-			},
-			expected: "image-from-status",
-		},
-	}
-
-	for _, tc := range cases {
-		t.Run(tc.name, func(t *testing.T) {
-			host := makeHost()
-			host.Spec.BootMACAddress = ""
-			host.Spec.Image = tc.specImage
-			host.Status.Provisioning.ID = "" // so we don't lookup by uuid
-			host.Status.Provisioning.Image = tc.statusImage
-
-			var createdNode *nodes.Node
-
-			createCallback := func(node nodes.Node) {
-				createdNode = &node
-			}
-
-			ironic := testserver.NewIronic(t).Ready().CreateNodes(createCallback).NoNode(host.Name)
-			ironic.NodeUpdate(nodes.Node{UUID: "node-0"})
-			ironic.Start()
-			defer ironic.Stop()
-
-			auth := clients.AuthConfig{Type: clients.NoAuth}
-			prov, err := newProvisionerWithSettings(host, bmc.Credentials{}, nullEventPublisher,
-				ironic.Endpoint(), auth, testserver.NewInspector(t).Endpoint(), auth,
-			)
-			if err != nil {
-				t.Fatalf("could not create provisioner: %s", err)
-			}
-
-			result, provID, err := prov.ValidateManagementAccess(false, false)
-			if err != nil {
-				t.Fatalf("error from ValidateManagementAccess: %s", err)
-			}
-			assert.Equal(t, "", result.ErrorMessage)
-			assert.NotEqual(t, "", createdNode.UUID)
-			updates := ironic.GetLastNodeUpdateRequestFor(provID)
-			assert.NotEqual(t, 0, len(updates))
-			for _, u := range updates {
-				if u.Path == "/instance_info/image_source" {
-					assert.Equal(t, u.Value, tc.expected)
-				}
-			}
-		})
-	}
 }
 
 func TestValidateManagementAccessExistingNode(t *testing.T) {