Commit Graph

6355 Commits

Author SHA1 Message Date
Christian Brauner
fd99824155
templates: remove legacy key from busybox
lxc.rebootsignal -> lxc.signal.reboot

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-22 00:02:28 +02:00
Serge Hallyn
7456fb2c44 Merge pull request #1750 from brauner/2017-08-10/further_lxc_2.1_preparations
further lxc 2.1. preparations
2017-08-21 14:46:00 -05:00
Christian Brauner
7ec2e32ad7
conf{,ile}: warn user once about legacy config
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-21 18:06:20 +02:00
Christian Brauner
54a2454f4c
tools: use "which"
Somehow "type" doesn't really work.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-21 17:33:30 +02:00
Christian Brauner
555200a6f4
tools: add lxc-update-config.in
This tool can be used to switch from a pre 2.1 to a 2.1 config file.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-21 17:19:16 +02:00
Christian Brauner
35ec13c567
confile: lxc.id_map --> lxc.idmap
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-21 17:03:40 +02:00
Christian Brauner
4393ebc3bf Merge pull request #1752 from stgraber/master
Add CONFIG_NETFILTER_XT_MATCH_COMMENT to lxc-checkconfig
2017-08-20 13:54:51 +02:00
Stéphane Graber
308d9075e9
Add CONFIG_NETFILTER_XT_MATCH_COMMENT to lxc-checkconfig
Closes https://github.com/lxc/lxd/issues/3685

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2017-08-19 12:28:46 -04:00
Christian Brauner
c8313003e8
test: add test to get subkeys
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-16 01:51:31 +02:00
Christian Brauner
fe9b7349dd
confile: list namespaced keys
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-16 01:48:20 +02:00
Christian Brauner
300df83ecf
confile: lxc_getconfig() -> lxc_get_config()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-16 01:05:06 +02:00
Stéphane Graber
0c9a9339d9 Merge pull request #1746 from brauner/2017-08-10/further_lxc_2.1_preparations
further lxc 2.1 preparations
2017-08-15 16:55:33 -04:00
Christian Brauner
7451daf89d
confile: improve get_network_config_ops()
- handle lxc.net.<idx> keys without any subkey
- allow caller to pass NULL if caller doesn't need to retrieve deindexed key

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-15 22:11:25 +02:00
Christian Brauner
e45d720486
storage: add overlay as valid backend
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-15 20:02:45 +02:00
Serge Hallyn
065055b6d5 Merge pull request #1739 from keloyang/mem-leak
Fix mem leak with realpath
2017-08-12 09:55:40 -05:00
Stéphane Graber
42139323ba
Revert "debian: jessie and stretch keyring support"
This reverts commit 87eacd4d49.

While that commit looks right, the actual signing key doesn't match and
debootstrap therefore fails to bootstrap, as can be seen here:

https://jenkins.linuxcontainers.org/view/All/job/lxc-template-debian/

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2017-08-11 15:06:02 -04:00
Shukui Yang
e58e6e11ef Fix mem leak with realpath
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2017-08-11 17:12:24 +08:00
Christian Brauner
a5448c1530
confile: move lxc_list_net()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-11 00:30:09 +02:00
Christian Brauner
cfc6762681
confile: lxc_listconfigs -> lxc_list_config_items
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-11 00:22:12 +02:00
Christian Brauner
3aea1a7643
confile: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-11 00:13:25 +02:00
Christian Brauner
01f55c4098
confile: rework lxc_list_net()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-11 00:11:34 +02:00
Christian Brauner
70c1e708fa
confile: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-10 23:48:59 +02:00
Christian Brauner
49072f06f7
confile: cleanup
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-10 23:45:37 +02:00
Stéphane Graber
d17a217910 Merge pull request #1738 from brauner/2017-08-10/fix_android
android: fix includes
2017-08-10 17:41:18 -04:00
Christian Brauner
a3cbac3290
android: fix includes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-10 23:17:36 +02:00
Stéphane Graber
f111a899b9 Merge pull request #1736 from brauner/2017-08-08/fix_gcc_warnings
cgfsng: do not use uninitialized variable
2017-08-10 15:06:26 -04:00
Christian Brauner
462a15ef68
lxccontainer: remove 5s timeout
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-10 20:30:06 +02:00
Christian Brauner
2a06d041bb
cgfsng: do not use uninitialized variable
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-10 20:30:06 +02:00
Christian Brauner
28cfa8fc63 Merge pull request #1735 from fanyeren/patch-20
debian: jessie and stretch keyring support
2017-08-08 10:48:11 -04:00
有张纸
87eacd4d49 debian: jessie and stretch keyring support
Signed-off-by: feng xiahou xiahoufeng@yahoo.com
2017-08-08 18:06:38 +08:00
Stéphane Graber
52c5ac5f24
debian: Add buster as a valid release
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2017-08-07 17:49:40 -04:00
Alf Gaida
fdf3ef0a0d Don't force getty@ configuration
```
    # this only works if we have getty@.service to manipulate
    if [ -f "${rootfs}/lib/systemd/system/getty@.service" ]; then
       sed -e 's/^ConditionPathExists=/# ConditionPathExists=/' \
           -e 's/After=dev-%i.device/After=/' \
           < "${rootfs}/lib/systemd/system/getty@.service" \
           > "${rootfs}/etc/systemd/system/getty@.service"
    fi
```
we have only /dev/tty in a container - so this little cutie will spam the log all 10s with the following:

