Deployment execution flow¶
How Kolla-Ansible 2025.1 decides what runs when: play order, the steps inside each role, handler flush points,
batching, and how deploy, reconfigure, upgrade, deploy-containers, genconfig, pull, stop and the new
check differ.
Note
Key answers
- There is no dependency resolution. Order comes from play order (
commonis a play of its own, not a role dependency), task order inside a role, handler flush points,serial, the restart plays that MariaDB and RabbitMQ handlers fill throughgroup_by, and the etcd handlers that restart the non-leaders before the leader CODE (§1). - Changed in 2025.1: the network plays come before Nova.
openvswitch,ovs-dpdk,ovn-controllerandovn-dbrun beforenova.yml, andneutronright after it CODE (§2.2). - What each action does (
deploy,reconfigure,upgrade,deploy-containers,genconfig,pull,stop,prechecks,validate-configand, new in 2025.1,check): the action matrix (§4).genconfig, thendeploy-containers --limit <batch>, is still the only built-in way to separate "write the config" from "apply it". Changed in 2025.1:genconfigno longer pulls the fluentd image. - Changed in 2025.1: one shared step decides every restart. The config tasks no longer notify handlers; each
role's
check-containersstep notifies only the containers thatcompare_containerfound changed CODE (§3). - Batching: a batch runs the complete play, handler restarts included, before the next batch starts, but each play
is still traversed batch by batch for the whole fleet before the next play starts. MariaDB and RabbitMQ apply their
role to all hosts in one batch, then restart the notified hosts in separate plays with
serial: "33%"; the etcd play has noserial. Changed in 2025.1:reconfigureandupgradealways passkolla_serial=0, after your own-e, sokolla_serialbatches only the other commands (§5). reconfigureon a running cloud still runs the DB sync containers of keystone, glance, cinder, placement, nova, neutron, heat and others CODE (§6).- What one compute host goes through in a full
deploy, in order (§2.4). On a fresh compute,openvswitchnow starts beforenova_compute;neutron_openvswitch_agentstill starts after it. - Changed in 2025.1:
-t <svc>no longer restarts HAProxy. The loadbalancer play's final check step carries only thehaproxy,keepalivedandloadbalancertags, so a run limited to a service tag rewrites its frontend file but leaves HAProxy running the old configuration until a later run reaches that step CODE (§7 item 4). - Restart order is handler definition order, not notification order CODE, and the handlers of a play run on all notified hosts in lockstep (§7).
Deployment order (this page) ≠ runtime communication (see Component dependencies). Arrows in the diagrams below mean "runs before", unless a diagram explicitly says it shows runtime calls.
1. How the order is decided¶
There is no dependency resolution in Kolla-Ansible 2025.1. Order comes from these mechanisms only CODE:
| Mechanism | Effect | Evidence |
|---|---|---|
Play order in site.yml / nova.yml / mariadb.yml / rabbitmq.yml |
Services are applied strictly in file order. Ansible's default linear strategy runs play N on all its hosts (per batch) before play N+1 |
ansible/, generated list in Generated inventory §1 |
Role meta dependency on common |
None. No role has a meta/ directory. common is the Apply role common play, run after the prechecks play and before the loadbalancer play, on the cron, fluentd, kolla-logs and kolla-toolbox hosts, tagged common |
site.yml:88-103, roles/ |
| Task order inside a role | Fixed sequence: register → config(-host) → check-containers → bootstrap → flush handlers (§3) | roles/ |
| Handler flush points | Restarts happen at meta: flush_handlers (end of most deploy.yml) or at the end of the play. The loadbalancer role deliberately defers to the end of its play |
e.g. roles/; roles/ |
| Restart plays filled by handlers | MariaDB and RabbitMQ handlers only put hosts into groups (group_by); the following plays of mariadb.yml / rabbitmq.yml restart those groups with serial: "33%" |
roles/, mariadb.yml:18-68; roles/, rabbitmq.yml:30-49 |
| Restart handlers that stage etcd | The etcd handlers look up the cluster leader, restart the non-leaders through a handler that loops over groups.etcd.index(host) % 4 (on upgrade, a loop over the etcd hosts), then restart the leader, whose handler is defined after them; each restart waits for the client port and for etcdctl endpoint health |
roles/, roles/ |
serial / kolla_serial |
Splits a play into batches; each batch completes the whole play, handlers included, before the next starts | serial: '{{ kolla_serial|default("0") }}' on the gather-facts plays (gather-facts.yml:11,), the common play and every service play, except the plays of mariadb.yml and rabbitmq.yml (no serial, or a fixed "33%" on the restart plays), the etcd play, which has no serial key (site.yml:485-496), and cyborg, which reads serial: '{{ serial|default("0") }}' (site.yml:874), so kolla_serial never batches it. The group_by and prechecks plays have no serial key either (site.yml:7-86) |
Conditions only remove work, never reorder it:
when: enable_<svc>on the role;- the host-pattern intersection
&enable_<svc>_True; - per-task
when:onkolla_action; - placement filters (
inventory_hostname in groups[...],service_enabled_and_mapped_to_host, and theselect_services_enabled_and_mapped_to_hostfilter that the shared roles of 2025.1 loop over).
max_fail_percentage, set on almost every play, does not reorder anything either: it can only stop a run earlier
(§5).
2. The five diagrams¶
2.1 Infrastructure services (deployment order)¶
CODE (gather-facts.yml, site.yml:1-496, mariadb.yml, rabbitmq.yml)
flowchart TB
F["gather-facts (all hosts; delegated when --limit)"] --> G["group_by: kolla_action, enable_* flags"]
G --> P["prechecks (only kolla_action=precheck)"]
P --> CO["common (own play, tag common: fluentd, kolla_toolbox, cron)"]
CO --> HA["loadbalancer: haproxy + keepalived (+ proxysql)<br/>+ 38 per-service loadbalancer includes<br/>+ one loadbalancer check-containers step<br/>(handlers flushed at END of this play)"]
HA --> LE["letsencrypt (only with enable_letsencrypt)"]
LE --> MON["collectd → influxdb → telegraf → redis → valkey (new)"]
MON --> DB["mariadb.yml: apply role (no serial) → restart / start plays (serial 33%) → bootstrap-host restart → post-config"]
DB --> MC["memcached"]
MC --> PR["prometheus → iscsi → multipathd"]
PR --> MQ["rabbitmq.yml: rabbitmq → restart (serial 33%) → post-config"]
MQ --> QD["etcd (no serial; leader restarted last by its handlers)"]
QD --> KS["keystone ⇒ control plane (2.2)"]
style HA fill:#ffe9b3
style DB fill:#ffd6d6
style MQ fill:#ffd6d6
Changed since 2024.1:
- A
valkeyplay runs after theredisplay (site.yml:399-411). - The loadbalancer play includes the
loadbalancertasks of 38 roles (39 in 2024.1: theswiftrole is gone), then runs theloadbalancerrole'scheck-containersonce, skipped forgenconfig(site.yml:121-327, final step at:319-324). The whole block runs only fordeploy,reconfigure,upgradeandgenconfig(:325-327). - Under
--limit, the hosts that facts are delegated to come from the newkolla_ansible_delegate_facts_hosts, which defaults togroups['all'](gather-facts.yml:47,group_vars/all.yml:43); see Compute scaling.
mariadb.yml, rabbitmq.yml and nova.yml are unchanged since 2024.1 (same text). OpenSearch still comes after
Keystone (site.yml:512-524).
2.2 OpenStack control plane (deployment order)¶
CODE (site.yml:498-1072, nova.yml)
flowchart LR
KS["keystone"] --> OS["opensearch"] --> RGW["ceph-rgw"] --> GL["glance"] --> IR["ironic"] --> CI["cinder"] --> PL["placement"]
PL --> NET1["openvswitch / ovs-dpdk → ovn-controller → ovn-db (2.5)"] --> NOVA["nova.yml (2.3)"]
NOVA --> NET2["neutron → kuryr (2.5)"]
NET2 --> HC["hacluster"] --> HE["heat"] --> HO["horizon"] --> MISC["magnum → mistral"]
MISC --> MA["manila"] --> TEL["gnocchi → ceilometer → aodh"] --> BA["barbican"] --> MORE["cyborg → designate → trove → watcher → grafana → cloudkitty → tacker"]
MORE --> OC["octavia"] --> TAIL["zun → blazar → masakari → venus → skyline"]
site.yml has 50 Apply role plays, prechecks and common included (site.yml:77-1072). Changed since 2024.1:
the swift play is gone, a valkey play is added, and the openvswitch, ovs-dpdk, ovn-controller and ovn-db
plays moved from after nova.yml to before it (site.yml:605-665, import of nova.yml at :667); neutron follows
nova.yml directly (:669-691).
Notable order facts CODE:
- Keystone comes after MariaDB, RabbitMQ and memcached, but before any service that registers with it.
service-ks-registerusesopenstack_interface(internal) and authenticates againstkeystone_internal_url(roles/service-ks-register/defaults/main.yml:5,group_vars/all.yml:823, :1096, :1126-1127). - Placement, Glance and Cinder come before Nova. Open vSwitch and OVN now come before Nova too; Neutron still comes after Nova (see §2.5).
- Barbican comes after Nova, Cinder and Glance, even though they can be configured to use it as a key manager.
With
enable_barbican, Nova and Cinder render a[barbican]section (roles/nova/templates/nova.conf.j2:205-210,roles/nova-cell/templates/nova.conf.j2:249-254,roles/cinder/templates/cinder.conf.j2:262-267), and their plays run before the barbican play (site.yml:574, :667, :851). On a first deploy they therefore start configured with a[barbican]section before Barbican exists. NOT AVAILABLE Whether this has any effect before encrypted volumes are used. - Octavia is near the end. With
octavia_auto_configure(default: true when the amphora provider is enabled,group_vars/all.yml:1411), its play creates the amphora flavor, the keypair, the security groups and the management network, subnet and (for IPv6) router (roles/octavia/tasks/deploy.yml:4-5,prepare.yml:2-161). No task of the role uploads the amphora image, and the certificates come from the separateoctavia-certificatescommand, which also accepts--check-expiry <days>(kolla_ansible/cli/commands.py:198-228) (fact sheet D).
2.3 Nova deployment (ansible/nova.yml)¶
flowchart TB
subgraph P1["Play 1: Bootstrap nova API databases — hosts nova-api (tags nova, nova-bootstrap, nova-api, nova-api-bootstrap)"]
A1["mysql_db nova_api + nova_cell0 (run_once, kolla_toolbox)"] --> A2["mysql_user grants (run_once)"] --> A3["config_bootstrap: /etc/kolla/nova-api-bootstrap (run_once)"]
A3 --> A4["nova_api_bootstrap container: api_db sync + db sync (run_once)"] --> A5["nova_api_map_cell0 + list_cells for cell0 (+ update cell0 if its DB URL differs) (delegate groups['nova-api'][0])"]
A5 -->|"map_cell0 changed"| A6["nova_api_bootstrap again"]
end
subgraph P2["Play 2: Bootstrap nova cell databases — hosts nova-conductor, any_errors_fatal"]
B1["cell DB + user (on groups[nova_cell_conductor_group][0])"] --> B2["RabbitMQ vhost/user (service-rabbitmq, delegated to the cell RPC group's first host)"] --> B3["nova-cell-bootstrap config"] --> B4["nova_cell_bootstrap container (cell db sync)"] --> B5["list_cells → create_cell or update_cell"]
end
subgraph P3["Play 3: Apply role nova — nova-api, nova-scheduler, nova-super-conductor"]
C1["service-ks-register (run_once)"] --> C2["config.yml"] --> C3["check-containers"] --> C4["flush: super-conductor → scheduler → api → metadata"]
end
subgraph P4["Play 4: Apply role nova-cell — compute, nova-compute-ironic, nova-conductor, consoles"]
D0["version-check (new): libvirt version and kolla_nova_libvirt_start in the nova_libvirt image"] --> D1["config-host (br_netfilter, sysctl, udev, qemu-kvm mask)"] --> D2["config.yml (nova.conf, libvirt, ssh, ceph, hostnqn)"] --> D3["check-containers"] --> D4["flush: conductor → consoles → ssh → libvirt → libvirt ready check + SASL user → compute"] --> D5["wait for nova-compute registration (first compute of batch, delegated to conductor[0], 20×10s)"] --> D6["list_cells + discover_hosts --by-service (delegated to conductor[0])"]
end
subgraph P5["Play 5: Refresh scheduler cell cache — kill -HUP nova_scheduler (deploy/reconfigure)"]
end
subgraph P6["Plays 6-10: reloads + online data migrations — upgrade only (both migration plays any_errors_fatal)"]
end
P1 --> P2 --> P3 --> P4 --> P5 --> P6
CODE (nova.yml:29-302; roles/nova/tasks/bootstrap.yml:2-56, config_bootstrap.yml, bootstrap_service.yml:2-21,
map_cell0.yml:2-67; kolla docker/nova/nova-api/extend_start.sh:16-20; roles/nova-cell/tasks/bootstrap.yml:2-43,
roles/nova-cell/tasks/rabbitmq.yml:3-29, roles/nova-cell/tasks/create_cells.yml:2-55;
roles/nova-cell/tasks/version-check.yml:2-120, roles/nova-cell/tasks/config-host.yml:2-53,
roles/nova-cell/tasks/config.yml:248-257; roles/nova-cell/tasks/deploy.yml:5-39,
roles/nova-cell/tasks/wait_discover_computes.yml:27-28,42-43,87-90, roles/nova-cell/tasks/discover_computes.yml:5,14-21;
handler order roles/nova/handlers/main.yml:2,19,36,53, roles/nova-cell/handlers/main.yml:2-159;
roles/nova/tasks/refresh_scheduler_cell_cache.yml:10)
Changed since 2024.1 (nova.yml itself is unchanged):
- The nova-cell play starts with
version-check.yml(roles/nova-cell/tasks/deploy.yml:5). It runs one-shot containers from the targetnova_libvirtimage on the firstnova-libvirthost (run_once,delegate_to), fails the play if the new libvirt is older than the running one (tagnova-libvirt-version-check,roles/nova-cell/tasks/version-check.yml:2-77), and fails it if the image lacks/usr/local/bin/kolla_nova_libvirt_start(tagnova-libvirt-script-check,:79-120). Both asserts can be bypassed only by skipping their tag. - The nova-cell
post-config.ymlstep, which removed the oldnova_libvirt_secretsvolume, is gone; the volume is now only removed bynova-libvirt-cleanup(roles/nova-cell/tasks/libvirt-cleanup.yml:52-55). - The nova role has a
Restart nova-metadata containerhandler after the API one (roles/nova/handlers/main.yml:53).
Details and Nova runtime dependencies: Nova deep dive.
2.4 Compute node deployment (what one compute host experiences)¶
Sequence on one compute host during a full deploy, with the default enable flags (neutron_plugin_agent:
"openvswitch", group_vars/all.yml:332) and the multinode inventory groups (iscsi only with enable_iscsid)
CODE (facts and group_by first (site.yml:2,7-75); play order site.yml:88-103, :454-467, :605-619,
nova.yml:125-147 (imported at site.yml:667), site.yml:669-691; task and handler order in each role's
tasks/deploy.yml and handlers/main.yml; common in its own play (site.yml:88-103,
roles/common/tasks/deploy.yml:2-9); discovery on the first compute of the batch only, delegated to the first
conductor, roles/nova-cell/tasks/wait_discover_computes.yml:42-43,87-90 and discover_computes.yml:21):
sequenceDiagram
autonumber
participant D as Deploy host
participant C as compute001
D->>C: setup (facts), group_by (always)
Note over D,C: Play "common" (compute is in the common group)
D->>C: common: config dirs, kolla.target, config.json ×3, fluentd.conf, cron logrotate config, toolbox Erlang cookie, rabbitmq-env.conf, erl_inetrc
D->>C: common: check containers (fluentd, kolla_toolbox, cron), create kolla_logs volume, link /var/log/kolla
D->>C: handlers (changed containers only): Restart fluentd → kolla_toolbox (+ toolbox init) → cron
Note over D,C: Play "iscsi" (only if enable_iscsid)
D->>C: configfs module, iscsid config/check → Restart iscsid
Note over D,C: Play "openvswitch" (now before Nova)
D->>C: load openvswitch module, config, check → Restart openvswitch_db → wait ovsdb → Restart vswitchd
D->>C: post-config: set system-id, hostname and hw-offload through openvswitch_db (notifies vswitchd restart), bridge ensure only if computes need external bridge
Note over D,C: Play "nova-cell" (after controllers' nova plays have bootstrapped DBs/cell)
D->>C: version check (one-shot libvirt containers on the first nova-libvirt host; per host, libvirtd --version in the running nova_libvirt if its image differs)
D->>C: br_netfilter, sysctl, udev kvm rule, config dirs, config.json, nova.conf, qemu.conf, libvirtd.conf, SASL, ssh keys, hostnqn
D->>C: check nova-cell containers
D->>C: handlers: Restart nova-ssh → nova-libvirt → libvirt ready check → Create libvirt SASL user → nova-compute
D->>C: (first compute of batch only) wait for nova-compute services, discover_hosts — delegated to conductor[0]
Note over D,C: Play "neutron"
D->>C: plugin/agent check, ip6_tables module, sysctl (only on l3 hosts), config (neutron.conf, openvswitch_agent.ini), check
D->>C: handler: Restart neutron-openvswitch-agent
The common steps are roles/common/tasks/config.yml, check-containers.yml:2-3 (the shared
service-check-containers role) and bootstrap.yml:2-16. Changed in 2025.1: the common config step installs
/etc/systemd/system/kolla.target (roles/common/tasks/config.yml:54-58) and no longer ensures or pulls the fluentd
image (no ensure_image task in the file). The iscsi play loads configfs first (roles/iscsi/tasks/config-host.yml:2-10).
The openvswitch roles/openvswitch/tasks/post-config.yml:3-53 runs after the role's flush (roles/openvswitch/tasks/deploy.yml:8-11), so a
vswitchd restart it notifies runs at the end of the play. The neutron play starts with
neutron_plugin_agent_check.yml (roles/neutron/tasks/deploy.yml:2); its module and sysctl steps are
roles/neutron/tasks/config-host.yml:2-34.
NOT AVAILABLE How many task results, skips and handlers a compute host or a controller produces in a full
deploy: that depends on the inventory, the enable flags and the when: conditions met at run time. The first
controller also runs the run_once and delegated bootstrap tasks (e.g. roles/nova/tasks/map_cell0.yml:63-64).
Ordering consequence (changed in 2025.1): on a fresh compute, openvswitch_db and openvswitch_vswitchd now
exist before nova_compute is started and its registration awaited, but neutron_openvswitch_agent is still started
after them. NOT AVAILABLE Whether instances can be scheduled there successfully before the neutron play finishes
(Nova deep dive §3 item 6). On a
running cloud this ordering matters when you add computes with --limit (see Add a compute node
§2). With neutron_plugin_agent: ovn, the
ovn-controller play also runs before Nova (site.yml:635-647).
2.5 Networking components¶
flowchart TB
subgraph Order["Deployment order"]
direction TB
O1["loadbalancer play: neutron-server frontend"] --> O2["openvswitch play: openvswitch_db → vswitchd (network, compute, manila-share)"]
O2 --> O2b["post-config: system-id, hostname, hw-offload; br-ex + external interface on network nodes"]
O2b --> O3["ovs-dpdk play (instead of openvswitch when enable_ovs_dpdk)"]
O3 --> O4["ovn-controller play (if neutron_plugin_agent=ovn): config, check, br-int and OVN settings in OVSDB, ovn_controller"]
O4 --> O4b["ovn-db play: NB/SB DB cluster, northd"]
O4b --> NV["nova.yml (2.3)"]
NV --> O5["neutron play: plugin check → register → config-host → config → check → bootstrap (DB/user and DB-sync container) → flush"]
O5 --> O6["kuryr (if enabled)"]
end
subgraph Within["Inside the neutron play (all hosts in parallel)"]
N1["neutron-server (controllers)"]
N2["l3 / dhcp / metadata / ovs agents (network nodes)"]
N3["ovs agent (+ l3/metadata if DVR) or ovn-metadata agent (computes)"]
end
O5 --> Within
CODE (site.yml:605-705; inventory/multinode:105-108; roles/openvswitch/tasks/deploy.yml:2-11,
roles/openvswitch/tasks/post-config.yml:3-53; roles/ovn-controller/tasks/deploy.yml:2-9, setup-ovs.yml;
roles/ovn-db/tasks/deploy.yml:2-22;
roles/neutron/tasks/deploy.yml:2-23, roles/neutron/tasks/bootstrap.yml:38, roles/neutron/tasks/bootstrap_service.yml:2-21)
The OVN controller play still runs before the OVN database play (site.yml:635-647 then :649-665), and both now
run before Nova. The neutron play deploys the server and all agents in a single play and a single handler flush.
Agents are not deployed after the server has been verified. NOT AVAILABLE Whether the RPC layer tolerates the agents
starting first. The OVN southbound relay group ovn-sb-db-relay is covered on the OVN page.
3. Inside a role: the standard deploy sequence¶
Typical deploy.yml (Nova shown; Neutron adds a plugin check and config-host and runs its bootstrap before the
flush; nova-cell adds the version check):
| Step | Typical task file | Scope | Runs on reconfigure? |
|---|---|---|---|
| 1. Keystone registration | register.yml → service-ks-register |
run_once (per batch) via kolla_toolbox on the first host of the play |
yes |
| 2. Host configuration | config-host.yml (sysctl, modules, udev) |
per host | yes |
| 3. Config generation | config.yml (dirs, config.json, INI merges, policy, certs). Changed in 2025.1: it notifies no handler, apart from two narrow cases (Conventions, row writes-config) |
per host × per service × per file | yes |
| 4. Container check | check-containers.yml → shared service-check-containers role: compare_container once per enabled container mapped to the host (container parameters, image, systemd unit file, kolla_set_configs --check), then notify Restart <service> container for the changed ones only |
per host × per container | yes |
| 5. Bootstrap | bootstrap.yml (DB, user, grants) + bootstrap_service.yml (one-shot container: DB sync) |
run_once / first host of the group |
yes for most roles, Neutron included: its bootstrap_neutron DB-sync container has no kolla_action or neutron_enable_rolling_upgrade condition (roles/, bootstrap_service.yml:2-21) |
| 6. Flush handlers | meta: flush_handlers |
notified hosts, in handler definition order | yes |
| 7. Post steps | e.g. openvswitch post-config.yml, nova-cell discovery |
varies | yes |
CODE (roles/nova/tasks/deploy.yml:2-9; roles/neutron/tasks/deploy.yml:2-23;
roles/service-check-containers/tasks/main.yml:4-41; module_utils/kolla_container_worker.py:58-65)
The containers are driven by the kolla_container module, which hands the work to a Docker or a Podman worker, after
kolla_container_engine, which defaults to docker (library/kolla_container.py:409-416, group_vars/all.yml:100).
The module_utils/kolla_docker_worker.py lines cited on this page are those of the Docker worker. How the restart is
decided, step by step, is in Repository architecture §4.3.
Order caveats:
- Some roles bootstrap before containers start, some after. Nova bootstraps in separate plays before the service
plays (
nova.yml:29-100). Neutron runs its bootstrap after check-containers but before the flush (roles/neutron/tasks/deploy.yml:13-23). Keystone bootstraps before its flush and registers last, after Fernet key distribution (roles/keystone/tasks/deploy.yml:2-21). Glance and Cinder vary (fact sheets B, C). - The loadbalancer role does not flush in
deploy.yml. The NOTE inroles/loadbalancer/tasks/deploy.yml:8-11explains that site.yml handles all haproxy changes in that play, so the restart happens once, at the end of the play, after all per-service frontends are rendered and the play's lastcheck-containersstep has compared the loadbalancer containers (site.yml:319-324).
4. Action matrix: what each kolla_action does¶
| Action (CLI) | Config written | Containers compared | Handlers (restarts) | Bootstrap / DB sync | Keystone registration | Images pulled | Notes |
|---|---|---|---|---|---|---|---|
deploy |
yes | yes | yes | yes | yes | only if absent | Full flow (kolla_ansible/) |
reconfigure |
yes | yes | yes | yes (most roles) | yes | only if absent | Identical to deploy in 53 of the 54 roles that have a reconfigure.yml (bifrost is the exception; skyline uses include_tasks: deploy.yml) (Repository architecture §4.2). The command always adds kolla_serial=0 (kolla_ansible/) |
upgrade |
yes | yes | yes | yes: most roles re-run the deploy KOLLA_BOOTSTRAP one-shot with the new image (cinder, heat, barbican, octavia, manila, horizon, placement, legacy glance/neutron). Upgrade-only one-shots: keystone KOLLA_UPGRADE then KOLLA_FINISH_UPGRADE, run as handlers (roles/, roles/); neutron rolling (default, roles/) NEUTRON_DB_EXPAND/NEUTRON_DB_CONTRACT; glance rolling (opt-in, glance_enable_rolling_upgrade: "no", group_vars/) GLANCE_DB_EXPAND/MIGRATE/CONTRACT (roles/); mariadb upgrade_mariadb (roles/); KOLLA_OSM online migrations (nova, placement, cinder, rolling ironic). Nova bootstrap_upgrade re-runs its deploy db-sync container, minus DB creation and cell0 mapping (roles/, Kolla images §4) |
yes (some roles) | only if absent → run pull first |
Nova reload plays and the separate KOLLA_OSM online-migration containers are active only here. The command always adds kolla_serial=0 (kolla_ansible/). Placement's bootstrap container also runs placement-manage db online_data_migrations on every deploy/reconfigure (kolla docker/); so does Ironic's with ironic_enable_rolling_upgrade: no (roles/, kolla docker/; the default is "yes", roles/) |
deploy-containers |
no | yes (incl. drift of the files listed in config_files and, new in 2025.1, of the command in config.json; not permissions changes, see below) |
yes | no | no | only if absent | tasks/ = check-containers.yml (e.g. roles/). The loadbalancer includes and their final check are skipped (site.yml:325-327) (kolla_ansible/) |
genconfig (config) |
yes | no | none, apart from two narrow cases (changed in 2025.1): the config tasks no longer notify handlers, so most handlers lost their kolla_action != "config" guard; the two config tasks that still notify can restart placement-api (with placement_wsgi_provider: apache) and cinder-volume (with Huawei XML files) (Conventions, row writes-config). The loadbalancer play's check-containers step is skipped (site.yml:319-324) |
no | no | no (changed in 2025.1: 2024.1 pulled the fluentd image if absent; 2025.1 roles/ has no ensure_image task) |
kolla_ansible/. With octavia_auto_configure, octavia's config tasks still query the cloud through kolla_toolbox (roles/) |
pull |
no | no | no | no | no | yes, every enabled container mapped to the host, plus common (in its own play) |
service-images-pull (roles/); kolla_ansible/ |
stop |
no | no | no | no | no | no | stop_container for every enabled container on the host, honouring skip_stop_containers; new in 2025.1, --ignore-missing passes kolla_action_stop_ignore_missing so missing containers do not fail the task (roles/). The command refuses to run without --yes-i-really-really-mean-it (kolla_ansible/) |
prechecks (precheck) |
no | no | no | no | no | no | prechecks role + each role's precheck.yml (port checks, group validation) (kolla_ansible/) |
validate-config (config_validate) |
no | no | no | no | no | no | kolla_ansible/. Runs oslo-config-validator inside each running container that has a validation list, and writes the errors under service_config_validate_output_dir on the deploy host (roles/, validate.yml:2-50) |
check (new in 2025.1) |
no | no | no | no | no | no | kolla_ansible/. 52 roles have a check.yml that imports service-check, which reads the role's containers with kolla_container_facts and fails the host when one is missing, not running or unhealthy (roles/). A failed host counts for max_fail_percentage like in any other run (§5). NOT AVAILABLE Real output, and how far a check run goes after the first failure (to be confirmed by the community) |
The combination genconfig → (review the diff) → deploy-containers --limit <batch> is the only built-in way to
separate "write the config" from "apply it", and to apply in controlled batches. It works because compare_container
detects drift in the files listed in each config.json's config_files (content, mode, owner) through
kolla_set_configs --check CODE (module_utils/kolla_container_worker.py:58-65,
module_utils/kolla_docker_worker.py:146-181, kolla docker/base/set_configs.py:178-211, :233-255, :655-657). With
Podman, the worker returns "changed" when the container is not running, then runs the same check
(module_utils/kolla_podman_worker.py:524-552).
Changed in 2025.1: a change of command in config.json is now detected. --check compares the command of
config.json with the command the container was started with (/run_command) and exits 1 when they differ
(ConfigFileCommandDiffers, kolla docker/base/set_configs.py:41-44, :580-586; /run_command is written at start,
:324-330). Every memcached setting, for example, is in its command (roles/memcached/templates/memcached.json.j2:2),
so in 2025.1 a memcached setting change written by genconfig is applied by the next deploy-containers,
deploy or reconfigure; in 2024.1 deploy-containers never applied it. A change confined to the permissions list of config.json is still not
compared: the check path runs only the command check and the file check (set_configs.py:655-657), not
handle_permissions (:347). NOT AVAILABLE Which existing containers report a command difference at the first 2025.1
run (to be confirmed by the community).
An optional file that newly appears, and whose destination does not exist in the container yet, counts as drift:
--check exits 1 and the restart copies the file CODE (kolla docker/base/set_configs.py:178-185, :237-255,
:660-662, module_utils/kolla_docker_worker.py:164-177). New in 2025.1: a file that was listed earlier and is no
longer listed in config.json counts as drift too (StateMismatch, set_configs.py:589-636). See Write config
first, apply in controlled batches
§2
and Kolla images §3.
5. Batching (serial) and its interaction with order¶
gantt
dateFormat X
axisFormat %s
title Play execution with kolla_serial=2 (illustrative, 4 computes, deploy)
section openvswitch play
batch 1 (compute001-002) :b1, 0, 15s
batch 2 (compute003-004) :b2, after b1, 15s
section nova-cell play
batch 1 (compute001-002) config→check→flush→discover :a1, after b2, 30s
batch 2 (compute003-004) config→check→flush→discover :a2, after a1, 30s
The bar lengths are illustrative only; no duration is known from the code.
- A batch runs the complete play before the next batch starts. That includes handler restarts and the compute
discovery: ansible-core 2.18.20 runs the whole play once per batch, restricting the inventory to that batch
(
lib/ansible/executor/playbook_executor.py:183-191). Batches therefore bound the number of simultaneous restarts per play, but each play is still traversed batch by batch for the whole fleet before the next play starts. The neutron agents on compute001 are restarted only after all computes have finished the openvswitch and nova-cell plays. run_oncetasks run once per batch (Tags §2.5): the linear strategy sends arun_oncetask to the first host of the current batch only (lib/ansible/plugins/strategy/linear.py:178, :205-206). Examples: DB sync, Keystone registration, compute discovery (wait_discover_computes.ymlruns forall_computes_in_batch[0]), and the new nova-cell version check.- MariaDB and RabbitMQ are not batched by
kolla_serial. Their role plays run all hosts in one batch; their handlers only add the hosts to restart groups, and the next plays restart those groups withserial: "33%"(mariadb.yml:18-52,rabbitmq.yml:30-49). With three nodes that is one node per batch (ansible-core 2.18.20lib/ansible/utils/helpers.py:28-30). Each RabbitMQ node is put into maintenance mode before its restart (roles/rabbitmq/tasks/restart_services.yml:10-20) (fact sheet B). - etcd is not batched by
kolla_serial. Its play has noserialkey (site.yml:485-496); its handlers stage the restarts instead (§7 item 6). cyborg is not batched bykolla_serialeither: its play readsserialinstead (site.yml:874). - How
kolla_serialis set depends on the command (changed in 2025.1). TheANSIBLE_SERIALenvironment variable of 2024.1 is gone:ANSIBLE_SERIAL = 0is now a constant (kolla_ansible/cli/commands.py:20-22), andreconfigureandupgradealways addkolla_serial=0(:136, :278). That value is passed after your own-e(kolla_ansible/ansible.py:261-266), and ansible-core keeps the last value of a repeated extra var (lib/ansible/utils/vars.py:94-105, :198-224), sokolla-ansible reconfigure -e kolla_serial=1runs every play withkolla_serial=0CODE (to be confirmed by the community).deploy,deploy-containers,pull,genconfig,stop,checkand the others add nokolla_serial, so-e kolla_serial=Nbatches them (kolla_ansible/cli/commands.py:231-256). To batch a reconfiguration, usegenconfigthendeploy-containers -e kolla_serial=N, or--limit(Controlled batches). max_fail_percentageon the plays. Every play ofsite.yml,gather-facts.yml,mariadb.ymlandrabbitmq.yml, and every play ofnova.ymlexcept the cell bootstrap and the two online-migration plays (which useany_errors_fatal: true), setsmax_fail_percentagefrom<service>_max_fail_percentage, thenkolla_max_fail_percentage, then 100 (e.g.site.yml:10-13,95-99,nova.yml:40-43,77-79).globals.ymlsays that 100 is equivalent to not setting it (etc/kolla/globals.yml:27-31). In ansible-core 2.18.20 the check compares the hosts failed in the current batch with the batch size (lib/ansible/plugins/strategy/linear.py:336-347; the failed-host list is cleared at the start of each batch,lib/ansible/executor/task_queue_manager.py:334, :386-387), so a lower value stops the play, and the rest of the run, once that share of a batch has failed (lib/ansible/executor/playbook_executor.py:194-196, :214-215). Whatever the value, a batch in which every host failed ends the run (playbook_executor.py:199-204). This applies tochecktoo, where a failed host is a host with a missing, stopped or unhealthy container.
6. Initial deployment vs reconfiguration: what actually differs¶
| Aspect | Initial deploy (empty hosts) |
reconfigure on a running cloud |
|---|---|---|
| Containers | All create+start: the container check finds no container, and the restart handler then starts a new one under its systemd unit CODE (module_utils/, module_utils/). Exception: on the bootstrap host (groups[mariadb_shard_group][0]), mariadb runs first as the one-shot bootstrap_mariadb, then a handler starts it with --wsrep-new-cluster and waits for its port and WSREP sync, and the "Restart bootstrap mariadb service" play runs recreate_or_restart_container on it (roles/, bootstrap_cluster.yml:2-27, roles/, mariadb.yml:54-68, roles/). NOT AVAILABLE Container counts, which depend on the inventory and the enable flags |
Restart (config) or recreate (image or params) only if drift is detected; otherwise none CODE (module_utils/, module_utils/). At the first run after an upgrade from 2024.1, some differences come from 2025.1 itself (the systemd unit, the default ulimits with Docker): see Repository architecture §4.3 |
| One-shot containers | DB bootstrap for every service, MariaDB and RabbitMQ bootstrap, fernet key generation, cell creation | DB sync containers still run for keystone, glance, cinder, placement, nova (API and cell DB sync, plus map_cell0, list_cells for cell0 and list_cells ×2), neutron, heat, plus barbican, octavia and others CODE (in these roles reconfigure.yml imports deploy.yml and the bootstrap containers have no kolla_action guard, e.g. roles/; nova: nova.yml:49-55,, roles/, list_cells from roles/ and discover_computes.yml:5; neutron: roles/). MariaDB/RabbitMQ bootstrap and the keystone Fernet bootstrap (when: groups['keystone_fernet_running_True'] is not defined, roles/) are not re-run |
| Handler order effects | Every handler fires | Only notified handlers fire, and changed in 2025.1, only for the containers reported changed: the loop-notify of 2024.1 is gone (Tags §2.4) |
Neutron DB sync (bootstrap_neutron) |
runs | runs too (no condition on kolla_action or neutron_enable_rolling_upgrade, roles/). The DB/user/grant tasks run as well |
| Nova cell | create_cell |
update_cell only if the transport URL or DB URL changed (roles/) |
| Fernet keys | generated | re-distributed from the first running keystone_fernet node to the others (fact sheet B §3.6, task flow in §3.3) |
| MariaDB | Galera bootstrap on the first host of the shard | cluster lookup; if the container changed, restart plays with serial: "33%" (mariadb.yml:18-52) |
| Duration drivers | image pulls, first container starts | per-task SSH overhead across all hosts, compare_container exec per container (see Compute scaling). NOT AVAILABLE Any duration |
7. Dependencies introduced by handlers¶
Handlers create ordering that is not visible in task files:
- Within a role, restart order = handler definition order, not notification order.
- nova-cell restarts
nova_ssh→nova_libvirt(→ libvirt ready check, SASL user) →nova_compute(roles/nova-cell/handlers/main.yml:70-159). - openvswitch restarts
openvswitch_db→ waits →openvswitch_vswitchd(roles/openvswitch/handlers/main.yml:2-40). - CODE ansible-core 2.18.20 keeps the play's handler list in definition order, copies it into each host's state
at each flush, and walks it in that order, running only the handlers notified for the host
(
lib/ansible/executor/play_iterator.py:193-198, :424-438).
- nova-cell restarts
- Handlers of a play run on all notified hosts in lockstep (ansible-core 2.18.20: the linear strategy gives all
hosts the same next task, and at a
flush_handlersit inserts the play's handlers into that shared task list,lib/ansible/plugins/strategy/linear.py:47-90). Withserial: 0, every compute whosenova_computechanged restarts it in the same step. Changed in 2025.1:nova_libvirtandnova_sshrestart with it only if they changed too; the loop-notify that restarted them along in 2024.1 is gone. - Handler chains:
- Restart nova-libvirt → Checking libvirt container is ready → Create libvirt SASL user (with
libvirt_enable_sasl,roles/nova-cell/handlers/main.yml:90, :108). - Restart openvswitch-db → Waiting for openvswitch_db (
roles/openvswitch/handlers/main.yml:15-16). - Restart kolla-toolbox → Initializing toolbox (
roles/common/handlers/main.yml:30-36). - Restart haproxy / proxysql / keepalived container → handlers that
listento these names: check the API interface addresses, group the hosts by whether they hold the VIP, stop and start the backup hosts' containers, then the master's, then wait for HAProxy (and ProxySQL) to listen on the VIP (roles/loadbalancer/handlers/main.yml:9-332). - MariaDB and RabbitMQ: restart handlers only
group_bythe host; the restart itself is a later play (item 5).
- Restart nova-libvirt → Checking libvirt container is ready → Create libvirt SASL user (with
- The loadbalancer restart is decided once, at the end of its play (changed in 2025.1). In 2024.1 each service's
haproxy-configtask notified the loadbalancer handler. In 2025.1roles/haproxy-config/tasks/main.ymlhas nonotify; the per-service frontends are files underservices.d/, which the HAProxyconfig.jsonlists (roles/loadbalancer/templates/haproxy/haproxy.json.j2:16-21), and the play's last step, theloadbalancerrole'scheck-containers, compares the HAProxy container and notifies its restart (site.yml:319-324). Consequence with-t <svc>: the play still runs that service'sloadbalancerinclude, which carries the service tag, but the finalcheck-containersinclude has no tag of its own, so it inherits only the play's tagshaproxy,keepalivedandloadbalancer(site.yml:115-118, :319-324) and is skipped. ansible-core lists it that way: under--list-tasks -t novathe loadbalancer play shows only the twonovaandnova-cellincludes (listings, play #6). Sokolla-ansible reconfigure -t novarewrites a changed Nova frontend file underservices.d/but does not restart HAProxy in that run; the change is applied by the next run that reaches the check step (no-t, or-t loadbalancer,haproxyorkeepalived) CODE. NOT AVAILABLE To be confirmed by the community. - The MariaDB restart is a sequence of plays, not of handler waves. The handlers put running members into
mariadb_restartand new members intomariadb_start(roles/mariadb/handlers/main.yml:59-74); the "Restart mariadb services" and "Start mariadb services" plays then runrestart_services.yml(restart, port wait, WSREP sync wait) withserial: "33%"(mariadb.yml:18-52,roles/mariadb/tasks/restart_services.yml:2-53) (fact sheet B §1.5). Changed in 2025.1: the handlers nowlistentoRestart mariadb container, the name the shared check step notifies (roles/mariadb/handlers/main.yml:65, :74), and the WSREP wait queries throughkolla_toolboxinstead ofmysqlinside the container (roles/mariadb/tasks/restart_services.yml:31-53). - The etcd restart is staged by its handlers.
Restart etcd containeris only a name that handlerslistento: they look up the leader, then restart the non-leaders (onupgrade, looping over the etcd hosts; otherwise looping over the four values ofgroups.etcd.index(host) % 4), then the leader, which comes after them because its handler is defined after theirs (roles/etcd/handlers/main.yml:9-61). Each restart waits for the client port and foretcdctl endpoint health(roles/etcd/tasks/restart_services.yml:2-41). NOT AVAILABLE How ansible-core orders the files included by one looped handler across hosts, so whether the% 4groups really restart one after another.
Related¶
- Component dependencies (runtime dependencies)
- Repository architecture §4.3 (how a restart is decided)
- Tags §2.5 (
run_oncewithserial) - Nova deep dive (the nova plays)
- Write config first, apply in controlled batches
§2 (
genconfigthendeploy-containers) - Glossary (glossary)
To remember
Lumo: if you keep only 5 things from this page, keep these.
- There is no dependency resolution: order comes from play order, task order inside a role, handler flush points,
serial, the MariaDB and RabbitMQ restart plays and the etcd restart handlers. CODE - Changed in 2025.1: the
openvswitch,ovs-dpdk,ovn-controllerandovn-dbplays run beforenova.yml, so a fresh compute gets Open vSwitch beforenova_compute; the Neutron agents still come after it. CODE - A restart now comes from the shared
service-check-containersstep, which notifies only the containers it found changed;genconfigneither compares containers nor, apart from two narrow cases, restarts any. CODE kolla-ansible reconfigureandupgradealways passkolla_serial=0after your own-e, so they cannot be batched withkolla_serial;deployanddeploy-containerscan. CODEreconfigureon a running cloud still runs the DB sync containers of keystone, glance, cinder, placement, nova, neutron, heat and others. CODE
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.