aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Szumski <doug@stackhpc.com>2025-11-21 16:42:34 +0000
committerDoug Szumski <doug@stackhpc.com>2026-03-16 12:21:50 +0000
commitb0b798a397f7744ec473ba0101708a51a0d35db1 (patch)
tree5d3a96ba824dc4069d055238abd2eb58fcdabfc0
parent09ddc0d1b3ca1fc1c7e0de6e3bb49c4dc12581a8 (diff)
downloadkolla-ansible-b0b798a397f7744ec473ba0101708a51a0d35db1.tar.gz
kolla-ansible-b0b798a397f7744ec473ba0101708a51a0d35db1.zip
Ironic parameter rework and default NTP server
This patch moves the default Ironic kernel parameters from templates into variables located in the 'Kernel Parameters' section. Existing configurations are supported using existing variables. Default NTP configuration for the Ironic Python Agent (IPA) was also added in this patch. Change-Id: I2ef63233eae661ed056bfa215b2875f44e0b6134 Signed-off-by: Doug Szumski <doug@stackhpc.com>
-rw-r--r--ansible/roles/ironic/defaults/main.yml20
-rw-r--r--ansible/roles/ironic/templates/ironic.conf.j22
-rw-r--r--doc/source/reference/bare-metal/ironic-guide.rst16
-rw-r--r--releasenotes/notes/ironic-parameter-ntp-rework-672efa37e5cc918f.yaml9
4 files changed, 46 insertions, 1 deletions
diff --git a/ansible/roles/ironic/defaults/main.yml b/ansible/roles/ironic/defaults/main.yml
index e9e2163fe..c7f746cb2 100644
--- a/ansible/roles/ironic/defaults/main.yml
+++ b/ansible/roles/ironic/defaults/main.yml
@@ -362,3 +362,23 @@ ironic_copy_certs: "{{ kolla_copy_ca_into_containers | bool or ironic_enable_tls
# WSGI
############
ironic_wsgi_provider: "uwsgi"
+
+############
+# NTP
+############
+# If set, pass this NTP server via the kernel command line to IPA
+ironic_ntp_server: ""
+
+####################
+# Kernel Parameters
+####################
+ironic_kernel_append_params_default:
+ - "nofb"
+ - "nomodeset"
+ - "vga=normal"
+ - "console=tty0"
+ - "console=ttyS0,{{ ironic_console_serial_speed }}"
+ - "{% if ironic_ntp_server is not none and ironic_ntp_server | length > 0 %}ipa-ntp-server={{ ironic_ntp_server }}{% endif %}"
+
+ironic_kernel_append_params_extras: []
+ironic_kernel_append_params: "{{ (ironic_kernel_append_params_default + ironic_kernel_append_params_extras) | select() | join(' ') }}"
diff --git a/ansible/roles/ironic/templates/ironic.conf.j2 b/ansible/roles/ironic/templates/ironic.conf.j2
index 7ed1a9e9d..9cc4fd78e 100644
--- a/ansible/roles/ironic/templates/ironic.conf.j2
+++ b/ansible/roles/ironic/templates/ironic.conf.j2
@@ -178,7 +178,7 @@ deploy_logs_storage_backend = local
deploy_logs_collect = always
[pxe]
-kernel_append_params = nofb nomodeset vga=normal console=tty0 console=ttyS0,{{ ironic_console_serial_speed }}
+kernel_append_params = {{ ironic_kernel_append_params }}
tftp_root = /var/lib/ironic/tftpboot
tftp_master_path = /var/lib/ironic/master_images
tftp_server = {{ api_interface_address }}
diff --git a/doc/source/reference/bare-metal/ironic-guide.rst b/doc/source/reference/bare-metal/ironic-guide.rst
index fbbe00ff2..962ece762 100644
--- a/doc/source/reference/bare-metal/ironic-guide.rst
+++ b/doc/source/reference/bare-metal/ironic-guide.rst
@@ -146,6 +146,22 @@ The port used for conductor's HTTP server is controlled via
ironic_http_port: "8089"
+Configure Ironic Python Agent NTP server (optional)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The Ironic Python Agent requires that the system clock is set correctly for
+the heartbeat mechanism to work. One way of achieving this is to pass
+the address of an NTP server via the kernel commandline, which is then
+used to set the system clock when IPA first starts. This is not a hard
+requirement, and you may use other methods. For example DHCP, or functionality
+built into the BMC.
+
+If you wish to use this option you can set ``ironic_ntp_server`` in
+``/etc/kolla/globals.yml``. Eg.
+
+.. code-block:: yaml
+
+ ironic_ntp_server: "192.168.33.3"
+
Revert to plain PXE (not recommended)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Starting with Yoga, Ironic has changed the default PXE from plain PXE to iPXE.
diff --git a/releasenotes/notes/ironic-parameter-ntp-rework-672efa37e5cc918f.yaml b/releasenotes/notes/ironic-parameter-ntp-rework-672efa37e5cc918f.yaml
new file mode 100644
index 000000000..4cb0b07b0
--- /dev/null
+++ b/releasenotes/notes/ironic-parameter-ntp-rework-672efa37e5cc918f.yaml
@@ -0,0 +1,9 @@
+---
+features:
+ - |
+ Adds explicit support for passing through the ``ipa-ntp-server`` setting
+ via the kernel commandline to the Ironic Python Agent.
+
+ You can now also use ``ironic_kernel_append_params`` to provide
+ additional arguments to the kernel command line when booting the Ironic
+ Python Agent.