Predict and inspect a run¶
Impact Read only Writes config
The commands that show what a run would target, render and restart before it runs, read in Kolla-Ansible 2025.1-eom.
Each row of the table gives one command, what it shows and its limits.
§2 adds what the first 2025.1 run on a cloud deployed by 2024.1
restarts, and how to see it beforehand.
Note
Key answers
- Predict a run:
genconfig, thenkolla_set_configs --checkin each container; the meaning of exit codes 0, 1, 2 and 137, with Docker and with Podman, is in the same table CODE.--list-tasksis not useful (table below). - Changed in 2025.1, the check sees more: it also compares the container's command with
config.json, and flags a file that an earlier start recorded and thatconfig.jsonno longer lists CODE. - What the check does not show: a container also restarts when its image, volumes, dimensions or other parameters differ, or when its systemd unit text differs CODE. After an upgrade from 2024.1, look at the unit files, at the ulimits on Docker hosts outside the Red Hat family, and at the services the upgrade has not reached, whose image changes on the next run (§2).
- Changed in 2025.1,
genconfig: it no longer pulls the fluentd image, and apart from two narrow cases no config task notifies a restart any more CODE. The CLI options follow the sub-command (kolla-ansible genconfig -i multinode -t glance).
1. Commands and what they show¶
| Goal | Command | Notes |
|---|---|---|
| List tags as Ansible sees them | ansible-playbook -i multinode --list-tags <share>/ |
Changed in 2025.1: the CLI has no way to pass --list-tags or --list-hosts (the EXTRA_OPTS environment variable of 2024.1 is gone; Repository architecture §2), so run ansible-playbook on the installed playbook directly; <share> is the data directory of the installed package. Shows the play tags and the tags inherited by the tasks of each play. common is tagged only on the common play (site.yml:88-103): no role has a meta dependency on it. list-tags-site.txt is the ansible-core 2.18.20 parse of the 2025.1 tree, where common appears on play #5 only. Tags set inside dynamic includes, such as rabbitmq-ha-precheck (roles/), are not listed (Ansible listings) |
| List hosts a run would target | ansible-playbook -i multinode -t nova --list-hosts <share>/ |
Not available through the CLI (row above). Plays with &enable_<svc>_True patterns show 0 hosts: the groups are created at run time by group_by (site.yml:6-74; Tags §2.6) |
| List tasks | kolla-ansible deploy -i multinode --list-tasks |
The one listing option the CLI kept (kolla_ansible/). Not useful: only include_tasks placeholders are shown (Tags §2.6) |
| Render configs without restarting | kolla-ansible genconfig -i multinode [-t <svc>] [--limit <hosts>] |
Sets kolla_action=config (kolla_ansible/). Writes /etc/ on the targets. Changed in 2025.1: the config tasks no longer notify the restart handlers, apart from two that still can, for placement-api with placement_wsgi_provider: apache and for cinder-volume with Huawei XML files (Execution flow §4); restarts come from the shared check step, which genconfig does not run. Also re-renders haproxy services.d (and, with the single external frontend, external-frontend-map) for the tagged services: the service includes of the loadbalancer play run for config (site.yml:325-327), and the loadbalancer's own check-containers step is skipped under config (site.yml:319-324), so HAProxy keeps its old frontends. A later -t <svc> reconfigure does not apply them either: in 2025.1 only -t haproxy (or keepalived, loadbalancer) or an untagged run reaches that check step, whose comparison covers services.d (roles/, roles/); that restart is staged, backups first and the VIP holder last (roles/) (Tags §2.2). To diff the frontends, copy /etc/ before genconfig (Controlled batches §2). Changed in 2025.1: the fluentd ensure_image of 2024.1 is gone (roles/ has no kolla_container task), so genconfig no longer needs the registry |
| See what will restart | on each host: docker exec -u root <container> /usr/ (Podman: podman exec -u root …) |
0 = the command matches, no recorded file was dropped and every file listed in config.json's config_files matches its live copy (content, mode, owner). New in 2025.1: 1 when the command of config.json differs from /run_command, written at the last start, so a memcached setting change now shows; and 1 when a destination recorded in the container's defaults state is no longer listed in config.json, which repeats on every run until the container is recreated. permissions, unrecorded removed entries and optional entries whose source is absent are still not compared. 1 = also a listed file that differs or is missing from the container, optional files included (a newly rendered optional file is drift) → restart on the next deploy/reconfigure/deploy-containers. 1 is also returned for a required source missing from /var/ or an invalid config.json; the restarted container then fails kolla_set_configs at start. preserve_properties entries (no perm, so the mode check never matches) and directory sources with subdirectories return 1 on every run. 2 = an unexpected exception, such as a config.json that cannot be opened or a missing /run_command (kolla docker/; Kolla images §3) CODE. What Kolla does with the code depends on the engine: with Docker, 0 = no drift, 1 and 137 = drift, a client error from the exec (container stopped or restarting) = drift, any other code fails the check task (module_utils/, library/); with Podman, a container that is not running is drift before any exec, a client error from the exec = drift, 0 = no drift, 1 = drift, and any other code, 137 included, fails the task (module_utils/). The config check is reached only when the container exists and its parameters match: compare_container stops at the first difference (module_utils/), so a code that would fail the task does not when the image or parameters already differ. Keep -u root: both workers run the check as root (module_utils/, module_utils/), and containers that run as a service user cannot read the root-owned 0660 files in /var/ (Kolla images §3.4). The check runs the set_configs.py of the image the container runs: a container still on a 2024.1 image runs the 2024.1 check, without the command and state checks |
| See what else will restart | compare the image, volumes, dimensions and other parameters of each container with the service definition; read /etc/ |
The check task (compare_container) also reports drift when the container is missing, when one of its compared parameters differs (image, volumes, environment, dimensions, healthcheck, …), or when the unit file on disk differs from the rendered template, whole text compared (module_utils/; module_utils/). kolla_set_configs --check sees none of these. A changed docker_graceful_timeout, docker_client_timeout, docker_restart_policy or docker_restart_policy_retry changes the unit text of every long-running container (F16) |
| Check-mode run | kolla-ansible reconfigure -i multinode --check --diff |
CODE kolla_container and kolla_container_facts do not declare check-mode support (no supports_check_mode in library/ or in library/), so Ansible skips them under --check (ansible-core 2.18.20 lib/) unless the task sets check_mode: false, and many tasks register outputs used later. Changed in 2025.1: kolla_toolbox now declares check-mode support and passes --check to the ansible command it runs inside the kolla_toolbox container (library/); what the inner modules (MySQL, RabbitMQ, OpenStack) then report is NOT AVAILABLE. 86 tasks set check_mode: false (or no) and run for real even under --check (a YAML walk of roles/*/tasks, roles/ and the playbooks): 46 are kolla_container_facts calls, 18 command tasks (for example the RabbitMQ queue listing of the precheck, roles/, and the hacluster authkey generation, roles/), 7 kolla_toolbox calls and 5 kolla_container tasks that start one-shot containers: nova_list_cells (roles/), nova_upgrade_checks (roles/), libvirt_version_check and nova_libvirt_script_check (roles/) and rabbitmq_version_check (roles/). The last is not reached under --check: its block runs only when the preceding kolla_container_facts task found a rabbitmq container, and that task is skipped (roles/). NOT AVAILABLE Whether such a run fails or gives partial results, and which of those tasks it reaches; staging only |
| Pre-deployment checks | kolla-ansible prechecks -i multinode [-t <svc>] |
Sets kolla_action=precheck (kolla_ansible/). Read-only (fact sheet E §5), apart from the commands it runs inside existing containers, e.g. rabbitmqctl list_queues (roles/). -t <svc> skips the prechecks role (untagged play, site.yml:77-86) but runs <svc>/. Changed in 2025.1: the two RabbitMQ variable checks of the prechecks role are gone; the rabbitmq precheck fails when the queues of the running broker are not of the type the configuration expects, under the tag rabbitmq-ha-precheck (roles/; F17); the supported OS and Ansible versions changed (fact sheet E §5) |
2. The first 2025.1 run on a cloud deployed by 2024.1¶
The first deploy, reconfigure, upgrade or deploy-containers that the 2025.1 code runs on a host can restart or
recreate containers whose operator config did not change. Two causes come from the code, and each can be seen before
the run CODE. A third applies to every service that kolla-ansible upgrade has not reached yet, below the table:
| Cause | Containers | How to see it before the run |
|---|---|---|
Unit text (F16). The 2025.1 template adds PartOf=kolla.target (module_utils/, line :27), and the common role installs that target (roles/); check_unit_change compares the whole file (:155-168). A container that the 2025.1 code has not yet created or restarted still has the unit that 2024.1 wrote |
every long-running container not recreated or restarted by 2025.1 code whose role runs the check step, for example one outside the tags of a partial upgrade. A container recreated or restarted by the upgrade got the new unit then | grep -L PartOf=kolla.target /etc/: each file listed differs from the 2025.1 template and its container reports drift. kolla_set_configs --check does not show it |
Default ulimits (Docker, hosts outside the Red Hat family). default_container_dimensions now sets nofile 1048576 with Docker on every host (group_vars/); in 2024.1 it was empty outside the Red Hat family. compare_dimensions compares ulimits (module_utils/) |
every container created by 2024.1 whose service uses default_container_dimensions, most of them (e.g. roles/): it differs and is recreated, not only restarted. The Podman worker filters these limits out of the comparison (module_utils/), so Podman hosts are not affected |
docker inspect -f '{{.HostConfig.Ulimits}}' <container> prints [] for a container created by 2024.1 on such a host. kolla_set_configs --check does not show it |
Image tag. openstack_release defaults to 2025.1 (group_vars/all.yml:795-797) and every image tag follows it
(e.g. roles/keystone/defaults/main.yml:98-100). The check step compares the image
(module_utils/kolla_container_worker.py:75), and the restart handler recreates a container whose image differs,
pulling it first when absent (module_utils/kolla_docker_worker.py:352-372). So a deploy, reconfigure or
deploy-containers moves every service that kolla-ansible upgrade has not reached (the whole cloud before the
upgrade, the services outside the tags after upgrade -t <svc>) to its 2025.1 image through the deploy path, without
the role's upgrade tasks (e.g. roles/keystone/tasks/upgrade.yml:23-34). kolla_set_configs --check does not show it;
compare the image tag of each running container (docker ps) with the 2025.1 tag. Run kolla-ansible upgrade for
those services first.
A container recreated or restarted by 2025.1 code gets the new unit (module_utils/kolla_systemd_worker.py:173-186,
called on create and restart, module_utils/kolla_docker_worker.py:350, :395, :462), so the unit cause appears once.
NOT AVAILABLE What these restarts and recreations do to the running VMs: the sources do not establish it. The
checklist for that run is in Pre-execution checklist
§2.
Related¶
- Kolla images §3 — what
kolla_set_configs --checkcompares, what it never compares, and its exit codes with Docker and Podman - Tags §2.6 — why
--list-tasksshows only placeholders and why some plays list 0 hosts - Pre-execution checklist — step 1 uses
genconfigand the check before a production run - Write config first, apply in controlled batches — applying what
genconfigwrote, batch by batch - Execution flow §4 — the rows
genconfigandprecheckof the action matrix - Repository architecture §6 — the unit template and the default ulimits behind §2
- Technical findings F14, F16, F17 — the blind spots of the check, the unit-text drift and the RabbitMQ queue checks
- Fact sheet E
§5 —
what
precheckschecks - Open questions Q9 — check mode (
--check --diff) usability: NOT AVAILABLE - 2024.1 predict and inspect a run — the same page for 2024.1
To remember
Lumo: if you keep only 5 things from this page, keep these.
- Predict a run with
genconfig, thenkolla_set_configs --checkin each container;--list-tasksis not useful. CODE genconfigwrites/etc/kolla/<svc>/and the haproxyservices.dfiles of the tagged services, and restarts nothing apart from two narrow cases; changed in 2025.1, it no longer pulls the fluentd image. CODE- Changed in 2025.1: the check also compares the container's command with
config.json, and flags a recorded file thatconfig.jsonno longer lists. With Docker, exit 1 (or 137) means drift; with Podman, only 1 does. Keep-u root. CODE - The check sees config files and the command only: a changed image, volume, dimension or systemd unit text also restarts the container. On the first 2025.1 run after an upgrade from 2024.1, every unit without
PartOf=kolla.targetis drift, and with Docker outside the Red Hat family the new default ulimits recreate most containers. CODE - Whether a
--check --diffrun fails or gives partial results is unknown, and the tasks markedcheck_mode: false(86) still run, five of which start one-shot containers: staging only. NOT AVAILABLE
What would you do?
Lumo: a situation you could meet on a real platform, and three ways to react. Pick the one you would choose: I will tell you what this page says about it. Nothing is recorded.
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.