-
Notifications
You must be signed in to change notification settings - Fork 24
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
Remove cache file support #50
Conversation
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. I have a few nitpicks and a locking-related comment.
1cbfc26
to
9bd32bd
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.
Looks go to me now (although looks like some go reformatting is needed). Maybe we'll need to sit on this for a while, at least until the first CRI-O release is done with the merged related fixes.
And maybe we'll need to add a version check to pkg/resmgr/nri.go:Configure() to give an error (and maybe refuse to start up) if the runtime+version indicates a cri-o without the fixes.
9bd32bd
to
2f3a806
Compare
Fixed the format error. We can address the cri-o version check later after the cri-o release. |
2f3a806
to
76511a6
Compare
Removed the cache rm task from todo file. |
No need to save / restore cache state as all the state should come from runtime via Synchronize message so no need to cache the data even if we restart the nri plugin. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The e2e tests want to validate things after the test and for that, they need access to the cache state. So now that the cache file is removed, the cache state needs to be fetched directly from NRI plugin via a HTTP request. Default address used by e2e tests is http://localhost:8891/cache-state The cache fetching is disabled by default and only enabled for e2e tests. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As there is no longer a cache file, the test is no longer valid and can be removed. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
No one uses the mutex in cache object so it can be removed. Can be reintroduced if fine grained locking is needed there. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
76511a6
to
cd7864a
Compare
Rebased to main. Changed option name used by e2e test to |
We'll revisit this later. Closing for now. |
As we can get the full state of the pod and container from runtime, no need to cache the data.
Containerd already has support for this. For cri-o, one needs a version that has commit f59c1f72a837c2235010813b8f361bb57c8c551b ("sandbox: Handle PodLinuxOverhead and PodLinuxResources CRI fields") in it.