Skip to content

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 only groups['glance-api'][0] runs glance (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

Impact and risk

Dependencies

Evidence

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 with ANSIBLE_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 10 s (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: set glance_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.
  • R8, precautions for a HAProxy config change: ANSIBLE_SERIAL=1 for haproxy changes; --skip-tags haproxy when you don't intend to change frontends.
  • R24, precautions for the effective container stop timeout of 10 s: drain long operations before restarts; patch kolla_docker or pass graceful_timeout if needed.
  • Reconfigure a single service §3, verification of -t <svc> reconfigure: before, kolla-ansible -t <svc> genconfig, then kolla_set_configs --check in each <svc> container and a diff of /etc/kolla/haproxy/services.d/<svc>*.cfg against 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, and docker ps --filter name=haproxy shows whether HAProxy restarted.

Known limits and open points

  • Known bugs and limitations, row glance: global log_bin_trust_function_creators toggle 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, row glance-api: glance-manage db_load_metadefs runs on every deploy/reconfigure.
  • F3, "docker_graceful_timeout and docker_client_timeout are ignored" CODE: on every restart, a service still running 10 s after SIGTERM is SIGKILLed with its in-flight work (heat-engine, cinder copies, glance uploads).
  • 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; the sanity check (if enabled) creates and deletes an image on every deploy/reconfigure; Glance does not touch compute hosts.
  • 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: yes or glance_backend_ceph: yes is applied by reconfigure; glance-api start time with a large NFS glance_file_datadir_volume; whether the glance cinder store works with cinder_catalog_info = volume:cinder:internalURL and no [cinder] store section. Answered from code: Glance rolling upgrade with ANSIBLE_SERIAL=1 runs the contract at the end of batch 1, before later batches are upgraded.
  • Kolla images §6, item 10: recursive chown on data volumes at every start: kolla_set_configs makes one chown per file of the glance image store on every COPY_ALWAYS start CODE.

Service card

The rows of the card are explained on the Components page.

Item Value
Play site.yml:657
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/deploy.yml) register → config → check-containers → clone (if) → bootstrap → flush handlers → check
Task files bootstrap.yml, bootstrap_service.yml, check-containers.yml, check.yml, clone.yml, config.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 common (meta)
  • Reconfigure a single service — what -t <svc> reconfigure runs 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 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