Commit Graph

6346 Commits

Author SHA1 Message Date
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
Christian Brauner
d8b712bc61
conf: mount_entry_on_generic()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 22:35:24 +02:00
Christian Brauner
07667a6a18
conf: mount_entry_on_systemfs()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 22:16:12 +02:00
Christian Brauner
bdd2b34c41
conf: mount_entry_on_absolute_rootfs()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 22:14:48 +02:00
Christian Brauner
19b5d7557b
conf: setup_mount_entries()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 22:11:32 +02:00
Christian Brauner
6bd0414042
conf: make_anonymous_mount_file()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 22:09:43 +02:00
Christian Brauner
42dff44818
conf: setup_mount()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 22:03:14 +02:00
Christian Brauner
1ae3c19f47
conf: mount_file_entries()
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 22:00:44 +02:00
Serge Hallyn
ebc524334a Merge pull request #1723 from brauner/2017-07-31/remove_utmp_watch
start: remove utmp watch
2017-08-01 14:59:32 -05:00
Serge Hallyn
58f52a1438 Merge pull request #1722 from brauner/2017-07-31/devpts_use_max_mount_option
devpts: use max=<count> option on mount
2017-08-01 14:59:06 -05:00