Commit 637c8ab8 authored by Balazs Lecz's avatar Balazs Lecz
Browse files

LXC: add lxc.console to the generated lxc.conf file


Signed-off-by: default avatarBalazs Lecz <leczb@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 25e2fe5c
......@@ -97,6 +97,7 @@ DISK_LINKS_DIR = RUN_GANETI_DIR + "/instance-disks"
RUN_DIRS_MODE = 0775
SOCKET_DIR = RUN_GANETI_DIR + "/socket"
SECURE_DIR_MODE = 0700
SECURE_FILE_MODE = 0600
SOCKET_DIR_MODE = 0750
CRYPTO_KEYS_DIR = RUN_GANETI_DIR + "/crypto"
CRYPTO_KEYS_DIR_MODE = SECURE_DIR_MODE
......
......@@ -164,8 +164,17 @@ class LXCHypervisor(hv_base.BaseHypervisor):
# separate pseudo-TTY instances
out.append("lxc.pts = 255")
# standard TTYs/console
# standard TTYs
out.append("lxc.tty = 6")
# console log file
console_log = utils.PathJoin(self._ROOT_DIR, instance.name + ".console")
try:
utils.WriteFile(console_log, data="", mode=constants.SECURE_FILE_MODE)
except EnvironmentError, err:
raise errors.HypervisorError("Creating console log file %s for"
" instance %s failed: %s" %
(console_log, instance.name, err))
out.append("lxc.console = %s" % console_log)
# root FS
out.append("lxc.rootfs = %s" % root_dir)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment