gured.
Signed-off-by: David Ward
---
src/lxc/conf.c |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 965a0d2..6b3f318 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -1129,8 +1129,13 @@ static int setup_rootfs(struct lxc
The child process's environment should be manipulated the same way
by lxc-attach as it would be by lxc-start or lxc-execute.
Signed-off-by: David Ward
---
src/lxc/attach.c | 15 +++
src/lxc/attach.h |1 +
src/lxc/lxc_attach.c |5 +
3 files change
Support new default location for LXCINITDIR.
Signed-off-by: David Ward
---
configure.ac |1 +
src/lxc/lxc-setcap.in |1 +
src/lxc/lxc-setuid.in |1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index c2bf4b0..0c8aa69 100644
Avoid nesting and improve readability.
Signed-off-by: David Ward
---
src/lxc/cgroup.c | 70 -
1 files changed, 32 insertions(+), 38 deletions(-)
diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c
index f50c74a..8d70951 100644
--- a/src/lxc
.
Signed-off-by: David Ward
---
src/lxc/lxc-checkconfig.in | 15 +++
src/lxc/lxc-clone.in | 70 +++-
src/lxc/lxc-create.in | 96 ---
src/lxc/lxc-destroy.in | 40 --
src/lxc/lxc-setcap.in
27;, which indicates that it
has a real init process and is expected to write to a utmp file
- support for CAP_SYS_BOOT was not found in the kernel, which would
otherwise supersede utmp monitoring
Signed-off-by: David Ward
---
src/lxc/utmp.c |4
1 files changed, 0 insert
mount block device /proc//net read-only".
Check that user is root. Check that container name is specified
before calling 'exec'.
Update the help information.
Print error messages and help information to stderr.
Make indentation consistent.
Signed-off-by: David
r to solve a different problem: ignoring hierarchies that are
not bound to any subsystems (like 'systemd').
Signed-off-by: David Ward
---
src/lxc/attach.c | 110 +
src/lxc/attach.h |9
src/lxc/cgroup.c | 97 +
ot feature patches). They were
tested on top of lxc 0.8.0-rc2 under both Fedora 14 and Fedora 16. I am
submitting them for inclusion in lxc 0.8.0. Please let me know if you
have any questions or concerns.
David Ward (14):
use syscall numbers from Linux kernel headers
lxc-attach: use execvp
__NR_setns is defined in the Linux kernel headers in linux/unistd.h.
The full Linux kernel sources are not necessary for compilation.
Signed-off-by: David Ward
---
config/linux.m4 | 76 ---
configure.ac|8 ++---
src/lxc
do not append '/lxc' to the parent cgroup.
Add a '--help' option that prints the command syntax.
Print error messages and help information to stderr.
Update the documentation.
Signed-off-by: David Ward
---
doc/lxc-ls.sgml.in |
execvp does not require specifying the full path to the executable
(e.g., "ls" instead of "/bin/ls"), making the operation of 'lxc-attach'
consistent with 'lxc-start' and 'lxc-execute'.
Signed-off-by: David Ward
---
src/lxc/lxc_attach.c
lxc-cgroup gets or sets the value of a state object (such as
'cpuset.cpus'), not the value of a subsystem (which would be
just 'cpuset').
Signed-off-by: David Ward
---
doc/lxc-cgroup.sgml.in | 31 +--
src/lxc/cgroup.c |4 ++--
Obtain a list of subsystems from /proc/cgroups, and ignore hierarchies
that are not bound to any of them (especially the 'systemd' hierarchy:
http://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups ).
Signed-off-by: David Ward
---
src/lxc/cgrou
27;/lxc' to the parent cgroup.
Maintain column spacing. Expand container name column as necessary.
Properly handle spaces in 'ps' output that are not field separators
(for example, try 'lxc-ps -o pid,args').
Fix file mode in repository.
Signed-off-by: D
If CAP_SYS_BOOT is not found in the kernel, the existing value for
conf->need_utmp_watch should be left intact (which will be '1' for
containers started with 'lxc-start', or '0' for containers started
with 'lxc-execute').
Signed-off-by: David Ward
---
When a hierarchy contains the 'ns' subsystem, do not append '/lxc'
to the parent cgroup. Update surrounding comments for consistency.
Signed-off-by: David Ward
---
src/lxc/cgroup.c | 13 +++--
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/lx
Support new default location for LXCINITDIR.
Signed-off-by: David Ward
---
configure.ac |1 +
src/lxc/lxc-setcap.in |1 +
src/lxc/lxc-setuid.in |1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 526d22d..5c47dfc 100644
Support new default location for LXCINITDIR.
---
configure.ac |1 +
src/lxc/lxc-setcap.in |1 +
src/lxc/lxc-setuid.in |1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 526d22d..5c47dfc 100644
--- a/configure.ac
+++ b/configu
.
Signed-off-by: David Ward
---
src/lxc/lxc-checkconfig.in | 15 +++
src/lxc/lxc-clone.in | 70 +++-
src/lxc/lxc-create.in | 96 ---
src/lxc/lxc-destroy.in | 40 --
src/lxc/lxc-setcap.in
spaces in 'ps' output that are not field separators
(for example, try 'lxc-ps -o pid,args').
Fix file mode in repository.
Signed-off-by: David Ward
---
src/lxc/lxc-ps.in | 311 +++--
1 files changed, 109 insertions(+), 202 delet
ling 'exec'.
Update the help information.
Print error messages and help information to stderr.
Make indentation consistent.
Signed-off-by: David Ward
---
src/lxc/lxc-netstat.in | 141 +++-
1 files changed, 91 insertions(+), 50 deletions(-)
Obtain a list of subsystems from /proc/cgroups, and ignore hierarchies
that are not bound to any of them (especially the 'systemd' hierarchy:
http://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups ).
Signed-off-by: David Ward
---
src/lxc/cgrou
If CAP_SYS_BOOT is not found in the kernel, the existing value for
conf->need_utmp_watch should be left intact (which will be '1' for
containers started with 'lxc-start', or '0' for containers started
with 'lxc-execute').
Signed-off-by: David Ward
---
f you have any questions or concerns.
David Ward (12):
use syscall numbers from Linux kernel headers
lxc-attach: use execvp instead of execve
utmp: do not set conf->need_utmp_watch if CAP_SYS_BOOT is not found
utmp: support non-rootfs configuration
cgroup: rearrange code blocks
lxc-
Print error messages and help information to stderr.
Update the documentation.
Signed-off-by: David Ward
---
doc/lxc-ls.sgml.in | 17 ++-
src/lxc/lxc-ls.in | 112 +++-
2 files changed, 98 insertions(+), 31 deletions(-)
diff --git a/doc/lxc-
r to solve a different problem: ignoring hierarchies that are
not bound to any subsystems (like 'systemd').
Signed-off-by: David Ward
---
src/lxc/attach.c | 110 +
src/lxc/attach.h |9
src/lxc/cgroup.c | 91 ++
Avoid nesting and improve readability.
Signed-off-by: David Ward
---
src/lxc/cgroup.c | 66 -
1 files changed, 30 insertions(+), 36 deletions(-)
diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c
index cc3910a..c915b52 100644
--- a/src/lxc
__NR_setns is defined in the Linux kernel headers in linux/unistd.h.
The full Linux kernel sources are not necessary for compilation.
Signed-off-by: David Ward
---
config/linux.m4 | 76 ---
configure.ac|8 ++---
src/lxc
27;, which indicates that it
has a real init process and is expected to write to a utmp file
- support for CAP_SYS_BOOT was not found in the kernel, which would
otherwise supersede utmp monitoring
Signed-off-by: David Ward
---
src/lxc/utmp.c |4
1 files changed, 0 insert
execvp does not require specifying the full path to the executable
(e.g., "ls" instead of "/bin/ls"), making the operation of 'lxc-attach'
consistent with 'lxc-start' and 'lxc-execute'.
Signed-off-by: David Ward
---
src/lxc/lxc_attach.c
r to solve a different problem: ignoring hierarchies that are
not bound to any subsystems (like 'systemd').
Signed-off-by: David Ward
---
src/lxc/attach.c | 110 +
src/lxc/attach.h |9
src/lxc/cgroup.c | 91 ++
__NR_setns is defined in the Linux kernel headers in linux/unistd.h.
The full Linux kernel sources are not necessary for compilation.
Signed-off-by: David Ward
---
config/linux.m4 | 76 ---
configure.ac|8 ++---
src/lxc
The following patches address a few issues I discovered while building
or using lxc, including compatibility with systemd. They were tested on
top of lxc 0.8.0-rc1 under Fedora 16. Please let me know if you have
any questions or concerns.
David Ward (9):
use syscall numbers from Linux kernel
lxc-ls returns a list of active containers by searching for UNIX sockets
named '/var/lib/lxc//command'. Make the regular expression tighter
for this search, to avoid inadvertently picking up other sockets.
Signed-off-by: David Ward
---
src/lxc/lxc-ls.in |4 ++--
1 files
Obtain a list of subsystems from /proc/cgroups, and ignore hierarchies
that are not bound to any of them (especially the 'systemd' hierarchy:
http://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups ).
Signed-off-by: David Ward
---
src/lxc/cgrou
Avoid nesting and improve readability.
Signed-off-by: David Ward
---
src/lxc/cgroup.c | 66 -
1 files changed, 30 insertions(+), 36 deletions(-)
diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c
index cc3910a..c915b52 100644
--- a/src/lxc
ll printed using the old method as well, so now the active containers
just get printed twice.
Assuming that the intention of the above commit was to only list active
containers, do not print the directory names in /var/lib/lxc any longer.
Signed-off-by: David Ward
---
src/lxc/lxc-ls.in |2 -
If CAP_SYS_BOOT is not found in the kernel, the existing value for
conf->need_utmp_watch should be left intact (which will be '1' for
containers started with 'lxc-start', or '0' for containers started
with 'lxc-execute').
Signed-off-by: David Ward
---
27;, which indicates that it
has a real init process and is expected to write to a utmp file
- support for CAP_SYS_BOOT was not found in the kernel, which would
otherwise supersede utmp monitoring
Signed-off-by: David Ward
---
src/lxc/utmp.c |4
1 files changed, 0 insert
execvp does not require specifying the full path to the executable
(e.g., "ls" instead of "/bin/ls"), making the operation of 'lxc-attach'
consistent with 'lxc-start' and 'lxc-execute'.
Signed-off-by: David Ward
---
src/lxc/lxc_attach.c
, lxc checks to see if "/var/run" is shared between the
container and the system by comparing the device and inode numbers. If not,
lxc will watch utmp. This replaces the check for "lxc.rootfs".
Signed-off-by: David Ward
---
src/lxc/utmp.c | 21 -
1 fil
utmp.
This replaces the check for "lxc.rootfs" in the configuration.
Signed-off-by: David Ward
---
src/lxc/utmp.c | 21 -
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/lxc/utmp.c b/src/lxc/utmp.c
index 691c3ef..3356396 100644
--- a/src/l
Daniel,
On 02/06/2010 03:29 PM, Daniel Lezcano wrote:
>diff --git a/src/lxc/confile.c b/src/lxc/confile.c
>index 4d81ac6..7c72752 100644
>--- a/src/lxc/confile.c
>+++ b/src/lxc/confile.c
>@@ -423,9 +423,8 @@ static int config_network_ipv4(const char *key, char
>*value,
> * prefix and addres
Each network interface was brought up regardless of the configuration,
as the wrong boolean operator was being used to test the IFF_UP flag.
Signed-off-by: David Ward
---
src/lxc/conf.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
45 matches
Mail list logo