Skip to content

feat: add multi-subnet support for CoreDHCP/coresmd#4352

Merged
abhishek-sa1 merged 3 commits into
pub/q2_devfrom
feature/multi-subnet-coresmd-support
May 11, 2026
Merged

feat: add multi-subnet support for CoreDHCP/coresmd#4352
abhishek-sa1 merged 3 commits into
pub/q2_devfrom
feature/multi-subnet-coresmd-support

Conversation

@sujit-jadhav
Copy link
Copy Markdown
Collaborator

Summary

Add optional additional_subnets configuration under admin_network in network_spec.yml to support multi-RAC / multi-subnet PXE deployments with CoreDHCP relay (giaddr-based routing). Requires coresmd with multi-subnet support (coresmd PR #61).

Changes

File Change
input/network_spec.yml Added additional_subnets: [] field with documentation
.../schema/network_spec.json JSON schema validation for additional subnet entries
.../en_us_validation_msg.py 6 error messages for subnet validation
.../provision_validation.py _validate_additional_subnets() + _ranges_overlap() — validates CIDRs, routers within subnet, ranges within subnet, no overlap with admin or between subnets, no DHCP pool overlap
.../templates/configs.yaml.j2 Emits coredhcp_subnets and coredhcp_subnet_pools lists
.../templates/coredhcp.yaml.j2 New — dual-mode CoreDHCP template
.../vars/main.yml Template path variables
.../tasks/deploy_openchami.yml Copy coredhcp template after clone
.../tests/test_additional_subnets_validation.py New — 17 unit tests

Backward Compatibility

additional_subnets coresmd version Config format Works?
[] (single subnet) v0.4.x (current) Positional args (original)
[] (single subnet) New (PR #61) Positional args (backward compat)
Populated (multi-subnet) New (PR #61) key=value with subnet=/subnet_pool=

Testing

  • 37 unit tests pass (17 new + 20 existing)
  • Validation covers: invalid CIDR, router outside subnet, range outside subnet, admin overlap, inter-subnet overlap, DHCP pool overlap, invalid netmask, invalid range format
  • Single-subnet generates byte-identical config to original template

Add optional additional_subnets configuration under admin_network in
network_spec.yml to support multi-RAC / multi-subnet PXE deployments
with CoreDHCP relay (giaddr-based routing).

Changes:
- network_spec.yml: add additional_subnets field with documentation
- network_spec.json: JSON schema validation for subnet entries
- en_us_validation_msg.py: error messages for subnet validation
- provision_validation.py: validate CIDRs, routers, ranges, overlaps
- configs.yaml.j2: emit coredhcp_subnets/coredhcp_subnet_pools vars
- coredhcp.yaml.j2: dual-mode template (positional args for v0.4.x,
  key=value format with subnet=/subnet_pool= for multi-subnet)
- deploy_openchami.yml: overlay coredhcp template after clone
- vars/main.yml: add template path variables
- test_additional_subnets_validation.py: 17 unit tests

Single-subnet (flat) deployments continue to use the original
positional-argument config format compatible with coresmd v0.4.x.
Multi-subnet requires coresmd with multi-subnet support (PR #61).
Signed-off-by: Abhishek S A <abhishek.sa3@dell.com>
Signed-off-by: Sujit Jadhav <sujit.jadhav@dell.com>
@abhishek-sa1 abhishek-sa1 merged commit 7289eb7 into pub/q2_dev May 11, 2026
6 checks passed
@abhishek-sa1 abhishek-sa1 deleted the feature/multi-subnet-coresmd-support branch May 13, 2026 14:08
@abhishek-sa1 abhishek-sa1 restored the feature/multi-subnet-coresmd-support branch May 13, 2026 14:09
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.

3 participants