From 616e4a7104b4dc2630df18915a2afbd0306804ad Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Tue, 17 Oct 2017 18:50:17 +0200 Subject: [PATCH] Switch from deprecated 'ironic' CLI to 'openstack baremetal' Change-Id: Id7e65995bb1a93db4af72252dd70077fb028fc70 --- .../advanced_deployment/introspect_single_node.rst | 11 +++++------ .../advanced_deployment/introspection_data.rst | 2 +- .../install/advanced_deployment/node_placement.rst | 2 +- .../install/advanced_deployment/node_states.rst | 5 ++--- .../install/advanced_deployment/profile_matching.rst | 6 +++--- .../install/advanced_deployment/root_device.rst | 6 +++--- 6 files changed, 15 insertions(+), 17 deletions(-) diff --git a/doc/source/install/advanced_deployment/introspect_single_node.rst b/doc/source/install/advanced_deployment/introspect_single_node.rst index 071ce889..6b86f43b 100644 --- a/doc/source/install/advanced_deployment/introspect_single_node.rst +++ b/doc/source/install/advanced_deployment/introspect_single_node.rst @@ -3,12 +3,12 @@ Introspecting a Single Node In addition to bulk introspection, you can also introspect nodes one by one. When doing so, you must take care to set the correct node states manually. -Use ``ironic node-show UUID`` command to figure out whether nodes are in -``manageable`` or ``available`` state. For all nodes in ``available`` state, -start with putting a node to ``manageable`` state (see +Use ``openstack baremetal node show UUID`` command to figure out whether nodes +are in ``manageable`` or ``available`` state. For all nodes in ``available`` +state, start with putting a node to ``manageable`` state (see :doc:`../advanced_deployment/node_states` for details):: - ironic node-set-provision-state UUID manage + openstack baremetal node manage Then you can run introspection:: @@ -25,5 +25,4 @@ or ``None`` if introspection succeeded for this node. Do not forget to make nodes available for deployment afterwards:: - ironic node-set-provision-state UUID provide - + openstack baremetal node provide diff --git a/doc/source/install/advanced_deployment/introspection_data.rst b/doc/source/install/advanced_deployment/introspection_data.rst index 974e245f..c93e43b7 100644 --- a/doc/source/install/advanced_deployment/introspection_data.rst +++ b/doc/source/install/advanced_deployment/introspection_data.rst @@ -48,7 +48,7 @@ and use that to collect a list of node mac addresses:: export IRONIC_INSPECTOR_PASSWORD=xxxxxx # Download the extra introspection data from swift: - for node in $(ironic node-list | grep -v UUID | awk '{print $2}'); + for node in $(openstack baremetal node list -f value -c UUID); do swift -U service:ironic -K $IRONIC_INSPECTOR_PASSWORD download ironic-inspector extra_hardware-$node; done diff --git a/doc/source/install/advanced_deployment/node_placement.rst b/doc/source/install/advanced_deployment/node_placement.rst index b674e2ba..66ac78ee 100644 --- a/doc/source/install/advanced_deployment/node_placement.rst +++ b/doc/source/install/advanced_deployment/node_placement.rst @@ -21,7 +21,7 @@ by the Nova scheduler on deployment. This can either be done via the nodes json file when registering the nodes, or alternatively via manual adjustment of the node capabilities, e.g:: - ironic node-update replace properties/capabilities='node:controller-0,boot_option:local' + openstack baremetal node set --property capabilities='node:controller-0,boot_option:local' This has assigned the capability ``node:controller-0`` to the node, and this must be repeated (using a unique continuous index, starting from 0) for all diff --git a/doc/source/install/advanced_deployment/node_states.rst b/doc/source/install/advanced_deployment/node_states.rst index 78a602aa..3b45e781 100644 --- a/doc/source/install/advanced_deployment/node_states.rst +++ b/doc/source/install/advanced_deployment/node_states.rst @@ -37,8 +37,7 @@ Nodes get into ``manageable`` state automatically. The ``manage`` action can be used to bring nodes already moved to available_ state back to ``manageable`` for configuration:: - ironic node-set-provision-state manage - + openstack baremetal node manage available --------- @@ -55,4 +54,4 @@ in this state. which failed introspection stay in ``manageable`` state and must be reintrospected or made ``available`` manually:: - ironic node-set-provision-state provide + openstack baremetal node provide diff --git a/doc/source/install/advanced_deployment/profile_matching.rst b/doc/source/install/advanced_deployment/profile_matching.rst index 103267d0..b19d6936 100644 --- a/doc/source/install/advanced_deployment/profile_matching.rst +++ b/doc/source/install/advanced_deployment/profile_matching.rst @@ -27,17 +27,17 @@ Manual profile tagging To assign a profile to a node directly, issue the following command:: - ironic node-update replace properties/capabilities=profile:,boot_option:local + openstack baremetal node set --property capabilities=profile:,boot_option:local Alternatively, you can provide a number of profiles as capabilities in form of ``_profile:1``, which later can be automatically converted to one assigned profile (see `Use the flavors to deploy`_ for details). For example:: - ironic node-update replace properties/capabilities=compute_profile:1,control_profile:1,boot_option:local + openstack baremetal node set --property capabilities=compute_profile:1,control_profile:1,boot_option:local Finally, to clean all profile information from a node use:: - ironic node-update replace properties/capabilities=boot_option:local + openstack baremetal node set --property capabilities=boot_option:local .. note:: We can not update only a single key from the capabilities dictionary, so we diff --git a/doc/source/install/advanced_deployment/root_device.rst b/doc/source/install/advanced_deployment/root_device.rst index 2b1858c2..405ff112 100644 --- a/doc/source/install/advanced_deployment/root_device.rst +++ b/doc/source/install/advanced_deployment/root_device.rst @@ -11,17 +11,17 @@ for more details. For example:: - ironic node-update > add properties/root_device='{"wwn": "0x4000cca77fc4dba1"}' + openstack baremetal node set --property root_device='{"wwn": "0x4000cca77fc4dba1"}' To remove a hint and fallback to the default behavior:: - ironic node-update remove properties/root_device + openstack baremetal node unset --property root_device Note that the root device hints should be assigned *before* both introspection and deployment. After changing the root device hints you should either re-run introspection or manually fix the ``local_gb`` property for a node:: - ironic node-update add properties/local_gb= + openstack baremetal node set --property local_gb= Where the new value is calculated as a real disk size in GiB minus 1 GiB to account for partitioning (the introspection process does this calculation