Skip to content

feat(infra): show the hosts of an infra repo with node state #5123

Closed

Description

@dan-petty

Problem or Motivation

To see the hosts of dan-petty/homelab, a person runs scripts/cluster-status.sh and scripts/health-check.sh, or reads kubectl get nodes and the inventory side by side. On 2026-11-10 the node hawk hung and came back on 2026-11-12 with 16 GiB of RAM; nothing showed the inventory and the node state together. A read of 2026-11-12 shows facts that one view should give: hawk is cordoned, allocatable memory equals capacity on every node (no system reservation yet), and condor runs kernel 7.2.8 while the other nodes run 7.2.15.

Proposed Solution & Architectural Design

devops infra status <repo> (design section 5 in tracker #5120). One row for each inventory host: group, in service or in the offline group, Kubernetes node name (devops_infra_node_name, default the first DNS label), Ready, cordoned, kernel and kubelet version, memory capacity and allocatable, GPU allocatable. All of these come from the Kubernetes API of infra.repos[].kube_context, so the default run starts no SSH connection. --ping adds SSH reachability (ansible-runner ad-hoc ping) and a pending reboot (stat of /run/reboot-required), and needs agent level plan. --format table|json|yaml. --dry-run makes zero requests.

Target Subsystem

OpenTofu / Infrastructure as Code

Existing Tool Considered

The Kubernetes API (through the existing devops k8s client) and ansible-runner give every fact. The command joins them. Cost: about 1.5M tokens to build, 0.2M a quarter to keep, 2 hours.

Acceptance Criteria

  • Tests with the fixture repo of feat(infra): onboard an Ansible infra repo #5121 and fake node objects: a cordoned node, a NotReady node, a host in offline with no node, a node with no inventory host.
  • A test: without --ping no ansible process starts.
  • A test: --ping from an agent caller on a repo at level none is refused.
  • A test: --dry-run sends no request.
  • Live run on dan-petty/homelab, recorded in a PR comment: 4 in-service hosts and 2 offline hosts; hawk cordoned with about 15.5 GiB; --ping reaches the 4 in-service hosts and shows whether condor has a pending reboot.

Dependencies

#5121

Activity

  1. added
    source/agent
    type/feature
    scope/infra
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  2. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 12, 2026
  4. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 12, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 12, 2026
  6. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-12 19:05 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/infrasource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions