Christian Brauner
de708fb77c
console: lxc_terminal_io_cb()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 22:18:09 +01:00
Christian Brauner
a8867251bc
console: lxc_terminal_signal_fini()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 22:15:21 +01:00
Christian Brauner
dc8c788350
console: lxc_terminal_signal_init()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 22:15:21 +01:00
Christian Brauner
9bafc8cb14
console: lxc_terminal_signalfd_cb()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 22:15:21 +01:00
Christian Brauner
8ccbbf9404
commands: lxc_cmd_terimal_winch()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 22:15:21 +01:00
Christian Brauner
dad4a0390d
console: lxc_terminal_sigwinch()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 22:15:21 +01:00
Christian Brauner
7a10164ad8
console: lxc_terminal_winch()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 22:15:20 +01:00
Christian Brauner
4e9c033073
console: lxc_terminal_winsz()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 22:15:20 +01:00
Christian Brauner
9785b5398c
tree-wide: s/struct lxc_console/struct lxc_pty/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 22:15:18 +01:00
Christian Brauner
93677636e2
cgfsng: non-functional changes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 22:09:24 +01:00
Stéphane Graber
7263b97f2c
Merge pull request #2167 from brauner/2018-02-15/simplify_console_logging
...
console: simplify console logging
2018-02-27 16:07:56 -05:00
Christian Brauner
d931b24349
Merge pull request #2194 from hallyn/2018-02-27/lxcinit-umountdev
...
lxc_init: don't mount filesystems
2018-02-27 22:04:55 +01:00
Serge Hallyn
0011e0975c
lxc_init: don't mount filesystems
...
We have an extensive set of container config options to do this
for us, and doing this unconditionally breaks several use cases.
For instance, if we want to bind mount a /dev/shm using the
container configuration, then lxc-execute, then lxc-init will
rudely unmount the /dev/shm and remount it as a private tmpfs.
Signed-off-by: Serge Hallyn <shallyn@cisco.com>
2018-02-27 14:50:48 -06:00
Christian Brauner
89962c6c0c
console: always dump log file
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 21:42:18 +01:00
Christian Brauner
39c6cdb771
console: dump ringbuffer to disk on container exit
...
The console ringbuffer will be dumped to disk if the console log file is not
rotated and it's size is not unlimited. In the former two cases we will have
all data from the ringbuffer available anyway.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 21:38:31 +01:00
Christian Brauner
23e0d9af76
confile: remove lxc.console.buffer.logfile
...
All of its functionality is now covered over by lxc.console.logfile.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 21:38:31 +01:00
Christian Brauner
861813e52b
confile: add lxc.console.size
...
lxc.console.size regulates the size of the console log file. This is intended
to replace lxc.console.buffer.logfile. The current semantics are:
- if lxc.console.size is not set:
- no limit is placed on the size of the log file
- if lxc.console.size is set:
- if lxc.console.rotate is set and the next write would exceed the limit:
- write as much as possible into the old log file
- rotate the log file
- write as much as posible into the new log file
- discard remaining bytes (scenario shouldn't be possible in normal
circumstances)
- if lxc.console.rotate is not set and the next write would exceed the limit:
- keep overwriting the current log file
To make the log file a mirror of the in-memory ringbuffer simply set:
lxc.console.buffer.size == lxc.console.size.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-27 21:38:29 +01:00
Stéphane Graber
9e49a491de
libpam: Drop mention to non-existing macro.h
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-02-26 13:22:02 -05:00
Stéphane Graber
d4feae43a6
Merge pull request #2192 from brauner/2018-02-26/enable_pam_flag
...
configure: add --enable-pam
2018-02-26 12:11:13 -05:00
Stéphane Graber
378ad0a07b
Merge pull request #2190 from brauner/2018-02-16/lxc_local_template
...
templates: add lxc-local template
2018-02-26 11:38:13 -05:00
Christian Brauner
f7a8609fab
configure: add --enable-pam
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:27:46 +01:00
Christian Brauner
35444f3827
templates: add lxc-local template
...
Closes #2184 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:22:48 +01:00
Christian Brauner
fbbe5ff5b2
lxc-oci: remove executable bit
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:04:55 +01:00
Christian Brauner
7ac43d3d21
Revert "Revert "pam: create writable cgroups for unpriv users""
...
This reverts commit 79cf25e826
.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:01:18 +01:00
Stéphane Graber
e72d2f5a81
Merge pull request #2191 from brauner/2018-02-16/fix_snapshot_segfault
...
lxc-snapshot: fix segfault
2018-02-26 10:35:22 -05:00
Stéphane Graber
d5bd4f0a1b
Merge pull request #2189 from brauner/2018-02-16/remove_needless_locking
...
commands: remove mutex from state client list
2018-02-26 10:34:56 -05:00
Stéphane Graber
521c807906
Merge pull request #2188 from brauner/2018-02-16/coding_style
...
CODING_STYLE: add section about _exit()
2018-02-26 10:33:28 -05:00
Christian Brauner
07d7dc9438
lxc-snapshot: fix segfault
...
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1751780
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 15:30:56 +01:00
Christian Brauner
44dec7efcc
parse: error out on invalid config key
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 14:03:00 +01:00
Christian Brauner
328a3f0f8b
commands: remove mutex from state client list
...
I was thinking about the locking here yesterday and it dawned on me that we
actually don't need this at all:
- possible contention between traversing list to send states to state clients
and adding new state clients to the list:
It is the command handler that adds new state clients to the state client
list. The command handler and the code that actually sends out the container
states run in the same process so there's not contention and thus no locking
needed.
- adding state clients to the list from multiple threads:
The command handler itself is single-threaded so only one thread's request can
be served at the same time so no locking is needed.
- sending out the state to state clients via the command handler itself:
The state client also adds and removes state clients from the state client
list so there's no locking needed.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 11:43:42 +01:00
Christian Brauner
4ad78f87c7
CODING_STYLE: add section about _exit()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 11:21:51 +01:00
Stéphane Graber
69556eaf83
Merge pull request #2187 from itoffshore/alpine
...
fix download template for /tmp as tmpfs or noexec
2018-02-25 17:17:19 -05:00
Stuart Cardall
edb5452cec
fix download template for /tmp as tmpfs or noexec
...
* prepend $LXC_PATH to $DOWNLOAD_TEMP on systems with /tmp mounted
securely as a small tmpfs / noexec
* gpg_setup() creates $DOWNLOAD_TEMP so remove superflous mkdir
* fixes https://github.com/lxc/lxc/issues/516
Signed-off-by: Stuart Cardall <developer@it-offshore.co.uk>
2018-02-25 21:40:16 +00:00
Stéphane Graber
c8a5adcdef
Merge pull request #2186 from brauner/2018-02-22/make_confile_reading_thread_safe
...
tree-wide: thread-safety improvements
2018-02-25 11:40:57 -05:00
Christian Brauner
106f1f38ef
cgfsng: fix get_hierarchy() for unified hierarchy
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:44 +01:00
Christian Brauner
7211378b1f
criu: du_dump()
...
thread-safety: s/exit()/_exit()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:43 +01:00
Christian Brauner
5a24adb870
criu: do_restore()
...
thread-safety: s/exit()/_exit()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:42 +01:00
Christian Brauner
665bb114c4
criu: criu_version_ok()
...
thread-safety: s/exit()/_exit()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:41 +01:00
Christian Brauner
4f43526d74
criu: __criu_check_feature()
...
thread-safety: s/exit()/_exit()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:39 +01:00
Christian Brauner
dfa7eaeb21
lxccontainer: create_container_dir()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:38 +01:00
Christian Brauner
78d44e5af5
lxccontainer: do_create_container_dir()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:37 +01:00
Christian Brauner
9f52e3317d
lxccontainer: lxcapi_startl()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:36 +01:00
Christian Brauner
0c14779f09
lxccontainer: lxcapi_start()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:35 +01:00
Christian Brauner
702bf732f8
lxccontainer: free_init_cmd()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:33 +01:00
Christian Brauner
75bd13abd3
lxccontainer: split_init_cmd()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:32 +01:00
Christian Brauner
1452d3fe06
lxccontainer: push_arg()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:31 +01:00
Christian Brauner
6b0297e327
lxccontainer: am_single_threaded()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:30 +01:00
Christian Brauner
e202dfb821
lxccontainer: do_lxcapi_wait()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:29 +01:00
Christian Brauner
871ed23baa
lxccontainer: do_lxcapi_want_close_all_fds()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:27 +01:00
Christian Brauner
fb5999f65f
lxccontainer: do_lxcapi_want_daemonize()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:26 +01:00