Debian Codegraph @

releasenotes/notes/fix-resource-provider-hostname-mismatch-2139369-a1b2c3d4e5f6g7h8.yaml

raw symbols SCIP
1 ---
2 fixes:
3 - |
4 A new configuration option ``[agent] resource_provider_name`` that
5 allows operators to explicitly specify the name of the compute resource
6 provider in Placement has been added.
7
8 This defaults to ``socket.getfqdn()`` which typically
9 matches libvirt's hypervisor hostname behavior. If the resource provider
10 lookup fails with this name, Cyborg will automatically fall back to using
11 ``CONF.host``, providing backward compatibility for existing deployments.
12
13 The cyborg-agent now validates the resource provider name at startup by
14 querying Placement directly. It tries the configured name (defaulting to
15 ``socket.getfqdn()``) first, then falls back to ``CONF.host``. If neither
16 hostname finds a valid resource provider, the agent will fail to start
17 with a clear error message.
18
19 A new ``[agent] resource_provider_startup_retries`` option (default: 3)
20 controls how many times the agent retries the Placement lookup at startup,
21 using exponential backoff (1s, 2s, 4s, ...). This tolerates a startup race
22 where nova-compute has not yet created the resource provider in Placement.
23
24 This fixes `Bug 2139369`_ and addresses the disconnect between
25 how Cyborg identifies the compute resource provider name and
26 how Nova/Placement names it.
27
28 Previously, Cyborg used ``CONF.host`` (which defaults to
29 ``socket.gethostname()``) to look up the compute resource provider in
30 Placement. However, Nova uses libvirt's hostname determination, which
31 typically returns the FQDN. This mismatch caused
32 ``PlacementResourceProviderNotFound`` errors on systems where the short
33 hostname differs from the FQDN.
34
35 .. _Bug 2139369: https://bugs.launchpad.net/openstack-cyborg/+bug/2139369
36
37 upgrade:
38 - |
39 The cyborg-agent now requires Placement to be reachable at startup.
40 Previously the agent would start and only fail during the
41 ``update_usage`` periodic task. This aligns with nova-compute behavior
42 where the compute service validates its resource provider at startup.
43 Ensure Placement is available before starting cyborg-agent.
44
45 The agent retries the resource provider lookup up to 3 times by default
46 (configurable via ``[agent] resource_provider_startup_retries``), using
47 exponential backoff. The default of 3 retries gives approximately 7
48 seconds of tolerance (1s + 2s + 4s) for nova-compute to create the
49 resource provider.
50