Compare commits

...

19 Commits

Author SHA1 Message Date
Matt Anson
8b246c2316 Don't install biosdevname in arm64/aarch64 arches
Closes-Bug: #2105867
Change-Id: I57e494c6e01c45a5e102c575eaa6101a2b440868
2025-04-01 17:07:40 +01:00
satoshi-sh
a9964026d5 Convert README.md to README.rst
Fixed the formatting issue.

Change-Id: I906b5c37601675b578276fc4c50629450c03bd55
2025-03-27 20:29:44 +00:00
Zuul
aebdf6082d Merge "Create Podman DIB Element for container-based cleaning" 2025-03-26 23:06:59 +00:00
satoshi-sh
9b2277302d Create Podman DIB Element for container-based cleaning
Create ironic-python-agent-podman. It installs podman and create conf files for podman, ipa, and cleaning steps
Add explanation how to configure on README.rst

Partial-Bug: #2100556
Change-Id: Id78f0488b4aee34a2682f51d5e647ad81f9e505f
2025-03-26 19:17:15 +00:00
334fd79f97 Update master for stable/2025.1
Add file to the reno documentation build to show release notes for
stable/2025.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2025.1.

Sem-Ver: feature
Change-Id: I8f985f9a4393cc12e3fa8e1e5bf213b10be5b586
2025-03-18 17:21:56 +00:00
Zuul
72a02b7b68 Merge "Prevent service restart while in 'rescued' state" 2025-03-05 15:37:54 +00:00
Zuul
4dba6f4ef2 Merge "Change to maximum compression level when using lzma" 2025-03-05 14:41:45 +00:00
Zuul
4a9f329f69 Merge "fix: Adds bsdextrautils package for Debian which provides hexdump command" 2025-03-05 11:01:07 +00:00
Nicholas Kuechler
0b3f3dc110 fix: Adds bsdextrautils package for Debian which provides hexdump
command

Change-Id: I48cb65c94f697dbdd42cc09a2d473e4202ec48c8
2025-03-04 13:05:21 -06:00
cid
36b5e11de6 More reliable TinyIPA builds with network retries
Wraps `wget` command with sleep and mutiple retry
support for resilient network downloads and replaces
git clone with direct tarball downloads where possible.

Closes-Bug: #2098417
Change-Id: I49435f5c1a7c0628e4eb7e824322d4e1f2938588
2025-02-26 13:02:07 +01:00
Kaifeng Wang
f340ae3100 Change to maximum compression level when using lzma
The deploy image is getting larger and larger, by specifying a higher
compression level, usualy we can save a couple of MB. Smaller image
has higher performance when deploying nodes with PXE.

This patch changes the default compression level to 9 to have the
minimum image size.

Change-Id: Id20292e73796b2c0d72a4d3f5279e02fc3a2757a
2025-02-18 21:35:56 +08:00
cid
142834e41b Prevent service restart while in 'rescued' state
Closes-Bug: #2086865
Change-Id: I8c8b0c9f168ccc165c17e1c57a74831d12dfc1a7
2025-02-13 23:39:36 +01:00
Kaifeng Wang
46a8e0104e Remove unnecessary firmware from deploy image
Remove several wifi related firmware that is not required in the
deploy image.

Change-Id: I2cce855b600f5d5165012182bf1db342f23cdd96
2025-02-06 10:31:34 +08:00
Jay Faulkner
2cab2e4143 Deprecate ironic-lib
Ironic-lib code has been rolled into Ironic-Python-Agent and Ironic
where used; we no longer should support installing ironic-lib on master
versions of IPA-builder.

Depends-On: https://review.opendev.org/c/openstack/ironic-python-agent/+/937743
Change-Id: I29acfa275adc6aa3ec187883e6a096bf4038e9f6
2025-01-16 22:25:27 +00:00
Riccardo Pittau
ef33cc89e7 Move jobs and DIB builds to ubuntu noble
Change-Id: Iafb7606d57e69a88a0dfe36673d1489820551ede
2024-12-23 11:08:50 +01:00
d6008a941d reno: Update master for unmaintained/2023.1
Update the 2023.1 release notes configuration to build from
unmaintained/2023.1.

