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
2f9f7820
Commit
2f9f7820
authored
Mar 01, 2018
by
Humble Chirammal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add volumemetrics for ISCSI Plugin.
Signed-off-by:
Humble Chirammal
<
hchiramm@redhat.com
>
parent
5f8b0438
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
iscsi.go
pkg/volume/iscsi/iscsi.go
+12
-5
No files found.
pkg/volume/iscsi/iscsi.go
View file @
2f9f7820
...
@@ -112,6 +112,12 @@ func (plugin *iscsiPlugin) newMounterInternal(spec *volume.Spec, podUID types.UI
...
@@ -112,6 +112,12 @@ func (plugin *iscsiPlugin) newMounterInternal(spec *volume.Spec, podUID types.UI
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
if
iscsiDisk
!=
nil
{
//Add volume metrics
iscsiDisk
.
MetricsProvider
=
volume
.
NewMetricsStatFS
(
iscsiDisk
.
GetPath
())
}
return
&
iscsiDiskMounter
{
return
&
iscsiDiskMounter
{
iscsiDisk
:
iscsiDisk
,
iscsiDisk
:
iscsiDisk
,
fsType
:
fsType
,
fsType
:
fsType
,
...
@@ -164,10 +170,11 @@ func (plugin *iscsiPlugin) NewUnmounter(volName string, podUID types.UID) (volum
...
@@ -164,10 +170,11 @@ func (plugin *iscsiPlugin) NewUnmounter(volName string, podUID types.UID) (volum
func
(
plugin
*
iscsiPlugin
)
newUnmounterInternal
(
volName
string
,
podUID
types
.
UID
,
manager
diskManager
,
mounter
mount
.
Interface
,
exec
mount
.
Exec
)
(
volume
.
Unmounter
,
error
)
{
func
(
plugin
*
iscsiPlugin
)
newUnmounterInternal
(
volName
string
,
podUID
types
.
UID
,
manager
diskManager
,
mounter
mount
.
Interface
,
exec
mount
.
Exec
)
(
volume
.
Unmounter
,
error
)
{
return
&
iscsiDiskUnmounter
{
return
&
iscsiDiskUnmounter
{
iscsiDisk
:
&
iscsiDisk
{
iscsiDisk
:
&
iscsiDisk
{
podUID
:
podUID
,
podUID
:
podUID
,
VolName
:
volName
,
VolName
:
volName
,
manager
:
manager
,
manager
:
manager
,
plugin
:
plugin
,
plugin
:
plugin
,
MetricsProvider
:
volume
.
NewMetricsStatFS
(
plugin
.
host
.
GetPodVolumeDir
(
podUID
,
utilstrings
.
EscapeQualifiedNameForDisk
(
iscsiPluginName
),
volName
)),
},
},
mounter
:
mounter
,
mounter
:
mounter
,
exec
:
exec
,
exec
:
exec
,
...
@@ -264,7 +271,7 @@ type iscsiDisk struct {
...
@@ -264,7 +271,7 @@ type iscsiDisk struct {
plugin
*
iscsiPlugin
plugin
*
iscsiPlugin
// Utility interface that provides API calls to the provider to attach/detach disks.
// Utility interface that provides API calls to the provider to attach/detach disks.
manager
diskManager
manager
diskManager
volume
.
Metrics
Nil
volume
.
Metrics
Provider
}
}
func
(
iscsi
*
iscsiDisk
)
GetPath
()
string
{
func
(
iscsi
*
iscsiDisk
)
GetPath
()
string
{
...
...
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