Glance¶
This page is the starting point for Glance, the glance role: the containers glance_api and glance_tls_proxy, on
the control nodes of the example inventory, selected by the tag glance. With the file backend on the default named
volume (glance_file_datadir_volume: "glance"), only groups['glance-api'][0] runs glance (glance_api_hosts,
group_vars/all.yml:906,911,915; Component dependencies §3), and any
restart is then a full Image API outage (R20). 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 - 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
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 withANSIBLE_SERIAL; 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:140,152;module_utils/kolla_systemd_worker.py:33; R24). - R20, precautions for a Glance reconfigure or deploy: avoid during image-heavy operations.
- R21, precautions for enabling Swift (or
glance_backend_ceph) on a running cloud: setglance_backend_*explicitly before enabling Swift. - R22, precautions for an inventory reordering, after which glance moves (file backend): treat inventory order as configuration; never reorder casually.
- 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 2023.1cinder_backend_ceph(with Cinder enabled) also makes glance-api privileged, without/dev(roles/glance/defaults/main.yml:10,192-193) CODE. - R8, precautions for a HAProxy config change:
ANSIBLE_SERIAL=1for haproxy changes;--skip-tags haproxywhen you don't intend to change frontends. - R24, precautions for the container stop timeout (60 s in 2023.1: the systemd unit
stops the container with
docker stop -t <docker_graceful_timeout>): drain long operations before restarts; raisedocker_graceful_timeoutif needed (it reaches the unit on the next restart). - Reconfigure a single service
§3,
verification of
-t <svc> reconfigure: before,kolla-ansible -t <svc> genconfig, 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, the container start times show which hosts restarted, anddocker ps --filter name=haproxyshows whether HAProxy restarted.
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 Swift/Ceph is enabled. Status: CODE. - Q12: "Glance backend switch on enabling Swift". Status: NOT AVAILABLE.
- 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 Swift 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).
- 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:20-37). - F3, "
docker_graceful_timeoutanddocker_client_timeoutare ignored": an Ussuri finding that no longer holds as written in 2023.1. The role handlers passdocker_common_options, which carriesgraceful_timeout: "{{ docker_graceful_timeout }}"(60 s) andclient_timeout(120 s) (group_vars/all.yml:105,140, 152-153), and the container's systemd unit stops it withdocker 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 module default when nograceful_timeoutis passed (module_utils/kolla_docker_worker.py:438-440,462-464) 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 2023.1 runs a glance cache pruner or cleaner); the
sanity check (if enabled) creates and deletes an image on every deploy/reconfigure; Glance does not touch compute
hosts. The sanity check does not exist in 2023.1: the role has no
check.ymlandtasks/deploy.ymlhas no check step (service card below), andkolla_enable_sanity_glanceis not defined ingroup_vars/all.ymlCODE. - fact sheet C §8,
"NOT AVAILABLE list", items 1 to 4: NOT AVAILABLE: whether an existing glance file-store image stays readable after
enable_swift: yesorglance_backend_ceph: yesis applied by reconfigure; glance-api start time with a large NFSglance_file_datadir_volume; whether the glance cinder store works withcinder_catalog_info = volume:cinder:internalURLand no[cinder]store section. Answered from code: Glance rolling upgrade withANSIBLE_SERIAL=1runs the contract at the end of batch 1, before later batches are upgraded (the contract container isrun_once, delegated toglance_api_hosts[0], after the flush of handlers,roles/glance/tasks/rolling_upgrade.yml:80-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:54-58,group_vars/all.yml:43) CODE.
Service card¶
The rows of the card are explained on the Components page.
| Item | Value |
|---|---|
| Play | site.yml:495 |
| 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, 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-swift.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 — enabling Swift changes Glance's default backend
- Cinder — enabling its iSCSI/LVM or Ceph backend flips glance-api to privileged, so glance-api is recreated
- Nova — Nova needs Glance for image-backed boots
- Pre-execution checklist — the eight checks before every production run
- Components — the other component pages