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
1e2ac80c
Commit
1e2ac80c
authored
Jul 27, 2017
by
zhengchuan hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some typos
parent
3a0d8f8f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
cgroup_manager_linux.go
pkg/kubelet/cm/cgroup_manager_linux.go
+3
-3
pod_container_manager_linux.go
pkg/kubelet/cm/pod_container_manager_linux.go
+2
-2
qos_container_manager_linux.go
pkg/kubelet/cm/qos_container_manager_linux.go
+1
-1
types.go
pkg/kubelet/cm/types.go
+4
-4
cgroups_linux.go
pkg/kubelet/cm/util/cgroups_linux.go
+1
-1
No files found.
pkg/kubelet/cm/cgroup_manager_linux.go
View file @
1e2ac80c
...
...
@@ -154,7 +154,7 @@ func (l *libcontainerAdapter) revertName(name string) CgroupName {
return
CgroupName
(
driverName
)
}
// adaptName converts a CgroupName identifer to a driver specific conversion value.
// adaptName converts a CgroupName identif
i
er to a driver specific conversion value.
// if outputToCgroupFs is true, the result is returned in the cgroupfs format rather than the driver specific form.
func
(
l
*
libcontainerAdapter
)
adaptName
(
cgroupName
CgroupName
,
outputToCgroupFs
bool
)
string
{
if
l
.
cgroupManagerType
!=
libcontainerSystemd
{
...
...
@@ -229,7 +229,7 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool {
// the presence of alternative control groups not known to runc confuses
// the kubelet existence checks.
// ideally, we would have a mechani
n
sm in runc to support Exists() logic
// ideally, we would have a mechanism in runc to support Exists() logic
// scoped to the set control groups it understands. this is being discussed
// in https://github.com/opencontainers/runc/issues/1440
// once resolved, we can remove this code.
...
...
@@ -237,7 +237,7 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool {
// If even one cgroup path doesn't exist, then the cgroup doesn't exist.
for
controller
,
path
:=
range
cgroupPaths
{
// ignore mounts we dont care about
// ignore mounts we don
'
t care about
if
!
whitelistControllers
.
Has
(
controller
)
{
continue
}
...
...
pkg/kubelet/cm/pod_container_manager_linux.go
View file @
1e2ac80c
...
...
@@ -66,7 +66,7 @@ func (m *podContainerManagerImpl) Exists(pod *v1.Pod) bool {
// EnsureExists takes a pod as argument and makes sure that
// pod cgroup exists if qos cgroup hierarchy flag is enabled.
// If the pod level container does
e
n't already exist it is created.
// If the pod level container doesn't already exist it is created.
func
(
m
*
podContainerManagerImpl
)
EnsureExists
(
pod
*
v1
.
Pod
)
error
{
podContainerName
,
_
:=
m
.
GetPodContainerName
(
pod
)
// check if container already exist
...
...
@@ -91,7 +91,7 @@ func (m *podContainerManagerImpl) EnsureExists(pod *v1.Pod) error {
return
nil
}
// GetPodContainerName returns the CgroupName identifer, and its literal cgroupfs form on the host.
// GetPodContainerName returns the CgroupName identif
i
er, and its literal cgroupfs form on the host.
func
(
m
*
podContainerManagerImpl
)
GetPodContainerName
(
pod
*
v1
.
Pod
)
(
CgroupName
,
string
)
{
podQOS
:=
v1qos
.
GetPodQOS
(
pod
)
// Get the parent QOS container name
...
...
pkg/kubelet/cm/qos_container_manager_linux.go
View file @
1e2ac80c
...
...
@@ -127,7 +127,7 @@ func (m *qosContainerManagerImpl) Start(getNodeAllocatable func() v1.ResourceLis
m
.
activePods
=
activePods
// update qos cgroup tiers on startup and in periodic intervals
// to ensure desired state is in sync
h
with actual state.
// to ensure desired state is in sync with actual state.
go
wait
.
Until
(
func
()
{
err
:=
m
.
UpdateCgroups
()
if
err
!=
nil
{
...
...
pkg/kubelet/cm/types.go
View file @
1e2ac80c
...
...
@@ -47,13 +47,13 @@ type CgroupConfig struct {
ResourceParameters
*
ResourceConfig
}
// MemoryStats holds the on-demand sta
s
tistics from the memory cgroup
// MemoryStats holds the on-demand statistics from the memory cgroup
type
MemoryStats
struct
{
// Memory usage (in bytes).
Usage
int64
}
// ResourceStats holds on-demand sta
s
tistics from various cgroup subsystems
// ResourceStats holds on-demand statistics from various cgroup subsystems
type
ResourceStats
struct
{
// Memory statistics.
MemoryStats
*
MemoryStats
...
...
@@ -99,12 +99,12 @@ type QOSContainersInfo struct {
// The Pod workers interact with the PodContainerManager to create and destroy
// containers for the pod.
type
PodContainerManager
interface
{
// GetPodContainerName returns the CgroupName identifer, and its literal cgroupfs form on the host.
// GetPodContainerName returns the CgroupName identif
i
er, and its literal cgroupfs form on the host.
GetPodContainerName
(
*
v1
.
Pod
)
(
CgroupName
,
string
)
// EnsureExists takes a pod as argument and makes sure that
// pod cgroup exists if qos cgroup hierarchy flag is enabled.
// If the pod cgroup does
e
n't already exist this method creates it.
// If the pod cgroup doesn't already exist this method creates it.
EnsureExists
(
*
v1
.
Pod
)
error
// Exists returns true if the pod cgroup exists.
...
...
pkg/kubelet/cm/util/cgroups_linux.go
View file @
1e2ac80c
...
...
@@ -45,7 +45,7 @@ func getCgroupPath(cgroupPath string) (string, error) {
// If the cgroup name/path is absolute do not look relative to the cgroup of the init process.
if
filepath
.
IsAbs
(
cgroupPath
)
{
// Sometimes subsystems can be mounted togeth
g
er as 'cpu,cpuacct'.
// Sometimes subsystems can be mounted together as 'cpu,cpuacct'.
return
filepath
.
Join
(
root
,
mnt
,
cgroupPath
),
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