]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
6 years agostart: use correct prefix for includes
Christian Brauner [Sun, 18 Feb 2018 22:39:04 +0000 (23:39 +0100)]
start: use correct prefix for includes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years ago{commands,start}: remove element from list first
Christian Brauner [Sun, 18 Feb 2018 22:20:05 +0000 (23:20 +0100)]
{commands,start}: remove element from list first

First remove the client from the list then close the fd. Otherwise we open
ourselves to a race where another codepath might be writing to a bad file
descriptor.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agotree-wide: remove locking around openpty()
Christian Brauner [Sun, 18 Feb 2018 22:10:04 +0000 (23:10 +0100)]
tree-wide: remove locking around openpty()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agostart: remove duplicate lxc_monitor_send_state()
Christian Brauner [Sun, 18 Feb 2018 21:19:51 +0000 (22:19 +0100)]
start: remove duplicate lxc_monitor_send_state()

Closes #2177.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: use wait_for_pid()
Christian Brauner [Sun, 18 Feb 2018 20:43:46 +0000 (21:43 +0100)]
lxccontainer: use wait_for_pid()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: __cg_unified_setup_limits()
Christian Brauner [Sat, 17 Feb 2018 18:49:31 +0000 (19:49 +0100)]
cgfsng: __cg_unified_setup_limits()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: __cg_legacy_setup_limits()
Christian Brauner [Sat, 17 Feb 2018 18:48:59 +0000 (19:48 +0100)]
cgfsng: __cg_legacy_setup_limits()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_legacy_set_data()
Christian Brauner [Sat, 17 Feb 2018 18:47:23 +0000 (19:47 +0100)]
cgfsng: cg_legacy_set_data()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: convert_devpath()
Christian Brauner [Sat, 17 Feb 2018 18:46:44 +0000 (19:46 +0100)]
cgfsng: convert_devpath()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cgfsng_set()
Christian Brauner [Sat, 17 Feb 2018 18:45:12 +0000 (19:45 +0100)]
cgfsng: cgfsng_set()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cgfsng_get()
Christian Brauner [Sat, 17 Feb 2018 18:44:52 +0000 (19:44 +0100)]
cgfsng: cgfsng_get()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cgfsng_attach()
Christian Brauner [Sat, 17 Feb 2018 18:44:21 +0000 (19:44 +0100)]
cgfsng: cgfsng_attach()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: __cg_unified_attach()
Christian Brauner [Sat, 17 Feb 2018 18:43:46 +0000 (19:43 +0100)]
cgfsng: __cg_unified_attach()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: build_full_cgpath_from_monitorpath()
Christian Brauner [Sat, 17 Feb 2018 18:42:17 +0000 (19:42 +0100)]
cgfsng: build_full_cgpath_from_monitorpath()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cgfsng_escape()
Christian Brauner [Sat, 17 Feb 2018 18:41:04 +0000 (19:41 +0100)]
cgfsng: cgfsng_escape()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: recursive_count_nrtasks()
Christian Brauner [Sat, 17 Feb 2018 18:40:00 +0000 (19:40 +0100)]
cgfsng: recursive_count_nrtasks()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: recursive_count_nrtasks()
Christian Brauner [Sat, 17 Feb 2018 18:39:33 +0000 (19:39 +0100)]
cgfsng: recursive_count_nrtasks()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cgfsng_mount()
Christian Brauner [Sat, 17 Feb 2018 18:38:59 +0000 (19:38 +0100)]
cgfsng: cgfsng_mount()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: mount_cgroup_full()
Christian Brauner [Sat, 17 Feb 2018 18:35:03 +0000 (19:35 +0100)]
cgfsng: mount_cgroup_full()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cgfsng_chown()
Christian Brauner [Sat, 17 Feb 2018 18:31:16 +0000 (19:31 +0100)]
cgfsng: cgfsng_chown()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cgfsng_enter()
Christian Brauner [Sat, 17 Feb 2018 18:29:02 +0000 (19:29 +0100)]
cgfsng: cgfsng_enter()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cgfsng_create()
Christian Brauner [Sat, 17 Feb 2018 18:27:52 +0000 (19:27 +0100)]
cgfsng: cgfsng_create()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: remove_path_for_hierarchy()
Christian Brauner [Sat, 17 Feb 2018 18:26:42 +0000 (19:26 +0100)]
cgfsng: remove_path_for_hierarchy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: create_path_for_hierarchy()
Christian Brauner [Sat, 17 Feb 2018 18:25:20 +0000 (19:25 +0100)]
cgfsng: create_path_for_hierarchy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_unified_create_cgroup()
Christian Brauner [Sat, 17 Feb 2018 18:24:39 +0000 (19:24 +0100)]
cgfsng: cg_unified_create_cgroup()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: recursive_destroy()
Christian Brauner [Sat, 17 Feb 2018 18:23:24 +0000 (19:23 +0100)]
cgfsng: recursive_destroy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cgfsng_init()
Christian Brauner [Sat, 17 Feb 2018 18:22:31 +0000 (19:22 +0100)]
cgfsng: cgfsng_init()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_unified_get_current_cgroup()
Christian Brauner [Sat, 17 Feb 2018 18:21:30 +0000 (19:21 +0100)]
cgfsng: cg_unified_get_current_cgroup()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_is_pure_unified()
Christian Brauner [Sat, 17 Feb 2018 18:20:54 +0000 (19:20 +0100)]
cgfsng: cg_is_pure_unified()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_hybrid_init()
Christian Brauner [Sat, 17 Feb 2018 18:20:23 +0000 (19:20 +0100)]
cgfsng: cg_hybrid_init()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: lxc_cgfsng_print_basecg_debuginfo()
Christian Brauner [Sat, 17 Feb 2018 18:18:08 +0000 (19:18 +0100)]
cgfsng: lxc_cgfsng_print_basecg_debuginfo()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: lxc_cgfsng_print_hierarchies()
Christian Brauner [Sat, 17 Feb 2018 18:17:43 +0000 (19:17 +0100)]
cgfsng: lxc_cgfsng_print_hierarchies()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: trim()
Christian Brauner [Sat, 17 Feb 2018 18:16:56 +0000 (19:16 +0100)]
cgfsng: trim()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: must_append_string()
Christian Brauner [Sat, 17 Feb 2018 18:16:20 +0000 (19:16 +0100)]
cgfsng: must_append_string()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_hybrid_get_current_cgroup()
Christian Brauner [Sat, 17 Feb 2018 18:15:52 +0000 (19:15 +0100)]
cgfsng: cg_hybrid_get_current_cgroup()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: controller_in_clist()
Christian Brauner [Sat, 17 Feb 2018 18:15:17 +0000 (19:15 +0100)]
cgfsng: controller_in_clist()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: copy_to_eol()
Christian Brauner [Sat, 17 Feb 2018 18:14:48 +0000 (19:14 +0100)]
cgfsng: copy_to_eol()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_hybrid_get_mountpoint()
Christian Brauner [Sat, 17 Feb 2018 18:14:14 +0000 (19:14 +0100)]
cgfsng: cg_hybrid_get_mountpoint()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_hybrid_get_controllers()
Christian Brauner [Sat, 17 Feb 2018 18:12:51 +0000 (19:12 +0100)]
cgfsng: cg_hybrid_get_controllers()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: all_controllers_found()
Christian Brauner [Sat, 17 Feb 2018 18:10:49 +0000 (19:10 +0100)]
cgfsng: all_controllers_found()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: controller_found()
Christian Brauner [Sat, 17 Feb 2018 18:09:50 +0000 (19:09 +0100)]
cgfsng: controller_found()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: controller_list_is_dup()
Christian Brauner [Sat, 17 Feb 2018 18:09:18 +0000 (19:09 +0100)]
cgfsng: controller_list_is_dup()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: controller_lists_intersect()
Christian Brauner [Sat, 17 Feb 2018 18:08:38 +0000 (19:08 +0100)]
cgfsng: controller_lists_intersect()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_legacy_handle_cpuset_hierarchy()
Christian Brauner [Sat, 17 Feb 2018 18:07:56 +0000 (19:07 +0100)]
cgfsng: cg_legacy_handle_cpuset_hierarchy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: copy_parent_file()
Christian Brauner [Sat, 17 Feb 2018 18:04:05 +0000 (19:04 +0100)]
cgfsng: copy_parent_file()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_legacy_filter_and_set_cpus()
Christian Brauner [Sat, 17 Feb 2018 18:00:33 +0000 (19:00 +0100)]
cgfsng: cg_legacy_filter_and_set_cpus()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: get_max_cpus()
Christian Brauner [Sat, 17 Feb 2018 17:55:15 +0000 (18:55 +0100)]
cgfsng: get_max_cpus()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: lxc_cpumask_to_cpulist()
Christian Brauner [Sat, 17 Feb 2018 17:54:10 +0000 (18:54 +0100)]
cgfsng: lxc_cpumask_to_cpulist()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: lxc_cpumask()
Christian Brauner [Sat, 17 Feb 2018 16:16:52 +0000 (17:16 +0100)]
cgfsng: lxc_cpumask()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: get_hierarchy()
Christian Brauner [Sat, 17 Feb 2018 16:12:30 +0000 (17:12 +0100)]
cgfsng: get_hierarchy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: must_append_controller()
Christian Brauner [Sat, 17 Feb 2018 16:11:05 +0000 (17:11 +0100)]
cgfsng: must_append_controller()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: string_in_list()
Christian Brauner [Sat, 17 Feb 2018 16:09:26 +0000 (17:09 +0100)]
cgfsng: string_in_list()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: append_null_to_list()
Christian Brauner [Sat, 17 Feb 2018 16:08:58 +0000 (17:08 +0100)]
cgfsng: append_null_to_list()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: add me to authors
Christian Brauner [Sat, 17 Feb 2018 16:08:06 +0000 (17:08 +0100)]
cgfsng: add me to authors

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: move cg_legacy_must_prefix_named()
Christian Brauner [Sat, 17 Feb 2018 16:06:56 +0000 (17:06 +0100)]
cgfsng: move cg_legacy_must_prefix_named()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: cg_legacy_must_prefix_named()
Christian Brauner [Sat, 17 Feb 2018 16:03:38 +0000 (17:03 +0100)]
cgfsng: cg_legacy_must_prefix_named()

