Skip to content

Commit 18f019b

Browse files
committed
Console Policy
Updates policy file so serial console can be properly used by owners and lessees.
1 parent 426fdf1 commit 18f019b

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

docs/source/usage/index.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,43 @@ In order to use an external provisioning service, simply attach the node to the
225225
| Attach Network to Node | ``openstack esi node network attach (--network <network> | --port <port>) <node>`` |
226226
+-------------------------------+------------------------------------------------------------------------------------+
227227

228+
Serial Console Access
229+
---------------------
230+
231+
In order to access a node using a serial console, the admin or owner must configure the node's console interface.
232+
Instructions for this can be found under `Configuring Web or Serial Console`_ in Ironic's documentation.
233+
Once the node is properly configured, the console can be enabled and disabled as needed.
234+
235+
+-----------------+-----------------------------------------------------+
236+
| | **Actions** |
237+
+-----------------+-----------------------------------------------------+
238+
| Enable Console | ``openstack baremetal node console enable <node>`` |
239+
+-----------------+-----------------------------------------------------+
240+
| Disable Console | ``openstack baremetal node console disable <node>`` |
241+
+-----------------+-----------------------------------------------------+
242+
243+
Serial console information is available from the Bare Metal service. Get
244+
serial console information for a node from the Bare Metal service as follows:
245+
246+
+---------------------------+--------------------------------------------------+
247+
| | **Actions** |
248+
+---------------------------+--------------------------------------------------+
249+
| Show Console Information | ``openstack baremetal node console show <node>`` |
250+
+---------------------------+--------------------------------------------------+
251+
252+
``openstack baremetal node console show <node>`` will generate the following output:
253+
254+
+-----------------+----------------------------------------------------------------------+
255+
| Property | Value |
256+
+-----------------+----------------------------------------------------------------------+
257+
| console_enabled | True |
258+
+-----------------+----------------------------------------------------------------------+
259+
| console_info | {u'url': u'``tcp://<host>:<port>``', u'type': u'socat'} |
260+
+-----------------+----------------------------------------------------------------------+
261+
262+
If ``console_enabled`` is ``false`` or ``console_info`` is ``None`` then
263+
the serial console is disabled. Note, there can only be one ipmi connection to the node, meaning only one user may access the console at a time.
264+
228265
Additional ESI CLI Actions
229266
--------------------------
230267

@@ -284,3 +321,4 @@ Trunk Ports
284321
.. _Ironic boot-from-volume documentation: https://docs.openstack.org/ironic/latest/admin/boot-from-volume.html
285322
.. _python-esiclient: https://github.com/CCI-MOC/python-esiclient
286323
.. _python-esileapclient: https://github.com/CCI-MOC/python-esileapclient
324+
.. _Configuring Web or Serial Console: https://docs.openstack.org/ironic/latest/admin/console.html

etc/ironic/policy.yaml.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@
128128

129129
# Get Node console connection information
130130
# GET /nodes/{node_ident}/states/console
131-
#"baremetal:node:get_console": "rule:is_admin"
131+
#"baremetal:node:get_console": "rule:is_admin or rule:is_node_owner or rule:is_node_lessee"
132132

133133
# Change Node console status
134134
# PUT /nodes/{node_ident}/states/console
135-
#"baremetal:node:set_console_state": "rule:is_admin"
135+
#"baremetal:node:set_console_state": "rule:is_admin or rule:is_node_owner or rule:is_node_lessee"
136136

137137
# List VIFs attached to node
138138
# GET /nodes/{node_ident}/vifs

0 commit comments

Comments
 (0)