mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #68022 from jingxu97/waitForAttachLogging
Add a log in verifyDevicePath
This commit is contained in:
commit
69a8bb7f34
@ -269,6 +269,8 @@ func (attacher *gcePersistentDiskAttacher) WaitForAttach(spec *volume.Spec, devi
|
||||
// A device path has successfully been created for the PD
|
||||
klog.Infof("Successfully found attached GCE PD %q.", pdName)
|
||||
return path, nil
|
||||
} else {
|
||||
klog.V(4).Infof("could not verify GCE PD (%q) is attached, device path does not exist", pdName)
|
||||
}
|
||||
case <-timer.C:
|
||||
return "", fmt.Errorf("could not find attached GCE PD %q. Timeout waiting for mount paths to be created", pdName)
|
||||
|
@ -428,8 +428,11 @@ func (b *gcePersistentDiskMounter) SetUpAt(dir string, mounterArgs volume.Mounte
|
||||
return fmt.Errorf("mount of disk %s failed: %v", dir, err)
|
||||
}
|
||||
|
||||
klog.V(4).Infof("mount of disk %s succeeded", dir)
|
||||
if !b.readOnly {
|
||||
volume.SetVolumeOwnership(b, mounterArgs.FsGroup, mounterArgs.FSGroupChangePolicy, util.FSGroupCompleteHook(b.plugin, nil))
|
||||
if err := volume.SetVolumeOwnership(b, mounterArgs.FsGroup, mounterArgs.FSGroupChangePolicy, util.FSGroupCompleteHook(b.plugin, nil)); err != nil {
|
||||
klog.Errorf("SetVolumeOwnership returns error %v", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user