s/must_prefix_named/cg_legacy_must_prefix_named/

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: free_string_list()
Christian Brauner [Sat, 17 Feb 2018 15:51:03 +0000 (16:51 +0100)]
cgfsng: free_string_list()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: fully document remaining variables
Christian Brauner [Sat, 17 Feb 2018 15:48:08 +0000 (16:48 +0100)]
cgfsng: fully document remaining variables

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: fully document struct cgfsng_handler_data
Christian Brauner [Sat, 17 Feb 2018 15:45:01 +0000 (16:45 +0100)]
cgfsng: fully document struct cgfsng_handler_data

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: fully document struct hierarchy
Christian Brauner [Sat, 17 Feb 2018 15:37:35 +0000 (16:37 +0100)]
cgfsng: fully document struct hierarchy

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: order includes
Christian Brauner [Sat, 17 Feb 2018 15:32:16 +0000 (16:32 +0100)]
cgfsng: order includes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2174 from brauner/2018-02-17/lxc-update-config_check_empty_args
Christian Brauner [Sat, 17 Feb 2018 12:37:20 +0000 (13:37 +0100)]
Merge pull request #2174 from brauner/2018-02-17/lxc-update-config_check_empty_args

cmd/lxc-update-config: check for empty arguments

6 years agocmd/lxc-update-config: check for empty arguments
Christian Brauner [Sat, 17 Feb 2018 12:36:31 +0000 (13:36 +0100)]
cmd/lxc-update-config: check for empty arguments

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2173 from brauner/2018-02-17/add_coverity_status
Christian Brauner [Sat, 17 Feb 2018 12:08:32 +0000 (13:08 +0100)]
Merge pull request #2173 from brauner/2018-02-17/add_coverity_status

README: add coverity

6 years agoREADME: add coverity
Christian Brauner [Sat, 17 Feb 2018 12:07:14 +0000 (13:07 +0100)]
README: add coverity

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2171 from brauner/2018-02-16/rework_hooks
Serge Hallyn [Sat, 17 Feb 2018 00:51:56 +0000 (18:51 -0600)]
Merge pull request #2171 from brauner/2018-02-16/rework_hooks

conf: fix run_script_argv()

6 years agoconsole: ensure that fd is marked EBADF
Christian Brauner [Fri, 16 Feb 2018 23:04:30 +0000 (00:04 +0100)]
console: ensure that fd is marked EBADF

If the handler closes the file descriptor for the peer or master fd it is
crucial that we mark it as -EBADF. This will prevent lxc_console_delete()
from calling close() on an already closed file descriptor again. I've
observed the double close in the attach code.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agostart: don't call close on invalid file descriptor
Christian Brauner [Fri, 16 Feb 2018 22:18:54 +0000 (23:18 +0100)]
start: don't call close on invalid file descriptor

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2172 from stgraber/master
Christian Brauner [Fri, 16 Feb 2018 22:16:19 +0000 (23:16 +0100)]
Merge pull request #2172 from stgraber/master

Sabayon fixes

6 years agolxc-sabayon: Fix handling of eth0
Stéphane Graber [Fri, 16 Feb 2018 21:50:45 +0000 (16:50 -0500)]
lxc-sabayon: Fix handling of eth0

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agolxc-sabayon: Remove broken/unused code
Stéphane Graber [Fri, 16 Feb 2018 21:49:02 +0000 (16:49 -0500)]
lxc-sabayon: Remove broken/unused code

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agoconf: s/argsin/argv/ in run_script_argv()
Christian Brauner [Fri, 16 Feb 2018 21:11:19 +0000 (22:11 +0100)]
conf: s/argsin/argv/ in run_script_argv()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconf: use malloc() in run_script_argv()
Christian Brauner [Fri, 16 Feb 2018 21:10:06 +0000 (22:10 +0100)]
conf: use malloc() in run_script_argv()

