Automatically enable serial consoles on post configure
This functionality is controlled by the flag ironic_serial_console_autoenable, which, when enabled, will configure serial consoles for each of the ironic nodes during the `overcloud post configure` step. This was added to reduce the number of kayobe commands that are needed to be run for a given deployment. Change-Id: I7072e518c29387b964e4e25b08b4559f152d5ecf Story: 2004192 Task: 29325
This commit is contained in:
parent
7cb684a253
commit
5fa6bc4d36
6
ansible/baremetal-compute-serial-console-post-config.yml
Normal file
6
ansible/baremetal-compute-serial-console-post-config.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
# This is a wrapper around baremetal-compute-serial-console which only runs the playbook when
|
||||
# ironic_serial_console_autoenable is set to true.
|
||||
|
||||
- import_playbook: baremetal-compute-serial-console.yml
|
||||
when: ironic_serial_console_autoenable | bool
|
@ -131,6 +131,9 @@ kolla_ironic_pxe_append_params: >
|
||||
###############################################################################
|
||||
# Ironic Node Configuration
|
||||
|
||||
# Whether or not to enable the serial consoles on post configure
|
||||
ironic_serial_console_autoenable: false
|
||||
|
||||
# This defines the start of the range of TCP ports to used for the IPMI socat
|
||||
# serial consoles
|
||||
ironic_serial_console_tcp_pool_start: 30000
|
||||
|
@ -171,6 +171,24 @@
|
||||
set_fact:
|
||||
kolla_api_interface: "{{ kolla_bifrost_network_interface }}"
|
||||
|
||||
- name: Validate configuration options for kolla-ansible
|
||||
hosts: localhost
|
||||
tags:
|
||||
- kolla-ansible
|
||||
- config-validation
|
||||
tasks:
|
||||
- name: Validate serial console configuration
|
||||
block:
|
||||
- name: Check ipmitool-socat is in enabled in kolla_ironic_enabled_console_interfaces
|
||||
fail:
|
||||
msg: >
|
||||
kolla_ironic_enabled_console_interfaces must contain ipmitool-socat if you set
|
||||
ironic_serial_console_autoenable to true
|
||||
when:
|
||||
- kolla_ironic_enabled_console_interfaces is defined
|
||||
- "'ipmitool-socat' not in kolla_ironic_enabled_console_interfaces"
|
||||
when: ironic_serial_console_autoenable | bool
|
||||
|
||||
- name: Ensure Kolla Ansible is configured
|
||||
hosts: localhost
|
||||
tags:
|
||||
|
@ -131,3 +131,11 @@ You can optionally limit the nodes targeted by setting
|
||||
|
||||
which should take the form of an `ansible host pattern
|
||||
<https://docs.ansible.com/ansible/latest/user_guide/intro_patterns.html>`_.
|
||||
|
||||
Serial console auto-enable
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To enable the serial consoles automatically on ``kayobe overcloud post configure``, you can set
|
||||
``ironic_serial_console_autoenable`` in ``etc/kayobe/ironic.yml``::
|
||||
|
||||
ironic_serial_console_autoenable: true
|
||||
|
@ -106,6 +106,9 @@
|
||||
###############################################################################
|
||||
# Ironic Node Configuration
|
||||
|
||||
# Whether or not to enable the serial consoles on post configure
|
||||
#ironic_serial_console_autoenable:
|
||||
|
||||
# This defines the start of the range of TCP ports to used for the IPMI socat
|
||||
# serial consoles
|
||||
#ironic_serial_console_tcp_pool_start:
|
||||
|
@ -1257,6 +1257,7 @@ class OvercloudPostConfigure(KayobeAnsibleMixin, VaultMixin, Command):
|
||||
inspector service.
|
||||
* Register a provisioning network with glance.
|
||||
* Configure Grafana for control plane.
|
||||
* Configure serial consoles for the ironic nodes
|
||||
"""
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
@ -1264,7 +1265,8 @@ class OvercloudPostConfigure(KayobeAnsibleMixin, VaultMixin, Command):
|
||||
playbooks = _build_playbook_list(
|
||||
"overcloud-ipa-images", "overcloud-introspection-rules",
|
||||
"overcloud-introspection-rules-dell-lldp-workaround",
|
||||
"provision-net", "overcloud-grafana-configure")
|
||||
"provision-net", "overcloud-grafana-configure",
|
||||
"baremetal-compute-serial-console-post-config")
|
||||
self.run_kayobe_playbooks(parsed_args, playbooks)
|
||||
|
||||
|
||||
|
@ -1283,7 +1283,9 @@ class TestCase(unittest.TestCase):
|
||||
utils.get_data_files_path("ansible", "overcloud-introspection-rules-dell-lldp-workaround.yml"), # noqa
|
||||
utils.get_data_files_path("ansible", "provision-net.yml"),
|
||||
utils.get_data_files_path(
|
||||
"ansible", "overcloud-grafana-configure.yml")
|
||||
"ansible", "overcloud-grafana-configure.yml"),
|
||||
utils.get_data_files_path(
|
||||
"ansible", "baremetal-compute-serial-console-post-config.yml"), # noqa
|
||||
],
|
||||
),
|
||||
]
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added the ability to configure baremetal serial consoles during the
|
||||
post configure step. This is controlled via ``ironic_serial_console_autoenable``
|
||||
in ``etc/kayobe/ironic.yml``.
|
Loading…
Reference in New Issue
Block a user