Skip to content

Horizon

This page is the starting point for Horizon, the horizon role: one container, horizon, on the control nodes of the example inventory (inventory/multinode:119-120), selected by the tag horizon (site.yml:740-752). The role has no register.yml, so it is never registered in Keystone, and by default it runs no bootstrap: bootstrap.yml is included only when horizon_backend_database is true (roles/horizon/tasks/deploy.yml:10-11). Changed in 2024.1: that variable is now a plain false (group_vars/all.yml:1141); in 2023.1 it followed enable_murano, and the murano role is gone CODE (Tags §3). 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

No operation page gives a command line for the horizon tag. With defaults, -t horizon runs the loadbalancer horizon include (site.yml:188-192), config, check-containers and, if anything changed, the horizon restart handler (roles/horizon/tasks/deploy.yml:2-14; Tags §3, paragraph below the table). It does not run common: as in 2023.1, common is its own play, tagged common only (site.yml:88-103) CODE. upgrade runs the same files, with bootstrap_service.yml (no DB creation) instead of bootstrap.yml, again only with horizon_backend_database (roles/horizon/tasks/upgrade.yml:2-14) CODE.

Impact and risk

  • What the tag executes (horizon): Tags §3, row <svc> and the paragraph below the table; Tags §3.1, row <svc> API service
  • Risks: R8, R24

Dependencies

Evidence

Before and after a run

  • Settings files renamed: changed in 2024.1 CODE. local_settings.j2 and custom_local_settings.j2 no longer exist; the role renders _9998-kolla-settings.py and _9999-custom-settings.py (roles/horizon/tasks/config.yml:75-109), each looked up with with_first_found in /etc/kolla/config/horizon/<host>/, then /etc/kolla/config/horizon/, then the role template (:83-86, :101-104). config.json copies them into /etc/openstack-dashboard/local_settings.d/ (roles/horizon/templates/horizon.json.j2:21-32), a directory the image creates and links into the openstack_dashboard package, next to a local_settings.py copied from Horizon's example file (kolla docker/horizon/Dockerfile.j2:58-65). What follows for an operator:
    1. An override kept at the 2023.1 names, /etc/kolla/config/horizon/local_settings or custom_local_settings, is no longer read by any task: the lookup falls through to the role template, with no warning. It must be moved to the new names.
    2. The role's _9998 template no longer starts from Horizon's example file: it has no imports and no example comments, and it starts directly with Kolla's settings (roles/horizon/templates/_9998-kolla-settings.py.j2:1-5); _9999-custom-settings.py.j2 is empty. An operator file at the new names replaces the whole role template, as before. NOT AVAILABLE In which order Horizon loads local_settings.py and the files of local_settings.d, and where the CACHES that _9998 extends is defined (:21-22): that is Horizon code, not in these sources.
    3. On the first 2024.1 run the config.json task and the two settings tasks write new files and notify Restart horizon container (roles/horizon/tasks/config.yml:43-55,75-109). No task of the role removes the 2023.1 files local_settings and custom_local_settings from /etc/kolla/horizon/ (no state: absent under roles/horizon/); they are no longer listed in config.json.
  • Removed dashboards: changed in 2024.1 CODE. The freezer, murano, sahara, senlin, solum and vitrage entries are gone from the container environment (ENABLE_*, roles/horizon/defaults/main.yml:9-24) and from the policy list (roles/horizon/tasks/config.yml:19-41), and the murano-dashboard clone and dev-mode volume are gone (roles/horizon/tasks/clone.yml, roles/horizon/defaults/main.yml:123-129). ENABLE_FWAAS is new, driven by enable_horizon_fwaas = enable_neutron_fwaas (roles/horizon/defaults/main.yml:12, group_vars/all.yml:777). The image script also has a venus dashboard switch, ENABLE_VENUS (kolla docker/horizon/extend_start.sh:175-181), which Kolla-Ansible never sets, so it is always treated as no (:177).
  • fact sheet C §4.2: enabling or disabling any service that has a horizon plugin (designate, octavia, magnum, fwaas, …) changes the container environment (ENABLE_<PLUGIN>, roles/horizon/defaults/main.yml:9-24); the horizon container is then recreated on the next deploy/reconfigure even if no horizon config changed CODE.
  • Kolla images §5.2: a recreate (new image, changed parameters) or a settings change makes the next start regenerate the static assets; a plain restart with unchanged settings does not CODE. The settings hash covers /etc/openstack-dashboard/local_settings.d, where the two kolla files now live (kolla docker/horizon/extend_start.sh:206-223). New in 2024.1: manage.py compress --force is tried up to five times; if all five fail, the script prints "The compress operation failed after 5 attempts." and runs exit 1 (:243-259). kolla_start sources this script (kolla docker/base/start.sh:20), so the start fails before kolla_httpd_setup and httpd (extend_start.sh:275) CODE. NOT AVAILABLE How long such a start takes, and why compress would fail.
  • Tags §3.1, row <svc> API service: safe on its own "yes, it is the intended unit"; horizon runs neither Keystone registration nor DB sync, by default; batch with ANSIBLE_SERIAL. Prerequisites: MariaDB, RabbitMQ, memcached, Keystone (registration), HAProxy VIP. The play's serial is kolla_serial, default 0, and its max_fail_percentage defaults to 100 (site.yml:745-749) CODE.
  • HAProxy frontends CODE: new in 2024.1, the external frontends take horizon_external_fqdn (default kolla_external_fqdn, group_vars/all.yml:422) and the redirect frontends get an ACME challenge rule (roles/horizon/defaults/main.yml:41-69). The backend balances roundrobin when memcached or the DB backend is enabled, else source (:59), as in 2023.1.
  • 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, container stop timeout: in 2024.1 the stop goes through the container's systemd unit, whose ExecStop is /usr/bin/<engine> stop <name> -t <graceful_timeout> (module_utils/kolla_systemd_worker.py:32), with docker_graceful_timeout 60 s (group_vars/all.yml:139). Precautions: drain long operations before restarts; raise docker_graceful_timeout if needed. The first 2024.1 check of a container whose unit 2023.1 wrote reports drift (F16).