It seems dangerous to use alloca() as the arguments can be of indeterminate
length and we might blow up the stack.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconf: fix run_script_argv()
Christian Brauner [Fri, 16 Feb 2018 21:04:35 +0000 (22:04 +0100)]
conf: fix run_script_argv()

Make sure that we allocate the buffer **after** we determined how much space we
need in total.
This fixes a SIGBUS/SIGSEGV Stéphane reported on aarch64 and armf.

Reported-by: Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2170 from brauner/2018-02-16/cgfsng_force_cgroup_mount
Stéphane Graber [Fri, 16 Feb 2018 19:47:54 +0000 (14:47 -0500)]
Merge pull request #2170 from brauner/2018-02-16/cgfsng_force_cgroup_mount

confile: add "force" to cgroup:{mixed,ro,rw}

6 years agoutils: fix lxc_p{close,open}()
Christian Brauner [Fri, 16 Feb 2018 19:02:44 +0000 (20:02 +0100)]
utils: fix lxc_p{close,open}()

If a file descriptor fd is opened by fdopen() and associated with a stream f
will **not** have been dup()ed. This means that fclose(f) will also close the
fd. So never call close(fd) after fdopen(fd) succeeded.
This fixes a double close() Stéphane and I observed when debugging on aarch64
and armf.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agotests: remove lxc-test-ubuntu
Christian Brauner [Fri, 16 Feb 2018 14:56:24 +0000 (15:56 +0100)]
tests: remove lxc-test-ubuntu

