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
cc153a9c
Unverified
Commit
cc153a9c
authored
Nov 29, 2018
by
k8s-ci-robot
Committed by
GitHub
Nov 29, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70612 from jianglingxia/jlx201811031409
delete new defined para name in fc volume
parents
ba5f1cbf
371088e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
fc.go
pkg/volume/fc/fc.go
+4
-7
No files found.
pkg/volume/fc/fc.go
View file @
cc153a9c
...
@@ -355,9 +355,8 @@ type fcDisk struct {
...
@@ -355,9 +355,8 @@ type fcDisk struct {
}
}
func
(
fc
*
fcDisk
)
GetPath
()
string
{
func
(
fc
*
fcDisk
)
GetPath
()
string
{
name
:=
fcPluginName
// safe to use PodVolumeDir now: volume teardown occurs before pod is cleaned up
// safe to use PodVolumeDir now: volume teardown occurs before pod is cleaned up
return
fc
.
plugin
.
host
.
GetPodVolumeDir
(
fc
.
podUID
,
utilstrings
.
EscapeQualifiedNameForDisk
(
n
ame
),
fc
.
volName
)
return
fc
.
plugin
.
host
.
GetPodVolumeDir
(
fc
.
podUID
,
utilstrings
.
EscapeQualifiedNameForDisk
(
fcPluginN
ame
),
fc
.
volName
)
}
}
func
(
fc
*
fcDisk
)
fcGlobalMapPath
(
spec
*
volume
.
Spec
)
(
string
,
error
)
{
func
(
fc
*
fcDisk
)
fcGlobalMapPath
(
spec
*
volume
.
Spec
)
(
string
,
error
)
{
...
@@ -370,8 +369,7 @@ func (fc *fcDisk) fcGlobalMapPath(spec *volume.Spec) (string, error) {
...
@@ -370,8 +369,7 @@ func (fc *fcDisk) fcGlobalMapPath(spec *volume.Spec) (string, error) {
}
}
func
(
fc
*
fcDisk
)
fcPodDeviceMapPath
()
(
string
,
string
)
{
func
(
fc
*
fcDisk
)
fcPodDeviceMapPath
()
(
string
,
string
)
{
name
:=
fcPluginName
return
fc
.
plugin
.
host
.
GetPodVolumeDeviceDir
(
fc
.
podUID
,
utilstrings
.
EscapeQualifiedNameForDisk
(
fcPluginName
)),
fc
.
volName
return
fc
.
plugin
.
host
.
GetPodVolumeDeviceDir
(
fc
.
podUID
,
utilstrings
.
EscapeQualifiedNameForDisk
(
name
)),
fc
.
volName
}
}
type
fcDiskMounter
struct
{
type
fcDiskMounter
struct
{
...
@@ -462,9 +460,8 @@ func (c *fcDiskUnmapper) TearDownDevice(mapPath, devicePath string) error {
...
@@ -462,9 +460,8 @@ func (c *fcDiskUnmapper) TearDownDevice(mapPath, devicePath string) error {
if
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"fc: failed to detach disk: %s
\n
Error: %v"
,
mapPath
,
err
)
return
fmt
.
Errorf
(
"fc: failed to detach disk: %s
\n
Error: %v"
,
mapPath
,
err
)
}
}
klog
.
V
(
4
)
.
Infof
(
"fc: %q is unmounted, deleting the directory"
,
mapPath
)
klog
.
V
(
4
)
.
Infof
(
"fc: %s is unmounted, deleting the directory"
,
mapPath
)
err
=
os
.
RemoveAll
(
mapPath
)
if
err
=
os
.
RemoveAll
(
mapPath
);
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"fc: failed to delete the directory: %s
\n
Error: %v"
,
mapPath
,
err
)
return
fmt
.
Errorf
(
"fc: failed to delete the directory: %s
\n
Error: %v"
,
mapPath
,
err
)
}
}
klog
.
V
(
4
)
.
Infof
(
"fc: successfully detached disk: %s"
,
mapPath
)
klog
.
V
(
4
)
.
Infof
(
"fc: successfully detached disk: %s"
,
mapPath
)
...
...
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