Change-Id: I024e3bb47243c97ce8e48f15150a86797ae3829f
2024-11-29 07:53:54 +00:00
LALLAU Bertrand
8a27cf7167 Fix vmedia network config drive handling
The publisher ID generated by Ironic (using oslo.util) is actualy in lowercase,
hence it will never match publisher ID generated by udevadm (uppercase).
In order to compare these strings without case conflict, we put both in lowercase.

Closes-Bug: #2085355
Change-Id: I501c8b46128de38c634b1c159a40ffb0d7a64f4c
2024-11-05 15:59:05 +01:00
Takashi Kajinami
ac07c360a5 Drop unnecessary 'x' bit from doc config file
This file is not actually executable.

Trivial-Fix

Change-Id: I70fd3dfba4e4bf1fad7680aee245b8874bc5220a
2024-10-21 11:20:46 +00:00
a23d3d0328 Update master for stable/2024.2
Add file to the reno documentation build to show release notes for
stable/2024.2.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.2.

Sem-Ver: feature
Change-Id: Ia9b6c4211bc920dce9b8b387155cf53366ea186d
2024-09-20 13:51:47 +00:00
29 changed files with 370 additions and 72 deletions

@ -0,0 +1,191 @@
ironic-python-agent-podman
===========================
Adds Podman support and configuration files to ironic-python-agent-ramdisk.
Compatibility
-------------
This DIB element currently supports Debian-based images only. Additional
distribution support may be added in the future.
ironic-python-agent-config
--------------------------
**allow_arbitrary_containers**
- **Description:** Defines whether arbitrary containers are allowed. Set to true or false.
- **Environment Variable:** ``DIB_ALLOW_ARBITRARY_CONTAINERS``
- **Default:** ``false``
**allowed_containers**
- **Description:** Specifies a list of allowed container image URLs (ex "image1-url,image2-url").
- **Environment Variable:** ``DIB_ALLOWED_CONTAINERS``
- **Default:** Empty string (``""``)
**container_steps_file**
- **Description:** Specifies the path in the RAM to the YAML file containing container steps to be executed.
- **Environment Variable:** ``DIB_CONTAINER_STEPS_FILE``
- **Default:** ``/etc/ironic-python-agent.d/mysteps.yaml``
**runner**
- **Description:** Defines the container runtime to use, such as podman or docker.
- **Environment Variable:** ``DIB_RUNNER``
- **Default:** ``podman``
**pull_options**
- **Description:** Container pull options (e.g., --tls-verify=false).
- **Environment Variable:** ``DIB_PULL_OPTIONS``
- **Default:** ``--tls-verify=false``
**run_options**
- **Description:** Options passed when running the container (e.g., --rm --network=host).
- **Environment Variable:** ``DIB_RUN_OPTIONS``
- **Default:** ``--rm --network=host --tls-verify=false``
ironic-python-agent-podman
--------------------------
**podman_conf_file**
- **Description:** The path to the configuration file created in the RAM.
- **Environment Variable:** ``DIB_PODMAN_CONF_FILE``
- **Default:** ``/etc/containers/containers.conf``
ironic-python-agent-steps
--------------------------
**steps_file_path**
- **Description:** Path to the local step file to be copied to the RAM.
- **Environment Variable:** ``DIB_STEPS_FILE_PATH``
- **Default:** ``/etc/mysteps.yaml``
Example mysteps.yaml
--------------------
.. code-block:: yaml
steps:
- name: manage_container_cleanup
image: docker://172.24.4.1:5000/cleaning-image:latest
interface: deploy
reboot_requested: true
pull_options:
- --tls-verify=false
run_options:
- --rm
- --network=host
- --tls-verify=false
abortable: true
priority: 20
- name: manage_container_cleanup2
image: docker://172.24.4.1:5000/cleaning-image2:latest
interface: deploy
reboot_requested: true
pull_options:
- --tls-verify=false
run_options:
- --rm
- --network=host
- --tls-verify=false
abortable: true
priority: 10
Customization
-------------
You can override any of the default values by setting the corresponding
environment variables during the build process. This allows the configuration
to be dynamically adapted without modifying the script.
ironic-python-agent-podman
===========================
Adds Podman support and configuration files to ironic-python-agent-ramdisk.
Compatibility
-------------
This DIB element currently supports Debian-based images only. Additional
distribution support may be added in the future.
ironic-python-agent-config
--------------------------
**allow_arbitrary_containers**
- **Description:** Defines whether arbitrary containers are allowed. Set to true or false.
- **Environment Variable:** ``DIB_ALLOW_ARBITRARY_CONTAINERS``
- **Default:** ``false``
**allowed_containers**
- **Description:** Specifies a list of allowed container image URLs (ex "image1-url,image2-url").
- **Environment Variable:** ``DIB_ALLOWED_CONTAINERS``
- **Default:** Empty string (``""``)
**container_steps_file**
- **Description:** Specifies the path in the RAM to the YAML file containing container steps to be executed.
- **Environment Variable:** ``DIB_CONTAINER_STEPS_FILE``
- **Default:** ``/etc/ironic-python-agent.d/mysteps.yaml``
**runner**
- **Description:** Defines the container runtime to use, such as podman or docker.
- **Environment Variable:** ``DIB_RUNNER``
- **Default:** ``podman``
**pull_options**
- **Description:** Container pull options (e.g., --tls-verify=false).
- **Environment Variable:** ``DIB_PULL_OPTIONS``
- **Default:** ``--tls-verify=false``
**run_options**
- **Description:** Options passed when running the container (e.g., --rm --network=host).
- **Environment Variable:** ``DIB_RUN_OPTIONS``
- **Default:** ``--rm --network=host --tls-verify=false``
ironic-python-agent-podman
--------------------------
**podman_conf_file**
- **Description:** The path to the configuration file created in the RAM.
- **Environment Variable:** ``DIB_PODMAN_CONF_FILE``
- **Default:** ``/etc/containers/containers.conf``
ironic-python-agent-steps
--------------------------
**steps_file_path**
- **Description:** Path to the local step file to be copied to the RAM.
- **Environment Variable:** ``DIB_STEPS_FILE_PATH``
- **Default:** ``/etc/mysteps.yaml``
Example mysteps.yaml
--------------------
.. code-block:: yaml
steps:
- name: manage_container_cleanup
image: docker://172.24.4.1:5000/cleaning-image:latest
interface: deploy
reboot_requested: true
pull_options:
- --tls-verify=false
run_options:
- --rm
- --network=host
- --tls-verify=false
abortable: true
priority: 20
- name: manage_container_cleanup2
image: docker://172.24.4.1:5000/cleaning-image2:latest
interface: deploy
reboot_requested: true
pull_options:
- --tls-verify=false
run_options:
- --rm
- --network=host
- --tls-verify=false
abortable: true
priority: 10
Customization
-------------
You can override any of the default values by setting the corresponding
environment variables during the build process. This allows the configuration
to be dynamically adapted without modifying the script.

