<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openstack/kolla-ansible.git/ansible/roles/nova-cell/templates/libvirtd.conf.j2, branch stable/2026.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.platform-os.org/openstack/kolla-ansible.git/atom?h=stable%2F2026.1</id>
<link rel='self' href='https://git.platform-os.org/openstack/kolla-ansible.git/atom?h=stable%2F2026.1'/>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla-ansible.git/'/>
<updated>2026-06-29T00:11:47+00:00</updated>
<entry>
<title>Tune libvirtd connection limits for OpenStack</title>
<updated>2026-06-29T00:11:47+00:00</updated>
<author>
<name>Michael Still</name>
<email>mikal@stillhq.com</email>
</author>
<published>2026-06-29T00:11:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla-ansible.git/commit/?id=75a9dcd132b0a5aab69bf234dd621c9035208174'/>
<id>urn:sha1:75a9dcd132b0a5aab69bf234dd621c9035208174</id>
<content type='text'>
The libvirt daemon ships with max_workers=20 and max_client_requests=5.
Those defaults suit a multi-tenant host serving many mutually
distrustful clients, where the per-client request cap protects the
daemon from any single client monopolising it. Under Kolla-Ansible,
nova-compute is effectively the sole privileged client of libvirtd, so
the cap of 5 concurrent requests per client becomes the binding
constraint rather than a safety net.

When several instances build at once -- as they do during the tempest
run of the upgrade jobs -- nova-compute's concurrent libvirt RPCs
(instance defineXML calls plus the resource-tracker periodic) exceed
five. Further requests queue, the connection's keepalive responses are
starved, and after keepalive_interval (5s) x keepalive_count (5) = 25s
libvirtd closes the connection. nova then sees "Cannot recv data:
Input/output error" mid-defineXML, the build is rescheduled, and once
all hosts are exhausted the instance is left in ERROR. This presents as
flaky upgrade-job failures.

Example failure, on the voting kolla-ansible-debian-bookworm-upgrade
job (stable/2025.2):

  https://zuul.opendev.org/t/openstack/build/73ff5a97567d4e05b1774170e0f4aada

with primary/logs/kolla/libvirt/libvirtd.txt showing libvirt's own
recommendation to tune this parameter:

  warning : Client hit max requests limit 5. This may result in
  keep-alive timeouts. Consider tuning the max_client_requests server
  parameter
  ...
  error : connection closed due to keepalive timeout

Raise the per-client cap to 20 -- comfortably above the handful of
concurrent builds plus periodics seen in practice -- and the worker
pool to 50 so that lifting the per-client limit does not starve other
connections such as live migration, health checks and periodic tasks.
Both values are exposed as variables (libvirt_max_client_requests and
libvirt_max_workers) so operators can tune them further.

This is not a Kolla-specific workaround -- the stock libvirtd.conf
comment warns that setting max_client_requests too low "may cause
keepalive timeouts", and since 2022 libvirtd emits the runtime warning
quoted above. As Daniel Berrange explained when he added that warning,
the keepalive packets "are subject to the 'max_client_requests' limit
just like any API calls", so a client that saturates the limit can have
its connection dropped:

  https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/5NIJPA7SJVY55VSK7RTEDEHKWOZYJKT6/

Red Hat documents the same tuning for libvirt hosts under load in its
knowledge base, notably "Too many active clients are dropping the
connection" at https://access.redhat.com/solutions/28146.

Assisted-By: Claude Opus 4.8 (1M context, medium effort)
Partial-Bug: 2158515
Change-Id: I131c3d4d57dc73ca4dd421cc8f28465248c9830e
(cherry picked from commit 5acd2f91d22213ef04bd6988a2a0261982b0cf05)
Signed-off-by: Michael Still &lt;mikal@stillhq.com&gt;
</content>
</entry>
<entry>
<title>libvirt: support SASL authentication</title>
<updated>2022-03-10T16:57:16+00:00</updated>
<author>
<name>Mark Goddard</name>
<email>mark@stackhpc.com</email>
</author>
<published>2022-03-04T17:57:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla-ansible.git/commit/?id=d2d4b53d47df3b1a250c21404a8ec140873d4ce5'/>
<id>urn:sha1:d2d4b53d47df3b1a250c21404a8ec140873d4ce5</id>
<content type='text'>
In Kolla Ansible OpenStack deployments, by default, libvirt is
configured to allow read-write access via an unauthenticated,
unencrypted TCP connection, using the internal API network.  This is to
facilitate migration between hosts.

