Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 29, 2025

Internal Python-based config generation (netlab initial -o) was not excluding nodes in the unprovisioned group, while Ansible playbooks correctly filter them via hosts: all:!unprovisioned.

Changes

  • Added filter_unprovisioned() utility in netsim/cli/initial/utils.py

    • Uses existing groups.group_members() to get unprovisioned nodes
    • Returns filtered nodeset excluding those members
  • Applied filter in nodeset calculation

    • configs.py line 188: config file generation path
    • deploy.py line 134: config deployment path

Example

# Before: all nodes processed regardless of group membership
nodeset = _nodeset.parse_nodeset(args.limit, topology) if args.limit else list(topology.nodes.keys())

# After: unprovisioned nodes filtered out
nodeset = _nodeset.parse_nodeset(args.limit, topology) if args.limit else list(topology.nodes.keys())
nodeset = utils.filter_unprovisioned(nodeset, topology)

With a topology containing r1, r2, r3 where r3 is in the unprovisioned group, netlab initial -o config now generates configs only for r1 and r2.

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] Internal "netlab initial" configs do not consider the "unprovisioned" nodes</issue_title>
<issue_description>netlab initial should consider the "unprovisioned" group when calculating the configuration nodeset.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix netlab initial configs to consider unprovisioned nodes Filter unprovisioned group members from internal config generation Dec 29, 2025
Copilot AI requested a review from ipspace December 29, 2025 08:23
@ipspace ipspace marked this pull request as ready for review December 29, 2025 14:53
Copy link
Owner

@ipspace ipspace left a comment

Choose a reason for hiding this comment

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

Nice job

@ipspace ipspace merged commit 33b88d7 into dev Dec 29, 2025
11 checks passed
@ipspace ipspace deleted the copilot/fix-netlab-initial-configs branch December 29, 2025 15:44
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] Internal "netlab initial" configs do not consider the "unprovisioned" nodes

2 participants