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
b82bb22c
Unverified
Commit
b82bb22c
authored
Feb 10, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
criu: handle new cgroup layout
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
2682ad16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
criu.c
src/lxc/criu.c
+19
-2
No files found.
src/lxc/criu.c
View file @
b82bb22c
...
@@ -887,6 +887,7 @@ static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_
...
@@ -887,6 +887,7 @@ static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_
struct
lxc_handler
*
handler
;
struct
lxc_handler
*
handler
;
int
status
=
0
;
int
status
=
0
;
int
pipes
[
2
]
=
{
-
1
,
-
1
};
int
pipes
[
2
]
=
{
-
1
,
-
1
};
struct
cgroup_ops
*
cgroup_ops
;
/* Try to detach from the current controlling tty if it exists.
/* Try to detach from the current controlling tty if it exists.
* Otherwise, lxc_init (via lxc_console) will attach the container's
* Otherwise, lxc_init (via lxc_console) will attach the container's
...
@@ -907,9 +908,25 @@ static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_
...
@@ -907,9 +908,25 @@ static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_
if
(
lxc_init
(
c
->
name
,
handler
)
<
0
)
if
(
lxc_init
(
c
->
name
,
handler
)
<
0
)
goto
out
;
goto
out
;
cgroup_ops
=
handler
->
cgroup_ops
;
if
(
!
handler
->
cgroup_ops
->
payload_create
(
handler
->
cgroup_ops
,
handler
))
{
if
(
!
cgroup_ops
->
monitor_create
(
cgroup_ops
,
handler
))
{
ERROR
(
"failed creating groups"
);
ERROR
(
"Failed to create monitor cgroup"
);
goto
out_fini_handler
;
}
if
(
!
cgroup_ops
->
monitor_enter
(
cgroup_ops
,
handler
))
{
ERROR
(
"Failed to enter monitor cgroup"
);
goto
out_fini_handler
;
}
if
(
!
cgroup_ops
->
monitor_delegate_controllers
(
cgroup_ops
))
{
ERROR
(
"Failed to delegate controllers to monitor cgroup"
);
goto
out_fini_handler
;
}
if
(
!
cgroup_ops
->
payload_create
(
cgroup_ops
,
handler
))
{
ERROR
(
"Failed creating cgroups"
);
goto
out_fini_handler
;
goto
out_fini_handler
;
}
}
...
...
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