Repository: metal3-io/baremetal-operator
Pull request #946 (2021-07-28 17:10:31)

Explicitly set node bios_interface
Ironic sets the bios_interface by default for all drivers. For some drivers - particularly idrac-virtualmedia, the default should be overridden. If not explicitly set, Ironic will use the default.

This requires an upgrade to a Gophercloud release that supports BIOSInterface.

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

This pull-request has been approved by:
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **hardys** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @hardys` 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":["hardys"]} -->
bfournie: /cc @dtantsur 
metal3-io-bot: @bfournie: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
gomod | c60c8f2a557105c7385c92ad6ade9c9a4a413cb2 | [link](https://prow.apps.test.metal3.io/view/gs/metal3-prow/pr-logs/pull/metal3-io_baremetal-operator/946/gomod/1420431492965732352) | `/test gomod`

<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. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
bfournie: /test-integration
bfournie: /test-integration
dtantsur: /approve
metal3-io-bot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/metal3-io/baremetal-operator/pull/946#issuecomment-890804155" title="Approved">dtantsur</a>*

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

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

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

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

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":[]} -->
metal3-io-bot: @bfournie: PR needs rebase.

<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>
bfournie: /test-integration
bfournie: /cc @fmuyassarov @sadasu @andfasano 
elfosardo: /lgtm
bfournie: /test-integration

Patch:
diff --git a/apis/metal3.io/v1alpha1/baremetalhost_types.go b/apis/metal3.io/v1alpha1/baremetalhost_types.go
index fd206aa3..c60de869 100644
--- a/apis/metal3.io/v1alpha1/baremetalhost_types.go
+++ b/apis/metal3.io/v1alpha1/baremetalhost_types.go
@@ -442,10 +442,6 @@ type Image struct {
 	DiskFormat *string `json:"format,omitempty"`
 }
 
-func (image *Image) IsLiveISO() bool {
-	return image != nil && image.DiskFormat != nil && *image.DiskFormat == "live-iso"
-}
-
 // Custom deploy is a description of a customized deploy process.
 type CustomDeploy struct {
 	// Custom deploy method name.
diff --git a/config/crd/patches/cainjection_in_firmwareschemas.yaml b/config/crd/patches/cainjection_in_firmwareschemas.yaml
index b32d147b..dd50dd1a 100644
--- a/config/crd/patches/cainjection_in_firmwareschemas.yaml
+++ b/config/crd/patches/cainjection_in_firmwareschemas.yaml
@@ -1,6 +1,6 @@
 # The following patch adds a directive for certmanager to inject CA into the CRD
 # CRD conversion requires k8s 1.13 or later.
-apiVersion: apiextensions.k8s.io/v1
+apiVersion: apiextensions.k8s.io/v1beta1
 kind: CustomResourceDefinition
 metadata:
   annotations:
diff --git a/config/crd/patches/cainjection_in_hostfirmwaresettings.yaml b/config/crd/patches/cainjection_in_hostfirmwaresettings.yaml
index 2ab9f428..4d81f6e4 100644
--- a/config/crd/patches/cainjection_in_hostfirmwaresettings.yaml
+++ b/config/crd/patches/cainjection_in_hostfirmwaresettings.yaml
@@ -1,6 +1,6 @@
 # The following patch adds a directive for certmanager to inject CA into the CRD
 # CRD conversion requires k8s 1.13 or later.
-apiVersion: apiextensions.k8s.io/v1
+apiVersion: apiextensions.k8s.io/v1beta1
 kind: CustomResourceDefinition
 metadata:
   annotations:
diff --git a/config/crd/patches/webhook_in_firmwareschemas.yaml b/config/crd/patches/webhook_in_firmwareschemas.yaml
index 2744739c..f65cf2fb 100644
--- a/config/crd/patches/webhook_in_firmwareschemas.yaml
+++ b/config/crd/patches/webhook_in_firmwareschemas.yaml
@@ -1,6 +1,6 @@
 # The following patch enables conversion webhook for CRD
 # CRD conversion requires k8s 1.13 or later.
-apiVersion: apiextensions.k8s.io/v1
+apiVersion: apiextensions.k8s.io/v1beta1
 kind: CustomResourceDefinition
 metadata:
   name: firmwareschemas.metal3.io
diff --git a/config/crd/patches/webhook_in_hostfirmwaresettings.yaml b/config/crd/patches/webhook_in_hostfirmwaresettings.yaml
index 73870848..2e32829d 100644
--- a/config/crd/patches/webhook_in_hostfirmwaresettings.yaml
+++ b/config/crd/patches/webhook_in_hostfirmwaresettings.yaml
@@ -1,6 +1,6 @@
 # The following patch enables conversion webhook for CRD
 # CRD conversion requires k8s 1.13 or later.
-apiVersion: apiextensions.k8s.io/v1
+apiVersion: apiextensions.k8s.io/v1beta1
 kind: CustomResourceDefinition
 metadata:
   name: hostfirmwaresettings.metal3.io
diff --git a/config/rbac/auth_proxy_client_clusterrole.yaml b/config/rbac/auth_proxy_client_clusterrole.yaml
index bd4af137..7d62534c 100644
--- a/config/rbac/auth_proxy_client_clusterrole.yaml
+++ b/config/rbac/auth_proxy_client_clusterrole.yaml
@@ -1,4 +1,4 @@
-apiVersion: rbac.authorization.k8s.io/v1
+apiVersion: rbac.authorization.k8s.io/v1beta1
 kind: ClusterRole
 metadata:
   name: metrics-reader
diff --git a/config/render/capm3.yaml b/config/render/capm3.yaml
index 9fca532b..4aa1df56 100644
--- a/config/render/capm3.yaml
+++ b/config/render/capm3.yaml
@@ -1368,16 +1368,6 @@ rules:
 ---
 apiVersion: rbac.authorization.k8s.io/v1
 kind: ClusterRole
-metadata:
-  name: baremetal-operator-metrics-reader
-rules:
-- nonResourceURLs:
-  - /metrics
-  verbs:
-  - get
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
 metadata:
   name: baremetal-operator-proxy-role
 rules:
@@ -1394,6 +1384,16 @@ rules:
   verbs:
   - create
 ---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+  name: baremetal-operator-metrics-reader
+rules:
+- nonResourceURLs:
+  - /metrics
+  verbs:
+  - get
+---
 apiVersion: rbac.authorization.k8s.io/v1
 kind: RoleBinding
 metadata:
diff --git a/go.mod b/go.mod
index e1b42525..e2668ad4 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.16
 
 require (
 	github.com/go-logr/logr v0.4.0
-	github.com/gophercloud/gophercloud v0.16.0
+	github.com/gophercloud/gophercloud v0.18.0
 	github.com/metal3-io/baremetal-operator/apis v0.0.0
 	github.com/pkg/errors v0.9.1
 	github.com/prometheus/client_golang v1.11.0
diff --git a/go.sum b/go.sum
index 13b60e9c..560facf2 100644
--- a/go.sum
+++ b/go.sum
@@ -189,8 +189,8 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m
 github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
 github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw=
 github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
-github.com/gophercloud/gophercloud v0.16.0 h1:sWjPfypuzxRxjVbk3/MsU4H8jS0NNlyauZtIUl78BPU=
-github.com/gophercloud/gophercloud v0.16.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
+github.com/gophercloud/gophercloud v0.18.0 h1:V6hcuMPmjXg+js9flU8T3RIHDCjV7F5CG5GD0MRhP/w=
+github.com/gophercloud/gophercloud v0.18.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
 github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
 github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
diff --git a/ironic-deployment/certmanager/certificate.yaml b/ironic-deployment/certmanager/certificate.yaml
index dcbd006d..6a9cea6b 100644
--- a/ironic-deployment/certmanager/certificate.yaml
+++ b/ironic-deployment/certmanager/certificate.yaml
@@ -12,7 +12,6 @@ metadata:
   name: ironic-cacert
   namespace: ${NAMEPREFIX}-system
 spec:
-  commonName: ironic-ca
   isCA: true
   ipAddresses:
   - IRONIC_HOST_IP
@@ -36,7 +35,6 @@ metadata:
   name: ironic-cert
   namespace: ${NAMEPREFIX}-system
 spec:
-  commonName: ironic-cert
   ipAddresses:
   - IRONIC_HOST_IP
   issuerRef:
@@ -50,7 +48,6 @@ metadata:
   name: ironic-inspector-cert
   namespace: ${NAMEPREFIX}-system
 spec:
-  commonName: ironic-inspector-cert
   ipAddresses:
   - IRONIC_HOST_IP
   issuerRef:
@@ -64,7 +61,6 @@ metadata:
   name: mariadb-cert
   namespace: ${NAMEPREFIX}-system
 spec:
-  commonName: mariadb-cert
   ipAddresses:
   - MARIADB_HOST_IP
   issuerRef:
diff --git a/pkg/bmc/access.go b/pkg/bmc/access.go
index e12594d2..ee42d657 100644
--- a/pkg/bmc/access.go
+++ b/pkg/bmc/access.go
@@ -54,6 +54,8 @@ type AccessDetails interface {
 	// (such as the kernel and ramdisk locations).
 	DriverInfo(bmcCreds Credentials) map[string]interface{}
 
+	BIOSInterface() string
+
 	// Boot interface to set
 	BootInterface() string
 
diff --git a/pkg/bmc/ibmc.go b/pkg/bmc/ibmc.go
index 88701227..02e8d20e 100644
--- a/pkg/bmc/ibmc.go
+++ b/pkg/bmc/ibmc.go
@@ -81,6 +81,10 @@ func (a *ibmcAccessDetails) DriverInfo(bmcCreds Credentials) map[string]interfac
 	return result
 }
 
+func (a *ibmcAccessDetails) BIOSInterface() string {
+	return ""
+}
+
 func (a *ibmcAccessDetails) BootInterface() string {
 	return "pxe"
 }
diff --git a/pkg/bmc/idrac.go b/pkg/bmc/idrac.go
index 2dba5483..4739dc84 100644
--- a/pkg/bmc/idrac.go
+++ b/pkg/bmc/idrac.go
@@ -76,6 +76,10 @@ func (a *iDracAccessDetails) DriverInfo(bmcCreds Credentials) map[string]interfa
 	return result
 }
 
+func (a *iDracAccessDetails) BIOSInterface() string {
+	return ""
+}
+
 func (a *iDracAccessDetails) BootInterface() string {
 	return "ipxe"
 }
diff --git a/pkg/bmc/idrac_virtualmedia.go b/pkg/bmc/idrac_virtualmedia.go
index df619131..82e32db1 100644
--- a/pkg/bmc/idrac_virtualmedia.go
+++ b/pkg/bmc/idrac_virtualmedia.go
@@ -70,6 +70,10 @@ func (a *redfishiDracVirtualMediaAccessDetails) Driver() string {
 	return "idrac"
 }
 
+func (a *redfishiDracVirtualMediaAccessDetails) BIOSInterface() string {
+	return "idrac-redfish"
+}
+
 func (a *redfishiDracVirtualMediaAccessDetails) BootInterface() string {
 	return "idrac-redfish-virtual-media"
 }
diff --git a/pkg/bmc/ilo4.go b/pkg/bmc/ilo4.go
index 662f779e..6db153fd 100644
--- a/pkg/bmc/ilo4.go
+++ b/pkg/bmc/ilo4.go
@@ -72,6 +72,10 @@ func (a *iLOAccessDetails) DriverInfo(bmcCreds Credentials) map[string]interface
 	return result
 }
 
+func (a *iLOAccessDetails) BIOSInterface() string {
+	return ""
+}
+
 func (a *iLOAccessDetails) BootInterface() string {
 	return "ilo-ipxe"
 }
diff --git a/pkg/bmc/ilo5.go b/pkg/bmc/ilo5.go
index 821d000e..39c15532 100644
--- a/pkg/bmc/ilo5.go
+++ b/pkg/bmc/ilo5.go
@@ -72,6 +72,10 @@ func (a *iLO5AccessDetails) DriverInfo(bmcCreds Credentials) map[string]interfac
 	return result
 }
 
+func (a *iLO5AccessDetails) BIOSInterface() string {
+	return ""
+}
+
 func (a *iLO5AccessDetails) BootInterface() string {
 	return "ilo-ipxe"
 }
diff --git a/pkg/bmc/ipmi.go b/pkg/bmc/ipmi.go
index 98c283a8..346cc39e 100644
--- a/pkg/bmc/ipmi.go
+++ b/pkg/bmc/ipmi.go
@@ -91,6 +91,10 @@ func (a *ipmiAccessDetails) DriverInfo(bmcCreds Credentials) map[string]interfac
 	return result
 }
 
+func (a *ipmiAccessDetails) BIOSInterface() string {
+	return ""
+}
+
 func (a *ipmiAccessDetails) BootInterface() string {
 	return "ipxe"
 }
diff --git a/pkg/bmc/irmc.go b/pkg/bmc/irmc.go
index 9d9380f0..4dbb4634 100644
--- a/pkg/bmc/irmc.go
+++ b/pkg/bmc/irmc.go
@@ -70,6 +70,10 @@ func (a *iRMCAccessDetails) DriverInfo(bmcCreds Credentials) map[string]interfac
 	return result
 }
 
+func (a *iRMCAccessDetails) BIOSInterface() string {
+	return ""
+}
+
 func (a *iRMCAccessDetails) BootInterface() string {
 	return "pxe"
 }
diff --git a/pkg/bmc/redfish.go b/pkg/bmc/redfish.go
index e26189bf..a54673ff 100644
--- a/pkg/bmc/redfish.go
+++ b/pkg/bmc/redfish.go
@@ -100,6 +100,10 @@ func (a *redfishAccessDetails) DriverInfo(bmcCreds Credentials) map[string]inter
 	return result
 }
 
+func (a *redfishAccessDetails) BIOSInterface() string {
+	return ""
+}
+
 // That can be either pxe or redfish-virtual-media
 func (a *redfishAccessDetails) BootInterface() string {
 	return "ipxe"
@@ -133,11 +137,14 @@ func (a *redfishAccessDetails) BuildBIOSSettings(firmwareConfig *metal3v1alpha1.
 }
 
 // iDrac Redfish Overrides
-
 func (a *redfishiDracAccessDetails) Driver() string {
 	return "idrac"
 }
 
+func (a *redfishiDracAccessDetails) BIOSInterface() string {
+	return "idrac-redfish"
+}
+
 func (a *redfishiDracAccessDetails) BootInterface() string {
 	return "ipxe"
 }
diff --git a/pkg/bmc/redfish_virtualmedia.go b/pkg/bmc/redfish_virtualmedia.go
index 10766826..adbbc57b 100644
--- a/pkg/bmc/redfish_virtualmedia.go
+++ b/pkg/bmc/redfish_virtualmedia.go
@@ -69,6 +69,10 @@ func (a *redfishVirtualMediaAccessDetails) DriverInfo(bmcCreds Credentials) map[
 	return result
 }
 
+func (a *redfishVirtualMediaAccessDetails) BIOSInterface() string {
+	return ""
+}
+
 func (a *redfishVirtualMediaAccessDetails) BootInterface() string {
 	return "redfish-virtual-media"
 }
diff --git a/pkg/provisioner/ironic/ironic.go b/pkg/provisioner/ironic/ironic.go
index e9447f58..968a8cc3 100644
--- a/pkg/provisioner/ironic/ironic.go
+++ b/pkg/provisioner/ironic/ironic.go
@@ -367,6 +367,7 @@ func (p *ironicProvisioner) ValidateManagementAccess(data provisioner.Management
 			p.client,
 			nodes.CreateOpts{
 				Driver:              bmcAccess.Driver(),
+				BIOSInterface:       bmcAccess.BIOSInterface(),
 				BootInterface:       bmcAccess.BootInterface(),
 				Name:                p.objectMeta.Name,
 				DriverInfo:          driverInfo,
@@ -795,7 +796,7 @@ func (p *ironicProvisioner) getImageUpdateOptsForNode(ironicNode *nodes.Node, im
 	if hasCustomDeploy {
 		// Custom deploy process
 		p.setCustomDeployUpdateOptsForNode(ironicNode, imageData, updater)
-	} else if imageData.IsLiveISO() {
+	} else if imageData.DiskFormat != nil && *imageData.DiskFormat == "live-iso" {
 		// Set live-iso format options
 		p.setLiveIsoUpdateOptsForNode(ironicNode, imageData, updater)
 	} else {
@@ -897,7 +898,7 @@ func (p *ironicProvisioner) setUpForProvisioning(ironicNode *nodes.Node, data pr
 
 func (p *ironicProvisioner) deployInterface(image *metal3v1alpha1.Image) (result string) {
 	result = "direct"
-	if image.IsLiveISO() {
+	if image != nil && image.DiskFormat != nil && *image.DiskFormat == "live-iso" {
 		result = "ramdisk"
 	}
 	return result
@@ -957,7 +958,7 @@ func (p *ironicProvisioner) Adopt(data provisioner.AdoptData, force bool) (resul
 func (p *ironicProvisioner) ironicHasSameImage(ironicNode *nodes.Node, image metal3v1alpha1.Image) (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 image.IsLiveISO() {
+	if image.DiskFormat != nil && *image.DiskFormat == "live-iso" {
 		sameImage = (ironicNode.InstanceInfo["boot_iso"] == image.URL)
 		p.log.Info("checking image settings",
 			"boot_iso", ironicNode.InstanceInfo["boot_iso"],
@@ -1122,15 +1123,6 @@ func (p *ironicProvisioner) Prepare(data provisioner.PrepareData, unprepared boo
 }
 
 func (p *ironicProvisioner) getConfigDrive(data provisioner.ProvisionData) (configDrive nodes.ConfigDrive, err error) {
-	// In theory, Ironic can support configdrive with live ISO by attaching
-	// it to another virtual media slot. However, some hardware does not
-	// support two virtual media devices at the same time, so we shouldn't
-	// try it.
-	if data.Image.IsLiveISO() {
-		p.log.Info("not providing config drive for live ISO")
-		return
-	}
-
 	// Retrieve instance specific user data (cloud-init, ignition, etc).
 	userData, err := data.HostConfig.UserData()
 	if err != nil {
@@ -1154,7 +1146,7 @@ func (p *ironicProvisioner) getConfigDrive(data provisioner.ProvisionData) (conf
 	}
 
 	// Retrieve meta data with fallback to defaults from provisioner.
-	configDrive.MetaData = map[string]interface{}{
+	metaData := map[string]interface{}{
 		"uuid":             string(p.objectMeta.UID),
 		"metal3-namespace": p.objectMeta.Namespace,
 		"metal3-name":      p.objectMeta.Name,
@@ -1167,11 +1159,19 @@ func (p *ironicProvisioner) getConfigDrive(data provisioner.ProvisionData) (conf
 		return configDrive, errors.Wrap(err, "could not retrieve metadata")
 	}
 	if metaDataRaw != "" {
-		if err = yaml.Unmarshal([]byte(metaDataRaw), &configDrive.MetaData); err != nil {
+		if err = yaml.Unmarshal([]byte(metaDataRaw), &metaData); err != nil {
 			return configDrive, errors.Wrap(err, "failed to unmarshal metadata from secret")
 		}
 	}
 
+	// Set metaData if any field is populated by a user.
+	if metaDataRaw != "" || networkDataRaw != "" || userData != "" {
+		configDrive.MetaData = metaData
+		p.log.Info("triggering provisioning with config drive")
+	} else {
+		p.log.Info("triggering provisioning without config drive")
+	}
+
 	return
 }
 


Test patch:
diff --git a/pkg/bmc/access_test.go b/pkg/bmc/access_test.go
index 517b2cca..77b46c61 100644
--- a/pkg/bmc/access_test.go
+++ b/pkg/bmc/access_test.go
@@ -439,6 +439,7 @@ func TestStaticDriverInfo(t *testing.T) {
 		input      string
 		needsMac   bool
 		driver     string
+		bios       string
 		boot       string
 		management string
 		power      string
@@ -450,6 +451,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "ipmi://192.168.122.1:6233",
 			needsMac:   false,
 			driver:     "ipmi",
+			bios:       "",
 			boot:       "ipxe",
 			management: "",
 			power:      "",
@@ -462,6 +464,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "libvirt://192.168.122.1",
 			needsMac:   true,
 			driver:     "ipmi",
+			bios:       "",
 			boot:       "ipxe",
 			management: "",
 			power:      "",
@@ -474,6 +477,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "idrac://192.168.122.1",
 			needsMac:   false,
 			driver:     "idrac",
+			bios:       "",
 			boot:       "ipxe",
 			management: "",
 			power:      "",
@@ -486,6 +490,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "irmc://192.168.122.1",
 			needsMac:   false,
 			driver:     "irmc",
+			bios:       "",
 			boot:       "pxe",
 			management: "",
 			power:      "",
@@ -498,6 +503,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "redfish://192.168.122.1",
 			needsMac:   true,
 			driver:     "redfish",
+			bios:       "",
 			boot:       "ipxe",
 			management: "",
 			power:      "",
@@ -510,6 +516,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "redfish-virtualmedia://192.168.122.1",
 			needsMac:   true,
 			driver:     "redfish",
+			bios:       "",
 			boot:       "redfish-virtual-media",
 			management: "",
 			power:      "",
@@ -522,6 +529,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "redfish-virtualmedia+http://192.168.122.1",
 			needsMac:   true,
 			driver:     "redfish",
+			bios:       "",
 			boot:       "redfish-virtual-media",
 			management: "",
 			power:      "",
@@ -534,6 +542,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "redfish-virtualmedia+https://192.168.122.1",
 			needsMac:   true,
 			driver:     "redfish",
+			bios:       "",
 			boot:       "redfish-virtual-media",
 			management: "",
 			power:      "",
@@ -546,6 +555,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "idrac-redfish://192.168.122.1",
 			needsMac:   true,
 			driver:     "idrac",
+			bios:       "idrac-redfish",
 			boot:       "ipxe",
 			management: "idrac-redfish",
 			power:      "idrac-redfish",
@@ -558,6 +568,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:    "ilo5-virtualmedia://192.168.122.1",
 			needsMac: true,
 			driver:   "redfish",
+			bios:     "",
 			boot:     "redfish-virtual-media",
 		},
 
@@ -566,6 +577,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:    "ilo5-virtualmedia+http://192.168.122.1",
 			needsMac: true,
 			driver:   "redfish",
+			bios:     "",
 			boot:     "redfish-virtual-media",
 		},
 
@@ -574,6 +586,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:    "ilo5-virtualmedia+https://192.168.122.1",
 			needsMac: true,
 			driver:   "redfish",
+			bios:     "",
 			boot:     "redfish-virtual-media",
 		},
 
@@ -582,6 +595,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "idrac-virtualmedia://192.168.122.1",
 			needsMac:   true,
 			driver:     "idrac",
+			bios:       "idrac-redfish",
 			boot:       "idrac-redfish-virtual-media",
 			management: "idrac-redfish",
 			power:      "idrac-redfish",
@@ -594,6 +608,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "idrac-virtualmedia+http://192.168.122.1",
 			needsMac:   true,
 			driver:     "idrac",
+			bios:       "idrac-redfish",
 			boot:       "idrac-redfish-virtual-media",
 			management: "idrac-redfish",
 			power:      "idrac-redfish",
@@ -606,6 +621,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "idrac-virtualmedia+https://192.168.122.1",
 			needsMac:   true,
 			driver:     "idrac",
+			bios:       "idrac-redfish",
 			boot:       "idrac-redfish-virtual-media",
 			management: "idrac-redfish",
 			power:      "idrac-redfish",
@@ -618,6 +634,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "ibmc://192.168.122.1:6233",
 			needsMac:   true,
 			driver:     "ibmc",
+			bios:       "",
 			boot:       "pxe",
 			management: "ibmc",
 			power:      "ibmc",
@@ -630,6 +647,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "ilo4://192.168.122.1",
 			needsMac:   true,
 			driver:     "ilo",
+			bios:       "",
 			boot:       "ilo-ipxe",
 			management: "",
 			power:      "",
@@ -642,6 +660,7 @@ func TestStaticDriverInfo(t *testing.T) {
 			input:      "ilo5://192.168.122.1",
 			needsMac:   true,
 			driver:     "ilo5",
+			bios:       "",
 			boot:       "ilo-ipxe",
 			management: "",
 			power:      "",
@@ -664,6 +683,10 @@ func TestStaticDriverInfo(t *testing.T) {
 				t.Fatalf("Unexpected boot interface %q, expected %q",
 					acc.BootInterface(), tc.boot)
 			}
+			if acc.BIOSInterface() != tc.bios {
+				t.Fatalf("Unexpected bios interface %q, expected %q",
+					acc.BIOSInterface(), tc.bios)
+			}
 		})
 	}
 }
diff --git a/pkg/provisioner/ironic/configdrive_test.go b/pkg/provisioner/ironic/configdrive_test.go
index 1a55a7dc..3a41c0fc 100644
--- a/pkg/provisioner/ironic/configdrive_test.go
+++ b/pkg/provisioner/ironic/configdrive_test.go
@@ -19,37 +19,14 @@ func TestEmpty(t *testing.T) {
 	nodeUUID := "33ce8659-7400-4c68-9535-d10766f07a58"
 
 	cases := []struct {
-		name       string
-		hostData   provisioner.HostConfigData
-		diskFormat string
-		expected   nodes.ConfigDrive
+		name     string
+		hostData provisioner.HostConfigData
+		expected nodes.ConfigDrive
 	}{
 		{
-			name:     "default",
+			name:     "empty",
 			hostData: fixture.NewHostConfigData("", "", ""),
-			expected: nodes.ConfigDrive{
-				MetaData: map[string]interface{}{
-					"local-hostname":   "myhost",
-					"local_hostname":   "myhost",
-					"metal3-name":      "myhost",
-					"metal3-namespace": "myns",
-					"name":             "myhost",
-				},
-			},
-		},
-		{
-			name:       "default with disk format",
-			hostData:   fixture.NewHostConfigData("", "", ""),
-			diskFormat: "qcow2",
-			expected: nodes.ConfigDrive{
-				MetaData: map[string]interface{}{
-					"local-hostname":   "myhost",
-					"local_hostname":   "myhost",
-					"metal3-name":      "myhost",
-					"metal3-namespace": "myns",
-					"name":             "myhost",
-				},
-			},
+			expected: nodes.ConfigDrive{},
 		},
 		{
 			name:     "everything",
@@ -113,12 +90,6 @@ func TestEmpty(t *testing.T) {
 				},
 			},
 		},
-		{
-			name:       "live ISO",
-			hostData:   fixture.NewHostConfigData("", "", ""),
-			diskFormat: "live-iso",
-			expected:   nodes.ConfigDrive{},
-		},
 	}
 
 	for _, tc := range cases {
@@ -147,18 +118,9 @@ func TestEmpty(t *testing.T) {
 				t.Fatalf("could not create provisioner: %s", err)
 			}
 
-			var diskFormat *string
-			if tc.diskFormat != "" {
-				diskFormat = &tc.diskFormat
-			}
-
 			result, err := prov.getConfigDrive(provisioner.ProvisionData{
 				HostConfig: tc.hostData,
 				BootMode:   v1alpha1.DefaultBootMode,
-				Image: v1alpha1.Image{
-					URL:        "http://image",
-					DiskFormat: diskFormat,
-				},
 			})
 
 			if len(tc.expected.MetaData) > 0 {
diff --git a/pkg/provisioner/ironic/prepare_test.go b/pkg/provisioner/ironic/prepare_test.go
index c9834e1f..582c0932 100644
--- a/pkg/provisioner/ironic/prepare_test.go
+++ b/pkg/provisioner/ironic/prepare_test.go
@@ -23,6 +23,7 @@ func (r *RAIDTestBMC) NeedsMAC() bool                                        { r
 func (r *RAIDTestBMC) Driver() string                                        { return "raid-test" }
 func (r *RAIDTestBMC) DisableCertificateVerification() bool                  { return false }
 func (r *RAIDTestBMC) DriverInfo(bmc.Credentials) (i map[string]interface{}) { return }
+func (r *RAIDTestBMC) BIOSInterface() string                                 { return "" }
 func (r *RAIDTestBMC) BootInterface() string                                 { return "" }
 func (r *RAIDTestBMC) ManagementInterface() string                           { return "" }
 func (r *RAIDTestBMC) PowerInterface() string                                { return "" }
diff --git a/pkg/provisioner/ironic/testbmc/testbmc.go b/pkg/provisioner/ironic/testbmc/testbmc.go
index 1cb682bb..ae7a627d 100644
--- a/pkg/provisioner/ironic/testbmc/testbmc.go
+++ b/pkg/provisioner/ironic/testbmc/testbmc.go
@@ -63,6 +63,10 @@ func (a *testAccessDetails) DriverInfo(bmcCreds bmc.Credentials) map[string]inte
 	return result
 }
 
+func (a *testAccessDetails) BIOSInterface() string {
+	return ""
+}
+
 func (a *testAccessDetails) BootInterface() string {
 	return "ipxe"
 }