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
9d207b3e
Commit
9d207b3e
authored
Sep 17, 2018
by
David Zhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetMountRefs should not fail if the path supplied does not exist anymore. It has…
GetMountRefs should not fail if the path supplied does not exist anymore. It has no mount references
parent
44be42c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
mount_linux.go
pkg/util/mount/mount_linux.go
+3
-0
operation_generator.go
pkg/volume/util/operationexecutor/operation_generator.go
+2
-0
nfs_persistent_volume-disruptive.go
test/e2e/storage/nfs_persistent_volume-disruptive.go
+1
-1
No files found.
pkg/util/mount/mount_linux.go
View file @
9d207b3e
...
@@ -1005,6 +1005,9 @@ func (mounter *Mounter) SafeMakeDir(subdir string, base string, perm os.FileMode
...
@@ -1005,6 +1005,9 @@ func (mounter *Mounter) SafeMakeDir(subdir string, base string, perm os.FileMode
}
}
func
(
mounter
*
Mounter
)
GetMountRefs
(
pathname
string
)
([]
string
,
error
)
{
func
(
mounter
*
Mounter
)
GetMountRefs
(
pathname
string
)
([]
string
,
error
)
{
if
_
,
err
:=
os
.
Stat
(
pathname
);
os
.
IsNotExist
(
err
)
{
return
[]
string
{},
nil
}
realpath
,
err
:=
filepath
.
EvalSymlinks
(
pathname
)
realpath
,
err
:=
filepath
.
EvalSymlinks
(
pathname
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
pkg/volume/util/operationexecutor/operation_generator.go
View file @
9d207b3e
...
@@ -1433,6 +1433,8 @@ func isDeviceOpened(deviceToDetach AttachedVolume, mounter mount.Interface) (boo
...
@@ -1433,6 +1433,8 @@ func isDeviceOpened(deviceToDetach AttachedVolume, mounter mount.Interface) (boo
//TODO: refer to #36092
//TODO: refer to #36092
glog
.
V
(
3
)
.
Infof
(
"The path isn't device path or doesn't exist. Skip checking device path: %s"
,
deviceToDetach
.
DevicePath
)
glog
.
V
(
3
)
.
Infof
(
"The path isn't device path or doesn't exist. Skip checking device path: %s"
,
deviceToDetach
.
DevicePath
)
deviceOpened
=
false
deviceOpened
=
false
}
else
if
devicePathErr
!=
nil
{
return
false
,
deviceToDetach
.
GenerateErrorDetailed
(
"PathIsDevice failed"
,
devicePathErr
)
}
else
{
}
else
{
deviceOpened
,
deviceOpenedErr
=
mounter
.
DeviceOpened
(
deviceToDetach
.
DevicePath
)
deviceOpened
,
deviceOpenedErr
=
mounter
.
DeviceOpened
(
deviceToDetach
.
DevicePath
)
if
deviceOpenedErr
!=
nil
{
if
deviceOpenedErr
!=
nil
{
...
...
test/e2e/storage/nfs_persistent_volume-disruptive.go
View file @
9d207b3e
...
@@ -281,7 +281,7 @@ func tearDownTestCase(c clientset.Interface, f *framework.Framework, ns string,
...
@@ -281,7 +281,7 @@ func tearDownTestCase(c clientset.Interface, f *framework.Framework, ns string,
// Ignore deletion errors. Failing on them will interrupt test cleanup.
// Ignore deletion errors. Failing on them will interrupt test cleanup.
framework
.
DeletePodWithWait
(
f
,
c
,
client
)
framework
.
DeletePodWithWait
(
f
,
c
,
client
)
framework
.
DeletePersistentVolumeClaim
(
c
,
pvc
.
Name
,
ns
)
framework
.
DeletePersistentVolumeClaim
(
c
,
pvc
.
Name
,
ns
)
if
forceDeletePV
{
if
forceDeletePV
&&
pv
!=
nil
{
framework
.
DeletePersistentVolume
(
c
,
pv
.
Name
)
framework
.
DeletePersistentVolume
(
c
,
pv
.
Name
)
return
return
}
}
...
...
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