Bug 1330220

Summary: Documentation bug: Red Hat Ceph Storage for the Overcloud
Product: Red Hat OpenStack Reporter: Andreas Karis <akaris>
Component: documentationAssignee: Dan Macpherson <dmacpher>
Status: CLOSED CURRENTRELEASE QA Contact: RHOS Documentation Team <rhos-docs>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0 (Liberty)CC: akaris, cjanisze, djuran, dmacpher, lbopf, lmartins, mburns, mcornea, rhel-osp-director-maint, rkharwar, srevivo
Target Milestone: gaKeywords: Documentation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-16 04:46:05 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 Andreas Karis 2016-04-25 16:21:25 UTC
Description of problem:
Documentation bug: Red Hat Ceph Storage for the Overcloud


Actual results:

Documentation mentions the following, in section 2.5 Defining the root disk:
 First, find the serial number of the intended root drive for each node. Use the ironic node-show command for each node and identify the block devices available from the extra section. For example, use the following to list all nodes and their block devices:

$ for uuid in `ironic node-list | awk '{print $2}'`; do echo "Node ID: $uuid"; ironic node-show $uuid | grep 'properties\|extra ' -A3; done

For this example, the output includes the following:

...
Node ID: 97e3f7b3-5629-473e-a187-2193ebe0b5c7
| extra       | {u'newly_discovered': u'true', u'block_devices':      |
|             | {u'serials': [u'100000000', u'100000001',             |
|             | u'100000002', u'100000003', u'100000004',             |
|             | u'100000005', u'100000006', u'100000007',             |
--
| properties  | {u'cpu_arch': u'x86_64', u'root_device': {u'serial':  |
|             | u'100000005'}, u'cpus': u'16', u'capabilities':       |
|             | u'profile:ceph-storage,boot_option:local',            |
|             | u'memory_mb': u'65536', u'local_gb': u'3725'}         |
...


Expected results:
Extra specs are stored in swift now, so the documentation needs to be changed

Additional info:

    https://repos.fedorapeople.org/repos/openstack-m/jenkins/instack-undercloud-docs/243602-1/html/advanced_deployment/profile_matching.html  
      
    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  
      
    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"}'  
    There should be a "name" hint, but this doesn't work: This doesn't work: for i in {1..3};do ironic node-update overcloud-ceph$i replace properties/root_device='{"size": "64"}';done  
    (for i in {1..3};do ironic node-update overcloud-ceph$i add properties/root_device='{"name": "/dev/vda"}';done)  
    For this, disks need to be of different size:  
    for i in {1..3};do ironic node-update overcloud-ceph$i add properties/root_device='{"size": "64"}';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"  
      
      
    https://bugzilla.redhat.com/show_bug.cgi?id=1327866   
      
      
    This needs to be run _before_ introspection  to determine the correct root size!  
      
    openstack introspection bulk start

Comment 2 Dan Macpherson 2016-04-26 02:14:32 UTC
*** Bug 1329719 has been marked as a duplicate of this bug. ***

Comment 3 Dan Macpherson 2016-04-29 02:05:04 UTC
Hi Adreas,

Confirming that the data is now stored in Swift and I'll need to rectify the documentation for this.

However, I might need some clarification with how the hints are used with the swift objects, including "name".

I had a look at one of my test nodes following what you proposed. However, the data in the extra_hardware-* objects don't seem to contain all the hints, not just "name". For example, there doesn't seem to be fields for "model", "serial", or the "wwn*" fields.

I thought this was a little odd, so I looked at the standard inspector_data-* objects. I found a section in the JSON that had the following:

  "disks": [
    {
      "size": 53687091200,
      "rotational": true,
      "vendor": "0x1af4",
      "name": "/dev/vda",
      "wwn_vendor_extension": null,
      "wwn_with_extension": null,
      "model": "",
      "wwn": null,
      "serial": null
    }
  ],

I also checked on a multi-disk node and found the following:

  "disks": [
    {
      "size": 53687091200,
      "rotational": true,
      "vendor": "0x1af4",
      "name": "/dev/vda",
      "wwn_vendor_extension": null,
      "wwn_with_extension": null,
      "model": "",
      "wwn": null,
      "serial": null
    },
    {
      "size": 53687091200,
      "rotational": true,
      "vendor": "0x1af4",
      "name": "/dev/vdb",
      "wwn_vendor_extension": null,
      "wwn_with_extension": null,
      "model": "",
      "wwn": null,
      "serial": null
    },
    {
      "size": 53687091200,
      "rotational": true,
      "vendor": "0x1af4",
      "name": "/dev/vdc",
      "wwn_vendor_extension": null,
      "wwn_with_extension": null,
      "model": "",
      "wwn": null,
      "serial": null
    }
  ],

I looks like the the hints for the root disk are checked against data in the inspector_data-* objects, not the extra_hardware-* objects. Is there any chance you can confirm this?

Needinfo'ing Lucas from the Ironic team -- Lucas, any chance you can confirm this too?

Comment 6 Dan Macpherson 2016-05-05 02:05:26 UTC
Thanks, Ruchika. Have updated accordingly.

Comment 7 Dan Macpherson 2016-06-16 04:46:05 UTC
No response in over a month in response to comment #4. THe changes have been pushed to the portal, so I'll be closing this BZ. However, feel free to reopen if further changes to this section are required.