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
c4cafa08
Commit
c4cafa08
authored
Dec 31, 2015
by
Serge Hallyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add LXC_CGNS_AWARE env variable for mount hooks
This way the lxcfs mount hook can know whether lxc knows about cgroup namespaces. Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
6cee93ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
lxc.container.conf.sgml.in
doc/lxc.container.conf.sgml.in
+16
-0
start.c
src/lxc/start.c
+3
-0
No files found.
doc/lxc.container.conf.sgml.in
View file @
c4cafa08
...
...
@@ -1593,6 +1593,22 @@ mknod errno 0
</listitem>
</varlistentry>
</variablelist>
<variablelist>
<varlistentry>
<term>
<option>LXC_CGNS_AWARE</option>
</term>
<listitem>
<para>
If unset, then this version of lxc is not aware of cgroup
namespaces. If set, it will be set to 1, and lxc is aware
of cgroup namespaces. Note this does not guarantee that
cgroup namespaces are enabled in the kernel. This is used
by the lxcfs mount hook.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>Logging</title>
...
...
src/lxc/start.c
View file @
c4cafa08
...
...
@@ -451,6 +451,9 @@ struct lxc_handler *lxc_init(const char *name, struct lxc_conf *conf, const char
if
(
conf
->
console
.
log_path
&&
setenv
(
"LXC_CONSOLE_LOGPATH"
,
conf
->
console
.
log_path
,
1
))
{
SYSERROR
(
"failed to set environment variable for console log"
);
}
if
(
setenv
(
"LXC_CGNS_AWARE"
,
"1"
,
1
))
{
SYSERROR
(
"failed to set LXC_CGNS_AWARE environment variable"
);
}
/* End of environment variable setup for hooks */
if
(
run_lxc_hooks
(
name
,
"pre-start"
,
conf
,
handler
->
lxcpath
,
NULL
))
{
...
...
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