By default, Kolla Ansible does not use encryption for services on the
internal network (and did not support it until Ussuri). However, most
other services on the internal network are at least authenticated
(usually via passwords), ensuring that they cannot be used by anyone
with access to the network, unless they have credentials.

The main issue here is the lack of authentication. Any client with
access to the internal network is able to connect to the libvirt TCP
port and make arbitrary changes to the hypervisor. This could include
starting a VM, modifying an existing VM, etc. Given the flexibility of
the domain options, it could be seen as equivalent to having root access
to the hypervisor.

Kolla Ansible supports libvirt TLS [1] since the Train release, using
client and server certificates for mutual authentication and encryption.
However, this feature is not enabled by default, and requires
certificates to be generated for each compute host.

This change adds support for libvirt SASL authentication, and enables it
by default. This provides base level of security. Deployments requiring
further security should use libvirt TLS.

[1] https://docs.openstack.org/kolla-ansible/latest/reference/compute/libvirt-guide.html#libvirt-tls

Depends-On: https://review.opendev.org/c/openstack/kolla/+/833021
Closes-Bug: #1964013
Change-Id: Ia91ceeb609e4cdb144433122b443028c0278b71e
</content>
</entry>
<entry>
<title>Introduce nova_libvirt_logging_debug</title>
<updated>2021-03-10T15:15:29+00:00</updated>
<author>
<name>Michał Nasiadka</name>
<email>mnasiadka@gmail.com</email>
</author>
<published>2021-03-08T12:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla-ansible.git/commit/?id=eabdf1e9f959c274e827e8c24a6ea63709c1033c'/>
<id>urn:sha1:eabdf1e9f959c274e827e8c24a6ea63709c1033c</id>
<content type='text'>
In order to disable libvirt debug in CI (which takes vast amount of storage)
this change introduces nova_libvirt_logging_debug and disables that in CI.

Change-Id: I90bfd1b300ad3202ea4d139fda6d6beb44c5820f
</content>
</entry>
<entry>
<title>Deploy neutron-mlnx-agent and neutron-eswitchd containers</title>
<updated>2020-08-13T22:33:57+00:00</updated>
<author>
<name>Bharat Kunwar</name>
<email>bharat@stackhpc.com</email>
</author>
<published>2020-07-17T11:05:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla-ansible.git/commit/?id=4809462f4e4306d76888f36f48005dd416b75d4d'/>
<id>urn:sha1:4809462f4e4306d76888f36f48005dd416b75d4d</id>
<content type='text'>
Change-Id: I173669bdf92b1f2ea98907ba16808ca3c914944c
</content>
</entry>
<entry>
<title>nova: Add debug logging to libvirtd.conf</title>
<updated>2020-04-15T15:05:57+00:00</updated>
<author>
<name>Michal Nasiadka</name>
<email>mnasiadka@gmail.com</email>
</author>
<published>2020-03-26T12:16:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla-ansible.git/commit/?id=87a1c06b84f83aa740632b3f756da5b8c3a877fa'/>
<id>urn:sha1:87a1c06b84f83aa740632b3f756da5b8c3a877fa</id>
<content type='text'>
Change-Id: Ibbb962b035b695eec022566cf9f7d6c200480c45
</content>
</entry>
<entry>
<title>Copy Nova role as a basis for the Nova cell role</title>
<updated>2019-10-01T13:48:19+00:00</updated>
<author>
<name>Doug Szumski</name>
<email>d.s.szumski@gmail.com</email>
</author>
<published>2019-07-23T13:07:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla-ansible.git/commit/?id=952b53089b7c7d9ff3c268167462346ae2bff3d3'/>
<id>urn:sha1:952b53089b7c7d9ff3c268167462346ae2bff3d3</id>
<content type='text'>
The idea is to factor out a role for deploying Nova related services
to cells. Since all deployments use cells, this role can be used
in both regular deployments which have just cell0 and cell1,
and deployments with many cells.

Partially Implements: blueprint support-nova-cells
Change-Id: Ib1f36ec0a773c384f2c1eac1843782a3e766045a
</content>
</entry>
</feed>
