mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
rbd: no more remount.
remount was originally needed to ensure rw/ro is set correctly. There is no such need since mount is using exec interface Signed-off-by: Huamin Chen <hchen@redhat.com>
This commit is contained in:
parent
418a8b5022
commit
de41fd3960
@ -201,18 +201,8 @@ func (b *rbdBuilder) SetUpAt(dir string) error {
|
||||
err := diskSetUp(b.manager, *b, dir, b.mounter)
|
||||
if err != nil {
|
||||
glog.Errorf("rbd: failed to setup")
|
||||
return err
|
||||
}
|
||||
globalPDPath := b.manager.MakeGlobalPDName(*b.rbd)
|
||||
// make mountpoint rw/ro work as expected
|
||||
//FIXME revisit pkg/util/mount and ensure rw/ro is implemented as expected
|
||||
mode := "rw"
|
||||
if b.ReadOnly {
|
||||
mode = "ro"
|
||||
}
|
||||
b.plugin.execCommand("mount", []string{"-o", "remount," + mode, globalPDPath, dir})
|
||||
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
|
||||
type rbdCleaner struct {
|
||||
|
Loading…
Reference in New Issue
Block a user