diff options
| author | Will Szumski <will@stackhpc.com> | 2025-01-14 16:21:04 +0000 |
|---|---|---|
| committer | Michal Nasiadka <mnasiadka@gmail.com> | 2025-10-03 10:00:05 +0200 |
| commit | bacaf8f49412271ebcd3ed5294e2b1435d74ed29 (patch) | |
| tree | 4825f61298069ebda6bcf32cd5e279cbf3fde1ed /docker/dnsmasq | |
| parent | 0d51f0ab0349d51ec3faa3061ddd89cde2b2364e (diff) | |
| download | kolla-bacaf8f49412271ebcd3ed5294e2b1435d74ed29.tar.gz kolla-bacaf8f49412271ebcd3ed5294e2b1435d74ed29.zip | |
Adds ironic-pxe-filter container
Used in conjunction with the inspector implementation built into Ironic
and based on the Ironic documentation[1].
[1] https://docs.openstack.org/ironic/latest/admin/inspection/pxe_filter.html
Partial-Bug: #2094790
Depends-On: https://review.opendev.org/c/openstack/ironic/+/959850
Change-Id: I17811f2225edd64fb20cc44f0d40e14e9edb1413
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
Signed-off-by: Will Szumski <will@stackhpc.com>
Diffstat (limited to 'docker/dnsmasq')
| -rw-r--r-- | docker/dnsmasq/extend_start.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docker/dnsmasq/extend_start.sh b/docker/dnsmasq/extend_start.sh index c09ce0327..0c9734fa1 100644 --- a/docker/dnsmasq/extend_start.sh +++ b/docker/dnsmasq/extend_start.sh @@ -1,5 +1,8 @@ #!/bin/bash +DNSMASQ_PIDFILE=${DNSMASQ_PIDFILE:-/run/ironic/dnsmasq.pid} +DNSMASQ_PIDFILE_DIR="$(dirname $DNSMASQ_PIDFILE)" + if [[ ! -d "/var/log/kolla/ironic" ]]; then mkdir -p /var/log/kolla/ironic fi @@ -10,3 +13,19 @@ if [[ ! -r "/var/log/kolla/ironic/dnsmasq.log" ]]; then touch /var/log/kolla/ironic/dnsmasq.log chown ironic:ironic /var/log/kolla/ironic/dnsmasq.log fi + +if [[ ! -d "$DNSMASQ_PIDFILE_DIR" ]]; then + mkdir -p "$DNSMASQ_PIDFILE_DIR" +fi + +# NOTE(wszumski): This writes the PID of dnsmasq out to a file. The PIDFILE can be used in +# another container to send a signal to dnsmasq to reload its config (providing that the two +# containers share a PID namespace). The concrete use case is for the Ironic PXE filter to +# clean up stale host entries on startup as documented in: +# +# https://docs.openstack.org/ironic/latest/admin/inspection/pxe_filter.html +# +# We cannot use the pid-file option in dnsmasq, since it will only write the PIDFILE if you +# run dnsmasq in its non-forking mode i.e you do use the --no-daemon or --keep-in-foreground +# options. +echo $$ > "$DNSMASQ_PIDFILE" |
