Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-v3.26] Auto pick #7550 #7821: remove node update calls in calico-node startup #7824

Conversation

tobiasgiese
Copy link
Contributor

@tobiasgiese tobiasgiese commented Jun 29, 2023

Description

Cherry pick of #7714 and #7821 on release-v3.26.

Fixes #7819

Related issues/PRs

Release Note

When running Calico in policy-only mode, do not write the IP annotations to the node. (@skmatti)
Don't write AS number to node if running with CALICO_NETWORKING_BACKEND=none.

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

skmatti and others added 2 commits June 29, 2023 11:54
Followup to projectcalico#7550

Change-Id: I01c8018c9d47401383f05861865ff0c9b44c506e
There is a nil pointer in the configureASNumber function if the networking backend is none (i.e. policy-only mode)

Signed-off-by: Tobias Giese <[email protected]>
@tobiasgiese tobiasgiese requested a review from a team as a code owner June 29, 2023 09:57
@marvin-tigera marvin-tigera added this to the Calico v3.26.2 milestone Jun 29, 2023
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Jun 29, 2023
@caseydavenport caseydavenport added the docs-not-required Docs not required for this change label Jun 29, 2023
@marvin-tigera marvin-tigera removed the docs-pr-required Change is not yet documented label Jun 29, 2023
@caseydavenport
Copy link
Member

/sem-approve

@tobiasgiese
Copy link
Contributor Author

/retest

@caseydavenport
Copy link
Member

This test is failing:

[1688058346] �[1mStartup Suite�[0m - 116/116 specs �[32m•�[0m�[32m•�[0m
�[90m------------------------------�[0m
�[91m�[1m• Failure [0.001 seconds]�[0m
�[90mNode IP detection failure cases �[0m�[91m�[1m[It] startup should NOT terminate and BGPSpec shouldn't be set to nil �[0m
�[37m/go/src/github.com/projectcalico/calico/node/pkg/lifecycle/startup/startup_test.go:126�[0m

  �[91mExpected
      <bool>: false
  to equal
      <bool>: true�[0m

  /go/src/github.com/projectcalico/calico/node/pkg/lifecycle/startup/startup_test.go:117
�[90m------------------------------�[0m

Which sounds like it might be a legitimate failure based on these changes

@tobiasgiese
Copy link
Contributor Author

tobiasgiese commented Jun 29, 2023

Which sounds like it might be a legitimate failure based on these changes

Okay, I‘ll check tomorrow if we need further cherry-picks (and will also test it locally)

@tobiasgiese
Copy link
Contributor Author

tobiasgiese commented Jun 30, 2023

We have to cherry-pick #7714 #7550 as well. Will update this branch the next days.

Are all three cherry-picks in this single PR okay or should I open three separate PRs?
The other question is if it‘s okay to cherry-pick such a huge change (I know, it’s unused code/functionality for policy only mode) or if we should keep it in v3.27?

@tobiasgiese
Copy link
Contributor Author

We have to cherry-pick #7714 #7550 as well. Will update this branch the next days.

#7550 is already merged in release-v3.26 by #7632. I'll take a deeper look why the tests are failing

@tobiasgiese
Copy link
Contributor Author

tobiasgiese commented Jul 1, 2023

@caseydavenport funny is that even on master the test is failing.
To my understanding the test is even wrong since we are no longer adding the BGP spec if we are starting calico in policy only mode.

diff --git a/node/pkg/lifecycle/startup/startup_test.go b/node/pkg/lifecycle/startup/startup_test.go
index f52c80731..bcf3b8738 100644
--- a/node/pkg/lifecycle/startup/startup_test.go
+++ b/node/pkg/lifecycle/startup/startup_test.go
@@ -123,7 +123,7 @@ var _ = DescribeTable("Node IP detection failure cases",
 
 	Entry("startup should terminate if IP is set to none and Calico is used for networking", "bird", 1, "", false),
 	Entry("startup should NOT terminate if IP is set to none and Calico is policy-only", "none", 0, "", false),
-	Entry("startup should NOT terminate and BGPSpec shouldn't be set to nil", "none", 0, "rrClusterID", true),
+	Entry("startup should NOT terminate and BGPSpec shouldn't be set to nil", "none", 0, "rrClusterID", false),
 )
 
 var _ = Describe("Default IPv4 pool CIDR", func() {

This change should fix it -- or even without any condition if and update is expected. Am I correct?

Edit: created PR #7829

@caseydavenport
Copy link
Member

The test PR has been merged - this probably just needs a rebase?

@tobiasgiese
Copy link
Contributor Author

tobiasgiese commented Jul 19, 2023

Had no time, will do it the next days now. Thanks for pinging.

Policy only mode will no longer update the BGP spec.
Thus, the unit test should be fixed as well.

Signed-off-by: Tobias Giese <[email protected]>
@marvin-tigera
Copy link
Contributor

Removing "merge-when-ready" label due to new commits

@caseydavenport
Copy link
Member

/sem-approve

@marvin-tigera marvin-tigera merged commit a5e1b8a into projectcalico:release-v3.26 Jul 25, 2023
@tobiasgiese tobiasgiese deleted the tobiasgiese/cherry-pick-policyonly-fixes branch October 2, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required Docs not required for this change merge-when-ready release-note-required Change has user-facing impact (no matter how small)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants