Update diskimage-create.sh to use noble as default

This patch updates the image build process to use Ubuntu noble as the
default distribution.
It also removes the http-use-htx option that is now on by default and no
longer a valid configuration option.

Change-Id: Ic494a426a998a7db91e61001acd9c0ba8c1fd9a6
This commit is contained in:
Michael Johnson
2025-06-10 16:57:31 +00:00
parent 2fb6ba9343
commit 57eb9b49db
10 changed files with 37 additions and 9 deletions

View File

@@ -102,7 +102,7 @@ Command syntax:
[-a **amd64** | armhf | aarch64 | ppc64le ]
[-b **haproxy** ]
[-c **~/.cache/image-create** | <cache directory> ]
[-d **jammy**/**9-stream**/**9** | <other release id> ]
[-d **noble**/**9-stream**/**9** | <other release id> ]
[-e]
[-f]
[-g **repository branch** | stable/train | stable/stein | ... ]
@@ -125,7 +125,7 @@ Command syntax:
'-a' is the architecture type for the image (default: amd64)
'-b' is the backend type (default: haproxy)
'-c' is the path to the cache directory (default: ~/.cache/image-create)
'-d' distribution release id (default on ubuntu: jammy)
'-d' distribution release id (default on ubuntu: noble)
'-e' enable complete mandatory access control systems when available (default: permissive)
'-f' disable tmpfs for build
'-g' build the image for a specific OpenStack Git branch (default: current repository branch)

View File

@@ -23,7 +23,7 @@ usage() {
echo " [-a **amd64** | armhf | aarch64 | ppc64le]"
echo " [-b **haproxy** ]"
echo " [-c **~/.cache/image-create** | <cache directory> ]"
echo " [-d **jammy**/**9-stream**/**9** | <other release id> ]"
echo " [-d **noble**/**9-stream**/**9** | <other release id> ]"
echo " [-e]"
echo " [-f]"
echo " [-g **repository branch** | stable/train | stable/stein | ... ]"
@@ -45,7 +45,7 @@ usage() {
echo " '-a' is the architecture type for the image (default: amd64)"
echo " '-b' is the backend type (default: haproxy)"
echo " '-c' is the path to the cache directory (default: ~/.cache/image-create)"
echo " '-d' distribution release id (default on ubuntu: jammy)"
echo " '-d' distribution release id (default on ubuntu: noble)"
echo " '-e' enable complete mandatory access control systems when available (default: permissive)"
echo " '-f' disable tmpfs for build"
echo " '-g' build the image for a specific OpenStack Git branch (default: current repository branch)"
@@ -242,7 +242,7 @@ AMP_CACHEDIR="$( cd "$AMP_CACHEDIR" && pwd )"
AMP_BASEOS=${AMP_BASEOS:-"ubuntu-minimal"}
if [ "$AMP_BASEOS" = "ubuntu-minimal" ]; then
export DIB_RELEASE=${AMP_DIB_RELEASE:-"jammy"}
export DIB_RELEASE=${AMP_DIB_RELEASE:-"noble"}
elif [ "${AMP_BASEOS}" = "rhel" ]; then
export DIB_RELEASE=${AMP_DIB_RELEASE:-"9"}
elif [ "${AMP_BASEOS}" = "centos-minimal" ]; then
@@ -469,6 +469,11 @@ if [ "${AMP_BASEOS}" = "centos-minimal" ] || [ "${AMP_BASEOS}" = "fedora" ] || [
fi
fi
# AppArmor systems
if [ "${AMP_BASEOS}" = "ubuntu-minimal" ] || [ "${AMP_BASEOS}" = "ubuntu" ]; then
AMP_element_sequence="$AMP_element_sequence amphora-apparmor"
fi
# Disable the dnf makecache timer
if [ "${AMP_BASEOS}" = "centos-minimal" ] || [ "${AMP_BASEOS}" = "fedora" ] || [ "${AMP_BASEOS}" = "rhel" ] || [ "${AMP_BASEOS}" = "rocky-container" ]; then
AMP_element_sequence="$AMP_element_sequence disable-makecache"

View File

@@ -0,0 +1,4 @@
Element to configure apparmor for Octavia
This element will configure apparmor to allow rsyslog to create a log socket
for Octavia Amphora logging

View File

@@ -0,0 +1 @@
install-static

View File

@@ -0,0 +1,11 @@
#!/bin/bash
# This is a workaround to a known kernel bug with apparmor:
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1373070
#
# Apparmor cannot handle namespaces correctly and will drop the '/' prefix
# from a file path, thus causing the process to not have access.
#
# The reported workaround is to add flags=(attach_disconnected) to the rsyslog
# profile.
sed -i 's#profile rsyslogd /usr/sbin/rsyslogd {#profile rsyslogd /usr/sbin/rsyslogd flags=(attach_disconnected) {#g' /etc/apparmor.d/usr.sbin.rsyslogd

View File

@@ -0,0 +1,4 @@
# Allow rsyslog to create the octavia logging socket
/run/rsyslog/ w,
/run/rsyslog/octavia/ w,
/run/rsyslog/octavia/log rwk,

View File

@@ -34,7 +34,6 @@ frontend prometheus-exporter-internal-endpoint
bind 127.0.0.1:9101
mode http
no log
option http-use-htx
http-request use-service prometheus-exporter if { path /metrics }
http-request reject
timeout http-request 5s

View File

@@ -570,7 +570,6 @@ class TestHaproxyCfg(base.TestCase):
" bind 127.0.0.1:9101\n"
" mode http\n"
" no log\n"
" option http-use-htx\n"
" http-request use-service prometheus-exporter if { "
"path /metrics }\n"
" http-request reject\n"

View File

@@ -0,0 +1,5 @@
---
upgrade:
- |
``diskimage-create.sh`` has been updated to build Ubuntu Noble (24.04)
amphora images per default.

View File

@@ -46,8 +46,10 @@
irrelevant-files: *irrelevant-files
- octavia-v2-dsvm-scenario-traffic-ops-ubuntu-jammy:
irrelevant-files: *irrelevant-files
voting: false
- octavia-v2-dsvm-scenario-non-traffic-ops-ubuntu-jammy:
irrelevant-files: *irrelevant-files
voting: false
- octavia-v2-dsvm-scenario-traffic-ops-jobboard:
irrelevant-files: *irrelevant-files
- octavia-v2-dsvm-scenario-non-traffic-ops-jobboard:
@@ -104,8 +106,6 @@
- octavia-v2-dsvm-noop-api
- octavia-v2-dsvm-scenario-traffic-ops
- octavia-v2-dsvm-scenario-non-traffic-ops
- octavia-v2-dsvm-scenario-traffic-ops-ubuntu-jammy
- octavia-v2-dsvm-scenario-non-traffic-ops-ubuntu-jammy
- octavia-v2-dsvm-tls-barbican
- octavia-grenade:
voting: false