Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
920cb34b
Commit
920cb34b
authored
Jul 24, 2015
by
markturansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rebased and updated to latest
parent
63ccfa2b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
14 deletions
+26
-14
glusterfs.go
pkg/volume/glusterfs/glusterfs.go
+3
-4
nfs.go
pkg/volume/nfs/nfs.go
+11
-10
disk_manager.go
pkg/volume/rbd/disk_manager.go
+4
-0
rbd_util.go
pkg/volume/rbd/rbd_util.go
+8
-0
No files found.
pkg/volume/glusterfs/glusterfs.go
View file @
920cb34b
...
@@ -129,7 +129,6 @@ type glusterfsBuilder struct {
...
@@ -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 {
...
@@ -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 {
...
@@ -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"
)
}
}
...
...
pkg/volume/nfs/nfs.go
View file @
920cb34b
...
@@ -187,21 +187,22 @@ func (b *nfsBuilder) SetUpAt(dir string) error {
...
@@ -187,21 +187,22 @@ func (b *nfsBuilder) SetUpAt(dir string) error {
return
nil
return
nil
}
}
type
nfsCleaner
struct
{
func
(
b
*
nfsBuilder
)
IsReadOnly
()
bool
{
*
nfs
return
b
.
readOnly
}
func
(
nfsVolume
*
nfs
)
IsReadOnly
()
bool
{
return
nfsVolume
.
readOnly
}
}
func
(
nfsVolume
*
nfs
)
GetPath
()
string
{
//
name
:=
nfsPluginName
//func (c *nfsCleaner) GetPath() string {
return
nfsVolume
.
plugin
.
host
.
GetPodVolumeDir
(
nfsVolume
.
pod
.
UID
,
util
.
EscapeQualifiedNameForDisk
(
name
),
nfsVolume
.
volName
)
// name := nfsPluginName
}
// return c.plugin.host.GetPodVolumeDir(c.pod.UID, util.EscapeQualifiedNameForDisk(name), c.volName)
//}
var
_
volume
.
Cleaner
=
&
nfsCleaner
{}
var
_
volume
.
Cleaner
=
&
nfsCleaner
{}
type
nfsCleaner
struct
{
*
nfs
}
func
(
c
*
nfsCleaner
)
TearDown
()
error
{
func
(
c
*
nfsCleaner
)
TearDown
()
error
{
return
c
.
TearDownAt
(
c
.
GetPath
())
return
c
.
TearDownAt
(
c
.
GetPath
())
}
}
...
...
pkg/volume/rbd/disk_manager.go
View file @
920cb34b
...
@@ -62,7 +62,11 @@ func diskSetUp(manager diskManager, b rbdBuilder, volPath string, mounter mount.
...
@@ -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
)
...
...
pkg/volume/rbd/rbd_util.go
View file @
920cb34b
...
@@ -161,7 +161,11 @@ func (util *RBDUtil) loadRBD(rbd *rbd, mnt string) error {
...
@@ -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 {
...
@@ -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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment