-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Add mountpoint as CRI image filesystem storage identifier. #59475
Conversation
A container runtime implementation is here containerd/cri#601. I've manually tested it, and it works. The CI https://k8s-testgrid.appspot.com/sig-node-containerd will catch more issue if there is any. |
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.
question
@@ -3183,6 +3183,9 @@ func (m *UInt64Value) GetValue() uint64 { | |||
type StorageIdentifier struct { | |||
// UUID of the device. | |||
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` |
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.
somewhat related: do we plan to keep the UUID field? If so, what is it used for now that we are passing the mount point?
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.
read the PR description, ignore :)
/lint |
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.
@dashpole: 5 warnings.
In response to this:
/lint
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/test-infra repository.
@@ -84,7 +84,7 @@ func (c *Mock) WatchEvents(request *events.Request) (*events.EventChannel, error | |||
return args.Get(0).(*events.EventChannel), args.Error(1) | |||
} | |||
|
|||
func (c *Mock) GetFsInfoByFsUUID(uuid string) (cadvisorapiv2.FsInfo, error) { | |||
args := c.Called(uuid) | |||
func (c *Mock) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) { |
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.
Golint comments: exported method Mock.GetDirFsInfo should have comment or be unexported. More info.
@@ -3196,6 +3199,13 @@ func (m *StorageIdentifier) GetUuid() string { | |||
return "" | |||
} | |||
|
|||
func (m *StorageIdentifier) GetMountpoint() string { |
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.
Golint comments: exported method StorageIdentifier.GetMountpoint should have comment or be unexported. More info.
@@ -77,6 +77,6 @@ func (cu *cadvisorUnsupported) WatchEvents(request *events.Request) (*events.Eve | |||
return nil, unsupportedErr | |||
} | |||
|
|||
func (c *cadvisorUnsupported) GetFsInfoByFsUUID(uuid string) (cadvisorapiv2.FsInfo, error) { | |||
func (c *cadvisorUnsupported) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) { |
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.
Golint naming: receiver name c should be consistent with previous receiver name cu for cadvisorUnsupported. More info.
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.
Done.
@@ -77,6 +77,6 @@ func (cu *cadvisorClient) WatchEvents(request *events.Request) (*events.EventCha | |||
return &events.EventChannel{}, nil | |||
} | |||
|
|||
func (c *cadvisorClient) GetFsInfoByFsUUID(uuid string) (cadvisorapiv2.FsInfo, error) { | |||
func (c *cadvisorClient) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) { |
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.
Golint naming: receiver name c should be consistent with previous receiver name cu for cadvisorClient. More info.
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.
Done.
@@ -76,6 +76,6 @@ func (c *Fake) WatchEvents(request *events.Request) (*events.EventChannel, error | |||
return new(events.EventChannel), nil | |||
} | |||
|
|||
func (c *Fake) GetFsInfoByFsUUID(uuid string) (cadvisorapiv2.FsInfo, error) { | |||
func (c *Fake) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) { |
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.
Golint comments: exported method Fake.GetDirFsInfo should have comment or be unexported. More info.
Le'ts wait for the version bump PR to land first. |
816d427
to
ca01b33
Compare
ca01b33
to
e8c243b
Compare
Rebased and switched to |
@@ -1105,8 +1105,8 @@ message UInt64Value { | |||
|
|||
// StorageIdentifier uniquely identify the storage.. | |||
message StorageIdentifier{ | |||
// UUID of the device. | |||
string uuid = 1; | |||
// Mountpoint of the image filesystem. |
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.
The StorageIdentifier
is a more generic message type. The comment should not include "image filesystem".
On the other hand, is StorageIdentifier
still an accurate name, or should we rename it to, say, FilesystemIdentifier
?
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.
Will do then.
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.
Done. Changed to FilesystemIdentifier
.
e8c243b
to
a77450e
Compare
@sameo PTAL. |
👍 We can add pool name in a follow-on for device mapper. |
Code changes lgtm. I also agree with the idea of using mountpoint as an identifier. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dashpole, Random-Liu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these OWNERS Files:
Approvers can indicate their approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
Fixes #57356.
This PR changes CRI to use mountpoint as storage identifier. See #57356 (comment).
Note that:
mountpoint
is added as new field inStorageIdentifier
now. After Update Container Runtime Interface to use enumerated namespace modes #58973 is merged, we can remove the UUID field inv1alpha2
./cc @yujuhong @feiskyer @yguo0905 @dashpole @mikebrow @abhi @kubernetes/sig-node-api-reviews
Release note: