ironic: ensure reasonable tempdir default

Ironic will create temporary images, like ISOs, which are then
hard linked into the images directory. Hard links don't work across file
system boundaries so the tempdir that's used must be within the same
file system that's used for the images.

Change-Id: Ide735dc6f302aefd4269adda129b28d95664fe17
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
This commit is contained in:
Doug Goldstein 2024-11-05 08:27:43 -06:00
parent c92d14b4e3
commit 1531fc45b8
No known key found for this signature in database
4 changed files with 12 additions and 1 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Ironic
name: ironic
version: 0.2.19
version: 0.2.20
home: https://docs.openstack.org/ironic/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Ironic/OpenStack_Project_Ironic_vertical.png
sources:

View File

@ -34,6 +34,13 @@ if [ "x" == "x${PXE_IP}" ]; then
exit 1
fi
# ensure the tempdir exists, read it from the config
ironictmpdir=$(python -c 'from configparser import ConfigParser;cfg = ConfigParser();cfg.read("ironic.conf");print(cfg.get("DEFAULT", "tempdir", fallback=""))')
if [ -n "${ironictmpdir}" -a ! -d "${ironictmpdir}" ]; then
mkdir -p "${ironictmpdir}"
chmod 1777 "${ironictmpdir}"
fi
tee /tmp/pod-shared/conductor-local-ip.conf << EOF
[DEFAULT]

View File

@ -101,6 +101,9 @@ conf:
ironic:
DEFAULT:
log_config_append: /etc/ironic/logging.conf
# conductor may use hardlinks to images for certain boot modes so the default path needs
# to be on the same filesystem
tempdir: /var/lib/openstack-helm/tmp
api:
port: null
conductor:

View File

@ -23,4 +23,5 @@ ironic:
- 0.2.17 Allow overriding of hostNetwork and hostIPC for Ironic conductor
- 0.2.18 Use service tokens
- 0.2.19 Allow extra containers for the conductor
- 0.2.20 ensure tempdir is set to a reasonable default
...