Skip to content
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

check IsNotExist error when validating mountpoint #9957

Merged
merged 1 commit into from Jun 18, 2015

Conversation

rootfs
Copy link
Contributor

@rootfs rootfs commented Jun 17, 2015

This fixes #9952

@k8s-bot
Copy link

k8s-bot commented Jun 17, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@@ -101,7 +101,7 @@ func (util *RBDUtil) AttachDisk(rbd rbd) error {
// mount it
globalPDPath := rbd.manager.MakeGlobalPDName(rbd)
mountpoint, err := rbd.mounter.IsMountPoint(globalPDPath)
if err != nil {
if err != nil && !os.IsNotExist(err) {
Copy link
Member

Choose a reason for hiding this comment

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

I would add a note saying that the mountpoint not existing is a contingency.

Do you want this method to continue running if there's already a mountpoint for this volume?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, if directory is not there, that indicates it is the first time to create then mountpoint. the method should continue to run. the mountpoint is later created.

Copy link
Member

Choose a reason for hiding this comment

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

K, then I would add a comment there to that effect.

Signed-off-by: Huamin Chen <hchen@redhat.com>
@pmorie pmorie added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 17, 2015
@saad-ali
Copy link
Member

v1.0 triage needed: Marked the associated issue #9952 as v1.0-candidate

@satnam6502
Copy link
Contributor

@k8s-bot ok to test

@k8s-bot
Copy link

k8s-bot commented Jun 18, 2015

GCE e2e build/test passed for commit 0280dac.

satnam6502 added a commit that referenced this pull request Jun 18, 2015
check IsNotExist error when validating mountpoint
@satnam6502 satnam6502 merged commit b48aa0b into kubernetes:master Jun 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rbd volume target mount point is created after it's checked for existence
6 participants