fix: typo alico_ipv6 silently breaks IPv6 Calico pool validation#13344
fix: typo alico_ipv6 silently breaks IPv6 Calico pool validation#13344AdeshDeshmukh wants to merge 1 commit into
Conversation
Signed-off-by: Adesh Deshmukh <adeshkd123@gmail.com>
|
Hi @AdeshDeshmukh. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Pull request overview
Fixes two variable-name typos in the Calico IPv6 ippool validation tasks so the IPv6 pool configuration is actually parsed into a fact and then asserted against inventory values when ipv6_stack: true. This brings the IPv6 validation flow in line with the already-working IPv4 block in the same task file.
Changes:
- Fix
when:guard typo (alico_ipv6→calico_ipv6) so the IPv6set_facttask executes when the command result is registered. - Fix assertion gating variable (
calico_pool_ipv6_conf→calico_pool_conf) so the IPv6 assertion runs when the fact is set.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: "Set calico_pool_ipv6_conf" | ||
| set_fact: | ||
| calico_pool_conf: '{{ calico_ipv6.stdout | from_json }}' |
|
/ok-to-test |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: AdeshDeshmukh, cyclinder 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 |
|
/lgtm |
tico88612
left a comment
There was a problem hiding this comment.
I'm fine with the description on Line 192, but I have an issue with the fix on Line 207. There's a task above that mentions setting calico_pool_ipv6_conf, so I don't think that's a typo or the wrong variable name. Could you double-check that?
/hold
|
Thank you for reviewing. I rechecked line 189 and the task is named 'Set calico_pool_ipv6_conf' but the set_fact actually sets calico_pool_conf. So the assert was checking a variable that never gets created. The fix changes it to match the variable that actually gets set. Please let me know if you'd like me to update the task name as well. |
So what I'm thinking is that the flow variables were set up wrong earlier, do you get what I mean? |
|
You're right. The set_fact on line 189 should have been setting calico_pool_ipv6_conf instead of calico_pool_conf. And the assert body on lines 200-203 also references calico_pool_conf — that should be calico_pool_ipv6_conf too. I'll update the PR to fix line 189 and 200-203, and revert line 207 to the original. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fixes two bugs in
roles/network_plugin/calico/tasks/check.ymlthat cause IPv6 Calico pool configuration validation to be silently skipped when deploying withipv6_stack: true.Bug 1 — Typo on line 192:
The
whencondition readsalico_ipv6 is defined(missing leadingc). The variable registered on line 182 iscalico_ipv6, soalico_ipv6is never defined and Jinja2 evaluates this asFalse. This causes theset_facttask that populatescalico_pool_confto always be skipped for IPv6.Bug 2 — Wrong variable name on line 207:
The assertion
"Check if ipv6 inventory match current cluster configuration"gates oncalico_pool_ipv6_conf is defined, but theset_facton line 189 setscalico_pool_conf(without_ipv6). The assertion therefore never runs even if Bug 1 were fixed.The IPv4 equivalent at lines 153-175 works correctly and follows the correct pattern. This fix makes IPv6 validation behave identically.
Which issue(s) this PR fixes:
Fixes #13341
Special notes for your reviewer:
The fix is minimal — two one-word changes on two lines. No new files, no config changes, no documentation needed.
Does this PR introduce a user-facing change?: