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. Each row of the table gives one command, what it shows and its limits.
Note
Key answers
- Predict a run:
genconfig, thenkolla_set_configs --checkin each container; the meaning of exit codes 0, 1, 2 and 137 is in the same table CODE.--list-tasksis not useful (table below).
| Goal | Command | Notes |
|---|---|---|
| List tags as Ansible sees them | EXTRA_OPTS="--list-tags" kolla-ansible -i multinode deploy |
Works. Shows the inherited task tags (common appears nearly everywhere; list-tags-site.txt) |
| List hosts a run would target | EXTRA_OPTS="--list-hosts" kolla-ansible -i multinode -t nova reconfigure |
Plays with &enable_<svc>_True patterns show 0 hosts: the groups are created at run time (Tags §2.6) |
| List tasks | EXTRA_OPTS="--list-tasks" … |
Not useful: only include_tasks placeholders are shown (Tags §2.6) |
| Render configs without restarting | kolla-ansible -i multinode genconfig [-t <svc>] [--limit <hosts>] |
Writes /etc/ on the targets. All handlers are skipped. Also re-renders haproxy services.d for the tagged services |
| See what will restart | on each host: docker exec -u root <container> /usr/ |
0 = every file listed in config.json's config_files matches its live copy (content, mode, owner). command, permissions, removed entries and stale optional files are not compared, so memcached ("config_files": []) always returns 0. 1 = a listed file differs or a non-optional one is missing from the container → 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 (e.g. prometheus extras already copied into the container) and, in practice, directory sources with subdirectories return 1 on every run (Tags §3). 137 is also treated as drift. 2 = an unexpected exception, such as a missing config.json or a newly rendered optional file not yet in the container (e.g. nova-compute release); the latter is real drift, and it gives 2 only if no entry listed before it differs (otherwise 1). On 2, or any code other than 0, 1 and 137, kolla_docker fails the check task instead of restarting CODE (kolla_docker.py:566-578,, kolla docker/, kolla docker/). Details: Kolla images §3. Keep -u root: Kolla runs the check as root (kolla_docker.py:544-578), and containers that run as a service user cannot read the root-owned 0660 files in /var/ |
| Check-mode run | EXTRA_OPTS="--check --diff" kolla-ansible … reconfigure |
CODE kolla_docker does not declare check-mode support (kolla_docker.py:1031-1035), so Ansible skips it under --check (ansible 2.9.27 lib/). Many tasks register outputs used later. NOT AVAILABLE Whether such a run fails or gives partial results; staging only |
| Pre-deployment checks | kolla-ansible -i multinode prechecks [-t <svc>] |
Read-only (fact sheet E). -t <svc> skips the prechecks role (untagged) but runs <svc>/ |
Related¶
- Kolla images §3 — what
kolla_set_configs --checkcompares, what it never compares, and its exit codes - 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 - Fact sheet E
§5 —
what
precheckschecks - Open questions Q9 — check mode (
--check --diff) usability: NOT AVAILABLE
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>/on the targets and skips all handlers, but also re-renders haproxyservices.dfor the tagged services.- Exit 1 (or 137) means drift: a restart on the next
deploy/reconfigure/deploy-containers; on 2 or any other code,kolla_dockerfails the check task instead of restarting. CODE - Keep
-u rooton the check: containers that run as a service user cannot read the root-owned files in/var/lib/kolla/config_files. - Whether a
--check --diffrun fails or gives partial results is unknown: 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: 2 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.