This is really taking a long time for not a lot of benefit.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoCODING_STYLE: add section for str{n}cmp()
Christian Brauner [Fri, 16 Feb 2018 14:24:19 +0000 (15:24 +0100)]
CODING_STYLE: add section for str{n}cmp()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconf: non-functional changes
Christian Brauner [Fri, 16 Feb 2018 14:30:30 +0000 (15:30 +0100)]
conf: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconfile: add "force" to cgroup:{mixed,ro,rw}
Shukui Yang [Fri, 16 Feb 2018 04:16:40 +0000 (23:16 -0500)]
confile: add "force" to cgroup:{mixed,ro,rw}

This lets users specify

        lxc.mount.auto = cgroup:mixed:force
or
        lxc.mount.auto = cgroup:ro:force
or
        lxc.mount.auto = cgroup:rw:force

When cgroup namespaces are supported LXC will not mount cgroups for the
container since it assumes that the init system will mount cgroups itself if it
wants to. This assumption already broke when users wanted to run containers
without CAP_SYS_ADMIN. For example, systemd based containers wouldn't start
since systemd needs to mount cgroups (named systemd hierarchy for legacy
cgroups and the unified hierarchy for unified cgroups) to track processes. This
problem was solved by detecting whether the container had CAP_SYS_ADMIN. If it
didn't we performed the cgroup mounts for it.
However, there are more cases when we should be able to mount cgroups for the
container when cgroup namespaces are supported:
- init systems not mounting cgroups themselves:
  A init system that doesn't mount cgroups would not have cgroups available
  especially when combined with custom LSM profiles to prevent cgroup
  {u}mount()ing inside containers.
- application containers:
  Application containers will usually not mount by cgroups themselves.
- read-only cgroups:
  It is useful to be able to mount cgroups read-only to e.g. prevent
  changing cgroup limits from inside the container while at the same time
  allowing the applications to perform introspection on their own cgroups. This
  again is mostly useful for application containers. System containers running
  systemd will usually not work correctly when cgroups are mounted read-only.
To be fair, all of those use-cases could be covered by custom hooks or
lxc.mount.entry entries but exposing it through lxc.mount.auto takes care of
setting correct mount options and adding the necessary logic to e.g. mount
filesystem read-only correctly.

Currently we only extend this to cgroup:{mixed,ro,rw} but technically there's
no reason not to enable the same behavior for cgroup-full:{mixed,ro,rw} as
well. If someone requests this we can simply treat it as a bug and add "force"
for cgroup-full.

Replaces #2136.

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2166 from brauner/2018-02-15/fix_cgfsng_chown
Stéphane Graber [Wed, 14 Feb 2018 23:30:38 +0000 (18:30 -0500)]
Merge pull request #2166 from brauner/2018-02-15/fix_cgfsng_chown

cgroups: use correct mask for chmod()

6 years agocgroups: use correct mask for chmod()
Christian Brauner [Wed, 14 Feb 2018 23:28:42 +0000 (00:28 +0100)]
cgroups: use correct mask for chmod()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2165 from brauner/2018-02-14/coding_style
Serge Hallyn [Wed, 14 Feb 2018 19:03:18 +0000 (13:03 -0600)]
Merge pull request #2165 from brauner/2018-02-14/coding_style

CODING_STYLE: add coding style file

6 years agoCODING_STYLE: add CODING_STYLE.md
Christian Brauner [Wed, 14 Feb 2018 12:04:59 +0000 (13:04 +0100)]
CODING_STYLE: add CODING_STYLE.md

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoCONTRIBUTING: update
Christian Brauner [Wed, 14 Feb 2018 12:04:48 +0000 (13:04 +0100)]
CONTRIBUTING: update

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2163 from brauner/2018-02-13/fix_cgroup_chown
Stéphane Graber [Wed, 14 Feb 2018 05:20:51 +0000 (00:20 -0500)]
Merge pull request #2163 from brauner/2018-02-13/fix_cgroup_chown

