Glance¶
This page is the starting point for Glance, the glance role: the containers glance_api and glance_tls_proxy
(roles/glance/defaults/main.yml:2-13, roles/glance/defaults/main.yml:38-46), on the control nodes of the example
inventory (inventory/multinode:96-97, inventory/multinode:222-223), selected by the tag glance
(site.yml:542-554). With the file backend on the default named volume (glance_file_datadir_volume: "glance"), only
the first host of glance-api runs glance (glance_api_hosts, group_vars/all.yml:1137, group_vars/all.yml:1142,
group_vars/all.yml:1146; the role's host_in_groups still takes precedence over group,
roles/glance/defaults/main.yml:6, kolla_ansible/filters.py:58-82; Component dependencies
§3), and any restart is then a full Image API outage
(R20).
Changed in 2025.1 CODE:
- The Swift store is gone, with no check:
glance_backend_swiftand theswiftentry ofglance_backendsare removed (roles/glance/defaults/main.yml:224-239), with the[swift]section,glance-swift.confand itsconfig.jsonentry.glance_backend_fileis now true unless Ceph, S3 or VMware is on (group_vars/all.yml:1137) andglance_default_backendisvmware, else the first Ceph entry, elses3, elsefile(roles/glance/defaults/main.yml:250). No precheck looks atenable_swiftor at a 2024.1glance_backend_swift(no match forswiftunderroles/glance/,roles/prechecks/orgroup_vars/all.yml). A cloud whose images were in Swift therefore gets, on its first 2025.1 run, a Glance whose default store isfile, on the firstglance-apihost only, and with noswiftstore configured (Swift). What then happens to the images whose locations are in Swift is service-side: NOT AVAILABLE, to be confirmed by the community. - Ceph: user and pool per backend: each entry of
glance_ceph_backendsnow carriescluster(defaultceph_cluster,"ceph"),poolanduser(roles/glance/defaults/main.yml:241-247,group_vars/all.yml:1290,group_vars/all.yml:1295,group_vars/all.yml:1301); the store section writesrbd_store_userandrbd_store_poolfrom the entry (roles/glance/templates/glance-api.conf.j2:66-73), and the keyring is<cluster>.client.<user>.keyring, built in the task (roles/glance/tasks/external_ceph.yml:25-34). The variableceph_glance_keyringis removed: with the defaults the file name is stillceph.client.glance.keyring, but an override ofceph_glance_keyringis no longer read. The Ceph tasks notify nothing any more (roles/glance/tasks/external_ceph.yml:14-34); a changedceph.confor keyring restartsglance_apithrough the container check (below). cinder_catalog_infois gone fromglance-api.conf(the[DEFAULT]section,roles/glance/templates/glance-api.conf.j2:1-31).- Restarts: the config tasks notify nothing;
check-containers.ymlimportsservice-check-containers, which notifiesRestart <service> containeronly for the container whose configuration or definition changed, so a change ofglance-api.confno longer restartsglance_tls_proxy(Tags §2.4). The handlers have nokolla_action != "config"guard any more (roles/glance/handlers/main.yml:2-30). Newcheck.ymlforkolla-ansible check(roles/glance/tasks/check.yml:2-4). - No rolling reconfigure or upgrade through the CLI:
reconfigureandupgradeforcekolla_serial=0(F19); a batched reconfigure iskolla-ansible deploy -t glance -e kolla_serial=N. - First-run changes: both containers always mount
/dev/shm(roles/glance/defaults/main.yml:204,roles/glance/defaults/main.yml:213), so both are recreated;use_queue_manager,rabbit_quorum_queueandrabbit_transient_quorum_queueare always rendered (roles/glance/templates/glance-api.conf.j2:114,120,125; F17);www_authenticate_uriiskeystone_public_urlandmemcache_security_strategyis a variable (roles/glance/templates/glance-api.conf.j2:40,51). The four HAProxy backends addoption httpchk(roles/glance/defaults/main.yml:24,36,57,70), which a-t glancerun renders but no longer applies by restarting HAProxy (F18). - Other:
glance_copy_certsdrives the CA copy into the containers (roles/glance/defaults/main.yml:308); image names takedocker_image_name_prefix(roles/glance/defaults/main.yml:160,164); the glance-api image addssystemd-udev(kolladocker/glance/glance-api/Dockerfile.j2:10-16). - Still holds from 2024.1: the per-cluster layout under
glance-api/ceph/and the copy of that directory over/etc/ceph(roles/glance/templates/glance-api.json.j2:15-21); themerge_configscopy of<cluster>.conf, which skips a missing source (roles/glance/tasks/external_ceph.yml:14-23); the quoteddefault_backend(roles/glance/templates/glance-api.conf.j2:59), whose parsing is NOT AVAILABLE; the S3 store and its precheck; the TLS proxy thread settings (roles/glance/defaults/main.yml:289-290); the[cors]section (roles/glance/templates/glance-api.conf.j2:147-148); the upgrade task files.
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 (
glance): Tags §3, row<svc>; Tags §3.1, row<svc>API service - Sequence CODE:
reconfigureimportsdeploy.yml(roles/glance/tasks/reconfigure.yml:2), which runs registration, config, check-containers, the clone in dev mode, bootstrap, then a flush of the handlers (roles/glance/tasks/deploy.yml:1-15). - Risks: R20, R21, R8, R24
Dependencies¶
- Dependencies: Component dependencies §3
Evidence¶
- Fact sheet: fact sheet C §1
- Image side: Kolla images
§4 (row
glance-api), Kolla images §5 - Bootstrap one-shots CODE: on deploy and reconfigure, the database and its user are created from the first
glance-apihost unlessuse_preconfigured_databases(roles/glance/tasks/bootstrap.yml:2-36); then, onglance_api_hosts[0], the MariaDB global variablelog_bin_trust_function_creatorsis set to 1, onebootstrap_glancecontainer runsrun_oncewithKOLLA_BOOTSTRAP, and the variable is set back to 0 (roles/glance/tasks/bootstrap_service.yml:2-54). The container runsglance-manage db_sync, thenglance-manage db_load_metadefs(kolladocker/glance/glance-api/extend_start.sh:5-9). - Handlers: Tags §5; changed in 2025.1, a change that concerns one container restarts only that container (Tags §2.4).
Before and after a run¶
- Pre-execution checklist, step 6 (workload gates): no live migrations, resizes, image uploads or volume migrations in flight on the targeted hosts.
- 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); the glance file backend has one host (R20). Prerequisites: MariaDB, RabbitMQ, memcached, Keystone (registration), HAProxy VIP. Glance and cinder transfers in progress are SIGKILLed after 60 s (docker_graceful_timeout,group_vars/all.yml:148; R24). - First run after the upgrade from 2024.1 CODE: expect
glance_api(andglance_tls_proxywhen enabled) to be recreated for the/dev/shmmount, andglance-api.confto change for the queue settings, the publicwww_authenticate_uriand the removedcinder_catalog_info(Changed in 2025.1 above, F17). A container that no 2025.1 run has recreated or restarted yet is also flagged by the changed systemd unit text (F16). On a cloud that used the Swift store, stop before the run: Glance falls back tofile(above). - R20, precautions for a Glance reconfigure or deploy: avoid during image-heavy operations.
- R21, precautions for enabling
glance_backend_ceph,glance_backend_s3orglance_backend_vmwareon a running cloud: setglance_backend_*explicitly. Changed in 2025.1 CODE: Swift is no longer one of the flags, andglance_backend_fileis true only when none of ceph, s3 and vmware is (group_vars/all.yml:1137); removing the Swift store is itself a backend switch (above). - R22, precautions for an inventory reordering, after which glance moves (file backend):
treat inventory order as configuration; never reorder casually. Still holds:
glance_api_hostsis then the first host ofglance-api(group_vars/all.yml:1146) CODE. - fact sheet C §3.8, item 7:
enabling
enable_cinder_backend_iscsi/LVM also flips glance-api to privileged with/dev, so glance-api is recreated. In 2025.1cinder_backend_ceph(with Cinder enabled) still makes glance-api privileged, without/dev(roles/glance/defaults/main.yml:10,roles/glance/defaults/main.yml:206-207) CODE. - R8, precautions for a HAProxy config change:
--skip-tags haproxywhen you don't intend to change frontends; a-t glancerun renders the frontends without restarting HAProxy (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,group_vars/all.yml:160) (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 (for glance aninternaland apublicendpoint,roles/glance/defaults/main.yml:101-102), the API answers through the VIP and the container start times show which hosts restarted; HAProxy no longer restarts on a service tag (F18).
Known limits and open points¶
- Known bugs and limitations, row
glance: globallog_bin_trust_function_creatorstoggle on every deploy/reconfigure; file backend = single host; backend switches silently when another store is enabled. Status: all three still hold in 2025.1 CODE (roles/glance/tasks/bootstrap_service.yml:2-17,roles/glance/tasks/bootstrap_service.yml:39-54;group_vars/all.yml:1146;group_vars/all.yml:1137,roles/glance/defaults/main.yml:250), with Ceph, S3 and VMware as the flags that turn the file store off; the Swift removal adds a silent switch tofilefor clouds that used Swift. - Q12: "Glance backend switch on enabling Swift". Status in 2025.1: no
longer applies as asked (Kolla Ansible no longer deploys Swift); the reverse question, what Glance does with images
stored in Swift once its
swiftstore is gone, is NOT AVAILABLE, to be confirmed by the community. - What is not known, row "Glance": the sources do not establish whether snapshots in progress fail (R20); whether existing file-store images stay readable, and boots from them still work, after another store is enabled (R21, Q12).
- What is not known: the sources do not
establish whether
glance-manage db_load_metadefs, without--merge, only adds namespaces that are not yet in the DB. - What is not known: the sources do not establish the cost of the recursive chown on large trees (the glance store among them).
- Multi-cluster Ceph: what Glance does with several
rbdstores on different clusters is service-side behaviour that the role does not establish: NOT AVAILABLE. - Q14, answered from the source CODE: "Glance adds
db_load_metadefs"; Kolla images §4, rowglance-api:glance-manage db_load_metadefsruns on every deploy/reconfigure (kolladocker/glance/glance-api/extend_start.sh:5-9;bootstrap_glanceruns once, onglance_api_hosts[0],roles/glance/tasks/bootstrap_service.yml:19-37). - F3, "
docker_graceful_timeoutanddocker_client_timeoutare ignored": an Ussuri finding that still does not hold in 2025.1. The role handlers passdocker_common_options(roles/glance/handlers/main.yml:7-9), which carriesgraceful_timeout: "{{ docker_graceful_timeout }}"(60 s) andclient_timeout(120 s) (group_vars/all.yml:114,group_vars/all.yml:148,group_vars/all.yml:151-162), and the container's systemd unit stops it with<engine> stop <name> -t <graceful_timeout>(module_utils/kolla_systemd_worker.py:33). On every restart, a service still running 60 s after SIGTERM is killed with its in-flight work (heat-engine, cinder copies, glance uploads); the 10 s value is only the fallback when nograceful_timeoutis passed (library/kolla_container.py:366,module_utils/kolla_docker_worker.py:450-454) CODE (R24). - F5, "
reconfigure=deploy": a reconfigure re-runs Keystone registration, DB creation/grants and the DB-sync bootstrap containers of most services CODE. - fact sheet C §1.8,
"Operational notes", seven items: backend switch via unrelated flags; inventory order matters; restart impact; rolling
upgrade; the image cache is never pruned (no task or image of 2025.1 runs a glance cache pruner or cleaner: no match
under
roles/glance/or kolladocker/glance/); the sanity check (if enabled) creates and deletes an image on every deploy/reconfigure; Glance does not touch compute hosts. The image sanity check still does not exist in 2025.1: the newcheck.ymlonly runs theservice-checkrole, which looks at the containers (roles/glance/tasks/check.yml:2-4),tasks/deploy.ymlhas no check step (roles/glance/tasks/deploy.yml:1-15), andkolla_enable_sanity_glanceis not defined ingroup_vars/all.ymlCODE. - Upgrade paths CODE:
upgrade.ymlrunsrolling_upgrade.ymlwhenglance_enable_rolling_upgrade(defaultno,group_vars/all.yml:1143), elselegacy_upgrade.yml(roles/glance/tasks/upgrade.yml:1-6). The legacy path renders the config, checks the containers, runs thedb_syncbootstrap, then flushes the handlers (roles/glance/tasks/legacy_upgrade.yml:1-9), so everyglance_apirestarts at once; in 2025.1upgradealways runs withkolla_serial=0(F19). The rolling path stopsglance_apionglance_api_hosts[0]after rendering its config, runs theexpandandmigrateone-shots there (KOLLA_UPGRADEwithGLANCE_DB_EXPANDorGLANCE_DB_MIGRATE), renders the config of the other hosts, checks the containers and flushes the handlers, then runscontract(roles/glance/tasks/rolling_upgrade.yml:6-102, kolladocker/glance/glance-api/extend_start.sh:13-27). - fact sheet C §8,
"NOT AVAILABLE list", items 1 to 4: NOT AVAILABLE: whether an existing glance file-store image stays readable after
glance_backend_ceph: yesis applied by reconfigure (and, new in 2025.1, what happens to Swift-stored images once the store is gone); glance-api start time with a large NFSglance_file_datadir_volume; whether the glance cinder store works with no[cinder]store section (in 2025.1cinder_catalog_infois no longer set either). Changed in 2025.1 CODE: the 2024.1 answer "a rolling upgrade withANSIBLE_SERIAL=1runs the contract at the end of batch 1" no longer applies through the CLI, sinceupgraderuns every host at once (F19); the contract container is stillrun_once, delegated toglance_api_hosts[0], after the flush of handlers (roles/glance/tasks/rolling_upgrade.yml:80-81,roles/glance/tasks/rolling_upgrade.yml:83-102). - Kolla images §6, item 10: recursive chown on data volumes at every
start:
kolla_set_configsmakes onechownper file of the glance image store on everyCOPY_ALWAYSstart (roles/glance/templates/glance-api.json.j2:48-52,group_vars/all.yml:49) CODE.
Service card¶
The rows of the card are explained on the Components page.
| Item | Value |
|---|---|
| Play | site.yml:542 |
| Tags | glance |
| Play host patterns | glance-api |
| Node types in play (example inventory) | control |
| Node types running its containers | control |
| Containers | glance_api, glance_tls_proxy |
deploy/reconfigure flow (tasks/) |
register → config → check-containers → clone (if) → 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, external_ceph.yml, legacy_upgrade.yml, loadbalancer.yml, main.yml, precheck.yml, pull.yml, reconfigure.yml, register.yml, rolling_upgrade.yml, stop.yml, stop_service.yml, upgrade.yml |
| Templates | glance-api.conf.j2, glance-api.json.j2, glance-cache.conf.j2, glance-tls-proxy.cfg.j2, glance-tls-proxy.json.j2 |
| Handlers (definition order) | Restart glance-api container; Restart glance-tls-proxy container |
| Key variables | enable_glance, glance_backend_*, glance_api_hosts, glance_enable_rolling_upgrade |
| Role dependencies | none |
Related¶
- Reconfigure a single service — what
-t <svc> reconfigureruns for an API service such as glance, with the risks and the verification - MariaDB/Galera — a Glance deploy or reconfigure toggles the global MariaDB variable
log_bin_trust_function_creators - Swift — removed in 2025.1; a cloud that used the Swift store falls back to
file - Cinder — enabling its iSCSI/LVM or Ceph backend flips glance-api to privileged, so glance-api is recreated; Cinder has the same per-cluster Ceph layout, with the user per backend in 2025.1
- Nova — Nova needs Glance for image-backed boots
- RabbitMQ — the queue settings, always on in 2025.1, that change
glance-api.conf(F17) - Pre-execution checklist — the checks before every production run
- Components — the other component pages