```
Jul 28 22:33:00 mariadb systemd[1]: getty@tty4.service: Service has no hold-off time, scheduling restart.
Jul 28 22:33:00 mariadb systemd[1]: getty@tty3.service: Service has no hold-off time, scheduling restart.
Jul 28 22:33:00 mariadb systemd[1]: getty@tty1.service: Service has no hold-off time, scheduling restart.
Jul 28 22:33:00 mariadb systemd[1]: getty@tty2.service: Service has no hold-off time, scheduling restart.
Jul 28 22:33:00 mariadb systemd[1]: Stopped Getty on tty2.
Jul 28 22:33:00 mariadb systemd[1]: getty@tty2.service: Failed to set invocation ID on control group /system.slice/system-getty.slice/getty@tty2.service, ignoring: Operation not permitted
Jul 28 22:33:00 mariadb systemd[1]: Started Getty on tty2.
Jul 28 22:33:00 mariadb systemd[1]: Stopped Getty on tty1.
Jul 28 22:33:00 mariadb systemd[1]: getty@tty1.service: Failed to set invocation ID on control group /system.slice/system-getty.slice/getty@tty1.service, ignoring: Operation not permitted
Jul 28 22:33:00 mariadb systemd[1]: Started Getty on tty1.
Jul 28 22:33:00 mariadb systemd[1]: Stopped Getty on tty3.
Jul 28 22:33:00 mariadb systemd[1]: getty@tty3.service: Failed to set invocation ID on control group /system.slice/system-getty.slice/getty@tty3.service, ignoring: Operation not permitted
Jul 28 22:33:00 mariadb systemd[1]: Started Getty on tty3.
Jul 28 22:33:00 mariadb systemd[1]: Stopped Getty on tty4.
Jul 28 22:33:00 mariadb systemd[1]: getty@tty4.service: Failed to set invocation ID on control group /system.slice/system-getty.slice/getty@tty4.service, ignoring: Operation not permitted
Jul 28 22:33:00 mariadb systemd[1]: Started Getty on tty4.
Jul 28 22:33:00 mariadb agetty[242]: /dev/tty1: cannot open as standard input: No such file or directory
Jul 28 22:33:00 mariadb agetty[241]: /dev/tty2: cannot open as standard input: No such file or directory
Jul 28 22:33:00 mariadb agetty[244]: /dev/tty4: cannot open as standard input: No such file or directory
Jul 28 22:33:00 mariadb agetty[243]: /dev/tty3: cannot open as standard input: No such file or directory
Jul 28 22:33:10 mariadb systemd[1]: getty@tty4.service: Service has no hold-off time, scheduling restart.
Jul 28 22:33:10 mariadb systemd[1]: getty@tty2.service: Service has no hold-off time, scheduling restart.
Jul 28 22:33:10 mariadb systemd[1]: getty@tty1.service: Service has no hold-off time, scheduling restart.
Jul 28 22:33:10 mariadb systemd[1]: getty@tty3.service: Service has no hold-off time, scheduling restart.
Jul 28 22:33:10 mariadb systemd[1]: Stopped Getty on tty3.
Jul 28 22:33:10 mariadb systemd[1]: getty@tty3.service: Failed to set invocation ID on control group /system.slice/system-getty.slice/getty@tty3.service, ignoring: Operation not permitted
Jul 28 22:33:10 mariadb systemd[1]: Started Getty on tty3.
Jul 28 22:33:10 mariadb systemd[1]: Stopped Getty on tty1.
Jul 28 22:33:10 mariadb systemd[1]: getty@tty1.service: Failed to set invocation ID on control group /system.slice/system-getty.slice/getty@tty1.service, ignoring: Operation not permitted
Jul 28 22:33:10 mariadb systemd[1]: Started Getty on tty1.
Jul 28 22:33:10 mariadb systemd[1]: Stopped Getty on tty2.
Jul 28 22:33:10 mariadb systemd[1]: getty@tty2.service: Failed to set invocation ID on control group /system.slice/system-getty.slice/getty@tty2.service, ignoring: Operation not permitted
Jul 28 22:33:10 mariadb systemd[1]: Started Getty on tty2.
Jul 28 22:33:10 mariadb systemd[1]: Stopped Getty on tty4.
Jul 28 22:33:10 mariadb systemd[1]: getty@tty4.service: Failed to set invocation ID on control group /system.slice/system-getty.slice/getty@tty4.service, ignoring: Operation not permitted
Jul 28 22:33:10 mariadb systemd[1]: Started Getty on tty4.
Jul 28 22:33:10 mariadb agetty[245]: /dev/tty3: cannot open as standard input: No such file or directory
Jul 28 22:33:10 mariadb agetty[247]: /dev/tty2: cannot open as standard input: No such file or directory
Jul 28 22:33:10 mariadb agetty[246]: /dev/tty1: cannot open as standard input: No such file or directory
Jul 28 22:33:10 mariadb agetty[248]: /dev/tty4: cannot open as standard input: No such file or directory
```
if more reasons are whished i could attach the logs from 10 containers after one month runtime. (approx 30G)

Signed-off-by: Alf Gaida <agaida@siduction.org>
2017-08-06 11:21:28 +02:00
Serge Hallyn
332833712b Merge pull request #1729 from brauner/2017-08-03/ensure_cgroup_cleanup_before_restart
start: ensure cgroups are cleaned up
2017-08-04 22:15:40 -05:00
Christian Brauner
4288b79f23
start: ensure cgroups are cleaned up
When a container is marked as being in STOPPED state it is possible for another
thread to start it again even though not all cleanup operations for that
container have finished. This is not a problem for most things like sockets and
friends which are unique to the container. It is however a problem for cgroups
which are named after that container in that we cause our cgroup driver to
waste cpu cycles finding a new cgroup name.

Closes  #1726.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-03 23:55:23 +02:00
Stéphane Graber
483efec8ca Merge pull request #1727 from brauner/2017-08-02/fix_travis
travis: fix builds
2017-08-02 22:12:36 -04:00
Serge Hallyn
aaede7171d Merge pull request #1705 from brauner/2017-07-15/fix_clone
storage: rework storage drivers
2017-08-02 12:30:06 -05:00
Christian Brauner
4c9ab50eb6
travis: fix builds
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 18:41:57 +02:00
Serge Hallyn
183ebf0a99 Merge pull request #1725 from brauner/2017-08-01/handle_pre_mounted_dev
conf: NOTICE() on mounts on container's /dev
2017-08-02 11:18:45 -05:00
Christian Brauner
307eba8ae3
userns.conf: remove obsolete bind-mounts
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 17:19:00 +02:00
Christian Brauner
06749971a0
conf: NOTICE() on mounts on container's /dev
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 17:18:59 +02:00
Christian Brauner
eda0afd4b4
utils: rework lxc_deslashify()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 01:37:02 +02:00
Christian Brauner
3999be0ac0
conf: lxc_fill_autodev()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 01:37:02 +02:00
Christian Brauner
29a11a7f1b
utils: switch to has_fs_type()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 01:37:02 +02:00
Christian Brauner
a035c53af1
utils: add has_fs_type() + is_fs_type()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 01:37:02 +02:00
Christian Brauner
7133b912d3
conf: mount_autodev()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 01:37:02 +02:00
Christian Brauner
2b9ae35aa6
conf: lxchook_names
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 01:37:01 +02:00
Christian Brauner
0ac4b28a48
conf: mount_entry()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 01:37:01 +02:00
Christian Brauner
c5e30de481
conf: cull_mntent_opt()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 01:37:01 +02:00
Christian Brauner
749f98d922
conf: mount_entry_create_dir_file()
bugfixes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 01:37:01 +02:00
Christian Brauner
0207868630
android: include custom mntent
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 23:42:19 +02:00