Skip to content

DBSU SSH key exchange assumes pg_cluster is an inventory group #770

Description

@Vonng

Problem

The DBSU SSH key exchange task currently derives its delegation targets from the Ansible inventory group named by pg_cluster:

with_nested:
  - "{{ [dbsu_ssh_keys.stdout] }}"
  - "{{ groups[pg_cluster] }}"

However, pg_cluster is the logical PostgreSQL cluster identity calculated from instance metadata. It is not guaranteed to be an Ansible group name.

This is visible in Citus inventories: logical clusters such as pg-citus1 and pg-citus2 are members of a broader inventory group, so groups[pg_cluster] may be undefined. As a result, the DBSU SSH key exchange cannot reliably enumerate or delegate to all members of the same logical PostgreSQL cluster.

Expected behavior

The task should exchange each DBSU public key among the members of the same logical PostgreSQL cluster, independently of how hosts are arranged into Ansible inventory groups.

Scope

The issue is limited to DBSU SSH key exchange. Ordinary inventories often hide the problem because their logical cluster name happens to match an inventory group name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions