-
Notifications
You must be signed in to change notification settings - Fork 347
Conversation
Signed-off-by: Lantao Liu <[email protected]>
|
@ijc Could you take a look? |
|
Looks fine to me. |
mikebrow
left a comment
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
| // getDeviceUUID gets device uuid for a given path. | ||
| func (c *criContainerdService) getDeviceUUID(path string) (string, error) { | ||
| info, err := c.os.LookupMount(path) | ||
| mount, err := c.os.LookupMount(path) |
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.
LookupMount has a comment in it:
// Note that m.{Major, Minor} are generally unreliable for our purpose here // https://www.spinics.net/lists/linux-btrfs/msg58908.html
But we are now using exactly those fields below.
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.
Actually, we don't seem to rely on these any more or less than we did before, so I guess this is fine.
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.
@Random-Liu @ijc Interesting.. if "generally unreliable" maybe we should do it both ways and compare results then return the best result. Just thinking out loud and now worrying about what was meant by generally unreliable.
|
Thanks for taking this one on @Random-Liu! |
|
Hey @Random-Liu If dealing with ZFS, the "truest" way to get a unique identifier which will ALWAYS identify that pool is the GUID property of the pool itself, so for the given mounts (from #325) the "pool name" is always the first word before the first / for a zfs mount, in our case, testpool. gives us a UUID which will always identify that pool. Error received for current master of cri-containerd as follows; |


Use linux device number from
mount.Lookupto look for uuid.This may be able to fix #325.
And I also see the Ubuntu used by GKE, rootfs is mounted from
/dev/root, which doesn't have real corresponding device file.With this fix, we get device number from mount directly, and find uuid with the device number. This doesn't assume that the mount source has to be a existing file.
Signed-off-by: Lantao Liu [email protected]