Bug 1563801

Summary: Setting --property root_device='{"hctl": "<number>"}' isn't always respected.
Product: Red Hat OpenStack Reporter: Alexander Chuzhoy <sasha>
Component: openstack-ironicAssignee: RHOS Maint <rhos-maint>
Status: CLOSED NOTABUG QA Contact: mlammon
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 13.0 (Queens)CC: bfournie, mburns, rhel-osp-director-maint, sasha, srevivo
Target Milestone: ga   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-09 15:07:41 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:

Description Alexander Chuzhoy 2018-04-04 18:07:43 UTC
Setting --property root_device='{"hctl": "<number>"}' isn't always respected.


(undercloud) [stack@wshed-director noqs]$ openstack baremetal introspection data save c14u25b05  |jq ".inventory.disks"
    "size": 146815733760,
    "serial": "50000395a8394fd0",
    "wwn": "0x50000395a8394fd0",
    "rotational": true,
    "vendor": "TOSHIBA",
    "name": "/dev/sda",
    "wwn_vendor_extension": null,
    "hctl": "0:0:0:0",
    "wwn_with_extension": "0x50000395a8394fd0",
    "by_path": "/dev/disk/by-path/pci-0000:01:00.0-scsi-0:0:0:0",
    "model": "MK1401GRRB"
    "size": 146815733760,
    "serial": "50000395a8394f90",
    "wwn": "0x50000395a8394f90",
    "rotational": true,
    "vendor": "TOSHIBA",
    "name": "/dev/sdb",
    "wwn_vendor_extension": null,
    "hctl": "0:0:1:0",
    "wwn_with_extension": "0x50000395a8394f90",
    "by_path": "/dev/disk/by-path/pci-0000:01:00.0-scsi-0:0:1:0",
    "model": "MK1401GRRB"

So I configured root_device with the following command:
openstack baremetal node set --resource-class OPENSHIFTWORKER c14u25b06  --property root_device='{"hctl": "0:0:0:0"}'

Attempted to deploy OC and the node still booted with another disk (had an OS there from previous deployment).

I ended up setting:
openstack baremetal node set --resource-class OPENSHIFTWORKER c14u25b05  --property root_device='{"serial": "50000395a8394fd0"}'

And the OC got deployed right (choosed the right disk).

Comment 2 Dmitry Tantsur 2018-04-04 18:41:48 UTC
Could you please try wiping the hard drives and seeing if the problem persists? Something like this may happen when cleaning is disabled.

Comment 3 Alexander Chuzhoy 2018-04-06 13:08:10 UTC
At some point reproduced the problem even with using serial on the same setup.

After cleaning the metadata the issue didn't reproduce.

Comment 4 Bob Fournier 2018-04-09 21:04:59 UTC
> After cleaning the metadata the issue didn't reproduce.

I think this proves the proves the issue was just that the node was not cleaned, correct?

Comment 5 Bob Fournier 2018-04-16 12:33:07 UTC
Sasha - would like to close since works fine when cleaned, OK?

Comment 6 Dmitry Tantsur 2018-05-09 15:07:41 UTC
I think we can close it, it's a known bug with cleaning disabled.