Bug 1327866

Summary: [RFE] Ironic properties/root_device allow "name" hint for deployment
Product: Red Hat OpenStack Reporter: Andreas Karis <akaris>
Component: openstack-ironicAssignee: Lucas Alvares Gomes <lmartins>
Status: CLOSED ERRATA QA Contact: Raviv Bar-Tal <rbartal>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 8.0 (Liberty)CC: achernet, dnavale, jjoyce, kbasil, mburns, nlevinki, rhel-osp-director-maint, srevivo
Target Milestone: gaKeywords: FutureFeature, OtherQA, TestOnly, ZStream
Target Release: 9.0 (Mitaka)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-ironic-5.1.2-3.el7ost Doc Type: Enhancement
Doc Text:
With this update, a new enhancement allows finding a suitable disk device for the Bare Metal Provisioning service to deploy the image onto by using its name or path. Some devices have persistent names (for example, RAID) and this new feature allows operators to use these names instead of having to use the disk WWN, serial, model names and so on.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-24 12:53:33 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:
Bug Depends On:    
Bug Blocks: 1418556    

Description Andreas Karis 2016-04-17 03:56:58 UTC
Description of problem:
Specify a hint according to:

http://docs.openstack.org/developer/ironic/deploy/install-guide.html#specifying-the-disk-for-deployment


It seems that "name" hints will work only for introspection (if at all) -> introspection succeeds and it seems that correct disk gets selected, but when deploying the actual instance, the following happens:

/var/log/ironic/ironic-api.log
InstanceDeployFailure: RPC do_node_deploy failed to validate deploy or power info. Error: The hints "name" are invalid. Valid hints are: "model, wwn, vendor, serial, size"

Version-Release number of selected component (if applicable):
openstack-ironic-api-4.2.2-4.el7ost.noarch

How reproducible:
All the time

Steps to Reproduce:

export IRONIC_DISCOVERD_PASSWORD=`sudo grep admin_password /etc/ironic-inspector/inspector.conf | egrep -v '^#'  | awk '{print $NF}'`


for node in $(ironic node-list | grep -v UUID| awk '{print $2}');

  do swift -U service:ironic -K $IRONIC_DISCOVERD_PASSWORD download ironic-inspector extra_hardware-$node;

done


for f in extra_hardware-*;

  do cat $f | jq -r 'map(select(.[0]=="disk" and .[1]=="vda"))';

done

e.g.:
[stack@undercloud ~]$ cat extra_hardware-6a4546be-7623-4fb8-a913-01b55c5bba01  | jq -r 'map(select(.[0]=="disk" and .[1]=="vda"))';
[
  [
    "disk",
    "vda",
    "size",
    "64"
  ],
  [
    "disk",
    "vda",
    "vendor",
    "0x1af4"
  ],
  [
    "disk",
    "vda",
    "optimal_io_size",
    "0"
  ],
  [
    "disk",
    "vda",
    "physical_block_size",
    "512"
  ],
  [
    "disk",
    "vda",
    "rotational",
    "1"
  ]
]



Specify a hint according to:

http://docs.openstack.org/developer/ironic/deploy/install-guide.html#specifying-the-disk-for-deployment


Attention: "name" hints will work only for introspection

e.g.:

ironic node-update <node-uuid> add properties/root_device='{"name": "/dev/vda"}'

for i in {1..3};do ironic node-update overcloud-ceph$i add properties/root_device='{"name": "/dev/vda"}';done

InstanceDeployFailure: RPC do_node_deploy failed to validate deploy or power info. Error: The hints "name" are invalid. Valid hints are: "model, wwn, vendor, serial, size"

Actual results:
InstanceDeployFailure: RPC do_node_deploy failed to validate deploy or power info. Error: The hints "name" are invalid. Valid hints are: "model, wwn, vendor, serial, size"

Expected results:
success

Additional info:

Comment 2 Lucas Alvares Gomes 2016-05-16 10:29:45 UTC
The feature was added as part of the mitaka release upstream [0]. For OSP it will be included in the version 9.

[0] http://docs.openstack.org/releasenotes/ironic/mitaka.html#id5

Comment 8 errata-xmlrpc 2016-08-24 12:53:33 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://rhn.redhat.com/errata/RHEA-2016-1761.html