Skip to content

Handle Existing MountPoints in NodePublish and NodeStage #95

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

Open
davidz627 opened this issue Aug 17, 2018 · 9 comments
Open

Handle Existing MountPoints in NodePublish and NodeStage #95

davidz627 opened this issue Aug 17, 2018 · 9 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Milestone

Comments

@davidz627
Copy link
Contributor

Currently if there is an existing mount point in the place where we are trying to mount the code will just throw an error. We should confirm whether it is compatible or not and return success (for idempotency) or throw and error respectively.

@davidz627 davidz627 self-assigned this Aug 17, 2018
@davidz627 davidz627 changed the title Handle Existing MountPoint in NodePublishVolume Handle Existing MountPoints in NodePublish and NodeStage Aug 17, 2018
@davidz627 davidz627 added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 17, 2018
@davidz627
Copy link
Contributor Author

No longer just throws an error but does not check for compatibility

@davidz627 davidz627 added this to the GA milestone Sep 27, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 25, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 25, 2019
@davidz627
Copy link
Contributor Author

/remove-lifecycle rotten
/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels May 28, 2019
@hantaowang
Copy link

/assign @hantaowang

@hantaowang
Copy link

The kubernetes mount interface and mount-linux has some functionality to do TODO #1 and #3 via checking /proc/mounts and proc/self/mountinfo. The difference between the two files is that

  1. /proc/mounts has a mapping from device to mount target
  2. /proc/self/mountinfo has a mapping from source to target and additional fields for the underlying device

I can probably get all the information I need from mountinfo, but the currently utilities that parse it are not exported and do work exactly as I want it to - so I may have to reimplement some of the logo with modifications

If we were only considering mounts from attached block devices, I can do it all with proc/mounts because the utility for praising that is already implemented well with Interface.List(). However this fails for fs mounts since proc/mounts only has a mapping from devices. So emptydir (or dirs on the host machines) will all mount from sda which does not uniquely identify the source.

@msau42
Copy link
Contributor

msau42 commented Jul 8, 2019

This is specific to PD driver which can only be a block device

@hantaowang
Copy link

What is then the difference between GetBlock() and GetMount() in NodePublish? Which one is the one normally used in the case of staging and then publishing a GCE PD and when would the other be used? I see that only GetBlock() results in deriving the device path.

@hantaowang
Copy link

/cc @jingxu97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

5 participants