Placement¶
This page is the starting point for Placement, the placement role: one container, placement_api
(roles/placement/defaults/main.yml:2-31), on the control nodes of the example inventory
(inventory/multinode:167-168, inventory/multinode:494-495), selected by the tag placement (site.yml:591-604).
enable_placement defaults to enable_nova or enable_zun (group_vars/all.yml:956). Its bootstrap container runs
the DB sync and the online data migrations on every deploy and reconfigure (Component dependencies
§3).
Changed in 2025.1 CODE:
- uWSGI instead of Apache:
placement_wsgi_providerdefaults touwsgi(roles/placement/defaults/main.yml:156). The container command becomesuwsgi /etc/placement/placement-api-uwsgi.ini(roles/placement/templates/placement-api.json.j2:3), the role rendersplacement-api-uwsgi.inithrough the sharedservice-uwsgi-configrole (roles/placement/tasks/config.yml:76-92) and skips the Apache virtual host (roles/placement/tasks/config.yml:58-74). On the first 2025.1 run theconfig.jsonand the new uWSGI file change, soplacement_apirestarts on every placement host. Settingplacement_wsgi_provider: apachekeeps the 2024.1 Apache path. - Log files: with uWSGI,
placement-api-error.logandplacement-api-access.logare no longer written (they come from the Apache virtual host,roles/placement/templates/placement-api-wsgi.conf.j2:31-33). The service logs to/var/log/kolla/placement/placement-api.log(log_file,roles/placement/templates/placement.conf.j2:4;service_nameis the service key,roles/placement/tasks/config.yml:46) and uWSGI toplacement-api-uwsgi.login the same directory (roles/service-uwsgi-config/defaults/main.yml:4-5,roles/service-uwsgi-config/templates/uwsgi.ini.j2:14). fluentd still tails/var/log/kolla/placement/*.log(roles/common/defaults/main.yml:193-194). - No rolling reconfigure:
kolla-ansible reconfigureforceskolla_serial=0, so the placement play (serialfromkolla_serial,site.yml:596) restarts everyplacement_apiat once; a batched run iskolla-ansible deploy -t placement -e kolla_serial=N(F19). - Restarts: the config tasks notify nothing, except the Apache virtual host task (
apacheprovider only,roles/placement/tasks/config.yml:73-74);check-containers.ymlimportsservice-check-containers(roles/placement/tasks/check-containers.yml:2-3), which restartsplacement_apionly when its configuration or definition changed. The handler has nokolla_action != "config"guard any more (roles/placement/handlers/main.yml:2-14).kolla-ansible checkruns theservice-checkrole (roles/placement/tasks/check.yml:2-4). - Endpoints:
placement_internal_endpointandplacement_public_endpointare no longer defined in the role; they are ingroup_vars/all.yml(group_vars/all.yml:654-655), still built withkolla_url, and the public port is stillplacement_api_public_port(group_vars/all.yml:659). - HAProxy health checks: both placement backends add
option httpchk GET /(roles/placement/defaults/main.yml:20-21,30-31). A-t placementrun renders them but no longer restarts HAProxy (F18). - Configuration text:
www_authenticate_uriiskeystone_public_urlandmemcache_security_strategyis a variable (roles/placement/templates/placement.conf.j2:29,40);placement.confstill has no messaging section, so the queue settings of F17 do not reach it.placement_copy_certsdrives the CA copy (roles/placement/defaults/main.yml:151); the image name takesdocker_image_name_prefix(roles/placement/defaults/main.yml:66). - Still holds: the deploy flow register → clone (if) → config → check-containers → bootstrap → flush
(
roles/placement/tasks/deploy.yml:2-14); the bootstrap container runsdb syncandonline_data_migrations(kolladocker/placement/placement-api/extend_start.sh:5-9; the kolladocker/placementdirectory only gains akolla_patch_sources()call).
The lists below say where the study covers how to operate it, its impact, its dependencies and the evidence, what to check around a run and what stays open; the service card follows them.
Where to look¶
Operate¶
- Scenario: Reconfigure a single service §2, Reconfigure a single service §3
- Command: Command quick lookup by tag
Impact and risk¶
- What the tag executes (
placement): Tags §3, row<svc>; Tags §3.1, row<svc>API service - Risks: R8, R24
Dependencies¶
- Dependencies: Component dependencies §3
Evidence¶
- Fact sheet: fact sheet C §2
- Image side: Kolla images
§4 (row
placement-api), Kolla images §5
Before and after a run¶
- Tags §3.1, row
<svc>API service: safe on its own "yes, it is the intended unit; it still runs Keystone registration and DB sync"; batch withdeploy -e kolla_serial=N(reconfigureforceskolla_serial=0, F19). Prerequisites: MariaDB, RabbitMQ, memcached, Keystone (registration), HAProxy VIP. - fact sheet C §2.8: rotating
placement_keystone_passwordneeds a reconfigure of placement and nova (all computes) and neutron; cyborg also renders it, when enabled (enable_cyborg, defaultno) CODE (roles/placement/templates/placement.conf.j2:36,roles/nova/templates/nova.conf.j2:184,roles/nova-cell/templates/nova.conf.j2:228,roles/neutron/templates/neutron.conf.j2:189,roles/cyborg/templates/cyborg.conf.j2:38;group_vars/all.yml:876). No other template underansible/rolesrenders it (grep). - R8, precautions for a HAProxy config change:
--skip-tags haproxywhen you don't intend to change frontends; in 2025.1 a-t placementrun renders the frontends without restarting HAProxy, so they apply at the next-t haproxyrun (F18). - R24, container stop timeout: the stop goes through the container's systemd unit,
whose
ExecStopis/usr/bin/<engine> stop <name> -t <graceful_timeout>(module_utils/kolla_systemd_worker.py:33), withdocker_graceful_timeout60 s (group_vars/all.yml:148) (F3). Precautions: drain long operations before restarts; raisedocker_graceful_timeoutif needed. - Reconfigure a single service
§3,
verification of
-t <svc> reconfigure: before,kolla-ansible genconfig -t <svc>, thenkolla_set_configs --checkin each<svc>container and a diff of/etc/kolla/haproxy/services.d/<svc>*.cfgagainst the previous version; after,openstack endpoint list --service <name>is unchanged for each Keystone service the role registers, the API answers through the VIP and the container start times show which hosts restarted; HAProxy no longer restarts on a service tag (F18). For Placement with uWSGI, look for errors inplacement-api.logandplacement-api-uwsgi.log;placement-api-error.logis only written with theapacheprovider (above).
Known limits and open points¶
- Known bugs and limitations, second row
site.yml: placement haproxy include lackswhen: enable_placement(site.yml:248-251). Status: still holds in 2025.1 CODE. - Q14, answered from the source CODE: Placement's
KOLLA_BOOTSTRAPrunsdb sync+online_data_migrationson every deploy/reconfigure (roles/placement/tasks/bootstrap_service.yml:10-12,roles/placement/tasks/deploy.yml:11,roles/placement/tasks/bootstrap.yml:38; kolladocker/placement/placement-api/extend_start.sh:5-9). The kolladocker/placementdirectory differs from 2024.1 only by akolla_patch_sources()call in each Dockerfile (diff of the two trees). - F15, "What the bootstrap containers run differs per image": Placement's
KOLLA_BOOTSTRAPcontainer also runsonline_data_migrations, on every deploy/reconfigure CODE. - F5, "
reconfigure=deploy": a reconfigure re-runs Keystone registration, DB creation/grants and the DB-sync bootstrap containers of most services CODE. For Placement,reconfigure.ymlis an import ofdeploy.yml(roles/placement/tasks/reconfigure.yml:2). - What is not known, row on upstream Nova behaviour when a dependency is missing: for Placement, the sources do not establish whether scheduling stops while it restarts.
- Nova deep dive §3, item 4: Placement serves the scheduler's allocation candidates and nova-compute's resource-provider updates; NOT AVAILABLE whether scheduling stops and computes log errors without it.
- fact sheet C §2.8, "Operational notes and the relation to nova", three points: consumers authenticate as
the placement user (
placement_keystone_user,group_vars/all.yml:975; e.g.roles/nova/templates/nova.conf.j2:183-184); NOT AVAILABLE (upstream nova): how scheduling and the nova-compute resource tracker periodic task behave during a placement-api outage or restart; the upgrade db sync and online data migrations run while the old placement-api is still serving. - Kolla images §6, item 6: Placement's online data migrations run on
every deploy/reconfigure, inside
bootstrap_placement, and twice on upgrade (bootstrap_placementwithKOLLA_BOOTSTRAP, then again withKOLLA_OSMafter the handler flush,roles/placement/tasks/upgrade.yml:11-34); a tag change applied withdeploytherefore runs them CODE.
Service card¶
The rows of the card are explained on the Components page.
| Item | Value |
|---|---|
| Play | site.yml:591 |
| Tags | placement |
| Play host patterns | placement-api |
| Node types in play (example inventory) | control |
| Node types running its containers | control |
| Containers | placement_api |
deploy/reconfigure flow (tasks/) |
register → clone (if) → config → check-containers → bootstrap → flush handlers |
| Task files | bootstrap.yml, bootstrap_service.yml, check-containers.yml, check.yml, clone.yml, config.yml, config_validate.yml, copy-certs.yml, deploy-containers.yml, deploy.yml, loadbalancer.yml, main.yml, precheck.yml, pull.yml, reconfigure.yml, register.yml, stop.yml, upgrade.yml |
| Templates | migrate-db.rc.j2, placement-api-wsgi.conf.j2, placement-api.json.j2, placement.conf.j2 |
| Handlers (definition order) | Restart placement-api container |
| Key variables | enable_placement |
| Role dependencies | none |
Related¶
- Reconfigure a single service — what
-t <svc> reconfigureruns for an API service such as placement, with the risks and the verification - Nova — the scheduler and nova-compute use Placement
- Nova deep dive §3 — Placement among what must be available before Nova can operate
- Neutron — one of the consumers that authenticate as the placement user
- Update container images §4 — a tag change applied with
deployruns no online data migrations, except Placement's - Component dependencies §6 — Placement is deployed before Nova
- Apply common changes — the fluentd input list, which includes placement,
belongs to the
commonrole - Components — the other component pages