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
ec6b9eb9
Commit
ec6b9eb9
authored
Jan 04, 2018
by
zhangxiaoyu-zidif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix-binary-check-cephfs
parent
745b89be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
cephfs.go
pkg/volume/cephfs/cephfs.go
+3
-4
No files found.
pkg/volume/cephfs/cephfs.go
View file @
ec6b9eb9
...
...
@@ -331,9 +331,8 @@ func (cephfsMounter *cephfsMounter) checkFuseMount() bool {
execute
:=
cephfsMounter
.
plugin
.
host
.
GetExec
(
cephfsMounter
.
plugin
.
GetPluginName
())
switch
runtime
.
GOOS
{
case
"linux"
:
retBytes
,
err
:=
execute
.
Run
(
"/bin/ls"
,
"/sbin/mount.fuse.ceph"
)
if
err
==
nil
&&
string
(
retBytes
)
==
"/sbin/mount.fuse.ceph
\n
"
{
glog
.
V
(
4
)
.
Infof
(
"/sbin/mount.fuse.ceph exists, it should be fuse mount"
)
if
_
,
err
:=
execute
.
Run
(
"/usr/bin/test"
,
"-x"
,
"/sbin/mount.fuse.ceph"
);
err
==
nil
{
glog
.
V
(
4
)
.
Infof
(
"/sbin/mount.fuse.ceph exists, it should be fuse mount."
)
return
true
}
return
false
...
...
@@ -356,7 +355,7 @@ func (cephfsVolume *cephfs) execFuseMount(mountpoint string) error {
payload
:=
make
(
map
[
string
]
util
.
FileProjection
,
1
)
var
fileProjection
util
.
FileProjection
keyring
:=
fmt
.
Sprintf
(
"[client.%s]
\n
"
,
cephfsVolume
.
id
)
+
"key = "
+
cephfsVolume
.
secret
+
"
\n
"
keyring
:=
fmt
.
Sprintf
(
"[client.%s]
\n
key = %s
\n
"
,
cephfsVolume
.
id
,
cephfsVolume
.
secret
)
fileProjection
.
Data
=
[]
byte
(
keyring
)
fileProjection
.
Mode
=
int32
(
0644
)
...
...
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