Commit Graph

6489 Commits

Author SHA1 Message Date
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
Christian Brauner
f5cdd5ac3c Merge pull request #1724 from GamerSource/opensuse-template-improvements-v2
Opensuse template improvements
2017-08-01 15:46:13 -04:00
Christian Brauner
17a367d841
overlay: correctly restore from snapshot
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 20:24:03 +02:00
Christian Brauner
9d28c4f980
devpts: use max=<count> option on mount
This will only work with kernels >= 3.4

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 19:59:18 +02:00
Christian Brauner
bc8ce58604
start: remove utmp watch
Closes #1616.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 18:45:50 +02:00
Thomas Lamprecht
46a892d500 templates/opensuse: support leap 42.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-08-01 09:15:30 +02:00
Thomas Lamprecht
d4cf2ad3ec templates/opensuse: getty.target.wants does not always exists
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-08-01 09:15:25 +02:00
Thomas Lamprecht
4615877951 templates/opensuse: fix tumbleweed software selection
tumbleweed needs a newer version for a few packages, namely:
* liblua5_3
* bncurses6
* breadline7

As Leap it also has no dhcpd, but udhcp which gets pulled in already.
Further iproute2 and net-tools need manual instalation.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-08-01 09:15:20 +02:00