@ -0,0 +1,2 @@
ironic-python-agent-ramdisk
package-installs

@ -0,0 +1,21 @@
# Podman Config
PODMAN_CONF_INSIDEDIR=/etc/containers
export PODMAN_CONF_FILE=${DIB_IPA_PODMAN_CONF_FILE:-$TMP_BUILD_DIR/mnt/$PODMAN_CONF_INSIDEDIR/containers.conf}
# Ipa Config
IPA_CONF_INSIDEDIR=/etc/ironic-python-agent.d
export IPA_CONFFILE=$TMP_BUILD_DIR/mnt/$IPA_CONF_INSIDEDIR/ironic_python_agent.conf
export ALLOW_ARBITRARY_CONTAINERS="${DIB_ALLOW_ARBITRARY_CONTAINERS:-false}"
export ALLOWED_CONTAINERS="${DIB_ALLOWED_CONTAINERS:-""}"
export CONTAINER_STEPS_FILE="${DIB_CONTAINER_STEPS_FILE:-/etc/ironic-python-agent.d/mysteps.yaml}"
export RUNNER="${DIB_RUNNER:-podman}"
export PULL_OPTIONS="${DIB_PULL_OPTIONS:---tls-verify=false}"
export RUN_OPTIONS="${DIB_RUN_OPTIONS:---rm --network=host --tls-verify=false}"
# Steps Config
STEPS_INSIDEDIR=/etc/ironic-python-agent.d
export STEPS_FILE=$TMP_BUILD_DIR/mnt/$STEPS_INSIDEDIR/mysteps.yaml
export STEPS_FILE_PATH="${DIB_STEPS_FILE_PATH:-/etc/mysteps.yaml}"

