Bug 1781801

Summary: hctl values are not consistent for the same node
Product: Red Hat OpenStack Reporter: Alex Stupnikov <astupnik>
Component: openstack-ironicAssignee: RHOS Maint <rhos-maint>
Status: CLOSED NOTABUG QA Contact: Alistair Tonner <atonner>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 13.0 (Queens)CC: bfournie, dtantsur, mburns, rpittau
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-11 10:38:16 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:
Embargoed:

Description Alex Stupnikov 2019-12-10 15:43:57 UTC
Description of problem:

hctl values are not consistent for customer's hardware. It is possible to reproduce the problem by running multiple introspections for the same node and comparing the following outputs:

openstack baremetal introspection data save NODENAME | jq '.["inventory"]["disks"][]["hctl"]'


For specified node we get the following results:

1.

"15:0:0:0"
"2:0:0:0"
"2:0:1:0"
"2:0:2:0"
"2:0:3:0"

2.

"0:0:0:0"
"0:0:1:0"
"0:0:2:0"
"0:0:3:0"
"15:0:0:0"


I will provide more details privately.

Comment 3 Riccardo Pittau 2019-12-11 09:40:32 UTC
Hey Alex,
I had a quick look at the disks output you provided and I think this is not a bug or an error.
Every time the bus is scanned, some informations like HCTL are dynamic and can change, the persistent ones should only be wwn and serial.
Usually only the WWID is used to uniquely identify a device:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/persistent_naming#persistent_naming-wwid

Comment 4 Dmitry Tantsur 2019-12-11 10:38:16 UTC
I agree with Riccardo, HCTL does not have to be persistent. We also don't have much control over it, all we do is read /sys/block/<device>/device/scsi_device and return whatever the kernel gives us.