Bug 1445451

Summary: [RFE] introspection should report /dev/disk/by-path name of block devices
Product: Red Hat OpenStack Reporter: Ben England <bengland>
Component: openstack-ironic-python-agentAssignee: Ilya Etingof <ietingof>
Status: CLOSED ERRATA QA Contact: mlammon
Severity: low Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: bfournie, ietingof, jefbrown, johfulto, jomurphy, jtaleric, mburns, mkovacik, racedoro, rhel-osp-director-maint, rsussman, sclewis, slinaber, smerrow, srevivo, twilkins
Target Milestone: Upstream M1Keywords: FutureFeature, Triaged
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: PerfScale
Fixed In Version: python-ironic-lib-2.12.0-0.20180213172054.831c55b openstack-ironic-python-agent-3.2.1-0.20180213101430.a13b555.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1565295 (view as bug list) Environment:
Last Closed: 2018-06-27 13:29:27 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:
Bug Depends On:    
Bug Blocks: 1475550, 1565295    

Description Ben England 2017-04-25 16:49:16 UTC
Description of problem:

This is a problem described in upstream ironic bug

https://bugs.launchpad.net/ironic/+bug/1679726

(plz check that I assigned to right component, I wasn't sure)

It impacts any Ceph deployment which must be done by RHOSP director, including but not limited to HCI.  Specifically in the scale lab configuration we have found it necessary to use /dev/disk/by-path names for Ceph OSD devices in YAML deployment configuration files in order to get HCI deploys to work reliably.  We expect this to happen in other hardware configurations as well, because Linux does not guarantee stability of block device names (i.e. /dev/sd*[a-z]) across reboots.  However, introspection does not report /dev/disk/by-path/ names - consequently it becomes a catch-22 where you have to deploy in order to deploy ;-)  When introspection is running, it can easily look in /dev/disk/by-path/ tree and find the softlink pointing to a particular block device and report that, and this would enable admins to generate YAML files that will work for RHOSP-director Ceph deployments first time and every time.

Version-Release number of selected component (if applicable):

RHOSP 10 GA (Newton) is where we first noticed this problem.

How reproducible:

every time.

Steps to Reproduce:
1. do an introspection 
2. openstack baremetal node save <uuid>

Actual results:

no /dev/disk/by-path info reported for each block device
https://bugzilla.redhat.com/show_bug.cgi?id=1371218
Expected results:

include block device's /dev/disk/by-path name. 

Additional info:

https://mojo.redhat.com/people/bengland/blog/2017/03/30/difficulty-with-hyperconverged-openstackceph-in-scale-lab

Comment 2 Ben England 2017-04-27 20:34:21 UTC
posted a potential patch here.

https://bugs.launchpad.net/ironic/+bug/1679726/comments/3

Comment 4 Ilya Etingof 2017-08-28 17:19:15 UTC
Implementation largely based on Ben's patch (thank you!): https://review.openstack.org/#/c/498489/

Comment 5 Ben England 2017-09-08 14:37:32 UTC
Ilya, Thank you for helping to get this feature added. -ben

Comment 12 Bob Fournier 2018-04-09 21:23:18 UTC
In puddle 2018-04-06.1

python-ironic-lib-2.12.0-1.el7ost.noarch
openstack-ironic-python-agent-3.2.1-0.20180219221752.a13b555.el7ost

Running:
(undercloud) [stack@host01 ~]$ openstack overcloud node introspect --all-manageable --provide
followed by:
(undercloud) [stack@host01 ~]$ openstack baremetal introspection data save host2 | jq .inventory.disks
[
  {
    "size": 599550590976,
    "serial": "6b083fe0d2d0eb001bd2cc7e0fc68486",
    "wwn": "0x6b083fe0d2d0eb00",
    "rotational": true,
    "vendor": "DELL",
    "name": "/dev/sda",
    "wwn_vendor_extension": "0x1bd2cc7e0fc68486",
    "hctl": "0:2:0:0",
    "wwn_with_extension": "0x6b083fe0d2d0eb001bd2cc7e0fc68486",
    "by_path": "/dev/disk/by-path/pci-0000:01:00.0-scsi-0:2:0:0",  <===
    "model": "PERC H710"
  }
]

So it looks like the by_path info is there.

Comment 16 errata-xmlrpc 2018-06-27 13:29:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:2086