Skip to content

support multi tmpfs in cadvisor#2292

Merged
dashpole merged 1 commit intogoogle:masterfrom
zouyee:multitmpfs
Nov 26, 2019
Merged

support multi tmpfs in cadvisor#2292
dashpole merged 1 commit intogoogle:masterfrom
zouyee:multitmpfs

Conversation

@zouyee
Copy link
Copy Markdown

@zouyee zouyee commented Aug 19, 2019

support multi tmpfs in cadvisor
fix kubernetes/kubernetes#81575

@zouyee
Copy link
Copy Markdown
Author

zouyee commented Aug 19, 2019

related PR: #1667
@dashpole PTAL

@dashpole dashpole self-assigned this Aug 21, 2019
@dashpole
Copy link
Copy Markdown
Collaborator

I don't fully understand the issue. Would you mind explaining it in detail?

@zouyee
Copy link
Copy Markdown
Author

zouyee commented Aug 22, 2019

Have multiple tmpfs mounts which have different major:minor pairs, e.g.:

root@hostname:/# cat /proc/self/mountinfo | grep tmpfs

404 394 0:18 / /dev/shm rw,nosuid,nodev shared:22 - tmpfs tmpfs rw,seclabel
1715 278 0:36 /var/lib/kubernetes/ssl/kubelet /var/lib/kubernetes/ssl ro,relatime shared:1 - tmpfs tmpfs rw,seclabel,mode=755
...
1775 278 0:36 /var/lib/kubelet /var/lib/kubelet rw,relatime shared:1 - tmpfs tmpfs rw,seclabel,mode=755
1820 278 0:36 /etc/kubernetes /etc/kubernetes rw,relatime shared:1 - tmpfs tmpfs rw,seclabel,mode=755
1845 278 0:36 /etc/ssl/certs /etc/ssl/certs ro,relatime shared:1 - tmpfs tmpfs rw,seclabel,mode=755
1877 278 0:36 /etc/hosts /etc/hosts rw,relatime shared:1 - tmpfs tmpfs rw,seclabel,mode=755

_, ok := partitions[mount.Source]
If mount.Source is tmpfs, other mountpoints which source also is tmpfs, will be escape.

@dashpole
Copy link
Copy Markdown
Collaborator

Right, I see why it exits. I'm trying to figure out why this works for other filesystems, but not for tmpfs. Is mount.Source normally unique?

@zouyee
Copy link
Copy Markdown
Author

zouyee commented Aug 23, 2019

mount.Source is normally unique, but the uniqueness of the mount point is more universal.

Copy link
Copy Markdown
Collaborator

@dashpole dashpole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, this LGTM.

@dashpole
Copy link
Copy Markdown
Collaborator

You will have to rebase. Ping the PR after you do that so I can merge it.

Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
@zouyee
Copy link
Copy Markdown
Author

zouyee commented Nov 26, 2019

@dashpole PTAL

@dashpole
Copy link
Copy Markdown
Collaborator

/retest

@dashpole dashpole merged commit fd4e2a0 into google:master Nov 26, 2019
@zouyee zouyee deleted the multitmpfs branch November 27, 2019 00:51
@zouyee zouyee restored the multitmpfs branch November 27, 2019 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to start server when multiple tmpfs exist

3 participants