-
Notifications
You must be signed in to change notification settings - Fork 753
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
switch to use state file for IP allocation pool management #2110
Conversation
402a21f
to
5a959aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM, just one performance concern and I will give others a chance to review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just few nits. Can we also run the soak test on bottlerocket? Rest lgtm.
pkg/ipamd/datastore/data_store.go
Outdated
// Assume that no file == no containers are currently in use, e.g. a fresh reboot just cleared everything out. | ||
// This is ok, and no-op. | ||
if os.IsNotExist(err) { | ||
ds.log.Debugf("backing store don't exists, assuming bootstrap on a new node") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: don't -> doesn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks :D fixed
pkg/ipamd/datastore/data_store.go
Outdated
@@ -1538,3 +1546,39 @@ func (ds *DataStore) CheckFreeableENIexists() bool { | |||
} | |||
return false | |||
} | |||
|
|||
// NormalizeCheckpointDataByPodVethExistence will normalize checkpoint data by remove allocations that don't have a corresponding pod veth. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove -> removing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks :D fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
* switch to use state file for IP allocation pool management * add soak test suit for state file * address comments * add missing go.sum entries
What type of PR is this?
feature
Which issue does this PR fix:
N/A
What does this PR do / Why do we need it:
We need it to remove the CRI socket dependency.
If an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:
Testing done on this change:
Automation added to e2e:
Added a new soak test suit that keep spin up and teardown pods and compare the state file with pods on nodes.
The suit can be executed via:
Will this PR introduce any new dependencies?:
No new dependencies as the file is already written.
Will this break upgrades or downgrades. Has updating a running cluster been tested?:
This will break upgrades when upgrade from CNI < 1.7.0, as no state file were wrotten.
I have tested upgrade from CNI 1.10.0, and it works fine
Does this change require updates to the CNI daemonset config files to work?:
Does this PR introduce any user-facing change?:
Yes, the CRI socket mount is no longer needed.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.