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:738-750). 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). As in 2024.1, that variable is
a plain false (group_vars/all.yml:1267) CODE (Tags §3).
Changed in 2025.1 CODE:
- One
compressattempt: the image start script runsmanage.py compress --forceonce, underset -o errexit(kolladocker/horizon/extend_start.sh:3,:244-248); the 2024.1 loop of five attempts is gone. A failingcompressnow stops the start at the first failure (below). - Restarts: the config tasks notify nothing;
check-containers.ymlimportsservice-check-containers, which restartshorizononly when its configuration or definition changed (Tags §2.4). The handler has nokolla_action != "config"guard any more (roles/horizon/handlers/main.yml:2-15). Newcheck.yml(roles/horizon/tasks/check.yml:2-4). ENABLE_VENUSis now set fromenable_horizon_venus, which followsenable_venus(roles/horizon/defaults/main.yml:23,group_vars/all.yml:902): the container environment gains a variable, so the first 2025.1 run recreateshorizonand regenerates the static assets.- Swift settings removed from
_9998-kolla-settings.py(SWIFT_FILE_TRANSFER_CHUNK_SIZEand theswiftclientlogger), with the Swift role (Swift). - Glance CORS:
horizon_public_endpoint, which Glance allows as CORS origin, is now built fromhorizon_external_fqdninstead ofkolla_external_fqdn(group_vars/all.yml:479-481,roles/glance/templates/glance-api.conf.j2:147-148); withhorizon_external_fqdnoverridden, the first 2025.1 run changesglance-api.conf. - Other: both HAProxy backends add
option httpchk(roles/horizon/defaults/main.yml:41,62), which a-t horizonrun renders without restarting HAProxy (F18);horizon_copy_certsdrives the CA copy; the image name takesdocker_image_name_prefix; the settings hash also covers/etc/openstack-dashboard/themes(kolladocker/horizon/extend_start.sh:209-213). - No rolling reconfigure through the CLI (F19); a batched run is
kolla-ansible deploy -t horizon -e kolla_serial=N.
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 2024.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 (since 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:64-90), each looked up withwith_first_foundin/etc/kolla/config/horizon/<host>/, then/etc/kolla/config/horizon/, then the role template (:72-75,:86-89).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:59-66). What follows for an operator:- An override kept at the pre-2024.1 names,
/etc/kolla/config/horizon/local_settingsorcustom_local_settings, is not 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. - No task of the role removes older
local_settingsandcustom_local_settingsfiles from/etc/kolla/horizon/(nostate: absentunderroles/horizon/); they are not listed inconfig.json.
- An override kept at the pre-2024.1 names,
- Removed dashboards (since 2024.1) CODE. The freezer, murano, sahara, senlin, solum and vitrage entries are
absent from the container environment (
ENABLE_*,roles/horizon/defaults/main.yml:9-25) and from the policy list (roles/horizon/tasks/config.yml:16-38), and the murano-dashboard clone and dev-mode volume are gone (roles/horizon/tasks/clone.yml,roles/horizon/defaults/main.yml:126-131).ENABLE_FWAAS, added in 2024.1, is driven byenable_horizon_fwaas=enable_neutron_fwaas(roles/horizon/defaults/main.yml:12,group_vars/all.yml:891). Changed in 2025.1: Kolla-Ansible now sets the image's venus switch,ENABLE_VENUS(above). - 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-25); 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-224). Changed in 2025.1:manage.py compress --forceruns once (:244-248); the script runs underset -o errexit(:3), so a failingcompressends the script at once.kolla_startsources this script (kolladocker/base/start.sh:23), so the start fails beforekolla_httpd_setupand httpd (kolladocker/horizon/extend_start.sh:264) CODE. NOT AVAILABLE How long such a start takes, and whycompresswould fail; to be confirmed by the community. - 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 withdeploy -e kolla_serial=N(reconfigureforceskolla_serial=0). Prerequisites: MariaDB, RabbitMQ, memcached, Keystone (registration), HAProxy VIP. The play'sserialiskolla_serial, default0, and itsmax_fail_percentagedefaults to 100 (site.yml:743-747) CODE. - HAProxy frontends CODE: as in 2024.1, the external frontends take
horizon_external_fqdn(defaultkolla_external_fqdn,group_vars/all.yml:479) and the redirect frontends get an ACME challenge rule (roles/horizon/defaults/main.yml:43-72). The backend balancesroundrobinwhen memcached or the DB backend is enabled, elsesource(:40); changed in 2025.1, they addoption httpchk. - R8, precautions for a HAProxy config change:
--skip-tags haproxywhen you don't intend to change frontends; a-t horizonrun 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). Precautions: drain long operations before restarts; raisedocker_graceful_timeoutif needed. The first 2025.1 check of a container whose unit 2024.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 2025.1: sessions live in memcached unless the DB backend is used
(in 2025.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 (in 2025.1 a single failure stops the start). - The image start script still handles the pre-2024.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 2025.1 does not write 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:738 |
| 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