Skip to content

interfaces: Mark ceph-ansible keys, quote the loopback0 fallback - #332

Merged
berendt merged 2 commits into
mainfrom
interface-defaults-cleanup
Oct 17, 2026
Merged

berendt merged 2 commits into
mainfrom
interface-defaults-cleanup

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

Two small fixes to all/099-interfaces.yml.

Mark the ceph-ansible keys. monitor_interface and radosgw_interface are set for every host, but only ceph-ansible reads them. The cephadm plays take monitor_address and radosgw_address instead; cephadm-rgw.yml fails when an RGW host has no radosgw_address. The keys stay because OSISM 11 still manages existing ceph-ansible clusters. A comment now says so.

Quote the loopback0 fallback. console_interface, hosts_interface, management_interface and k3s_interface use internal_interface|default(loopback0). Unquoted, loopback0 is a variable name, so with internal_interface unset the expression fails with "'loopback0' is undefined" instead of falling back. Quoting it gives the intended loopback0, matching network_interface. Hosts that set internal_interface render as before.

🤖 Generated with Claude Code

099-interfaces.yml sets monitor_interface and radosgw_interface for
every host, under a header that only says they come from ceph-ansible.
On a cephadm deployment they look like the knobs that place the
monitors and RGW daemons, but no cephadm play reads them:

- cephadm-bootstrap.yml and cephadm-hosts.yml take each host's address
  from monitor_address, falling back to the default IPv4 address;
- cephadm-rgw.yml fails when an RGW host has no radosgw_address, and
  its message says radosgw_interface is not supported, because
  resolving an interface name needs facts the play does not gather.

The keys stay: OSISM 11 still manages existing ceph-ansible clusters
(the reef and squid ceph-ansible images, --ceph-backend), which read
them. Add a comment saying that only ceph-ansible reads them and what
the cephadm plays use instead.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
console_interface, hosts_interface, management_interface and
k3s_interface fall back to loopback0 when internal_interface is unset:

  internal_interface|default(loopback0)

Unquoted, loopback0 is a variable name, and no such variable exists.
With internal_interface unset the expression is an undefined-variable
error ("'loopback0' is undefined") instead of the intended fallback.
The form dates from 8dda210 (2021, then default(eth0)) and was carried
through 410dff3, 0ce1810 and 8772eb3 (eth0 -> loopback0); the string
was always the intent, matching network_interface's own default.

Quote it. Hosts that set internal_interface render as before. Hosts
that do not now get loopback0, the interface OSISM uses for
network_interface, which is right on routed (BGP-to-host) hosts.
cilium_iface and kube_vip_iface follow k3s_interface. On a host
without a loopback0 interface the consumers (the hosts role and the
manager's *_host addresses in defaults/manager/000-defaults.yml,
which look up ansible_<interface>) still fail, now at the fact lookup.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@ideaship
ideaship marked this pull request as ready for review October 17, 2026 09:46
@ideaship
ideaship requested a review from berendt October 17, 2026 09:46
@ideaship ideaship self-assigned this Oct 17, 2026
@berendt
berendt merged commit 208b6e0 into main Oct 17, 2026
3 checks passed
@berendt
berendt deleted the interface-defaults-cleanup branch October 17, 2026 11:23
@github-project-automation github-project-automation Bot moved this from New to Done in Human Board Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants