[ICN-481] metal3 provisioning fails for nvme devices Created: 09/Oct/20 Updated: 17/Dec/20 Resolved: 16/Nov/20 |
|
| Status: | Done |
| Project: | Integrated Cloud Native NFV |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Todd Malsbary | Assignee: | Todd Malsbary |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
As found in a specific deploy, if the root device of the provisioned node is not /dev/sda, provisioning fails.
|
| Comments |
| Comment by Todd Malsbary [ 16/Nov/20 ] | ||||||||||||
| Comment by Todd Malsbary [ 15/Oct/20 ] | ||||||||||||
|
Proof of concept is at https://github.com/malsbat/icn/tree/upgrade-baremetal-operator, using an unofficial baremetal-operator image. The integratedcloudnative/baremetal-operator image needs to be built from the capm3-v0.3.2 tag of the upstream repo. | ||||||||||||
| Comment by Todd Malsbary [ 09/Oct/20 ] | ||||||||||||
|
From https://github.com/metal3-io/baremetal-operator/blob/master/docs/api.md: hardwareProfileThis field is deprecated. See rootDeviceHints instead. The name of the hardware profile to use. The following are the current supported hardwareProfile settings and their corresponding root devices.
NOTE: These are subject to change. This table is located in baremetal-operator/pkg/hardware/profile.go: profiles[DefaultProfileName] = Profile{
Name: DefaultProfileName,
RootDeviceHints: RootDeviceHints{
DeviceName: "/dev/sda",
},
RootGB: 10,
LocalGB: 50,
CPUArch: "x86_64",
}
The code that makes the choice is in baremetal-operator/pkg/provisioner/ironic/ironic.go: hwProf, err := hardware.GetProfile(p.host.HardwareProfile())
...
if _, ok := ironicNode.Properties["root_device"]; !ok {
op = nodes.AddOp
p.log.Info("adding root_device")
} else {
op = nodes.ReplaceOp
p.log.Info("updating root_device")
}
hints := map[string]string{}
switch {
case hwProf.RootDeviceHints.DeviceName != "":
hints["name"] = hwProf.RootDeviceHints.DeviceName
case hwProf.RootDeviceHints.HCTL != "":
hints["hctl"] = hwProf.RootDeviceHints.HCTL
}
p.log.Info("using root device", "hints", hints)
Now, let's take a look at the BareMetalHost: # kubectl -n metal3 get bmh
NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR
pod11-node2 OK provisioned ipmi://10.10.110.12 unknown true
The profile is confirmed in the logs from the baremetal-operator: {"level":"info","ts":1602018807.7891486,"logger":"baremetalhost_ironic","msg":"adding root_device","host":"pod11-node2"}{"level":"info","ts":1602018807.7891557,"logger":"baremetalhost_ironic","msg":"using root device","host":"pod11-node2","hints":{"name":"/dev/sda"}}
|