@ -0,0 +1,2 @@
podman:
phase: install.d

@ -0,0 +1,10 @@
#!/bin/bash
# Ensure the directory exists
sudo mkdir -p $(dirname $PODMAN_CONF_FILE)
# Create Podman configuration file inside the ramdisk with sudo tee
echo "[engine]
no_pivot_root = true" | sudo tee $PODMAN_CONF_FILE > /dev/null
echo "Podman configuration written to $PODMAN_CONF_FILE"

@ -0,0 +1,17 @@
#!/bin/bash
# Ensure the directory exists
sudo mkdir -p $(dirname $IPA_CONFFILE)
# Write the configuration inside the ramdisk
cat <<EOF | sudo tee $IPA_CONFFILE
[container]
allow_arbitrary_containers="$ALLOW_ARBITRARY_CONTAINERS"
allowed_containers="$ALLOWED_CONTAINERS"
container_steps_file="$CONTAINER_STEPS_FILE"
runner="$RUNNER"
pull_options="$PULL_OPTIONS"
run_options="$RUN_OPTIONS"
EOF
echo "Ironic Python Agent config written to $IPA_CONFFILE"

@ -0,0 +1,10 @@
#!/bin/bash
# Copy the YAML file to the ramdisk location
if [[ -f $STEPS_FILE_PATH ]]; then
sudo cp $STEPS_FILE_PATH $STEPS_FILE
echo "Local mysteps.yaml copied to ramdisk: $STEPS_FILE"
else
echo "No valid mysteps.yaml file found at $STEPS_FILE_PATH. Please provide a valid file or check the default path."
exit 1
fi

@ -13,5 +13,5 @@ smartmontools:
sysbench:
biosdevname:
not-arch: ppc64,ppc64el,ppc64le
not-arch: aarch64,arm64,ppc64,ppc64el,ppc64le
when: IPA_DISTRO_FAMILY = rh

@ -1,4 +1,4 @@
export IPA_REMOVE_FIRMWARE=${IPA_REMOVE_FIRMWARE:-amdgpu,netronome,qcom,ti-communication,ti-keystone,ueagle-atm,rsi,mrvl,brcm,mediatek,ath10k,rtlwifi}
export IPA_REMOVE_FIRMWARE=${IPA_REMOVE_FIRMWARE:-amdgpu,netronome,qcom,ti-communication,ti-keystone,ueagle-atm,rsi,mrvl,brcm,mediatek,ath10k,rtlwifi,rtw88,rtw89,libertas,ath11k}
# NOTE(TheJulia): List of what each item represents for future context
# amdgpu == AMD/ATI Radeon/Vega/Raven firmware for drivers
@ -13,3 +13,7 @@ export IPA_REMOVE_FIRMWARE=${IPA_REMOVE_FIRMWARE:-amdgpu,netronome,qcom,ti-commu
# mediatek == Mediatek wifi and SoC (think chromebook) firmware
# ath10k == Qualcom Atheros 10k firmware
# rtlwifi == Realtek Wifi firmware
# rtw88 == Realtek wireless
# rtw89 == Realtek wireless
# libertas == Marvell libertas wifi
# auth11k == Qualcomm atheros WLAN

@ -10,7 +10,6 @@ export LC_ALL=C.UTF-8
SCRIPTDIR=$(dirname $0)
IPADIR=/tmp/ironic-python-agent
IRLIBDIR=/tmp/ironic-lib
UPPER_CONSTRAINTS=/tmp/requirements/upper-constraints.txt
VENVDIR=/opt/ironic-python-agent
@ -46,12 +45,6 @@ $VENVDIR/bin/pip install -c $UPPER_CONSTRAINTS $IPADIR
ln -s $VENVDIR/bin/ironic-python-agent /usr/local/bin/
ln -s $VENVDIR/bin/ironic-collect-introspection-data /usr/local/bin/
# install ironic-lib from source if requested
if [ ${IRONIC_LIB_FROM_SOURCE:-false} == "true" ]; then
$VENVDIR/bin/pip install -c $UPPER_CONSTRAINTS -r $IRLIBDIR/requirements.txt
$VENVDIR/bin/pip install $IRLIBDIR
fi
case "$DIB_INIT_SYSTEM" in
upstart)
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.conf /etc/init/ironic-python-agent.conf