cgfsng: simplifications and fixes

6 years agostart: s/||/&&/ when mapping ids
Christian Brauner [Tue, 13 Feb 2018 23:19:42 +0000 (00:19 +0100)]
start: s/||/&&/ when mapping ids

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: simplifications and fixes
Christian Brauner [Tue, 13 Feb 2018 20:00:46 +0000 (21:00 +0100)]
cgfsng: simplifications and fixes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2162 from brauner/2018-02-10/remove_openpty_lock
Stéphane Graber [Tue, 13 Feb 2018 18:53:03 +0000 (13:53 -0500)]
Merge pull request #2162 from brauner/2018-02-10/remove_openpty_lock

lxclock: remove atfork handlers

6 years agotree-wide: remove cgmanager
Christian Brauner [Tue, 13 Feb 2018 04:37:48 +0000 (05:37 +0100)]
tree-wide: remove cgmanager

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxclock: remove pthread_atfork_handlers
Christian Brauner [Sat, 10 Feb 2018 22:25:18 +0000 (23:25 +0100)]
lxclock: remove pthread_atfork_handlers

They shouldn't be needed anymore.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge branch 'tanyifeng-support_mount_propagation' into lxc/master
Christian Brauner [Mon, 12 Feb 2018 09:58:24 +0000 (10:58 +0100)]
Merge branch 'tanyifeng-support_mount_propagation' into lxc/master

6 years agoconf: support mount propagation
Yifeng Tan [Mon, 12 Feb 2018 12:01:32 +0000 (20:01 +0800)]
conf: support mount propagation

Closes #810.

Signed-off-by: Yifeng Tan <tanyifeng1@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2158 from lifeng68/Fix_lxc-console
Christian Brauner [Mon, 12 Feb 2018 07:41:51 +0000 (08:41 +0100)]
Merge pull request #2158 from lifeng68/Fix_lxc-console

Fix lxc-console hang

6 years agoFix lxc-console hang
LiFeng [Mon, 12 Feb 2018 12:22:47 +0000 (07:22 -0500)]
Fix lxc-console hang

The variable 'descr' is mistakenly covered with 'descr_console'.

Signed-off-by: LiFeng <lifeng68@huawei.com>
6 years agoMerge pull request #2159 from lifeng68/modify_gitignore
Christian Brauner [Mon, 12 Feb 2018 06:27:37 +0000 (07:27 +0100)]
Merge pull request #2159 from lifeng68/modify_gitignore

Modify .gitignore

6 years agoModify .gitignore
LiFeng [Mon, 12 Feb 2018 14:45:22 +0000 (09:45 -0500)]
Modify .gitignore

add:
src/lxc/cmd/lxc-checkconfig
src/lxc/cmd/lxc-update-config

Signed-off-by: LiFeng <lifeng68@huawei.com>
6 years agoMerge pull request #2155 from brauner/2018-02-10/remove_legacy_items
Serge Hallyn [Mon, 12 Feb 2018 03:30:28 +0000 (21:30 -0600)]
Merge pull request #2155 from brauner/2018-02-10/remove_legacy_items

tree-wide: remove legacy codepaths

6 years agotree-wide: remove legacy codepaths
Christian Brauner [Sat, 10 Feb 2018 23:12:36 +0000 (00:12 +0100)]
tree-wide: remove legacy codepaths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2090 from brauner/2018-01-12/tools_remove_non_api_symbols
Stéphane Graber [Sun, 11 Feb 2018 22:52:01 +0000 (17:52 -0500)]
Merge pull request #2090 from brauner/2018-01-12/tools_remove_non_api_symbols

tools: remove non api symbols