Kolla images: start path and one-shot containers¶
This page answers open question Q14 of the Open
questions: what the kolla images do when a container starts, and what the
one-shot containers that Kolla-Ansible starts with KOLLA_BOOTSTRAP, KOLLA_UPGRADE, KOLLA_OSM and similar variables
actually run. It was read from the kolla image repository (openstack/kolla, tag 2025.1-eom, commit c4b53a2) and
matched against Kolla-Ansible 2025.1-eom (7222f0f). The images were read, not built or run.
Note
Key answers
- What every container start does:
kolla_startrunskolla_set_configs,kolla_copy_cacerts, the newkolla_install_projectsand the image'skolla_extend_start, then execs the service command, witherrexit,pipefailandnounset(§2.2). Changed in 2025.1 in kolladocker/base:start.sh,set_configs.py,copy_cacerts.sh(rewritten),sudoersandDockerfile.j2;install_projects.shandkolla_patch.share new. kolla_set_configs --check, changed in 2025.1: it now compares thecommandwith/run_command, fails when a destination recorded in the defaults state is no longer inconfig.json, then compares theconfig_filesentries (content, mode, owner) as before CODE (§3.1). It still never comparespermissions(§3.2). Exit codes 0, 1, 2 and 137, and whatkolla_containerdoes with each, with Docker and with Podman: §3.3. Run by hand, it needsexec -u root(§3.4).- New in 2025.1 on the Kolla-Ansible side: the config step no longer notifies restart handlers; the shared
service-check-containersstep runscompare_container,--checkincluded, for every container and restarts only those reported changed (Repository architecture §4.3). 131 of the 163config.jsontemplates now copy the custom CA directory to/var/lib/kolla/share/ca-certificates, so a CA change is seen by--check(§2.4). - What a
COPY_ALWAYSrestart applies: changed or added files, mode and owner changes and a changed command CODE. As before,kolla_set_configsrecords the state of each destination at the container's first start and, at every later start, deletes or restores those destinations before copying: most removals apply too, with exceptions (§3.5). - One-shot containers: what
KOLLA_BOOTSTRAP,KOLLA_UPGRADE,KOLLA_OSMand the other variables run in each image, and which Kolla-Ansible task sets them (§4). Swift is gone from both repositories. - Per-image start behaviour: the table in §5. Changed in 2025.1: Open vSwitch
runs under
ovs_wrapper(Kolla-Ansible's ownstart-ovsscripts are gone), HAProxy isexec'd, the MariaDB clustercheck runs undersocat_wrapper, nova-libvirt startsvirtlogdbesidelibvirtd, and the opt-inneutron_agents_wrappersruns dnsmasq, haproxy, keepalived and radvd of the DHCP and L3 agents in child containers. The nova-libvirt start path is still passive towards running guests (§5.1). - Day-2 consequences: 20 items (§6). What is not available from the sources: §7.
Citation convention: kolla image paths carry a kolla prefix (kolla docker/base/start.sh:11). Kolla-Ansible paths
have
no prefix and are relative to its ansible/ directory (roles/nova/tasks/bootstrap_service.yml:11,
module_utils/kolla_docker_worker.py:146-181, nova.yml:29-65), except kolla_ansible/.... Ansible source paths
carry an ansible-core 2.18.20 prefix. Evidence labels are those of Conventions and evidence
labels: CODE (a kolla or Ansible path counts as CODE) and NOT AVAILABLE
(the sources do not establish it).
1. Scope and method¶
- Read in full CODE: kolla
docker/base(Dockerfile.j2,start.sh,set_configs.py,copy_cacerts.sh,install_projects.sh,kolla_patch.sh,httpd_setup.sh,sudoers,healthcheck_*), and theDockerfile.j2and start scripts of the images in §5: Keystone, Glance, Placement, Cinder, Heat, Horizon, Barbican, Octavia, Manila, Nova (with the newkolla_nova_libvirt_start.sh), Neutron (with the neutron-base wrappers), Open vSwitch (withovs_wrapper.sh), OVN, MariaDB (server and clustercheck, withsocat_wrapper.sh), RabbitMQ, memcached, HAProxy, keepalived (withcheck_alive.sh), fluentd, cron, kolla-toolbox, iscsid and tgtd.diff -rqof kolladocker/basebetween2024.1-eomand2025.1-eomshows changes inDockerfile.j2,start.sh,set_configs.py,copy_cacerts.sh,sudoersand repository files, and two new scripts;httpd_setup.shand the healthcheck scripts are byte-identical. Theswiftimages are gone and avalkeyimage is new. The chrony image and role are still absent. Of the other images only theironic-apibootstrap branch (§4) and thebifrost-deployENTRYPOINT/CMD(§2.1) were read, and every Dockerfile was searched forHEALTHCHECK(§2.7) and forENTRYPOINT/CMDoverrides. The rest were not. - Matched to Kolla-Ansible. Each one-shot variable was traced to the task that sets it
(§4) CODE. Every role calls the
kolla_containermodule, which loadsDockerWorkerwhencontainer_engineisdockerandPodmanWorkerotherwise (library/kolla_container.py:406-416). The engine comes fromkolla_container_engine, defaultdocker(group_vars/all.yml:100,162). Both workers shareContainerWorker(module_utils/kolla_container_worker.py) and drive long-running containers through systemd units (module_utils/kolla_systemd_worker.py:20-40), which are nowPartOf=kolla.target(:27). This page cites the Docker worker first and gives the Podman differences where they change what a start, stop or check does. The drift logic is in Kolla-Ansible's ownmodule_utils/, not in ansible-collection-kolla: a grep of the collection2025.1-eomforset_configs,compare_containerandcheck_containerfinds nothing. kolla_set_configs --checkwas read, not run: exit codes 0, 1 and 2 of §3.3 are read from kolladocker/base/set_configs.py; 137 and the exec client error arekolla_containeroutcomes (module_utils/kolla_docker_worker.py:146-181,module_utils/kolla_podman_worker.py:524-552).- Not covered: behaviour against real services and data, signal delivery, timing. These are NOT AVAILABLE and are listed in §7.
2. Start path common to every image¶
2.1 Image wiring¶
Every kolla image inherits from kolla docker/base/Dockerfile.j2 CODE:
ENTRYPOINT ["dumb-init", "--single-child", "--"]whenuse_dumb_initis on (kolladocker/base/Dockerfile.j2:397-399; default True, kollakolla/common/config.py:155), andCMD ["kolla_start"](kolladocker/base/Dockerfile.j2:432). The MariaDB server image drops--single-child(§2.6). bifrost-deploy resets both (ENTRYPOINT [],CMD [ "/sbin/init" ], kolladocker/bifrost/bifrost-deploy/Dockerfile.j2:29-30), sobifrost_deploynever runskolla_startorkolla_set_configs.- The base scripts are installed as
kolla_set_configs(set_configs.py),kolla_start(start.sh),kolla_copy_cacerts(copy_cacerts.sh),kolla_httpd_setup(httpd_setup.sh) and, new in 2025.1,kolla_install_projects(install_projects.sh) andkolla_patch(kolla_patch.sh);sudoersbecomes/etc/sudoers, mode 0440 (kolladocker/base/Dockerfile.j2:389-395,410-417).kolla_patchis a build-time step: it applies the patch files of the build'spatches-pathoption and runs only when that option is set (kolladocker/macros.j2:92-97,kolla/common/config.py:180-181,docker/base/kolla_patch.sh:14-40). It does nothing at container start. /usr/local/bin/kolla_extend_startis created empty bytouch(kolladocker/base/Dockerfile.j2:410). An image gets start logic only by overwriting it./var/log/kollagets groupkollaand mode 2775 (kolladocker/base/Dockerfile.j2:418-420).- Service users are added to group
kolla(kolladocker/macros.j2:53). The basesudoerslets members of that group run three commands as root without a password, keeping their environment:kolla_set_configs,kolla_copy_cacertsand, new in 2025.1,kolla_install_projects(kolladocker/base/sudoers:7,18,21,24). It sets asecure_paththat puts/var/lib/kolla/venv/binfirst (:9) and includes/etc/sudoers.d(:26), where many images add entries of their own, e.g. cinder-volume'schown -Randchmod(kolladocker/cinder/cinder-volume/cinder_sudoers:2-5, installed askolla_cinder_volume_sudoers,docker/cinder/cinder-volume/Dockerfile.j2:46) and mariadb'skolla_security_reset(kolladocker/mariadb/mariadb-server/mariadb_sudoers:1). Thekolla_set_configsentry restricts no arguments, sosudo kolla_set_configs --checkis allowed. - Kolla-Ansible passes
KOLLA_CONFIG_STRATEGYto every container throughdocker_common_options(group_vars/all.yml:49,151-162; defaultCOPY_ALWAYS).kolla_containermerges the task'senvironmentover the one ofcommon_options(library/kolla_container.py:371-393).
2.2 kolla_start step by step¶
flowchart TB
D["dumb-init --single-child (PID 1)"] --> KS["kolla_start (errexit, pipefail, nounset, xtrace)"]
KS --> SC["sudo -E kolla_set_configs"]
SC --> ST{"KOLLA_CONFIG_STRATEGY"}
ST -- "COPY_ALWAYS" --> CA["restore defaults + copy + permissions + /run_command (every start)"]
ST -- "COPY_ONCE, first start" --> CO["restore defaults + copy + permissions + /run_command, create /configured"]
ST -- "COPY_ONCE, /configured exists" --> SK["copy nothing, exit 0"]
ST -- "invalid strategy or copy error" --> F1["exit 1 or 2: start aborts"]
CA --> RC["CMD = cat /run_command"]
CO --> RC
SK --> RC
RC --> CC["sudo kolla_copy_cacerts"]
CC --> IP["sudo kolla_install_projects (pip install /dev-mode/*, if present)"]
IP --> SE{"KOLLA_SKIP_EXTEND_START set?"}
SE -- "yes" --> EX
SE -- "no" --> XS["source kolla_extend_start (image USER)"]
XS --> OS{"one-shot variable set?"}
OS -- "yes" --> Z["run DB or setup commands, exit 0"]
OS -- "no" --> EX["exec CMD ARGS"]
-
set -o errexit; set -o pipefail; set -o nounset; set -o xtrace(kolladocker/base/start.sh:3-6). Any failing command ends the container, including commands in the sourcedkolla_extend_start; a failing command inside a pipeline, or a reference to an unset variable, also ends it. The start scripts give defaults to the variables Kolla-Ansible does not always set (e.g. kolladocker/keystone/keystone/extend_start.sh:21,docker/neutron/neutron-base/extend_start.sh:22,docker/horizon/extend_start.sh:5) CODE. xtrace is on in that script, and in thekolla_<service>_extend_startit sources (§2.5), where one-shots put a secret on a command line: heat's--password ${HEAT_DOMAIN_ADMIN_PASSWORD}(kolladocker/heat/heat-api/extend_start.sh:12) and the MariaDB upgrademysql_upgrade ... --password="${DB_ROOT_PASSWORD}"(kolladocker/mariadb/mariadb-server/extend_start.sh:55). As in 2024.1, thatmysql_upgradepipes its output intotee -a ${MARIADB_LOG_DIR}/mariadb-upgrade.log(:3,55), so withpipefailits failure still ends the one-shot. The MariaDB bootstrap turns xtrace off around its root-password commands (set +o xtrace...set -o xtrace,:24-28) CODE. NOT AVAILABLE (bash semantics, not in these sources) Whether the trace on stderr shows the remaining commands with their variables expanded, and so writes the secret there.kolla_containerreturns the container's rc, stdout and stderr in the task result when it waits for a one-shot (module_utils/kolla_docker_worker.py:402-424,module_utils/kolla_podman_worker.py:654-675,library/kolla_container.py:421-425). Ansible's default callback prints a failed result,stderrincluded, and an ok or changed one only with-v(ansible-core 2.18.20lib/ansible/plugins/callback/default.py:49-70,72-105,lib/ansible/plugins/callback/__init__.py:210-212); a task withno_logreaches the callback with its result replaced by acensoredmessage (ansible-core 2.18.20lib/ansible/executor/task_queue_manager.py:447,lib/ansible/executor/task_result.py:130-139).bootstrap_heatsets nono_log(roles/heat/tasks/bootstrap_service.yml:2-30);upgrade_mariadbdoes (roles/mariadb/tasks/post-upgrade.yml:2-24) CODE. -
sudo -E kolla_set_configs(:11) runs as root whatever the imageUSER, copies the configuration (§2.3) and writesconfig.json'scommandto/run_command. CMD=$(cat /run_command)andARGS=""(:12-13).sudo kolla_copy_cacerts(:16, §2.4), on every start whatever the strategy.- New in 2025.1:
sudo kolla_install_projects(:19). If/dev-modeexists, it runspip install -Uon each entry below it (kolladocker/base/install_projects.sh:8-12). Kolla-Ansible mounts a project's source there only when its<project>_dev_modeis on (e.g.roles/aodh/defaults/main.yml:185). The loop runs on every start, as root. The script sets no errexit, so its exit status is that of the lastpip install: a failure on the last entry ends the start throughkolla_start's errexit, a failure on an earlier one does not CODE (pip and network behaviour NOT AVAILABLE). - Unless
KOLLA_SKIP_EXTEND_STARTis set,. kolla_extend_start(kolladocker/base/start.sh:21-24). The script is sourced: it runs in the same shell, as the imageUSER, with errexit on. It can setARGSorCMD, orexit. Anexit 0ends the container before the service starts, which is how every one-shot branch in §4 works. The test is${!KOLLA_SKIP_EXTEND_START[@]}, the idiom that kolla's own comments describe as catching "all cases of the ... variable being set, including empty" (kolladocker/keystone/keystone/extend_start.sh:41-42), so any value, even empty orfalse, skips the script and every one-shot branch with it CODE. Kolla-Ansible never sets this variable (grep ofansible/). echo "Running command: '${CMD}${ARGS:+ $ARGS}'", thenexec ${CMD} ${ARGS}, unquoted (kolladocker/base/start.sh:26-27). The service replaces the shell and becomes dumb-init's only child.
2.3 kolla_set_configs: copy and permissions¶
Without arguments, kolla_set_configs loads /var/lib/kolla/config_files/config.json, validates it (command is
required; each config_files entry needs source and dest, plus owner and perm unless preserve_properties) and
applies the strategy (kolla docker/base/set_configs.py:258-273,292-312,559-577) CODE:
COPY_ALWAYS(:562-565): defaults handling, copy and permissions on every start.COPY_ONCE(:566-575): on the first start, defaults handling, copy, permissions andmknod /configured. On any later start of the same containerImmutableConfigis raised with exit code 0: nothing is copied, permissions are not re-applied and/run_commandkeeps its first value.kolla_startcontinues normally.- Unset or any other value:
InvalidConfig, exit 1 (:576-577).
Defaults handling (handle_defaults, :540-556; the same code as in 2024.1), before the copy:
- The state lives in
/etc/kolla/defaults/state, a JSON file in the container layer (:37-38,453-458,461-473). - Restore (
remove_or_restore_configs,:476-498): for every destination recorded in the state, the file or tree is deleted if it did not exist when it was recorded, or copied back from its saved original under/etc/kolla/defaults/if it did. - Record (
backup_configs,:501-537): everyconfig_filesentry not yet in the state is added, but only if itssourcepath exists as written (os.path.exists,:526, so a glob source such asextras/*is never recorded, and an optional entry is recorded only once its source exists). A destination that exists at that moment, from the image or from a volume, is first saved under/etc/kolla/defaults/<dest>; one that does not exist is recorded as absent. A destination already in the state is never re-recorded (:518-519), and no entry is ever removed from the state: neither function deletes a key, and the state is rewritten whole after each start (:553-556). - The restore swaps the saved entry in place. For a destination that had an original, the restore swaps the
entry's
sourceanddestto copy the original back (:496-498), and the swapped entry is what is written back to the state (:553-556). At the next start the swap reverses it, and that start copies the destination as it is then, the file rendered by Kolla-Ansible for the previous start, over the saved original. From the container's third start on, the saved "original" is therefore an earlier rendered file, and odd starts do not restore at all CODE. A run of the 2025.1 functions outside a container, on one file present in the image, confirms the sequence: the saved copy holds the image file after starts 1 and 2, then rendered files; once the entry is dropped, the destination keeps an earlier rendered file instead of the image's. The 2024.1 code is the same. NOT AVAILABLE Whether this was intended, and how it behaves in a real container; a check for the community is listed in §7.
Copy, per config_files entry (ConfigFile.copy, :149-176):
- The source is a glob. A non-optional entry that matches nothing raises
MissingRequiredSource(exit 1). An optional one is skipped silently (:151-157). - A
destending in/meansdest/<basename of source>(:163-164). - Unless
mergeis set, the destination is deleted first, a whole tree for a directory, then parent directories are created (:165-167). Each file is still deleted before it is copied,mergeor not (:91-92). In 2025.1 three Kolla-Ansible manifests usemerge, as in 2024.1: Keystone's OIDC metadata and certificate directories (roles/keystone/templates/keystone.json.j2:57-70), nova-libvirt's/etc/libvirt/secrets(roles/nova-cell/templates/nova-libvirt.json.j2:45-52) and skyline-console's custom logos copied into itsstaticdirectory (roles/skyline/templates/skyline-console.json.j2:15-22) (grep ofroles/*/templates/*.json.j2). - Directory sources are copied recursively. Every directory and file gets the entry's
ownerandperm(so directories get the file mode, plus the execute bit wherever the read bit is set), or the source's mode and owner withpreserve_properties(kolladocker/base/set_configs.py:91-116,132-147,378-385). - An
OSErrorduring the copy is logged and re-raised: exit 2 (:168-176,663-665). - Finally
commandis written to/run_command, mode 0644 (:324-334).
Permissions, per permissions entry (handle_permissions, kolla docker/base/set_configs.py:347-410):
pathis a glob. A path that matches nothing is skipped without a warning (:403).ownerisuser[:group], the group defaulting to the user (:337-344). An unknown user or group raisesKeyError: exit 2 (:355-357,663-665).chownalways,chmodonly ifpermis given. A failing chown or chmod is only logged (:359-391).- With
recurse, the same is applied to every directory and file below, one unconditionalos.chownper entry (:403-410). Several manifests do this on data volumes (§6 item 10). - New in 2025.1: an
excludelist of regular expressions (:353) is tested against each path below a recursive entry (handle_exclusion,:393-401). With one pattern, a matching path is skipped. With several, the permissions are applied once for every pattern the path does not match, so a path is skipped only when it matches all of them CODE. No Kolla-Ansible 2025.1 manifest usesexclude(grep ofroles/*/templates/*.json.j2).
A failure here (missing required source, bad JSON, unknown user) aborts kolla_start through errexit. The container
then exits non-zero. The default unless-stopped policy (group_vars/all.yml:126) is not given to the engine: the
Docker worker builds the host config without a restart policy (module_utils/kolla_docker_worker.py:285-319) and the
Podman worker drops it (module_utils/kolla_podman_worker.py:57,143). It is written into the container's systemd unit
as Restart=always, with RestartSec 11 s, StartLimitInterval 120 and StartLimitBurst 10 from
docker_client_timeout 120 and docker_restart_policy_retry 10 (module_utils/kolla_systemd_worker.py:20-40,57-67,
group_vars/all.yml:114,129,158-161) CODE. The unit names the engine in ExecStart/ExecStop and depends on
docker.service for Docker or network-online.target otherwise (module_utils/kolla_systemd_worker.py:24-33,51-55).
New in 2025.1, every unit is PartOf=kolla.target (:27), a target that the common role writes to
/etc/systemd/system/kolla.target (roles/common/tasks/config.yml:54-58) and that no task enables or starts (grep of
ansible/) CODE. NOT AVAILABLE (systemd semantics) Whether the unit restarts the container in a loop until the
input is fixed, or stops after the start limit is reached, and whether a systemctl stop or restart of
kolla.target then stops or restarts every Kolla container of the host.
2.4 kolla_copy_cacerts and kolla_httpd_setup¶
kolla_copy_cacertswas rewritten in 2025.1 (kolladocker/base/copy_cacerts.sh:6-48) CODE:- It picks the Debian family (
/etc/debian_version:/usr/local/share/ca-certificates,update-ca-certificates) or the Red Hat family (/etc/redhat-release:/etc/pki/ca-trust/source/anchors,update-ca-trust), and otherwise prints "Unsupported OS" and exits 1 (:6-15), which ends the start through errexit. - It deletes every file named
kolla*under/etc/ssl/certs/,/usr/local/share/ca-certificates/and/etc/pki/ca-trust/source/anchors/in onefind(:21-26). - The source is
/var/lib/kolla/share/ca-certificateswhen the defaults state (§2.3) records that path, otherwise/var/lib/kolla/config_files/ca-certificates(:29-33). In 2025.1, 131 of the 163 Kolla-Ansibleconfig.jsontemplates copy{{ container_config_directory }}/ca-certificatesto/var/lib/kolla/share/ca-certificates, as a normalconfig_filesentry, whenkolla_copy_ca_into_containers(defaultno) or the service's own TLS setting asks for it (e.g.roles/nova/templates/nova-api.json.j2:49-54,roles/keystone/templates/keystone.json.j2:70-76,group_vars/all.yml:1064; grep ofroles/*/templates/*.json.j2). The certificates are then compared by--checklike any other file (§3.1). - Each file of the source is copied as
kolla-customca-<name>(:36-43). - The update command runs only if
findsucceeded or a file was copied (update_needed,:18,25,41,46-48). NOT AVAILABLE (findsemantics and image contents) Whetherfindreports success when one of its three start directories does not exist, which decides whether the bundle is regenerated after the last custom CA is removed, and so whether the container keeps trusting it until it is recreated.
- It picks the Debian family (
kolla_httpd_setupacts on httpd only when the shell runs as root (whoami, kolladocker/base/httpd_setup.sh:7). It empties/var/run/apache2/(Debian/Ubuntu) or removes/var/run/httpd/*,/run/httpd/*and/tmp/httpd*, so a restarted httpd does not trip on stale run files. On CentOS/Rocky it also writes a/server-statushandler limited to local requests (99-server-status.conf) and createslocalhost.crtif missing (:10-40). Whatever the user, it then setsLANG=C.UTF-8and sources the distribution's locale file if present (:43-51). In images that run as a service user (barbican-api, manila-api) the httpd part does nothing. nova-api and octavia-api set noUSERand run it as root (§5).
2.5 The extend_start chain¶
Most service families layer two scripts CODE. The service base image installs its extend_start.sh as
kolla_extend_start, creates an empty /usr/local/bin/kolla_<service>_extend_start, and its last line sources that
file (e.g. kolla docker/cinder/cinder-base/Dockerfile.j2:44,54-55, docker/cinder/cinder-base/extend_start.sh:13).
The API image overwrites kolla_<service>_extend_start with the one-shot branches. On those images
kolla_extend_start prepares the log directory (neutron-base also selects the iptables backend,
§5), and the DB commands are in kolla_<service>_extend_start. Keystone,
keystone-fernet, keystone-ssh, horizon, mariadb-server, mariadb-clustercheck, rabbitmq, keepalived,
iscsid, fluentd, cron, kolla-toolbox, nova-libvirt and nova-ssh put everything in kolla_extend_start instead.
Since 2024.1, ovn-base layers too: it replaces the openvswitch-base script with its own and sources
kolla_ovn_extend_start (kolla docker/ovn/ovn-base/Dockerfile.j2:29, docker/ovn/ovn-base/extend_start.sh:13),
which each of ovn-controller, ovn-northd, ovn-nb-db-server and ovn-sb-db-server installs (e.g.
docker/ovn/ovn-controller/Dockerfile.j2:29) CODE.
Neutron agents, changed in 2025.1 CODE:
- neutron-dhcp-agent still replaces the neutron-base script with its own (kolla
docker/neutron/neutron-dhcp-agent/Dockerfile.j2:17): it creates/var/log/kolla/neutronanddnsmasq.log, so the neutron-base log-dir mode and iptables-backend steps do not run in that image. - neutron-l3-agent now does the same (kolla
docker/neutron/neutron-l3-agent/Dockerfile.j2:27). Its script repeats the neutron-base log-dir and iptables-backend steps (docker/neutron/neutron-l3-agent/extend_start.sh:2-29). - Both scripts then copy or delete the neutron agent wrappers according to
KOLLA_NEUTRON_WRAPPERS, throughsudo -Eentries of the neutron sudoers file, and source the emptykolla_neutron_extend_start(docker/neutron/neutron-dhcp-agent/extend_start.sh:9-17,docker/neutron/neutron-l3-agent/extend_start.sh:31-39,docker/neutron/neutron-base/neutron_sudoers:11,docker/neutron/neutron-base/Dockerfile.j2:126-127). The wrappers replacednsmasq,haproxy,keepalived,neutron-keepalived-state-changeandradvdin/usr/local/binwith scripts that start each process in a child container of the agent's image, through the host's Docker or Podman socket (docker/neutron/neutron-base/copy-wrappers:2-9,docker/neutron/neutron-base/dnsmasq:13-40). Kolla-Ansible setsKOLLA_NEUTRON_WRAPPERSfromneutron_agents_wrappers, defaultno; when it is on, the two agents also get host PID and cgroup namespaces and the engine socket (roles/neutron/defaults/main.yml:55,65-69,71,80,89,492-494,646). NOT AVAILABLE How the child containers behave across an agent restart; they are not in Kolla-Ansible's inventory of containers.
2.6 Signals and PID 1¶
- PID 1 is
dumb-init --single-child, andkolla_startexecs the service, so the service is dumb-init's direct child (kolladocker/base/Dockerfile.j2:398,docker/base/start.sh:27) CODE. NOT AVAILABLE (dumb-init semantics, not in these sources) Whether in this mode dumb-init forwards the engine's stop signal only to that child. A comment in the mariadb image describes the other mode: without--single-child, "the TERM signal is sent to all subprocesses" (kolladocker/mariadb/mariadb-server/Dockerfile.j2:67-71). - MariaDB overrides the entrypoint to
dumb-init --without--single-child(kolladocker/mariadb/mariadb-server/Dockerfile.j2:65-74) CODE. Its comment gives the reason:mysqld_safeignores SIGTERM, and without--single-childTERM also reachesmysqldCODE (for the comment; NOT AVAILABLE: dumb-init and mysqld_safe semantics). - Changed in 2025.1: one Kolla-Ansible command is still a shell wrapper that does not
execthe service, so dumb-init's child is bash:neutron-l3-agent-wrapper.sh(roles/neutron/templates/neutron-l3-agent-wrapper.sh.j2:18-22) CODE.haproxy_run.shnow ends withexec /usr/sbin/haproxy ... -f /etc/haproxy/services.d/(roles/loadbalancer/templates/haproxy/haproxy_run.sh.j2:38), where 2024.1 started haproxy through afind | xargs | xargspipeline, and Kolla-Ansible's ownstart-ovsandstart-ovsdb-serverscripts are gone from theopenvswitchrole (theovs-dpdkrole still usesstart-ovsdb-server,roles/ovs-dpdk/templates/ovsdpdk-db.json.j2:2). NOT AVAILABLE Whether the L3 agent gets any SIGTERM before the container stops. - Kolla-Ansible 2025.1 now uses the three signal-trapping wrappers that kolla added in 2024.1 CODE:
ovs_wrapperruns the Open vSwitch daemons (roles/openvswitch/templates/openvswitch-vswitchd.json.j2:2,openvswitch-db-server.json.j2:2). It starts the daemon in the background, waits for it, and on TERM or QUIT runsovs-appctl -T1 -t /run/openvswitch/$1.$child.ctl exit, then exits 0 (kolladocker/openvswitch/openvswitch-base/ovs_wrapper.sh:3-19).$1there is the handler function's first argument, andtrapcalls the handler with none, so the path is/run/openvswitch/.<pid>.ctlinstead ofovs-vswitchd.<pid>.ctlorovsdb-server.<pid>.ctlCODE (a bash run of the same handler pattern prints/run/openvswitch/.<pid>.ctl). NOT AVAILABLE Whether the daemon then exits only when the container's PID namespace is torn down, without its own clean shutdown.socat_wrapperruns the MariaDB clustercheck (roles/mariadb/templates/mariadb-clustercheck.json.j2:2) and forwards TERM or QUIT tosocat(kolladocker/mariadb/mariadb-clustercheck/socat_wrapper.sh:3-19).kolla_toolboxis the kolla-toolbox command, as in 2024.1 (roles/common/templates/kolla-toolbox.json.j2:2): asleep 1loop that exits 0 on TERM or QUIT (kolladocker/kolla-toolbox/kolla_toolbox.sh:3-16).
- New in 2025.1, nova-libvirt's command is
kolla_nova_libvirt_start(roles/nova-cell/templates/nova-libvirt.json.j2:2), which startsvirtlogdin the background and thenexecslibvirtd --listen(kolladocker/nova/nova-libvirt/kolla_nova_libvirt_start.sh:9,12), so libvirtd is still dumb-init's direct child and virtlogd is a second process of the container (§5.1) CODE. - A long-running container is stopped through its systemd unit, whose
ExecStopis<engine> stop <name> -t <graceful_timeout>,docker_graceful_timeout60 s by default (module_utils/kolla_systemd_worker.py:33,group_vars/all.yml:148,160). The Docker worker calls the client'sstopdirectly only for a container without a unit file, such as a one-shot (module_utils/kolla_docker_worker.py:426-442); the Podman worker stops through systemd unless the task'srestart_policyisoneshot(module_utils/kolla_podman_worker.py:677-695) (Repository architecture §6) CODE.
2.7 Healthcheck scripts¶
The base image installs healthcheck_curl (curl --fail, 10 s maximum), healthcheck_filemod,
healthcheck_listen, healthcheck_port and healthcheck_socket when docker_healthchecks is on (kolla
docker/base/Dockerfile.j2:401-408, docker/base/healthcheck_curl:2,8-12; default True, kolla
kolla/common/config.py:251). No kolla Dockerfile has a HEALTHCHECK instruction (grep of docker/) CODE.
Kolla-Ansible wires container healthchecks itself: enable_container_healthchecks defaults to yes with interval
30 s, timeout 30 s, 3 retries and a 5 s start period (group_vars/all.yml:229-235); service definitions carry a
healthcheck dict, e.g. memcached's healthcheck_listen memcached <port>
(roles/memcached/defaults/main.yml:10,32-43)
and MariaDB's /usr/bin/clustercheck (roles/mariadb/defaults/main.yml:96-107). kolla_container passes it at
container creation and compares it, so a changed healthcheck recreates the container
(module_utils/kolla_docker_worker.py:336-338, module_utils/kolla_podman_worker.py:101-105,
module_utils/kolla_container_worker.py:88,348-370) CODE. No deploy, reconfigure or upgrade task waits on the
resulting health status. New in 2025.1, the kolla-ansible check command reads it: the check.yml of 52 roles imports
service-check, which fails the host when a container of the role is missing, not running or reported unhealthy
(roles/service-check/tasks/main.yml:2-40, kolla_ansible/cli/commands.py:495-506; Execution flow
§4). Besides that, the only hits for
healthy in roles/*/tasks, roles/*/handlers, library/ and module_utils/ are the etcd tasks, which run
etcdctl endpoint health in the container (roles/etcd/tasks/restart_services.yml:27-39), and an OpenSearch cluster
wait (roles/opensearch/tasks/post-config.yml:18)
CODE. NOT AVAILABLE (Docker and Podman semantics) What the engine does with an unhealthy container beyond
reporting it. The mariadb image's own healthcheck_mariadb exits 1 when the node is not synced (kolla
docker/mariadb/mariadb-server/healthcheck_mariadb:10-19); Kolla-Ansible does not use it.
3. kolla_set_configs --check: what it compares and its exit codes¶
kolla_container's compare_container reports drift when the container is missing or differs, when the systemd unit
file would change, or when /usr/local/bin/kolla_set_configs --check, run inside the container as root, says so
(module_utils/kolla_container_worker.py:20,58-65, module_utils/kolla_podman_worker.py:301-308,
module_utils/kolla_systemd_worker.py:155-168, module_utils/kolla_docker_worker.py:146-181; Repository architecture
§4.3). Changed in 2025.1, every role's
check-containers.yml imports the shared service-check-containers step, which runs it for each enabled container
and notifies the restart handler of the changed ones only (e.g. roles/memcached/tasks/check-containers.yml:2-3,
roles/service-check-containers/tasks/main.yml:4-41). --check loads and validates config.json like a normal
start, then, new in 2025.1, runs two checks in turn (kolla docker/base/set_configs.py:645-666) CODE:
- Command check (
execute_command_check,:580-586): thecommandofconfig.jsonmust equal the content of/run_command, written at the last start that copied the configuration; otherwiseConfigFileCommandDiffers, exit 1. - Config check (
execute_config_check,:589-642): it reads the defaults state (§2.3) and raisesStateMismatch, exit 1, if a destination recorded there is not a destination ofconfig.jsonany more (:610-636). It then callsConfigFile.checkfor eachconfig_filesentry, as in 2024.1 (:640-642).
It does no restore and no copy, but it creates /etc/kolla/defaults if it is missing (:453).
3.1 What is compared¶
- The command against
/run_command(above) CODE. - Dropped entries: any destination that the defaults state records and
config.jsonno longer lists CODE. The state is never pruned (§2.3), so once an entry has been recorded and then dropped, every later--checkof that container exits 1, restart or not, until the container is recreated with a new state (§6 item 4).
Then, for each entry whose source glob matches something (:233-255) CODE:
- File source (
_cmp_file,:178-211): destination missing (drift), foroptionalentries too (:180-182); byte-for-byte content; mode, as the last four octal digits ofst_modeagainst the entry'spermstring; owner user and group names. - Directory source (
_cmp_dir,:213-231): every file below, as above. For subdirectories therelpatharguments are reversed (:217-218), so the mode checked is that of the destination's parent against the fileperm. A directory source that contains a subdirectory therefore reports drift on every run. preserve_propertiesentries carry noperm(:77-85), so the mode test always fails (:195) and they report drift on every run. Example:prometheus_server'sextras/*entry whenever extras exist (roles/prometheus/templates/prometheus-server.json.j2:16-21).- CA certificates, new in 2025.1 for most services: the
/var/lib/kolla/share/ca-certificatesentry is a flat directory source (§2.4), so a CA added or changed under/etc/kolla/<service>/ca-certificates/is drift, and the container restarts on the next run.
3.2 What is still not compared¶
config.json'spermissions:--checkreads onlycommandandconfig_files(kolladocker/base/set_configs.py:580-642). Apermissions-only change applies at the next start for another reason.- Destinations that were never recorded: those of glob sources such as
extras/*(:526), and those of optional entries whose source never existed while the container ran. Their removal is neither detected nor applied. - Optional entries whose source no longer exists (
:239-240): the entry is skipped, so its old destination is not compared; if the entry was recorded and is still listed, the state check does not flag it either. - Extra files in a destination directory, and the mode and owner of the destination directories themselves (for
subdirectories
_cmp_dirchecks the mode of a directory above the destination instead, §3.1). A file destination's mode and owner are compared (§3.1). A CA removed from/etc/kolla/<service>/ca-certificates/therefore does not show as drift (§3.5).
3.3 Exit codes¶
| Exit code | Raised when | What kolla_container does (Docker) |
Day-2 meaning |
|---|---|---|---|
| 0 | The command matches, no recorded destination was dropped and every listed entry matches. Also any difference confined to permissions, unrecorded destinations or optional entries without a source |
no drift (module_utils/) |
"No drift" no longer ignores the command or recorded entries, but still ignores permissions (§6 item 1) |
| 1 | ConfigFileCommandDiffers (new): the command differs from /run_command. StateMismatch (new): a recorded destination is no longer listed. ConfigFileBadState: a listed file differs in content, mode or owner, or a destination is missing, optional entries included (e.g. a newly rendered nova-compute release file, roles/). Also MissingRequiredSource (a non-optional source matches nothing, set_configs.py:237-238) and InvalidConfig (bad JSON, no command, an entry without owner/perm; :258-273,) |
drift: the handler restarts the container (module_utils/) |
Usually real drift; the restart copies the new file. A StateMismatch comes back on every run until the container is recreated (§6 item 4). For a missing source or an invalid config.json the restarted container then fails in kolla_set_configs at every start (errexit; what systemd then does is NOT AVAILABLE, §2.3). preserve_properties entries and directory sources with subdirectories return 1 on every run |
| 2 | Any other exception (set_configs.py:663-665): a config.json that cannot be opened (:298, outside the inner try, e.g. run as a service user); a missing /run_command (:582, e.g. a container whose first start failed before the copy); a uid or gid with no passwd or group entry (:201,206) |
raises: the check task fails on that host (module_utils/, library/) |
An environment problem, not drift. Checks run in order and the first difference ends the check (set_configs.py:655-657,) |
| 137 | the exec was killed because the container exited | drift (module_utils/) |
the container is unstable; Kolla restarts it |
| none | the exec call fails with a client error (container stopped or restarting) | drift (module_utils/) |
a stopped container is restarted by the next run |
Read from main (kolla docker/base/set_configs.py:645-666) CODE: rc 0 for a match, for an optional entry without
a source (:239-240), and for a flat directory with an extra file in the destination (_cmp_dir walks the source
only, :213-231); rc 1 for a changed command (:584-586), a dropped recorded destination (:631-636), a content,
mode or missing destination difference, optional or not (:180-210), a missing required source (:237-238), a
preserve_properties entry (:195), a directory with a subdirectory (:217-218), a missing command (:261-262)
and bad JSON (:301-303); rc 2 for a missing or unreadable config.json (:298) or /run_command (:582).
With Podman the same exec runs as root, but the outcomes differ CODE
(module_utils/kolla_podman_worker.py:524-552):
- a container whose status is not
runningis reported as drift before any exec (:528-529); - rc 0 is no drift and rc 1 is drift (
:545-548); - any other rc, 137 included, raises "Failed to compare container configuration", which fails the task (
:549-552); - a client error from the API is drift (
:536-538).
3.4 Running it by hand needs root¶
Kolla-Ansible writes the files in /etc/kolla/<service>/ with mode 0660 into directories with mode 0770, owned by
config_owner_user root (group_vars/all.yml:20-21; e.g. roles/nova/tasks/config.yml:2-9,
roles/keystone/tasks/config.yml:42-47), and mounts them read-only (e.g. roles/nova-cell/defaults/main.yml:432).
In an image with a service USER (e.g. USER nova, kolla docker/nova/nova-compute/Dockerfile.j2:112) a plain
docker exec <c> kolla_set_configs --check cannot open them and exits 2. kolla_container execs as root
(module_utils/kolla_docker_worker.py:148-152, module_utils/kolla_podman_worker.py:531-532). By hand, use
docker exec -u root (or podman exec -u root), or sudo kolla_set_configs --check inside the container
(§2.1). Its log lines now carry a timestamp and level (kolla docker/base/set_configs.py:27-34), and
the failing check names its class, e.g. StateMismatch: The following config files are tracked in state but missing
from config.json (:632-636,661). The swift role, whose reconfigure ran it that way, is gone in 2025.1. The bifrost
reconfigure omits -u root (roles/bifrost/tasks/reconfigure.yml:18), but its check cannot work anyway: it execs
into bifrost-deploy, while the container is bifrost_deploy (roles/bifrost/tasks/start.yml:8), which runs
/sbin/init and mounts no config.json (§2.1). No kolla-ansible command runs that file: the
bifrost role includes <kolla_action>.yml (roles/bifrost/tasks/main.yml:2) and is reached only through
deploy-bifrost, deploy-servers and upgrade-bifrost, which set kolla_action to deploy, deploy-servers and
upgrade (kolla_ansible/cli/commands.py:391,405,419).
3.5 What a restart applies¶
- A
COPY_ALWAYSrestart (systemdRestartUnitof the same container; with Docker, stop and start for a unit-less one-shot;module_utils/kolla_docker_worker.py:450-470,module_utils/kolla_podman_worker.py:704-719,module_utils/kolla_systemd_worker.py:107-114) re-copies the listed entries and rewrites/run_command. Changed or added files, mode and owner changes and a changed command apply CODE. Stale files inside a listed directory destination go too, because the destination is deleted first (except formergeentries, §2.3). -
Removals apply in most cases. Before copying, every start deletes each recorded destination that did not exist at the container's first start, and restores each one that did (from the image or a volume) to the saved copy, which from the third start on is an earlier rendered file (§2.3) (kolla
docker/base/set_configs.py:476-498,540-556,562-565) CODE. So the destination of an entry dropped fromconfig.json, or of an optional source that is gone, is removed (or reset to the saved copy) at the next start, provided it was recorded. Exceptions CODE:- Glob sources are never recorded (
:526), so their destinations still stay, e.g. prometheusextras/*(roles/prometheus/templates/prometheus-server.json.j2:16-21). - The state and the saved originals are in
/etc/kolla/defaults, in the container layer (:37-38). A recreate starts a new state. A destination on a volume that already holds a file at the new container's first start is saved as the "original" and restored on later starts. Example: nova-compute's SASLauth.conf(roles/nova-cell/templates/nova-compute.json.j2:70-76) is under/var/lib/nova, thenova_computevolume when the libvirt container is used (roles/nova-cell/defaults/main.yml:391,group_vars/all.yml:945,1254). Turned off bylibvirt_enable_saslafter a restart-only history, it is deleted at the next start; turned off after the container was recreated while SASL was on, the copy found on the volume at that recreate is restored instead. - Under
COPY_ONCEnothing happens after the first start (§2.3).
Changed in 2025.1:
--checknow flags a dropped entry once it is recorded, so the next run restarts the container and the removal applies; but the state keeps the entry, so the check keeps failing on every later run until the container is recreated (§3.1, §6 item 4) CODE. Unrecorded destinations (glob sources) are still neither flagged nor removed (§3.2). - Glob sources are never recorded (
-
CA certificates are purged and re-added on every start (§2.4), from
/var/lib/kolla/share/ca-certificates, itself a copy of/etc/kolla/<svc>/ca-certificates/made bykolla_set_configs. A CA deleted fromkolla_certificates_dir/ca/stays in that host directory, because thecopytask never deletes files (roles/service-cert-copy/tasks/main.yml:2-10; the copy action only walks the source tree, ansible-core 2.18.20lib/ansible/plugins/action/copy.py:409-599) CODE, so it is re-added at every start until it is deleted there by hand. Changed in 2025.1: that copy task no longer notifies a restart handler; a CA added there is drift for--check(§3.1), a CA removed there is not (§3.2). NOT AVAILABLE Whether, once the last custom CA is removed there, the generated trust bundle keeps it (§2.4). COPY_ONCE:/configuredlives in the container layer, so only a recreate re-applies config. Both workers always recreate underCOPY_ONCE(module_utils/kolla_docker_worker.py:352-374,module_utils/kolla_podman_worker.py:609-626).
4. One-shot containers: what the environment variables run¶
Kolla-Ansible starts one-shot containers with kolla_container start_container, detach: False,
restart_policy: oneshot, a label such as BOOTSTRAP or UPGRADE, and a variable that selects a branch of the
image's start script. With Docker a oneshot container gets no systemd unit and is started with the Docker client
directly (module_utils/kolla_docker_worker.py:342-350,390-393). With Podman the worker writes and enables a unit file
at creation for every container, one-shots included, but still starts a one-shot directly
(module_utils/kolla_podman_worker.py:596-607,641-645); NOT AVAILABLE (systemd semantics) what systemd does with such
a unit for a container left in place. Either way the module waits for the container and returns its rc, stdout and
stderr (module_utils/kolla_docker_worker.py:402-424, module_utils/kolla_podman_worker.py:654-675). The variables are
sent with an empty value (module_utils/kolla_container_worker.py:552-554) and every branch tests only whether they
are set (${!VAR[@]}). The one-shot runs the whole of kolla_start first: kolla_set_configs with the config
directory mounted into it, kolla_copy_cacerts, kolla_install_projects, then the branch, which ends in exit 0 before the service command
(§2.2) CODE. That directory is the service's own, except for Nova: its bootstrap and
online-migration one-shots mount a dedicated nova-api-bootstrap or nova-cell-bootstrap directory whose command is
"false" (roles/nova/defaults/main.yml:224-226, roles/nova-cell/defaults/main.yml:451-453,
roles/nova/templates/nova-api-bootstrap.json.j2:2). New in 2025.1, every nova-cell deploy and upgrade with
enable_nova_libvirt_container also starts two one-shots on the first nova-libvirt host, libvirt_version_check and
nova_libvirt_script_check, whose commands replace kolla_start altogether
(§4.1).
| Image | KOLLA_BOOTSTRAP |
KOLLA_UPGRADE / other one-shot variables |
Set by Kolla-Ansible (task, action) | Day-2 note |
|---|---|---|---|---|
| keystone | keystone-manage db_sync, as user keystone (kolla docker/) |
KOLLA_UPGRADE: db_sync --expand, then --migrate (:24-31). KOLLA_FINISH_UPGRADE: db_sync --contract (:36-39) |
bootstrap_keystone, deploy/reconfigure, run_once (roles/). Handlers init_upgrade_database and finish_upgrade_database, upgrade only (roles/) |
Schema sync on every deploy/reconfigure. EXTRA_KEYSTONE_MANAGE_ARGS (:21) is never set by Kolla-Ansible |
| glance-api | glance-manage db_sync, then db_load_metadefs (kolla docker/) |
KOLLA_UPGRADE with GLANCE_DB_EXPAND, GLANCE_DB_MIGRATE or GLANCE_DB_CONTRACT: glance-manage db expand, migrate or contract (:13-27) |
bootstrap_glance, deploy/reconfigure and legacy upgrade (roles/, legacy_upgrade.yml:6). Rolling containers only with glance_enable_rolling_upgrade (default no, group_vars/; roles/, roles/) |
glance-manage db_load_metadefs runs on every deploy/reconfigure; whether, without --merge, it only adds namespaces not yet in the DB is NOT AVAILABLE |
| placement-api | placement-manage db sync, then db online_data_migrations (kolla docker/) |
KOLLA_UPGRADE: db sync only (:12-15), never used. KOLLA_OSM: db online_data_migrations (:18-21) |
bootstrap_placement, deploy/reconfigure and upgrade (roles/, deploy.yml:11, reconfigure.yml:2, upgrade.yml:11). KOLLA_OSM after the handlers are flushed, upgrade only (roles/) |
Online data migrations on every deploy/reconfigure, and twice on upgrade |
| cinder-api | cinder-manage db sync (kolla docker/) |
No KOLLA_UPGRADE. KOLLA_OSM: db online_data_migrations, unbounded (:11-14) |
bootstrap_cinder, deploy/reconfigure and upgrade (roles/, upgrade.yml:7). KOLLA_OSM, upgrade only (roles/) |
A tag change applied by deploy/reconfigure syncs the schema without the online migrations |
| heat-api | heat-manage db_sync, then, only if heat_user_domain is absent, creates that domain, user heat_domain_admin (password HEAT_DOMAIN_ADMIN_PASSWORD) and its admin role (kolla docker/) |
none; upgrade re-runs the bootstrap | bootstrap_heat with admin OS_* credentials, deploy/reconfigure and upgrade (roles/, upgrade.yml:6) |
Needs a reachable Keystone. A changed heat_domain_admin_password never reaches Keystone (§6 item 7) |
| horizon | manage.py migrate --noinput, after the settings symlinks (kolla docker/) |
none; FORCE_GENERATE is a start-time switch (§5.2) |
bootstrap_horizon only when horizon_backend_database, now a plain default false (group_vars/; the 2023.1 link to enable_murano is gone with the murano role; roles/, upgrade.yml:10-11) |
Never runs unless the operator sets horizon_backend_database |
| barbican-api | barbican-db-manage upgrade (kolla docker/) |
none | bootstrap_barbican, deploy/reconfigure and upgrade (roles/, upgrade.yml:6) |
Schema upgrade on every deploy/reconfigure |
| octavia-api | octavia-db-manage upgrade head, then octavia-db-manage upgrade_persistence (kolla docker/) |
none | bootstrap_octavia, deploy/reconfigure and upgrade (roles/, upgrade.yml:6). Changed in 2025.1: the persistence database and its user are created by deploy's bootstrap.yml (roles/, deploy.yml:16), no longer by the upgrade; octavia.conf points persistence_connection at it (roles/) |
Schema upgrade of both databases on every deploy/reconfigure |
| manila-api | manila-manage db sync (kolla docker/) |
none | bootstrap_manila, deploy/reconfigure and upgrade (roles/, upgrade.yml:6) |
Schema sync on every deploy/reconfigure |
| nova-api | nova-manage api_db sync, db sync --local_cell, db online_data_migrations (kolla docker/). Unreachable: Kolla-Ansible never sets it for Nova |
KOLLA_UPGRADE: api_db sync, db sync --local_cell (:16-20). KOLLA_OSM: db online_data_migrations (:22-25). KOLLA_UPGRADE_CHECK: nova-status upgrade check, exiting with its code (:27-30) |
nova_api_bootstrap with KOLLA_UPGRADE, run_once, deploy/reconfigure and upgrade (roles/, nova.yml:29-65), again when map_cell0 reports a change (roles/). KOLLA_OSM, upgrade only (nova.yml:258-277, roles/). nova_upgrade_checks with KOLLA_UPGRADE_CHECK and the normal nova-api config, upgrade only; the run fails unless rc is 0 or 1 (roles/) |
db sync --local_cell targets cell0: the bootstrap nova.conf has [database] = cell0 (roles/, roles/). The bootstrap command is "false" (nova-api-bootstrap.json.j2:2), so success relies on the exit 0 |
| nova-conductor | nova-manage db sync --local_cell, db online_data_migrations (kolla docker/). Unreachable |
KOLLA_UPGRADE: db sync --local_cell (:9-12). KOLLA_OSM: db online_data_migrations (:14-17) |
nova_cell_bootstrap with KOLLA_UPGRADE on the first conductor, deploy/reconfigure and upgrade (roles/, nova.yml:67-100). KOLLA_OSM, upgrade only (nova.yml:283-302, roles/) |
The same image runs nova_super_conductor (roles/) |
| neutron-server | neutron-db-manage --subproject neutron upgrade head, then upgrade head for each NEUTRON_BOOTSTRAP_SERVICES entry (kolla docker/); no --config-file |
KOLLA_UPGRADE with NEUTRON_DB_EXPAND or NEUTRON_DB_CONTRACT: upgrade --expand or --contract for neutron, then for each NEUTRON_ROLLING_UPGRADE_SERVICES entry (:17-34) |
bootstrap_neutron on every deploy/reconfigure, and on upgrade only when neutron_enable_rolling_upgrade is off (default yes) (roles/, deploy.yml:20, bootstrap.yml:38, legacy_upgrade.yml:13, upgrade.yml:4-8, roles/). Both lists are the enabled neutron_subprojects, which in 2025.1 are still neutron-fwaas, networking-sfc, neutron-dynamic-routing, neutron-vpnaas, vmware-nsx and tap-as-a-service (roles/). Expand and contract containers in rolling_upgrade.yml:13-33, |
Only enabled subprojects are migrated, on deploy and on upgrade alike (§6 item 8) |
| mariadb | mysql_install_db, a temporary mysqld_safe --wsrep-new-cluster --skip-networking --wsrep-on=OFF, kolla_security_reset (root password), grants to root@localhost and root@'%', shutdown; both steps' output is appended to mariadb-bootstrap.log (kolla docker/) |
KOLLA_UPGRADE: removes /var/, runs mysql_upgrade over TCP against the running local server, its output now appended to mariadb-upgrade.log (:47-57). BOOTSTRAP_ARGS: appended to mysqld_safe on any start (:59-61) |
bootstrap_mariadb when a new cluster is bootstrapped (roles/), then a handler starts mariadb with BOOTSTRAP_ARGS=--wsrep-new-cluster (roles/). upgrade_mariadb on every MariaDB host, upgrade only, in the post-configuration play (roles/, mariadb.yml:88-92); roles/ only imports deploy.yml. --wsrep-recover and --wsrep-new-cluster in mariadb_recovery (roles/) |
The image forms no cluster itself and has no Galera recovery logic (§5.4) |
| rabbitmq | writes RABBITMQ_CLUSTER_COOKIE to /var/, mode 400; nothing else: no rabbitmqctl, no join, no users (kolla docker/; Kolla-Ansible uses the rabbitmq image, now with the docker_image_name_prefix, roles/) |
none | <project_name>_bootstrap, only when the volume was just created on that host (roles/) |
A normal start never rewrites the cookie (§6 item 9) |
No one-shot branch exists in: keystone-fernet, keystone-ssh, cinder-volume, cinder-scheduler, cinder-backup,
heat-api-cfn, heat-engine, the barbican, octavia and manila worker images, nova-scheduler,
nova-compute, nova-compute-ironic, nova-libvirt, nova-ssh, the Nova console proxies, every neutron agent,
openvswitch, ovn, mariadb-clustercheck, memcached, haproxy, keepalived, fluentd, cron, kolla-toolbox, iscsid and tgtd
(grep of their start scripts for ${!...[@]}) CODE. The only DB steps in the OVS and OVN images are at start
(§5).
Note on ironic (only this branch was read): ironic-api's KOLLA_BOOTSTRAP runs ironic-dbsync upgrade and
online_data_migrations, KOLLA_UPGRADE only upgrade, KOLLA_OSM only online_data_migrations (kolla
docker/ironic/ironic-api/extend_start.sh:5-19). bootstrap_ironic sends KOLLA_UPGRADE unless
ironic_enable_rolling_upgrade (default yes) is turned off (roles/ironic/tasks/bootstrap_service.yml:2-25,
roles/ironic/defaults/main.yml:316).
4.1 One-shots that bypass kolla_start¶
A few one-shots replace the container command with bash -c 'sudo -E kolla_set_configs && ...' CODE. The config
is copied, but kolla_copy_cacerts, kolla_install_projects and kolla_extend_start do not run, and the config.json command is written to
/run_command but never executed. Custom CA certificates are therefore not installed in these containers.
| Container | Image | What runs after kolla_set_configs |
Kolla-Ansible task |
|---|---|---|---|
bootstrap_keystone_fernet |
keystone-fernet | keystone-manage fernet_setup |
roles/ |
nova_api_map_cell0 |
nova-api | nova-manage cell_v2 map_cell0; new in 2024.1, a second run under the same name, cell_v2 update_cell for cell0, when the recorded cell0 database connection differs from the configured one |
roles/ |
nova_list_cells, cell create and update |
nova-conductor (nova-api for the cell0 lookup) | nova-manage cell_v2 list_cells, create_cell, update_cell |
roles/, create_cells.yml:12,, roles/ |
mariabackup |
mariadb-server, the image of the running mariadb container when known (now read from container_facts.containers[...]) |
/usr/ (§5); the container is removed on exit |
roles/ |
libvirt_version_check (new) |
the configured nova-libvirt image | Nothing: the command libvirtd --version replaces kolla_start, so no config is copied at all; the container is removed on exit. Where the running nova_libvirt uses another image, its own libvirtd --version is compared, and the run stops if the new version is lower, unless the tag nova-libvirt-version-check is skipped |
roles/, imported by deploy.yml:5 and upgrade.yml:2 |
nova_libvirt_script_check (new) |
the configured nova-libvirt image | ls /usr/, instead of kolla_start. The run stops if the image lacks that script, which the 2025.1 command needs (§5.1), unless the tag nova-libvirt-script-check is skipped |
roles/ |
The keystone-fernet image ships its own kolla_keystone_bootstrap, a fernet_setup wrapper, which Kolla-Ansible does
not use. Its changed detection is inverted: it reports changed when "Key repository is already initialized"
appears (kolla docker/keystone/keystone-fernet/keystone_bootstrap.sh:35-41). In this pairing that is dead code. The
new mariadb kolla_mariadb_backup_replica.sh (kolla docker/mariadb/mariadb-server/Dockerfile.j2:42) is not used by
Kolla-Ansible either (grep of ansible/ for backup_replica). discover_hosts is an exec into the running
nova_conductor, not a one-shot (roles/nova-cell/tasks/discover_computes.yml:14-18).
5. Per-image start behaviour¶
"Runs as" is the image USER; root when the image and its parents set none. Every row starts with the common path of
§2. "Log dir" means: create /var/log/kolla/<service> if missing and set
mode 755.
| Image | Runs as | What its start script does on every start | Day-2 note |
|---|---|---|---|
| base, openstack-base | root | Nothing: empty kolla_extend_start (kolla docker/) |
No USER in base, openstack-base or nova-base |
| keystone | root | Log dir and keystone.log with owners fixed, kolla_httpd_setup, ARGS=-DFOREGROUND (kolla docker/). The command keystone-startup.sh waits up to 36 × 5 s for fernet key 0, then execs httpd (roles/) |
Stale httpd run files are removed, so a restart is safe |
| keystone-fernet | root | Runs /usr/ if present, then chowns the key directory (kolla docker/). Kolla-Ansible installs that script; it waits up to 10 × 60 s for key 0, then exits 1 (roles/) |
Without key 0 on the node the start waits up to 10 × 60 s and the script exits 1 before the cron command is exec'd (§2.2), so no rotation cron runs there meanwhile CODE; what systemd then does is NOT AVAILABLE (§2.3) |
| keystone-ssh | root | Generates any missing SSH host key: rsa, ecdsa and ed25519, plus dsa except on CentOS and Rocky (changed in 2025.1); creates /var/ (kolla docker/) |
/etc/ssh is on no volume (roles/): new host keys on every recreate (§6 item 18) |
| glance-api | glance | Log dir (kolla docker/); no httpd step. kolla_set_configs recursively chowns /var/lib/glance and /var/ (roles/) |
With the file backend /var/lib/glance is the image store: one chown per file on every start (§6 item 10) |
| placement-api | root | Log dir and placement-api.log; chown -R only if the top-level owner differs (kolla docker/); kolla_httpd_setup (docker/) |
– |
| cinder-api | root | Log dir, now also chown -R cinder:kolla of it when its owner differs (kolla docker/); kolla_httpd_setup (docker/) |
– |
| cinder-volume | cinder | Log dir; sudo chown -R cinder:kolla of /var/lib/cinder and /etc/iscsi only if the top-level owner differs, chmod 2775 if needed (kolla docker/) |
Not only on a fresh volume: kolla_set_configs first chowns /var/lib/cinder recursively to cinder:cinder (roles/), so the cinder:kolla test always fails and chown -R walks the cinder volume a second time on every start |
| cinder-scheduler, cinder-backup | cinder | Log dir only (empty kolla_cinder_extend_start, kolla docker/) |
– |
| heat-api, heat-api-cfn, heat-engine | root (APIs), heat (engine) | Log dir (kolla docker/); the two API images run kolla_httpd_setup (docker/, docker/) |
– |
| horizon | root | Settings symlinks, plugin files from ENABLE_*, conditional static-asset regeneration, log dir, secret-key-store owner, kolla_httpd_setup (kolla docker/; §5.2) |
Assets are regenerated after a recreate or a settings change, and, changed in 2025.1, a single compress failure fails the start (§5.2); how long that start takes is NOT AVAILABLE |
| barbican, octavia and manila images | barbican, manila (all images); octavia workers; octavia-api root | Log dir (barbican chowns it, kolla docker/; octavia chowns it recursively when the owner differs, docker/). The API images call kolla_httpd_setup (docker/, docker/, docker/): a no-op for httpd as a service user (docker/, docker/); octavia-api sets no USER (grep of docker/), so it runs the httpd cleanup as root |
Worker images do the log-dir step only |
| nova-base | – | Log dir, then sources kolla_nova_extend_start (kolla docker/) |
Parent of every nova image except nova-libvirt |
| nova-api | root | nova-base step; kolla_httpd_setup (kolla docker/), which acts: the Dockerfile sets no USER (grep of docker/) |
No DB action on a normal start |
| nova-conductor, nova-scheduler | nova | nova-base step only | Also nova_super_conductor. The scheduler SIGHUP comes from Kolla-Ansible (nova.yml:152-174, roles/) |
| nova-compute | nova | kolla_set_configs recursively chowns /var/ and /var/lib/nova (roles/); nova-base step; mkdir -p /var/ (kolla docker/) |
/var/lib/nova is the instance datadir: one chown per file on every start (§6 item 10). The manifest copies a non-optional hostnqn to /etc/ (nova-compute.json.j2:64-69) |
| nova-compute-ironic | nova | nova-base step; permissions only on /var/ (roles/) |
– |
| nova-libvirt | root | Creates the log file (kolla docker/; the 2024.1 xenfs mount is gone). New in 2025.1, the command is kolla_nova_libvirt_start: virtlogd in the background, then exec libvirtd --listen (docker/). The image does not touch /dev/kvm; Kolla-Ansible installs a host udev rule instead (§5.1) |
Passive towards running guests (§5.1). An image without that script fails the new nova_libvirt_script_check (§4.1) |
| nova-ssh | root | Replaces the nova-base script: generates missing SSH host keys (no dsa on CentOS and Rocky), creates and chowns /var/ (kolla docker/, docker/); exec sshd -D |
New host keys on every recreate (§6 item 18) |
| nova-novncproxy, nova-serialproxy, nova-spicehtml5proxy | nova | nova-base step only | – |
| neutron-base | – | Log dir; iptables backend, skipped on CentOS and Rocky and when update-alternatives --display iptables fails: update-alternatives --set to the -legacy binaries when KOLLA_LEGACY_IPTABLES is "true", otherwise --auto (unset counts as false) (kolla docker/) |
Only the OVS and L3 agents get KOLLA_LEGACY_IPTABLES (roles/); the linuxbridge agent is gone in 2025.1. Changing neutron_legacy_iptables recreates them; whether rules in the old backend are migrated is NOT AVAILABLE |
| neutron-server | neutron | neutron-base step; no branch taken; exec neutron-server |
– |
| neutron-openvswitch-agent | neutron | neutron-base step; nothing to OVS bridges or flows | NOT AVAILABLE Whether and how the agent resyncs flows after a restart: agent behaviour, not in these sources |
| neutron-dhcp-agent | neutron | Its own kolla_extend_start replaces neutron-base's: creates /var/ if missing and dnsmasq.log (owner neutron:kolla); new in 2025.1, copies or removes the agent wrappers (§2.5); then sources the empty kolla_neutron_extend_start (kolla docker/, Dockerfile.j2:17) |
With neutron_agents_wrappers (default no), dnsmasq runs in child containers. NOT AVAILABLE Otherwise, whether dnsmasq children die with the container and whether qdhcp- namespaces persist on the shared /run/netns |
| neutron-l3-agent | neutron | Changed in 2025.1: its own kolla_extend_start (log dir, iptables backend, agent wrappers; kolla docker/); the command is Kolla-Ansible's wrapper (§5.3) |
Namespace cleanup on every start with enable_neutron_agent_ha, unless neutron_agents_wrappers is on (Risk register R6) |
| neutron-metadata-agent (also the OVN metadata agent) | neutron | neutron-base step; recursive chown of /var/, the socket volume shared with the L3 and DHCP agents (roles/) |
2025.1 still runs the OVN metadata agent from this image (roles/) |
| neutron-sriov-agent | neutron | neutron-base step | – |
| openvswitch-base | root | Log dir; then chown -R openvswitch:openvswitch /var/ on every start, and kolla_openvswitch_extend_start (kolla docker/) |
The image does not create an openvswitch user (no configure_user in docker/; kolla kolla/ marks it "unused"); whether the distribution package does is NOT AVAILABLE. Without it the chown fails and errexit ends the start |
| openvswitch-db-server | root | mkdir -p /run/; ovsdb-tool create if conf.db is absent; ovsdb-tool convert when needs-conversion says yes; an ovsdb-server.log owned by openvswitch (kolla docker/). Changed in 2025.1: the command is ovs_wrapper ovsdb-server /var/, listening on the unix socket and on ptcp:{{ ovsdb_port }}:127.0.0.1 (roles/), with no config file of its own |
conf.db is on the openvswitch_db volume: bridges and ports survive restart and recreate. The wrapper's stop path: §2.6 |
| openvswitch-vswitchd | root | Creates ovs-vswitchd.log owned by openvswitch if unreadable; modprobe openvswitch (kolla docker/). Changed in 2025.1: the command is ovs_wrapper ovs-vswitchd unix:/ (roles/), still without flow save or restore |
The kernel module stays loaded; whether flows are lost is NOT AVAILABLE (§6 item 13) |
| ovn-base | root | Replaces the OVS script: creates /run/ovn and the log dir, then sources kolla_ovn_extend_start (kolla docker/) |
/run/ovn is on no volume |
| ovn-controller | root | ovn-base step; creates ovn-controller.log owned by openvswitch if unreadable (kolla docker/); exec ovn-controller (roles/) |
Chassis settings and br-int are set by Kolla-Ansible through kolla_toolbox (openvswitch_bridge, openvswitch_db; roles/), not by the image |
| ovn-northd | root | ovn-base step; log file ovn-northd.log (kolla docker/); exec ovn-northd |
Stateless |
| ovn-nb-db-server, ovn-sb-db-server | root | ovn-base step; log files ovn-nb-db.log and ovn-sb-db.log (kolla docker/, docker/). Kolla-Ansible calls /usr/ (or run_sb_ovsdb) directly, not the image's start-nb-db-server wrapper (roles/, ovn-sb-db.json.j2:2, roles/) |
The wrapper's comment says ovn-ctl creates the DB file when absent and updates it when the schema changes (kolla docker/); whether the direct call does so is NOT AVAILABLE |
| mariadb | mysql | kolla_set_configs recursively chowns /var/ and /var/lib/mysql (roles/); log dir; exec mysqld_safe plus BOOTSTRAP_ARGS if set (kolla docker/) |
No Galera recovery in the image (§5.4) |
| mariadb (backup) | mysql | §4.1. Changed in 2025.1, backup.sh: a full backup goes into its own full-<date>-<epoch>/ directory and its path is recorded in last_full_file; an incremental backup now fails if that file is missing, decompresses the last full backup into a temporary directory and uses it as --incremental-basedir, writing into incr-<time>-since-<date>/ (kolla docker/) |
No retention or rotation in the image. An incremental backup now needs a full one taken with the 2025.1 script, and temporary space for a decompressed copy of it |
| mariadb-clustercheck | root | Log dir (kolla docker/). Changed in 2025.1: the command is socat_wrapper, listening on the clustercheck port and running clustercheck per connection (roles/; §2.6) |
Stateless. The clustercheck script is not in the kolla source: it is downloaded from a Fedora package repository at build time, still version 10.9 (kolla docker/) |
| rabbitmq | rabbitmq | Recursive chown of /var/ and /var/ (roles/); log dir (kolla docker/); cookie untouched |
Clustering is classic_config peer discovery (roles/), not the image |
| memcached | memcached | Nothing: no start script, empty config_files, all settings in the command (roles/) |
No volume; whether a restart empties the cache is NOT AVAILABLE (§6 item 14) |
| haproxy | root | No start script. kolla_set_configs replaces haproxy.cfg and the whole services.d/ (roles/). Changed in 2025.1: haproxy_run.sh ends with exec /usr/, passing the directory instead of one -f per file (roles/). With TLS enabled it first writes a one-day self-signed certificate when the expected PEM file is missing, the case of Let's Encrypt (:3-36); the PEM entries now depend on letsencrypt_managed_certs (haproxy.json.j2:28-42) |
The image's reload helper kolla_ensure_haproxy_latest_config (kolla docker/) is never called (grep of ansible/): config applies by restart only (Risk register R8) |
| keepalived | root | Removes a stale /run/ (kolla docker/); exec keepalived -nld (roles/) |
VIP health is check_alive.sh, which runs the scripts Kolla-Ansible puts in /checks; there is no HAProxy fallback when none is there (§6 item 15) |
| fluentd | fluentd | Sets owner fluentd:kolla and mode 2775 on /var/log/kolla, the kolla_logs volume every container shares, and chowns /var/, through sudo (kolla docker/, docker/). Changed in 2025.1 on the Kolla-Ansible side: the command is always fluentd -c /etc/ and the owner always fluentd, where 2024.1 still templated fluentd_cmd and fluentd_user (roles/). Recursive chowns of its log dirs and /var/ (:17-42) |
NOT AVAILABLE Whether read positions are lost on recreate but kept on a restart |
| cron | root | Moves the logrotate cron file to /etc/ when the schedule is hourly, daily, weekly or monthly (kolla docker/; Kolla-Ansible sets cron_logrotate_schedule, default daily, roles/); copies logrotate.conf, exec crond -s -n or cron -f (roles/) |
A restart only delays rotation |
| kolla-toolbox | ansible | Creates /var/, owner ansible:kolla, mode 664 (kolla docker/); Kolla-Ansible also sets that owner and mode through permissions (roles/). When RabbitMQ is enabled, copies the Erlang cookie from passwords.yml (:4-9). The command is kolla_toolbox (:2), a sleep 1 loop that exits 0 on TERM or QUIT (kolla docker/) |
Gets the current cookie on every start, unlike the brokers (§6 item 9) |
| chrony | – | Still absent in 2025.1: no docker/chrony image in kolla and no chrony role in Kolla-Ansible (ls of kolla docker/ and of roles/) |
– |
| iscsid | root | Writes /etc/ with a new IQN only if the file is missing (kolla docker/) |
/etc/iscsi is the iscsi_info volume (roles/): the IQN is stable (§6 item 19) |
| tgtd | root | No start script, empty config_files; exec tgtd (roles/) |
NOT AVAILABLE Whether the target table survives a restart, or exported targets drop until re-created |
5.1 nova-libvirt: the start path is passive¶
The image is built from base, not nova-base (kolla docker/nova/nova-libvirt/Dockerfile.j2:1), and runs as root
CODE. On every start kolla_set_configs deletes and re-copies only the files listed in
roles/nova-cell/templates/nova-libvirt.json.j2:3-77 (libvirtd.conf, qemu.conf, TLS files, Ceph and SASL files,
and the CA directory when kolla_copy_ca_into_containers), except /etc/libvirt/secrets, which is merged rather than
deleted first (:45-52); before that, the defaults handling of §2.3
deletes or restores each recorded destination. The manifest has no permissions block. extend_start.sh then only
creates the log file and fixes its mode (kolla docker/nova/nova-libvirt/extend_start.sh:3-11); the 2024.1 xenfs mount
is gone. The image does not touch /dev/kvm: Kolla-Ansible writes a host udev rule (KERNEL=="kvm", group
qemu_user_gid, mode 0660) and, on Ubuntu, masks qemu-kvm.service (roles/nova-cell/tasks/config-host.yml:30-53,
roles/nova-cell/templates/99-kolla-kvm.rules.j2:4). Nothing touches cgroups, running QEMU processes,
/var/run/libvirt, /var/lib/libvirt or /etc/libvirt/qemu, and virtlockd is not started. libvirtd.conf.j2 sets no
cgroup option, nor does qemu.conf.j2.
Changed in 2025.1: virtlogd now runs, and QEMU logs through it CODE. The command is
/usr/local/bin/kolla_nova_libvirt_start (roles/nova-cell/templates/nova-libvirt.json.j2:2), which starts
/usr/sbin/virtlogd & and then exec /usr/sbin/libvirtd --listen (kolla
docker/nova/nova-libvirt/kolla_nova_libvirt_start.sh:9,12); its comment gives the reason, instance console logs that
otherwise grow without bound. qemu.conf now sets stdio_handler = "logd", where 2024.1 set "file"
(roles/nova-cell/templates/qemu.conf.j2:1). virtlogd is a background child of the start script, not of dumb-init,
and lives in the container: every nova_libvirt restart or recreate stops it with the container while the guests
keep running (§2.6). NOT AVAILABLE (libvirt and QEMU semantics) What happens to the console
output of guests started before such a restart, and whether a restarted libvirtd reconnects them to the new virtlogd.
The container is deployed only while enable_nova_libvirt_container is true (default: nova_compute_virt_type is
kvm or qemu, group_vars/all.yml:945; roles/nova-cell/defaults/main.yml:8). The /run bind mount is :shared
only with Docker, and Podman adds a devpts mount on /dev/pts (roles/nova-cell/defaults/main.yml:385,387). Whether
guests survive a restart is therefore decided by the stop path, where libvirt placed QEMU, and libvirtd's reconnect on
start (Nova deep dive §5,
Q1). The SASL DB /etc/libvirt/passwd.db is on no volume; only
/etc/libvirt/qemu is (roles/nova-cell/defaults/main.yml:393). It survives a restart and is lost on every recreate,
and the Create libvirt SASL user handler re-creates it (roles/nova-cell/handlers/main.yml:90,123-133).
NOT AVAILABLE Whether the image ships /etc/libvirt/secrets; if it does not, the defaults handling deletes the
merged directory at every start before re-copying it, which makes merge moot.
5.2 horizon: static assets¶
On every start the script copies or removes each plugin's enabled/*.py file according to its ENABLE_* variable
(unset counts as no); any change sets FORCE_GENERATE=yes (kolla docker/horizon/extend_start.sh:32-46,226-242)
CODE. Kolla-Ansible passes one ENABLE_* per dashboard it supports (roles/horizon/defaults/main.yml:9-25). The
script runs manage.py collectstatic --noinput --clear and compress --force only when
/var/lib/kolla/.settings.md5sum.txt is missing, the md5 of local_settings, custom_local_settings,
local_settings.d and, new in 2025.1, themes differs from it, or FORCE_GENERATE is yes; then it stores the new
hash (kolla docker/horizon/extend_start.sh:206-224,244-248). Kolla-Ansible copies themes only when horizon_custom_themes is set
(roles/horizon/templates/horizon.json.j2:44-47). Changed in 2025.1: the 2024.1 retry loop is gone. compress
runs once (kolla docker/horizon/extend_start.sh:246), so a single failure ends the start through errexit before httpd starts CODE. Kolla-Ansible sets
FORCE_GENERATE=yes only with horizon_dev_mode (roles/horizon/defaults/main.yml:26,155). /var/lib/kolla is not a
volume (:126-130), so the hash file lives in the container layer; only the start script writes it (HASH_PATH, kolla
docker/horizon/extend_start.sh:6,247). A recreate (new image, changed parameters) or a settings change therefore
makes the next start regenerate the assets; a plain restart with unchanged settings does not CODE. NOT AVAILABLE
How long such a start takes, and why compress would fail.
5.3 neutron-l3-agent: the wrapper¶
The command is Kolla-Ansible's /usr/local/bin/neutron-l3-agent-wrapper.sh
(roles/neutron/templates/neutron-l3-agent.json.j2:2-9) CODE. It sets errexit. With enable_neutron_agent_ha
(default no, group_vars/all.yml:934) it first runs neutron-netns-cleanup --force --agent-type l3, with the
fwaas driver file added when enable_neutron_fwaas (the wrapper's comment: "Remove all l3 related netns"), unless,
new in 2025.1, neutron_agents_wrappers is on (default no, roles/neutron/defaults/main.yml:646); it then runs
neutron-l3-agent without exec (roles/neutron/templates/neutron-l3-agent-wrapper.sh.j2:5-22). The cleanup runs on
every container start: handler restart, recreate, systemd restart, reboot. A cleanup failure aborts the start. NOT AVAILABLE What the
command deletes: it is neutron code, which is not in these sources (F12).
Because the wrapper does not exec the agent, bash stays dumb-init's only child (§2.6) CODE.
NOT AVAILABLE Whether the stop signal then reaches only bash, so that the agent gets no graceful shutdown, and
whether its keepalived, haproxy and radvd children die with the container.
5.4 MariaDB: what the image does not do¶
The image has no Galera recovery logic: no grastate.dat or safe_to_bootstrap handling, no seqno comparison, no
new-cluster decision CODE (kolla docker/mariadb/mariadb-server/extend_start.sh has none). All of that is in
Kolla-Ansible (roles/mariadb/tasks/recover_cluster.yml, lookup_cluster.yml). A normal start is mysqld_safe with
the rendered galera.cnf, whose gcomm:// lists every host of the MariaDB shard group, or is empty on a single node
(roles/mariadb/templates/galera.cnf.j2:33). BOOTSTRAP_ARGS is read from the container environment on every start
(kolla docker/mariadb/mariadb-server/extend_start.sh:59-61), and the containers started with --wsrep-new-cluster have restart_policy: oneshot
(roles/mariadb/handlers/main.yml:2-20, roles/mariadb/tasks/recover_cluster.yml:114-130): with Docker they get no
systemd unit (module_utils/kolla_docker_worker.py:342-350,390-393); with Podman a unit file is written but the
container is started directly (§4). The mariadb
bootstrap, upgrade and --wsrep-recover one-shots also run the recursive /var/lib/mysql chown of
§5, since they use the same manifest.
6. Day-2 consequences¶
-
Changed in 2025.1: a
config.json-only change written bygenconfignow restarts the container, unless it only touchespermissions. The config step no longer notifies restart handlers;service-check-containersruns--checkon the nextdeploy,reconfigureordeploy-containers, and--checknow compares the command and flags dropped recorded entries besides the files (§3.1). Apermissions-only change is still not detected and applies at the next restart for another reason CODE (Predict and inspect a run, Execution flow §4, Write config first, apply in controlled batches §2). -
Some containers restart on every deploy/reconfigure. A
preserve_propertiesentry, such as prometheusextras, or a directory source with subdirectories makes--checkexit 1 on every run (§3.1, §3.3) CODE (Tags §3). -
A new optional file is drift, not a failure.
--checkexits 1 when an optional file is rendered for the first time (e.g. nova-computerelease), and the container is restarted with the new file (kolladocker/base/set_configs.py:180-182) CODE. With Podman, any check exit code other than 0 or 1, 137 included, fails the check task instead, and so does, with either engine, a container without/run_command, whose check now exits 2 (§3.3) CODE (Pre-execution checklist, Predict and inspect a run). -
Dropped entries: a restart removes most of them, and, new in 2025.1, the check then restarts the container on every run until it is recreated. Destinations of entries removed from
config.jsonare deleted, or reset to the saved copy, at the next start; glob sources are not covered, and a file found on a volume when the container was created is restored rather than deleted (§3.5). From the container's third start on, the "saved copy" of a destination that existed in the image is an earlier rendered file, not the image's (§2.3) CODE. In 2025.1--checkraisesStateMismatchas soon as a recorded destination is no longer listed, and the state is never pruned: a restart keeps the container layer and its state, so--checkexits 1 again on every laterdeploy,reconfigureanddeploy-containers, and the container is restarted each time, until something recreates it (new image, changed parameters) CODE (a run of the 2025.1 functions outside a container shows the state keeping the dropped key and the check failing after the restart). Triggers include turning off an option whose files a manifest copies, such aslibvirt_enable_saslorkolla_copy_ca_into_containers(§2.4). NOT AVAILABLE Whether a real deployment shows this loop, and whether removing the container and runningdeploy-containersis a safe way out; both are left for the community to confirm (§7). CA certificates: a CA deleted fromkolla_certificates_dir/ca/stays in/etc/kolla/<svc>/ca-certificates/, because thecopytask never deletes (roles/service-cert-copy/tasks/main.yml:2-10), and is re-added at every start until it is deleted there by hand; even then the removal is not drift (§3.2) and waits for a restart, and whether the trust bundle is regenerated then is NOT AVAILABLE (§2.4) (Repository architecture §7). -
Nova's online data migrations never run outside
upgrade. Deploy and reconfigure run the Nova bootstrap containers withKOLLA_UPGRADE(api_db sync+db sync --local_cell,db sync --local_cell); the images'KOLLA_BOOTSTRAPbranches are unreachable (§4) CODE. Upgrade also runsnova-status upgrade checkfirst and stops on a result other than 0 or 1 (roles/nova/tasks/upgrade.yml:5-35) CODE (Nova deep dive §4, Findings F15). - Placement's online data migrations run on every deploy/reconfigure, inside
bootstrap_placement, and twice on upgrade. A tag change applied withdeploytherefore runs them; cinder's bootstrap does not (§4) CODE (Update container images). - A changed
heat_domain_admin_passwordnever reaches Keystone. The bootstrap only creates the user whenheat_user_domainis absent, and a domain left without its user by a partial run is never repaired, whileheat.confgets the new value (roles/heat/templates/heat.conf.j2:11-12) CODE. NOT AVAILABLE Whether stack-domain operations then fail authentication (Known bugs and limitations). - Neutron upgrade gaps. Deploy and the rolling
upgradeboth migrate neutron plus every enabled subproject, now including neutron-fwaas and tap-as-a-service (§4) CODE. The contract step still has two traps: ifhas_offline_migrationsreturns non-zero for any enabled subproject, or its exec fails (ignore_errors), everyneutron_serveris stopped until the final flush, a Neutron API outage; and the check loops over the enabled subprojects only, never neutron itself, so with no subproject enabled no server is ever stopped beforeupgrade --contract(roles/neutron/tasks/rolling_upgrade.yml:38-89) CODE. NOT AVAILABLE Whether a neutron contract migration is then safe against running servers (Known bugs and limitations). - The RabbitMQ cookie is fixed at bootstrap. The image writes
.erlang.cookieonly in the bootstrap container on a new volume. A changedrabbitmq_cluster_cookierecreates the brokers (env compare,roles/rabbitmq/defaults/main.yml:13-16,roles/service-check-containers/tasks/main.yml:19,module_utils/kolla_container_worker.py:84,304-315) but their cookie file keeps the old value, whilekolla_toolboxgets the new one CODE (consequences NOT AVAILABLE) (fact sheet B §2). - Recursive chown on data volumes at every start.
kolla_set_configsmakes onechownper file of the glance image store, of/var/lib/novaon computes, of the MariaDB datadir, of the RabbitMQ mnesia directory and of thecindervolume (twice for cinder-volume, §5), on everyCOPY_ALWAYSstart CODE. NOT AVAILABLE Whether, withenable_shared_var_lib_nova_mnt, the walk also enters the shares still mounted under/var/lib/nova/mnt(roles/nova-cell/defaults/main.yml:392), and how start time grows with the number of files, especially on NFS-backed trees (fact sheet C, Nova deep dive §5). - nova-libvirt's start path is passive; VM survival is decided on the stop path (§5.1) CODE (for the start path; NOT AVAILABLE for survival) (Nova deep dive §5, Q1).
-
The L3 agent wrapper does not
execthe agent. NOT AVAILABLE Whether the stop signal then reaches only bash, so that the agent is killed without a graceful shutdown. Withenable_neutron_agent_ha, and unlessneutron_agents_wrappersis on, every start also runsneutron-netns-cleanup --force --agent-type l3before the agent starts CODE; what that command deletes is NOT AVAILABLE (Risk register R6, Component dependencies §4). -
An
openvswitch_vswitchdrestart replaces only the userspace daemon, and the new wrapper does not stop it cleanly. The kernel module stays loaded andconf.dbkeeps bridges and ports CODE. Changed in 2025.1, both Open vSwitch containers run underovs_wrapper, whose TERM handler builds the control-socket path from an empty$1and so does not reach the daemon before the wrapper exits 0 (§2.6) CODE. NOT AVAILABLE How the daemon then ends, whether the OpenFlow tables are lost and must be reprogrammed by the OVS agent orovn-controller, and how long that takes (Risk register R7, Q3). -
memcached has no data volume and no persistence option. The container mounts no data volume (
roles/memcached/defaults/main.yml:45-48) and its command has no persistence option (roles/memcached/templates/memcached.json.j2:2) CODE. NOT AVAILABLE (memcached semantics) Whether every restart therefore empties the cache, with token-cache misses and lost Horizon sessions where they are kept in memcached (Risk register R4). -
The VIP follows the HAProxy stats socket, and the ProxySQL admin interface when ProxySQL is enabled. keepalived's
check_alive.shruns every script under/checksand exits 1 if one fails; with no script it reaches its end without anexit(kolladocker/keepalived/check_alive.sh:9-33) CODE (its exit status then is NOT AVAILABLE: bash semantics). Kolla-Ansible puts there one script per enabled load-balancer service on the host,check_alive_haproxy.sh(ashow infoon the HAProxy socket) andcheck_alive_proxysql.sh, which in 2025.1 runsmariadb ... -e "SELECT 1"against the ProxySQL admin socket withproxysql_admin_userand its password written into the script, instead of ashow infothroughsocat(roles/loadbalancer/tasks/config.yml:74-105,roles/loadbalancer/templates/keepalived/check_alive_haproxy.sh.j2:6,roles/loadbalancer/templates/keepalived/check_alive_proxysql.sh.j2:6-12,roles/loadbalancer/templates/keepalived/keepalived.json.j2:10-15); withinterval 2,fall 2,rise 10whenkeepalived_track_script_enabled(default True) (roles/loadbalancer/templates/keepalived/keepalived.conf.j2:1-8,roles/loadbalancer/defaults/main.yml:190) CODE. Changed in 2025.1, the tasks that copy and remove these scripts notify no handler: a changed or new script is drift through--check, a removed one is not (§3.2). NOT AVAILABLE (keepalived semantics) Whether an HAProxy or ProxySQL restart puts the node in FAULT, and for how long (Risk register R8). -
MariaDB has no automatic Galera recovery (§5.4). NOT AVAILABLE Whether, after all DB containers stopped (power loss, engine restart on every DB host), they come back as plain
mysqld_safewith the cluster non-primary untilmariadb_recovery. A container left withBOOTSTRAP_ARGS=--wsrep-new-clusterby an interrupted run passes that option tomysqld_safeagain on any manualdocker start(§5.4) CODE; whether that bootstraps a new cluster (split-brain risk) is NOT AVAILABLE (fact sheet B §1, Risk register R18). - Container healthchecks are wired, but no deploy waits on them (§2.7). With the
default
enable_container_healthchecks: yes, the engine shows a health status for the services that define a test; no deploy, reconfigure or upgrade task gates on it. New in 2025.1,kolla-ansible checkfails a host whose containers are missing, stopped or unhealthy, which an operator can run as a health gate after a change CODE (Pre-execution checklist item 5, health gates). -
SSH host keys of
nova_sshandkeystone_sshchange on every recreate, because/etc/sshis on no volume (roles/nova-cell/defaults/main.yml:395-402,roles/keystone/defaults/main.yml:38-43); new in 2025.1, no dsa key is generated on CentOS and Rocky images (§5). The clients setStrictHostKeyChecking noand keep no known-hosts file (UserKnownHostsFile /dev/null,roles/nova-cell/templates/ssh_config.j2:2-3,roles/keystone/templates/ssh_config.j2:2-3) CODE; whether the SSH client then accepts the new keys without failing is NOT AVAILABLE (OpenSSH semantics) (Nova deep dive §6). -
The iSCSI initiator name is stable per
iscsi_infovolume across restart and recreate CODE. NOT AVAILABLE Whether removing the volume produces a new IQN at the next start (the start script writes one when the file is missing, §5), and whether that breaks backend ACLs keyed on the old one (Component dependencies §5). -
New in 2025.1: virtlogd lives and dies with
nova_libvirt. QEMU's console output now goes through virtlogd (stdio_handler = "logd"), and virtlogd runs inside thenova_libvirtcontainer (§5.1) CODE. Anova_libvirtrestart or recreate therefore also stops the log daemon of every running guest. NOT AVAILABLE Whether guests started before the restart keep writing console logs, block or lose them, and whether that differs for guests started before the upgrade to 2025.1, which still usestdio_handler = "file"(Nova deep dive §5, Q1).
7. What is not available from the sources¶
- dumb-init signal forwarding. Whether
--single-childforwards SIGTERM to the direct child only, and what happens to grandchildren (dnsmasq, keepalived and haproxy under the agents, virtlogd underkolla_nova_libvirt_start, the L3 agent behind its non-execwrapper). - Whether the runtime kills the container's cgroup when its init exits, and how that applies under
pid_mode: host(nova_libvirt, and the DHCP and L3 agents withneutron_agents_wrappers). - QEMU survival across a
nova_libvirtrestart or recreate (Q1): placement inmachine.slicethrough the host D-Bus and systemd-machined, reconnect from the runtime state, the old QEMU binary kept after a recreate (Nova deep dive §5), and, new in 2025.1, what happens to guest console logging when virtlogd stops with the container (§6 item 20). - How the Open vSwitch daemons end when
ovs_wrapperdoes not reach them, and whether OVS flows are lost on anopenvswitch_vswitchdrestart and, if so, how long reprogramming takes (Q3). - Whether the
openvswitchuser exists in the Open vSwitch and OVN images, which theirchownsteps need (§5). - Horizon regeneration time after a recreate or a settings change, and why
compresscould fail (§5.2). - Cost of the recursive chown on large trees: glance store, NFS instance directory, MariaDB datadir, RabbitMQ mnesia.
- Upstream semantics of
keystone-manage bootstrap: whether it resets the admin password tokeystone_admin_password. The wrapper, which Kolla-Ansible runs with<engine> exec keystone kolla_keystone_bootstrap(roles/keystone/tasks/register.yml:5), counts eight "already exists"/"skipping" patterns but reports unchanged only when the count is nine (kolladocker/keystone/keystone/keystone_bootstrap.sh:51-63); whether any output line matches twice, so that it can ever report unchanged, depends on keystone's output. ovn-ctlschema creation and upgrade with Kolla-Ansible's direct call, and its hard-coded/usr/share/ovn/scripts/path on distributions that shipovn-ctlelsewhere./var/runas a symlink to/runin the images, which would put libvirt's runtime state on the host/runbind mount. The Dockerfiles do not show it.- Whether a failing
kolla_set_configscauses a restart loop under the container's systemd unit (§2.3), what systemd does with the unit file the Podman worker writes for a one-shot (§4), what asystemctlaction onkolla.targetdoes to the containers (§2.3), what the engine does with an unhealthy container (§2.7), and whether the CA bundle is regenerated after the last custom CA is removed (§2.4). - The exit status of
check_alive.shwith no check script (§6 item 15). - The neutron agent wrappers' child containers: how they behave across an agent restart or recreate, and who removes them (§2.5).
- Service-side effects of the one-shot findings: heat stack-domain authentication after a changed
heat_domain_admin_password(§6 item 7); whetherrabbitmq-serverignoresRABBITMQ_CLUSTER_COOKIEand uses only the cookie file (§6 item 9); a neutron contract migration against running servers (§6 item 8); Galera after a full stop, or a manual start left with--wsrep-new-cluster(§6 item 16).
To be confirmed by the community¶
These points are read from the code, two of them also checked by running the same code outside a container, and were not run on a lab: they stay to be confirmed by the community before an operator relies on them (they are also in the change map of the study). If you run one of these checks, please share what you saw in an issue on the repository.
- Restart loop after a dropped entry: turn off an option whose file a manifest copies (for example
libvirt_enable_saslon a compute), runreconfiguretwice anddeploy-containersonce, and check whether the container restarts on each run and whatkolla_set_configs --checkprints (StateMismatch). Then check whether removing the container and runningdeploy-containersends the loop (§6 item 4). - Saved originals after three starts: in a test container, compare
/etc/kolla/defaults/<dest>with the image's file after the first, second and third start, then drop the entry and look at the destination (§2.3). ovs_wrapperstop path:docker stop openvswitch_vswitchd(orpodman stop) and readovs-vswitchd.log: a clean exit is logged by the daemon, an abrupt end is not (§2.6).- virtlogd and running guests: restart
nova_libvirtwith a running guest and check its console log file and the guest state (§6 item 20). - CA removal: with
kolla_copy_ca_into_containers, remove the last custom CA from/etc/kolla/<svc>/ca-certificates/, restart the container and check whether the system bundle still contains it (§2.4).
Related¶
- Open questions (Q14)
- Repository architecture §4.3 (how
Kolla-Ansible uses
--check) - Predict and inspect a run (running
--checkby hand) - Nova deep dive §5 (nova-libvirt restarts)
- Glossary and Components (glossary, service index)
To remember
Lumo: if you keep only 5 things from this page, keep these.
- Changed in 2025.1:
kolla_set_configs --checkalso compares thecommandwith/run_commandand fails when a file of the defaults state is no longer inconfig.json. CODE - The check still never compares
permissions, and the defaults state is never pruned: a dropped entry keeps failing the check until the container is recreated. CODE - A
COPY_ALWAYSrestart applies changed or added files, mode and owner changes and a changed command, and removes most dropped files. CODE - With
kolla_container_engine: podman, a stopped container or an exec exit code other than 0 or 1 is handled differently from Docker: there is no special case for 137. CODE - Run by hand,
kolla_set_configs --checkneedsdocker exec -u root(orpodman exec -u root).
Check yourself
Lumo: 4 quick questions to check the main ideas of this page. Choose an answer to see the explanation and the section that gives the evidence. Your score counts your first choices and stays in this browser only.
Lumo: ready for the next step? Take your time: you can come back to this page whenever you need it.
Lumo: nicely done! One more page on your journey.