@ -3,6 +3,7 @@ Description=Ironic Python Agent
After=network-online.target
[Service]
ConditionPathExists=!/etc/.rescued
ExecStartPre=/sbin/modprobe vfat
ExecStart=/usr/local/bin/ironic-python-agent --config-dir /etc/ironic-python-agent.d/
Restart=always

@ -59,6 +59,11 @@ amd64-microcode:
- DISTRO_NAME = debian
- IPA_DEBIAN_NONFREE = true
# Packages needed by Debian
# bsdextrautils provides the 'hexdump' command used by IPA.
bsdextrautils:
when: DISTRO_NAME = debian
# Packages that should not normally be present on IPA images
cloud-init:
phase: post-install.d

@ -64,7 +64,7 @@ DHCP=yes" > /etc/systemd/network/99-dhcp.network
fi
if [ -e /usr/lib/systemd/system/glean-early.service ]; then
# Disable Glean-early start
# Under normal cirumstances, glean-early attempts to mount a config
# Under normal circumstances, glean-early attempts to mount a config
# drive, configure ssh and a hostname. We only need the mount, and we
# trigger that in ironic-agent-resolve-config-drive.service.
# This is largely because glean uses /mnt/config by default,

@ -1 +0,0 @@
ironic-lib git /tmp/ironic-lib https://opendev.org/openstack/ironic-lib

