Skip to content

cli: fix node list to show only cluster nodes - #127

Open
HarshwardhanPatil07 wants to merge 2 commits into
bootc-dev:mainfrom
HarshwardhanPatil07:fix-node-list
Open

cli: fix node list to show only cluster nodes#127
HarshwardhanPatil07 wants to merge 2 commits into
bootc-dev:mainfrom
HarshwardhanPatil07:fix-node-list

Conversation

@HarshwardhanPatil07

@HarshwardhanPatil07 HarshwardhanPatil07 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

fixes bink node list which was showing all containers (DNS, HAProxy, registries) across all clusters instead of only the actual nodes for the requested cluster.

Before (bug):
Found 6 cluster node(s):

✗ e2e-dns (status: exited, created: 2026-07-11 13:15:12)
✗ e2e-controller (status: exited, created: 2026-07-11 13:15:12)
✗ e2e-haproxy (status: exited, created: 2026-07-11 13:16:11)
✗ test-node1 (status: exited, created: 2026-08-13 12:20:13)
✗ test-haproxy (status: exited, created: 2026-08-13 12:21:26)
✓ test-dns (status: running, created: 2026-08-24 09:39:27)

After (fixed):
Found 1 cluster node(s):

✓ node1 (role: control-plane, status: running, created: 2026-08-24 10:49:22)

Fixes: #108

@HarshwardhanPatil07

HarshwardhanPatil07 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator Author

@Johan-Liebert1 @alicefr @ptalgulk01 PTAL

node list was using a container name prefix filter (name=k8s-) which
matched all bink containers including infrastructure ones (DNS, HAProxy).
It also did not scope to the requested cluster and displayed node names
with the cluster prefix baked in.

Switch to label-based filtering (bink.cluster-name) scoped to the
active cluster, skip containers that carry a bink.component label,
and read node names from the bink.node-name label. Also display the
node role when available.

Fixes: bootc-dev#108

Assisted-by: AI
Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Add negative assertions to multinode integration tests confirming that
DNS and HAProxy containers do not appear in node list output.

Assisted-by: AI
Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
listOutput := string(listSession.Out.Contents())
Expect(listOutput).To(ContainSubstring(node1), "node list should contain node1")
Expect(listOutput).To(ContainSubstring(node2), "node list should contain node2")
Expect(listOutput).ToNot(ContainSubstring("dns"), "node list should not show DNS container")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it will be better to check the full list content instead of checking the non existence of the dns

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] bink node list shows the pod instead of the node

2 participants