mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
rebased and updated to latest
This commit is contained in:
parent
63ccfa2beb
commit
920cb34b1e
@ -129,7 +129,6 @@ type glusterfsBuilder struct {
|
|||||||
hosts *api.Endpoints
|
hosts *api.Endpoints
|
||||||
path string
|
path string
|
||||||
readOnly bool
|
readOnly bool
|
||||||
mounter mount.Interface
|
|
||||||
exe exec.Interface
|
exe exec.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,8 +161,8 @@ func (b *glusterfsBuilder) SetUpAt(dir string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (glusterfsVolume *glusterfs) IsReadOnly() bool {
|
func (b *glusterfsBuilder) IsReadOnly() bool {
|
||||||
return glusterfsVolume.readOnly
|
return b.readOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
func (glusterfsVolume *glusterfs) GetPath() string {
|
func (glusterfsVolume *glusterfs) GetPath() string {
|
||||||
@ -217,7 +216,7 @@ func (b *glusterfsBuilder) setUpAtInternal(dir string) error {
|
|||||||
var errs error
|
var errs error
|
||||||
|
|
||||||
options := []string{}
|
options := []string{}
|
||||||
if glusterfsVolume.readOnly {
|
if b.readOnly {
|
||||||
options = append(options, "ro")
|
options = append(options, "ro")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,21 +187,22 @@ func (b *nfsBuilder) SetUpAt(dir string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *nfsBuilder) IsReadOnly() bool {
|
||||||
|
return b.readOnly
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
//func (c *nfsCleaner) GetPath() string {
|
||||||
|
// name := nfsPluginName
|
||||||
|
// return c.plugin.host.GetPodVolumeDir(c.pod.UID, util.EscapeQualifiedNameForDisk(name), c.volName)
|
||||||
|
//}
|
||||||
|
|
||||||
|
var _ volume.Cleaner = &nfsCleaner{}
|
||||||
|
|
||||||
type nfsCleaner struct {
|
type nfsCleaner struct {
|
||||||
*nfs
|
*nfs
|
||||||
}
|
}
|
||||||
|
|
||||||
func (nfsVolume *nfs) IsReadOnly() bool {
|
|
||||||
return nfsVolume.readOnly
|
|
||||||
}
|
|
||||||
|
|
||||||
func (nfsVolume *nfs) GetPath() string {
|
|
||||||
name := nfsPluginName
|
|
||||||
return nfsVolume.plugin.host.GetPodVolumeDir(nfsVolume.pod.UID, util.EscapeQualifiedNameForDisk(name), nfsVolume.volName)
|
|
||||||
}
|
|
||||||
|
|
||||||
var _ volume.Cleaner = &nfsCleaner{}
|
|
||||||
|
|
||||||
func (c *nfsCleaner) TearDown() error {
|
func (c *nfsCleaner) TearDown() error {
|
||||||
return c.TearDownAt(c.GetPath())
|
return c.TearDownAt(c.GetPath())
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,11 @@ func diskSetUp(manager diskManager, b rbdBuilder, volPath string, mounter mount.
|
|||||||
}
|
}
|
||||||
// Perform a bind mount to the full path to allow duplicate mounts of the same disk.
|
// Perform a bind mount to the full path to allow duplicate mounts of the same disk.
|
||||||
options := []string{"bind"}
|
options := []string{"bind"}
|
||||||
|
<<<<<<< HEAD
|
||||||
if b.ReadOnly {
|
if b.ReadOnly {
|
||||||
|
=======
|
||||||
|
if disk.readOnly {
|
||||||
|
>>>>>>> rebased and updated to latest
|
||||||
options = append(options, "ro")
|
options = append(options, "ro")
|
||||||
}
|
}
|
||||||
err = mounter.Mount(globalPDPath, volPath, "", options)
|
err = mounter.Mount(globalPDPath, volPath, "", options)
|
||||||
|
@ -161,7 +161,11 @@ func (util *RBDUtil) loadRBD(rbd *rbd, mnt string) error {
|
|||||||
|
|
||||||
func (util *RBDUtil) fencing(b rbdBuilder) error {
|
func (util *RBDUtil) fencing(b rbdBuilder) error {
|
||||||
// no need to fence readOnly
|
// no need to fence readOnly
|
||||||
|
<<<<<<< HEAD
|
||||||
if b.ReadOnly {
|
if b.ReadOnly {
|
||||||
|
=======
|
||||||
|
if rbd.readOnly {
|
||||||
|
>>>>>>> rebased and updated to latest
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return util.rbdLock(b, true)
|
return util.rbdLock(b, true)
|
||||||
@ -169,7 +173,11 @@ func (util *RBDUtil) fencing(b rbdBuilder) error {
|
|||||||
|
|
||||||
func (util *RBDUtil) defencing(c rbdCleaner) error {
|
func (util *RBDUtil) defencing(c rbdCleaner) error {
|
||||||
// no need to fence readOnly
|
// no need to fence readOnly
|
||||||
|
<<<<<<< HEAD
|
||||||
if c.ReadOnly {
|
if c.ReadOnly {
|
||||||
|
=======
|
||||||
|
if rbd.readOnly {
|
||||||
|
>>>>>>> rebased and updated to latest
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user