Known limits and open points

  • What is not known, row "Horizon": the sources do not establish how long a start that regenerates the static assets takes.
  • What is not known, row "memcached": the sources do not establish whether cached tokens are lost when the membership changes or the container restarts, and the effect on auth latency and Horizon sessions.
  • fact sheet C §4.8, "Operational notes", three points, checked against 2024.1: sessions live in memcached unless the DB backend is used (in 2024.1: when horizon_backend_database is false and the memcached group is not empty, roles/horizon/templates/_9998-kolla-settings.py.j2:7-23 CODE; NOT AVAILABLE: whether a horizon restart or a memcached restart logs users out); image side: when collectstatic and compress run (NOT AVAILABLE: how long they take); Horizon config is independent of host count except for the memcached list (the only groups[...] lookup of the settings template is groups['memcached'], _9998-kolla-settings.py.j2:19-21) CODE.
  • fact sheet C §8, item 9: NOT AVAILABLE: Horizon restart: session survival (memcached) and start-up duration.
  • Kolla images §6, item 14: memcached has no data volume and no persistence option CODE; whether every restart therefore empties the cache, with token-cache misses and lost Horizon sessions where they are kept in memcached, is NOT AVAILABLE (memcached semantics).
  • Kolla images §7: not available from the sources: Horizon regeneration time after a recreate or a settings change, and why compress could fail five times.
  • The image start script still handles the 2023.1 names: it links /etc/openstack-dashboard/custom_local_settings when that file exists and includes local_settings and custom_local_settings in the settings hash (kolla docker/horizon/extend_start.sh:17-23,209-212) CODE. Kolla-Ansible 2024.1 no longer writes either file (roles/horizon/templates/horizon.json.j2:21-32), so under Kolla-Ansible these branches find nothing.
  • Known bugs and limitations, Open questions and Findings have no entry specific to Horizon.

Service card

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

Item Value
Play site.yml:740
Tags horizon
Play host patterns horizon
Node types in play (example inventory) control
Node types running its containers control
Containers horizon
deploy/reconfigure flow (tasks/deploy.yml) config → check-containers → clone (if) → bootstrap (if) → 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, policy_item.yml, precheck.yml, pull.yml, reconfigure.yml, stop.yml, upgrade.yml
Templates _9998-kolla-settings.py.j2, _9999-custom-settings.py.j2, horizon.conf.j2, horizon.json.j2
Handlers (definition order) Restart horizon container
Key variables enable_horizon, enable_horizon_*, horizon_backend_database
Role dependencies none