From aa502730624d4599daddee8b64266f3c60106e27 Mon Sep 17 00:00:00 2001 From: Michele Palazzi Date: Fri, 13 Nov 2026 17:34:17 +0100 Subject: [PATCH 1/2] chore: refresh for openstack 2026.1 Signed-off-by: Michele Palazzi --- .github/workflows/ci.yml | 2 +- .github/workflows/container.yml | 2 +- README.md | 10 ++++++++++ docker/Dockerfile | 8 ++++---- docs/configuration/index.rst | 31 +++++++++++++++++++++++++++++-- docs/deployment/container.rst | 6 +++--- 6 files changed, 48 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0135a95..a806990 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.12", "3.13"] + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 00b8bef..a7b6603 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -11,7 +11,7 @@ on: tags: ["v*"] env: - BASE_TAG: 2025.1-ubuntu-noble + BASE_TAG: 2026.1-ubuntu-noble jobs: image: diff --git a/README.md b/README.md index 362d576..7fa9e3e 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,10 @@ username = guest password = guest virtual_host = / +[oslo_messaging_rabbit] +rabbit_quorum_queue = true +rabbit_transient_quorum_queue = true + [executor] max_concurrent_migrations = 2 migration_timeout = 600 @@ -411,6 +415,12 @@ serviced by an independent unit on its own threads): The unassigned-hosts pool uses the reserved name `_unassigned_` in its topics. +Use quorum queues (`[oslo_messaging_rabbit] rabbit_quorum_queue` and +`rabbit_transient_quorum_queue`), as Kolla-Ansible does for the OpenStack +services. Without them oslo.messaging declares non-durable classic queues, +a deprecated feature in RabbitMQ 4 (`transient_nonexcl_queues`). See the +configuration reference for switching an existing deployment. + ## Project Layout ``` diff --git a/docker/Dockerfile b/docker/Dockerfile index 00a0e9c..9dd7049 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,8 +20,8 @@ # # python -m build # docker build -f docker/Dockerfile \ -# --build-arg BASE_TAG=2025.1-ubuntu-noble \ -# -t kronos:2025.1-ubuntu-noble . +# --build-arg BASE_TAG=2026.1-ubuntu-noble \ +# -t kronos:2026.1-ubuntu-noble . # # Run (standalone, without kolla-ansible): # @@ -30,10 +30,10 @@ # -v /etc/kronos/kronos-engine.json:/var/lib/kolla/config_files/config.json:ro \ # -v /etc/kronos/kronos.conf:/var/lib/kolla/config_files/kronos.conf:ro \ # -v /etc/kronos/policies.yaml:/var/lib/kolla/config_files/policies.yaml:ro \ -# kronos:2025.1-ubuntu-noble +# kronos:2026.1-ubuntu-noble ARG BASE_IMAGE=quay.io/openstack.kolla/openstack-base -ARG BASE_TAG=2025.1-ubuntu-noble +ARG BASE_TAG=2026.1-ubuntu-noble FROM ${BASE_IMAGE}:${BASE_TAG} LABEL maintainer="Kronos maintainers" name="kronos" diff --git a/docs/configuration/index.rst b/docs/configuration/index.rst index 6a1293c..6b68b95 100644 --- a/docs/configuration/index.rst +++ b/docs/configuration/index.rst @@ -31,6 +31,33 @@ and regenerated with: .. literalinclude:: kronos.conf.sample :language: ini +Messaging +--------- + +Kronos shares the OpenStack RabbitMQ broker. Kolla-Ansible configures the +OpenStack services with quorum queues, set the same for Kronos: + +.. code-block:: ini + + [oslo_messaging_rabbit] + rabbit_quorum_queue = true + rabbit_transient_quorum_queue = true + +Without these options oslo.messaging declares non-durable classic queues +(the RPC topic, server and fanout queues) and a non-durable ``openstack`` +exchange. RabbitMQ 4 deprecates non-durable non-exclusive queues +(deprecated feature ``transient_nonexcl_queues``). RabbitMQ 4.2 still +permits them. ``rabbit_stream_fanout`` is not needed: Kronos only casts to +topics, and the option also requires ``rabbit_qos_prefetch_count`` greater +than 0. + +Switching an existing deployment: RabbitMQ refuses to redeclare an +existing queue or exchange with a different durability +(``PRECONDITION_FAILED``). Stop the engines and executors, delete the +``kronos.*`` queues, delete the ``openstack`` exchange if nothing else is +bound to it (``rabbitmqctl list_bindings source_name destination_name``), +then start Kronos with the new options. + Policies file ------------- @@ -82,9 +109,9 @@ flags or guests retaining an older CPU model after reconfiguration. Nova's migration pre-check remains authoritative. Producer source: -`Nova libvirt CPU trait reporting `_. +`Nova libvirt CPU trait reporting `_. API source: -`Placement provider traits `_. +`Placement provider traits `_. When the option is enabled, both ``kronos-record`` and engine SIGUSR1 snapshots write ``placement/cpu_traits.json``, a mapping from host names diff --git a/docs/deployment/container.rst b/docs/deployment/container.rst index 83e178c..3217dde 100644 --- a/docs/deployment/container.rst +++ b/docs/deployment/container.rst @@ -19,8 +19,8 @@ daemons: the ``command`` in ``config.json`` selects which one starts. python -m build docker build -f docker/Dockerfile \ - --build-arg BASE_TAG=2025.1-ubuntu-noble \ - -t kronos:2025.1-ubuntu-noble . + --build-arg BASE_TAG=2026.1-ubuntu-noble \ + -t kronos:2026.1-ubuntu-noble . ``BASE_TAG`` selects the OpenStack release and distro of the base image; use the same release your cloud runs. @@ -50,7 +50,7 @@ Standalone run -v /etc/kronos/kronos-engine.json:/var/lib/kolla/config_files/config.json:ro \ -v /etc/kronos/kronos.conf:/var/lib/kolla/config_files/kronos.conf:ro \ -v /etc/kronos/policies.yaml:/var/lib/kolla/config_files/policies.yaml:ro \ - kronos:2025.1-ubuntu-noble + kronos:2026.1-ubuntu-noble The executor is the same image with the executor ``config.json`` (its ``command`` carries the ``--aggregate`` flags). From 314aa94e76139600e4d4bc7b76c6547c06054f79 Mon Sep 17 00:00:00 2001 From: Michele Palazzi Date: Fri, 13 Nov 2026 17:40:30 +0100 Subject: [PATCH 2/2] ci: fix lint and regenerate the config sample Signed-off-by: Michele Palazzi --- docs/configuration/kronos.conf.sample | 4 ++-- kronos/engine/affinity_enforcer.py | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/configuration/kronos.conf.sample b/docs/configuration/kronos.conf.sample index be77ceb..959f2c9 100644 --- a/docs/configuration/kronos.conf.sample +++ b/docs/configuration/kronos.conf.sample @@ -459,13 +459,13 @@ #status_code_retry_delay = # List of retriable HTTP status codes that should be retried. If not set -# default to [503] (list value) +# default to `[503]` (list value) #retriable_status_codes = # DEPRECATED: The default interface for endpoint URL discovery. (string value) # This option is deprecated for removal. # Its value may be silently ignored in the future. -# Reason: Using valid-interfaces is preferrable because it is capable of +# Reason: Using valid-interfaces is preferable because it is capable of # accepting a list of possible interfaces. #interface = diff --git a/kronos/engine/affinity_enforcer.py b/kronos/engine/affinity_enforcer.py index cd95e93..c08aadd 100644 --- a/kronos/engine/affinity_enforcer.py +++ b/kronos/engine/affinity_enforcer.py @@ -307,12 +307,11 @@ def _detect_violations( out.append( _Violation(group=group, offending_uuids=frozenset(offenders)), ) - elif group.policy in AFFINITY_POLICIES: + elif group.policy in AFFINITY_POLICIES and len(hosts_used) > 1: # Violation when members span more than one host. - if len(hosts_used) > 1: - out.append( - _Violation(group=group, offending_uuids=frozenset(visible)), - ) + out.append( + _Violation(group=group, offending_uuids=frozenset(visible)), + ) return out