]> git.proxmox.com Git - mirror_lxc.git/commit
confile: add lxc.console.size
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 15 Feb 2018 10:27:56 +0000 (11:27 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 27 Feb 2018 20:38:29 +0000 (21:38 +0100)
commit861813e52bdba0cda7e3b72ba4932db77d47b08b
treeb5667ec7e9fcb497a2f88050e082b93403e6389d
parent9e49a491de31bda9a5d1865657c2b4b8a06c5bcd
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>
doc/lxc.container.conf.sgml.in
src/lxc/commands.c
src/lxc/conf.c
src/lxc/conf.h
src/lxc/confile.c
src/lxc/console.c