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
e9195050
Commit
e9195050
authored
Dec 08, 2015
by
Tycho Andersen
Committed by
Stéphane Graber
Dec 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c/r: escape cgroups before exec()ing criu
Signed-off-by:
Tycho Andersen
<
tycho.andersen@canonical.com
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
06078509
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
criu.c
src/lxc/criu.c
+12
-0
No files found.
src/lxc/criu.c
View file @
e9195050
...
@@ -56,6 +56,18 @@ void exec_criu(struct criu_opts *opts)
...
@@ -56,6 +56,18 @@ void exec_criu(struct criu_opts *opts)
char
buf
[
4096
];
char
buf
[
4096
];
/* If we are currently in a cgroup /foo/bar, and the container is in a
* cgroup /lxc/foo, lxcfs will give us an ENOENT if some task in the
* container has an open fd that points to one of the cgroup files
* (systemd always opens its "root" cgroup). So, let's escape to the
* /actual/ root cgroup so that lxcfs thinks criu has enough rights to
* see all cgroups.
*/
if
(
!
cgroup_escape
())
{
ERROR
(
"failed to escape cgroups"
);
return
;
}
/* The command line always looks like:
/* The command line always looks like:
* criu $(action) --tcp-established --file-locks --link-remap --force-irmap \
* criu $(action) --tcp-established --file-locks --link-remap --force-irmap \
* --manage-cgroups action-script foo.sh -D $(directory) \
* --manage-cgroups action-script foo.sh -D $(directory) \
...
...
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