Skip to content

fix: typo alico_ipv6 silently breaks IPv6 Calico pool validation#13344

Open
AdeshDeshmukh wants to merge 1 commit into
kubernetes-sigs:masterfrom
AdeshDeshmukh:fix-calico-ipv6-pool-validation
Open

fix: typo alico_ipv6 silently breaks IPv6 Calico pool validation#13344
AdeshDeshmukh wants to merge 1 commit into
kubernetes-sigs:masterfrom
AdeshDeshmukh:fix-calico-ipv6-pool-validation

Conversation

@AdeshDeshmukh

Copy link
Copy Markdown
Contributor

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.yml that cause IPv6 Calico pool configuration validation to be silently skipped when deploying with ipv6_stack: true.

Bug 1 — Typo on line 192:
The when condition reads alico_ipv6 is defined (missing leading c). The variable registered on line 182 is calico_ipv6, so alico_ipv6 is never defined and Jinja2 evaluates this as False. This causes the set_fact task that populates calico_pool_conf to always be skipped for IPv6.

Bug 2 — Wrong variable name on line 207:
The assertion "Check if ipv6 inventory match current cluster configuration" gates on calico_pool_ipv6_conf is defined, but the set_fact on line 189 sets calico_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?:

NONE

Signed-off-by: Adesh Deshmukh <adeshkd123@gmail.com>
Copilot AI review requested due to automatic review settings July 3, 2026 08:33
@kubernetes-prow kubernetes-prow Bot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 3, 2026
@kubernetes-prow kubernetes-prow Bot requested a review from cyclinder July 3, 2026 08:33
@kubernetes-prow

Copy link
Copy Markdown
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@kubernetes-prow kubernetes-prow Bot requested a review from ErikJiang July 3, 2026 08:33
@kubernetes-prow kubernetes-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_ipv6calico_ipv6) so the IPv6 set_fact task executes when the command result is registered.
  • Fix assertion gating variable (calico_pool_ipv6_confcalico_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.

Comment on lines 187 to 189
- name: "Set calico_pool_ipv6_conf"
set_fact:
calico_pool_conf: '{{ calico_ipv6.stdout | from_json }}'
@yankay

yankay commented Jul 3, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 3, 2026

@cyclinder cyclinder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice catch!
/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 3, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AdeshDeshmukh, cyclinder
Once this PR has been reviewed and has the lgtm label, please assign tico88612 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@guoard

guoard commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@tico88612 tico88612 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 5, 2026
@AdeshDeshmukh

Copy link
Copy Markdown
Contributor Author

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.

@tico88612

Copy link
Copy Markdown
Member

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.

So what I'm thinking is that the flow variables were set up wrong earlier, do you get what I mean?

@AdeshDeshmukh

Copy link
Copy Markdown
Contributor Author

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.

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typo alico_ipv6 silently breaks IPv6 Calico pool validation

6 participants