Set dhcp vars for dnsmasq via IRSO - #1702
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/test metal3-centos-e2e-integration-test-release-1-13 metal3-dev-env-integration-test-ubuntu-main |
|
/copilot-review |
|
Copilot code review has been requested by @Sunnatillo. Please allow a few moments for the review to be added. |
There was a problem hiding this comment.
Pull request overview
This PR updates metal3-dev-env’s IRSO-based Ironic launch path to pass dnsmasq DHCP configuration (DHCP_HOSTS, DHCP_IGNORE) via the generated Ironic custom resource, rather than via the legacy environment-variable configmap flow used when launching Ironic without IRSO.
Changes:
- Build YAML snippets for dnsmasq DHCP
hostsandignoresettings fromDHCP_HOSTS/DHCP_IGNORE. - Inject those settings into the generated
IronicCR underspec.networking.dhcp.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Test failed exacly where I was expecting, it means changes are working. I will update the PR. |
95dc580 to
7231c2a
Compare
7231c2a to
59703be
Compare
|
/test metal3-centos-e2e-integration-test-release-1-13 metal3-dev-env-integration-test-ubuntu-main metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main |
|
/cc @lentzi90 |
lentzi90
left a comment
There was a problem hiding this comment.
Thanks for taking care of this!
I think we can skip the parsing and formatting and just pass the variable through. What do you think about this?
| rangeBegin: "${CLUSTER_DHCP_RANGE_START}" | ||
| rangeEnd: "${CLUSTER_DHCP_RANGE_END}" | ||
| networkCIDR: "${BARE_METAL_PROVISIONER_NETWORK}" | ||
| networkCIDR: "${BARE_METAL_PROVISIONER_NETWORK}"${dhcp_yaml} |
There was a problem hiding this comment.
I think this is quite hard to read. We can actually do it much simpler.
IRSO does parse separate items into the ; separated string, but it is also valid to put that string directly.
| networkCIDR: "${BARE_METAL_PROVISIONER_NETWORK}"${dhcp_yaml} | |
| networkCIDR: "${BARE_METAL_PROVISIONER_NETWORK}" | |
| hosts: | |
| - "${DHCP_HOSTS}" | |
| ignore: | |
| - "${DHCP_IGNORE}" |
There was a problem hiding this comment.
yes, I agree to keep this simple.
There was a problem hiding this comment.
I have tried, but we have two different way of configuring it now. One via old ironic way, where we pass the variables which includes mac addresses separeted by semicolon, the new irso way we give list of mac addresses via yaml.
Could not find the better solution.
There was a problem hiding this comment.
Sorry I must be missing something. What happens if you try my suggestion above? My understanding is that IRSO is backwards compatible with the old format. You should be able to use it as it is, without any parsing.
59703be to
0913353
Compare
|
/copilot-review |
|
Copilot code review has been requested by @Sunnatillo. Please allow a few moments for the review to be added. |
Signed-off-by: Sunnatillo <sunnat.samadov@est.tech>
0913353 to
2e0df5d
Compare
This PR sets dhcp_hosts and dhcp_ignore vars for dnsmasq via IRSO