Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
202e017e
Unverified
Commit
202e017e
authored
May 15, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: be less alarming when creating cgroups
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
8bbfacd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
cgfsng.c
src/lxc/cgroups/cgfsng.c
+9
-9
No files found.
src/lxc/cgroups/cgfsng.c
View file @
202e017e
...
...
@@ -1149,7 +1149,7 @@ static int mkdir_eexist_on_last(const char *dir, mode_t mode)
ret
=
mkdir
(
makeme
,
mode
);
if
(
ret
<
0
&&
((
errno
!=
EEXIST
)
||
(
orig_len
==
cur_len
)))
return
log_
error
_errno
(
-
1
,
errno
,
"Failed to create directory
\"
%s
\"
"
,
makeme
);
return
log_
warn
_errno
(
-
1
,
errno
,
"Failed to create directory
\"
%s
\"
"
,
makeme
);
}
while
(
tmp
!=
dir
);
return
0
;
...
...
@@ -1179,9 +1179,9 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
ret
=
mkdir_eexist_on_last
(
limit_path
,
0755
);
if
(
ret
<
0
)
return
log_
error_errno
(
false
,
errno
,
"Failed to create %s limiting cgroup"
,
limit_path
);
return
log_
debug_errno
(
false
,
errno
,
"Failed to create %s limiting cgroup"
,
limit_path
);
h
->
cgfd_limit
=
lxc_open_dirfd
(
limit_path
);
if
(
h
->
cgfd_limit
<
0
)
...
...
@@ -1210,7 +1210,7 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
* directory for us to ensure correct initialization.
*/
if
(
ret_cpuset
!=
1
||
cgroup_tree
)
return
log_
error
_errno
(
false
,
errno
,
"Failed to create %s cgroup"
,
path
);
return
log_
debug
_errno
(
false
,
errno
,
"Failed to create %s cgroup"
,
path
);
}
if
(
payload
)
{
...
...
@@ -1353,7 +1353,7 @@ __cgfsng_ops static inline bool cgfsng_monitor_create(struct cgroup_ops *ops,
monitor_cgroup
,
false
,
NULL
))
continue
;
ERROR
(
"Failed to create cgroup
\"
%s
\"
"
,
ops
->
hierarchies
[
i
]
->
monitor_full_path
?:
"(null)"
);
DEBUG
(
"Failed to create cgroup
\"
%s
\"
"
,
ops
->
hierarchies
[
i
]
->
monitor_full_path
?:
"(null)"
);
for
(
int
j
=
0
;
j
<
i
;
j
++
)
cgroup_tree_leaf_remove
(
ops
->
hierarchies
[
j
],
false
);
...
...
@@ -1363,7 +1363,7 @@ __cgfsng_ops static inline bool cgfsng_monitor_create(struct cgroup_ops *ops,
}
while
(
ops
->
hierarchies
[
i
]
&&
idx
>
0
&&
idx
<
1000
&&
suffix
);
if
(
idx
==
1000
||
(
!
suffix
&&
idx
!=
0
))
return
ret_set_errno
(
false
,
ERANGE
);
return
log_error_errno
(
false
,
ERANGE
,
"Failed to create monitor cgroup"
);
ops
->
monitor_cgroup
=
move_ptr
(
monitor_cgroup
);
return
log_info
(
true
,
"The monitor process uses
\"
%s
\"
as cgroup"
,
ops
->
monitor_cgroup
);
...
...
@@ -1457,7 +1457,7 @@ __cgfsng_ops static inline bool cgfsng_payload_create(struct cgroup_ops *ops,
limiting_cgroup
))
continue
;
ERROR
(
"Failed to create cgroup
\"
%s
\"
"
,
ops
->
hierarchies
[
i
]
->
container_full_path
?:
"(null)"
);
DEBUG
(
"Failed to create cgroup
\"
%s
\"
"
,
ops
->
hierarchies
[
i
]
->
container_full_path
?:
"(null)"
);
for
(
int
j
=
0
;
j
<
i
;
j
++
)
cgroup_tree_leaf_remove
(
ops
->
hierarchies
[
j
],
true
);
...
...
@@ -1467,7 +1467,7 @@ __cgfsng_ops static inline bool cgfsng_payload_create(struct cgroup_ops *ops,
}
while
(
ops
->
hierarchies
[
i
]
&&
idx
>
0
&&
idx
<
1000
&&
suffix
);
if
(
idx
==
1000
||
(
!
suffix
&&
idx
!=
0
))
return
ret_set_errno
(
false
,
ERANGE
);
return
log_error_errno
(
false
,
ERANGE
,
"Failed to create container cgroup"
);
ops
->
container_cgroup
=
move_ptr
(
container_cgroup
);
INFO
(
"The container process uses
\"
%s
\"
as cgroup"
,
ops
->
container_cgroup
);
...
...
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