@ -33,7 +33,7 @@ else
# We need to enumerate through the devices, and obtain the
for device in $(lsblk -o PATH,LABEL|grep config-2|cut -f1 -d" "); do
device_id=$(udevadm info --query=property --property=ID_FS_PUBLISHER_ID $device | sed s/ID_FS_PUBLISHER_ID=//)
if [[ "${publisher_id}" == "${device_id}" ]]; then
if [[ "${publisher_id,,}" == "${device_id,,}" ]]; then
# SUCCESS! Valid device! Do it!
echo "Device ${device} matches the ${publisher_id}. Mounting..."
mount -t iso9660 -o ro,mode=0700 "${device}" /mnt/config || true

@ -84,14 +84,6 @@ To use a specific branch of ironic-python-agent, use:
export DIB_REPOREF_ironic_python_agent=origin/stable/queens
export DIB_REPOREF_requirements=origin/stable/queens
To build ironic-lib from source, do:
.. code-block:: bash
export IRONIC_LIB_FROM_SOURCE=true
# Optionally:
#export DIB_REPOREF_ironic_lib=<branch>
To build image for architectures other than amd64, you can either set the
``ARCH`` environment variable or use ``-a`` to specify the target
architecture:

@ -154,18 +154,6 @@ If you want to collect BIOS given names of NICs in the inventory, set
export TINYIPA_REQUIRE_BIOSDEVNAME=true
Using ironic-lib from source
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ironic-lib_ contains important parts of the provisioning logic. If you would
like to build an IPA image with your local checkout of ironic-lib_, export
the following variable:
.. code-block:: bash
export IRONIC_LIB_SOURCE=/absolute/path/to/ironic-lib/checkout
.. _Ironic Python Agent: https://docs.openstack.org/ironic-python-agent
.. _TinyCoreLinux: http://tinycorelinux.net
.. _ironic-lib: https://opendev.org/openstack/ironic-lib

0
doc/source/conf.py Executable file → Normal file

@ -22,12 +22,3 @@ rebuilding an image with the following procedure.
DIB_REPOREF_ironic_python_agent=my-test-branch \
ironic-python-agent-builder -o my-ipa --release 9-stream centos
#. A similar process (with one additional variable) can be used for ironic-lib
changes:
.. code-block:: bash
DIB_REPOLOCATION_ironic_lib=/home/user/path/to/repo \
DIB_REPOREF_ironic_lib=my-test-branch \
IRONIC_LIB_FROM_SOURCE=true \
ironic-python-agent-builder -o my-ipa --release 9-stream centos

@ -80,7 +80,7 @@ def main():
os.environ['DIB_REPOREF_requirements'] = args.branch
if args.lzma:
os.environ['DIB_IPA_COMPRESS_CMD'] = \
'xz --format=lzma --compress --stdout'
'xz --format=lzma --compress --stdout -9'
# Enable checksum generation by default
if 'DIB_CHECKSUM' not in os.environ:
os.environ['DIB_CHECKSUM'] = 'sha256'

@ -1,4 +1,8 @@
- hosts: all
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
roles:
- ensure-pip

@ -1,5 +1,8 @@
- hosts: all
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
tasks:
- name: Create a target directory for raw images

@ -0,0 +1,4 @@
---
features:
- |
Changes lzma compression level to 9 for smaller images.

@ -3,4 +3,4 @@
===========================
.. release-notes::
:branch: stable/2023.1
:branch: unmaintained/2023.1

@ -0,0 +1,6 @@
===========================
2024.2 Series Release Notes
===========================
.. release-notes::
:branch: stable/2024.2

@ -0,0 +1,6 @@
===========================
2025.1 Series Release Notes
===========================
.. release-notes::
:branch: stable/2025.1

@ -6,6 +6,8 @@ Ironic Python Agent Builder Release Notes
:maxdepth: 1
unreleased
2025.1
2024.2
2024.1
2023.2
2023.1

@ -7,15 +7,77 @@ source ${WORKDIR}/common.sh
IRONIC_LIB_SOURCE=${IRONIC_LIB_SOURCE:-}
TC_RELEASE="15.x"
QEMU_RELEASE="v5.2.0"
QEMU_RELEASE="5.2.0"
LSHW_RELEASE="B.02.18"
BIOSDEVNAME_RELEASE="0.7.2"
IPMITOOL_GIT_HASH="19d78782d795d0cf4ceefe655f616210c9143e62"
CHROOT_CMD="sudo chroot $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy"
function clone_single_branch {
git clone --branch $3 --depth=1 $1 $2
DOWNLOAD_RETRY_MAX=${DOWNLOAD_RETRY_MAX:-5}
DOWNLOAD_RETRY_DELAY=${DOWNLOAD_RETRY_DELAY:-10}
function download_with_retry() {
local source_url=$1
local destination_path=$2
local attempts=1
declare -A tar_flags=(
["tar.gz"]="z"
["tgz"]="z"
["tar.bz2"]="j"
["tbz2"]="j"
["tar.xz"]="J"
["txz"]="J"
)
echo "Downloading $source_url to $destination_path"
while [ $attempts -le $DOWNLOAD_RETRY_MAX ]; do
for ext in "${!tar_flags[@]}"; do
if [[ "$source_url" =~ \.${ext}$ ]]; then
mkdir -p "$destination_path"
if wget --timeout=30 --tries=3 -O - "$source_url" | tar -x${tar_flags[$ext]} -C "$destination_path" --strip-components=1 -f -; then
echo "Successfully downloaded $source_url on attempt $attempts"
return 0
fi
break
fi
done
if [[ ! "$source_url" =~ \.tar\.[a-z]+$ ]]; then
if wget --timeout=30 --tries=3 "$source_url" -O "${destination_path}"; then
echo "Successfully downloaded $source_url on attempt $attempts"
return 0
fi
fi
echo "Download attempt $attempts failed for $source_url, retrying in $DOWNLOAD_RETRY_DELAY seconds..."
sleep $DOWNLOAD_RETRY_DELAY
attempts=$((attempts + 1))
done
echo "Failed to download $source_url after $DOWNLOAD_RETRY_MAX attempts"
return 1
}
function tce_load_with_retry() {
local package=$1
local attempts=1
echo "Loading package $package with tce-load"
while [ $attempts -le $DOWNLOAD_RETRY_MAX ]; do
if sudo chroot --userspec=$TC:$STAFF $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy tce-load -wci $package; then
echo "Successfully loaded $package on attempt $attempts"
return 0
fi
echo "tce-load attempt $attempts failed for $package, retrying in $DOWNLOAD_RETRY_DELAY seconds..."
sleep $DOWNLOAD_RETRY_DELAY
attempts=$((attempts + 1))
done
echo "Failed to load $package with tce-load after $DOWNLOAD_RETRY_MAX attempts"
return 1
}
echo "Building tinyipa:"
@ -37,8 +99,8 @@ fi
choose_tc_mirror
cd $WORKDIR/build_files
wget -N $TINYCORE_MIRROR_URL/$TC_RELEASE/x86_64/release/distribution_files/corepure64.gz
wget -N $TINYCORE_MIRROR_URL/$TC_RELEASE/x86_64/release/distribution_files/vmlinuz64
download_with_retry "$TINYCORE_MIRROR_URL/$TC_RELEASE/x86_64/release/distribution_files/corepure64.gz" "corepure64.gz"
download_with_retry "$TINYCORE_MIRROR_URL/$TC_RELEASE/x86_64/release/distribution_files/vmlinuz64" "vmlinuz64"
cd $WORKDIR
########################################################
@ -55,10 +117,10 @@ mkdir "$BUILDDIR"
sudo sh -c "echo $TINYCORE_MIRROR_URL > $BUILDDIR/opt/tcemirror"
# Download Qemu-utils, Biosdevname and IPMItool source
clone_single_branch "https://github.com/qemu/qemu.git" "${BUILDDIR}/tmp/qemu" "$QEMU_RELEASE"
clone_single_branch "https://github.com/lyonel/lshw.git" "${BUILDDIR}/tmp/lshw" "$LSHW_RELEASE"
download_with_retry "https://download.qemu.org/qemu-${QEMU_RELEASE}.tar.xz" "${BUILDDIR}/tmp/qemu"
download_with_retry "https://github.com/lyonel/lshw/archive/refs/tags/${LSHW_RELEASE}.tar.gz" "${BUILDDIR}/tmp/lshw"
if $TINYIPA_REQUIRE_BIOSDEVNAME; then
wget -N -O - https://linux.dell.com/biosdevname/biosdevname-${BIOSDEVNAME_RELEASE}/biosdevname-${BIOSDEVNAME_RELEASE}.tar.gz | tar -xz -C "${BUILDDIR}/tmp" -f -
download_with_retry "https://linux.dell.com/biosdevname/biosdevname-${BIOSDEVNAME_RELEASE}/biosdevname-${BIOSDEVNAME_RELEASE}.tar.gz" "${BUILDDIR}/tmp/biosdevname"
fi
if $TINYIPA_REQUIRE_IPMITOOL; then
git clone https://codeberg.org/IPMITool/ipmitool.git "${BUILDDIR}/tmp/ipmitool-src"
@ -82,14 +144,6 @@ $PYTHON_COMMAND setup.py sdist --dist-dir "$BUILDDIR/tmp/localpip" --quiet
ls $BUILDDIR/tmp/localpip || true
cp requirements.txt $BUILDDIR/tmp/ipa-requirements.txt
if [ -n "$IRONIC_LIB_SOURCE" ]; then
pushd $IRONIC_LIB_SOURCE
rm -rf *.egg-info
$PYTHON_COMMAND setup.py sdist --dist-dir "$BUILDDIR/tmp/localpip" --quiet
cp requirements.txt $BUILDDIR/tmp/ironic-lib-requirements.txt
popd
fi
if [ -n "$PYTHON_EXTRA_SOURCES_DIR_LIST" ]; then
IFS="," read -ra PKGDIRS <<< "$PYTHON_EXTRA_SOURCES_DIR_LIST"
for PKGDIR in "${PKGDIRS[@]}"; do
@ -105,9 +159,6 @@ if [ -n "$PYTHON_EXTRA_SOURCES_DIR_LIST" ]; then
fi
$WORKDIR/generate_tox_constraints.sh upper-constraints.txt
if [ -n "$IRONIC_LIB_SOURCE" ]; then
sed -i '/ironic-lib/d' upper-constraints.txt $BUILDDIR/tmp/ipa-requirements.txt
fi
cp upper-constraints.txt $BUILDDIR/tmp/upper-constraints.txt
echo Using upper-constraints:
cat upper-constraints.txt
@ -153,7 +204,7 @@ PY_REQS="buildreqs_python3.lst"
sudo chown $TC:$STAFF $BUILDDIR/usr/local/tce.installed
while read line; do
sudo chroot --userspec=$TC:$STAFF $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy tce-load -wci $line
tce_load_with_retry "$line"
done < <(paste $WORKDIR/build_files/$PY_REQS $WORKDIR/build_files/buildreqs.lst)
TINYIPA_PYTHON_EXE="python3.9"
@ -165,10 +216,6 @@ $CHROOT_CMD ${TINYIPA_PYTHON_EXE} -m ensurepip
$CHROOT_CMD ${PIP_COMMAND} install --upgrade pip==${PIP_VERSION} wheel
$CHROOT_CMD ${PIP_COMMAND} install pbr
$CHROOT_CMD ${PIP_COMMAND} wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ipa-requirements.txt
if [ -n "$IRONIC_LIB_SOURCE" ]; then
$CHROOT_CMD ${PIP_COMMAND} wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ironic-lib-requirements.txt
$CHROOT_CMD ${PIP_COMMAND} wheel -c /tmp/upper-constraints.txt --no-index --pre --wheel-dir /tmp/wheels --find-links=/tmp/localpip --find-links=/tmp/wheels ironic-lib
fi
if [ -n "$PYTHON_EXTRA_SOURCES_DIR_LIST" ]; then
IFS="," read -ra PKGDIRS <<< "$PYTHON_EXTRA_SOURCES_DIR_LIST"

@ -1,7 +1,7 @@
- job:
name: ironic-python-agent-build-image-base
parent: publish-openstack-artifacts
nodeset: ubuntu-jammy
nodeset: ubuntu-noble
pre-run: playbooks/ironic-python-agent-build-image/pre.yaml
run: playbooks/ironic-python-agent-build-image/run.yaml
post-run:
@ -46,7 +46,7 @@
- job:
name: ironic-python-agent-check-image-base
parent: base
nodeset: ubuntu-jammy
nodeset: ubuntu-noble
pre-run: playbooks/ironic-python-agent-build-image/pre.yaml
run: playbooks/ironic-python-agent-build-image/run.yaml
post-run: playbooks/ironic-python-agent-build-image/extra-logs.yaml
@ -133,13 +133,13 @@
vars:
image_type: 'dib'
image_distro: 'ubuntu'
image_release: 'jammy'
image_release: 'noble'
dib_no_tmpfs: '1'
- job:
name: ironic-python-agent-check-image-dib-ubuntu-arm64
parent: ironic-python-agent-check-image-dib-ubuntu
nodeset: ubuntu-jammy-arm64
nodeset: ubuntu-noble-arm64
vars:
image_target_name: ubuntu-arm64
@ -149,4 +149,4 @@
parent: openstack-tox
timeout: 7200
vars:
tox_envlist: codespell
tox_envlist: codespell