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¶
- Scenario: Reconfigure a single service §2
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¶
- Dependencies: Component dependencies §3
Evidence¶
- Fact sheet: fact sheet C §4
- Image side: Kolla images
§4 (row
horizon), Kolla images §5.2
Before and after a run¶
- Settings files renamed: changed in 2024.1 CODE.
local_settings.j2andcustom_local_settings.j2no longer exist; the role renders_9998-kolla-settings.pyand_9999-custom-settings.py(roles/horizon/tasks/config.yml:75-109), each looked up withwith_first_foundin/etc/kolla/config/horizon/<host>/, then/etc/kolla/config/horizon/, then the role template (:83-86,:101-104).config.jsoncopies them into/etc/openstack-dashboard/local_settings.d/(roles/horizon/templates/horizon.json.j2:21-32), a directory the image creates and links into theopenstack_dashboardpackage, next to alocal_settings.pycopied from Horizon's example file (kolladocker/horizon/Dockerfile.j2:58-65). What follows for an operator:- An override kept at the 2023.1 names,
/etc/kolla/config/horizon/local_settingsorcustom_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. - The role's
_9998template 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.j2is empty. An operator file at the new names replaces the whole role template, as before. NOT AVAILABLE In which order Horizon loadslocal_settings.pyand the files oflocal_settings.d, and where theCACHESthat_9998extends is defined (:21-22): that is Horizon code, not in these sources. - On the first 2024.1 run the
config.jsontask and the two settings tasks write new files and notifyRestart horizon container(roles/horizon/tasks/config.yml:43-55,75-109). No task of the role removes the 2023.1 fileslocal_settingsandcustom_local_settingsfrom/etc/kolla/horizon/(nostate: absentunderroles/horizon/); they are no longer listed inconfig.json.
- An override kept at the 2023.1 names,
- 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_FWAASis new, driven byenable_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(kolladocker/horizon/extend_start.sh:175-181), which Kolla-Ansible never sets, so it is always treated asno(: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 (kolladocker/horizon/extend_start.sh:206-223). New in 2024.1:manage.py compress --forceis tried up to five times; if all five fail, the script prints "The compress operation failed after 5 attempts." and runsexit 1(:243-259).kolla_startsources this script (kolladocker/base/start.sh:20), so the start fails beforekolla_httpd_setupand httpd (extend_start.sh:275) CODE. NOT AVAILABLE How long such a start takes, and whycompresswould 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 withANSIBLE_SERIAL. Prerequisites: MariaDB, RabbitMQ, memcached, Keystone (registration), HAProxy VIP. The play'sserialiskolla_serial, default0, and itsmax_fail_percentagedefaults to 100 (site.yml:745-749) CODE. - HAProxy frontends CODE: new in 2024.1, the external frontends take
horizon_external_fqdn(defaultkolla_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 balancesroundrobinwhen memcached or the DB backend is enabled, elsesource(:59), as in 2023.1. - R8, precautions for a HAProxy config change:
ANSIBLE_SERIAL=1for haproxy changes;--skip-tags haproxywhen you don't intend to change frontends. - R24, container stop timeout: in 2024.1 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:32), withdocker_graceful_timeout60 s (group_vars/all.yml:139). Precautions: drain long operations before restarts; raisedocker_graceful_timeoutif 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_databaseis false and thememcachedgroup is not empty,roles/horizon/templates/_9998-kolla-settings.py.j2:7-23CODE; NOT AVAILABLE: whether a horizon restart or a memcached restart logs users out); image side: whencollectstaticandcompressrun (NOT AVAILABLE: how long they take); Horizon config is independent of host count except for the memcached list (the onlygroups[...]lookup of the settings template isgroups['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
compresscould fail five times. - The image start script still handles the 2023.1 names: it links
/etc/openstack-dashboard/custom_local_settingswhen that file exists and includeslocal_settingsandcustom_local_settingsin the settings hash (kolladocker/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/) |
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 |
Related¶
- Memcached — Horizon keeps its sessions there unless the DB backend is used
- Tags §3 — what
-t horizonruns with defaults, in the paragraph below the master table - Reconfigure a single service §2 — what a service tag also touches
- HAProxy + Keepalived —
-t horizonruns the loadbalancer horizon include - Kolla images §5.2 — when a start regenerates the static
assets, and the new
compressretry - Components — the other component pages