[Kimchi-devel] [PATCH] [Kimchi 3/4] Make serial console timeout configurable
Lucio Correia
luciojhc at linux.vnet.ibm.com
Thu Mar 10 16:23:10 UTC 2016
On 09-03-2016 16:04, Jose Ricardo Ziviani wrote:
> - Add a new parameter in config.py to make it easier for users to
> configure the serial console timeout.
Better use kimchi.conf if user is supposed to change this config.
>
> Signed-off-by: Jose Ricardo Ziviani <joserz at linux.vnet.ibm.com>
> ---
> config.py.in | 3 +++
> serialconsole.py | 4 ++--
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/config.py.in b/config.py.in
> index 3c1c13a..0035515 100644
> --- a/config.py.in
> +++ b/config.py.in
> @@ -36,6 +36,9 @@ __release__ = "@kimchirelease@"
> # Storage pool constant for read-only pool types
> READONLY_POOL_TYPE = ['iscsi', 'scsi', 'mpath']
>
> +# Serial console timeout (seconds)
> +SERIAL_CONSOLE_TIMEOUT = 120
> +
>
> def get_kimchi_version():
> return "-".join([__version__, __release__])
> diff --git a/serialconsole.py b/serialconsole.py
> index 74f6b8a..6ace1a6 100644
> --- a/serialconsole.py
> +++ b/serialconsole.py
> @@ -28,11 +28,11 @@ import time
> from multiprocessing import Process
>
> from wok.plugins.kimchi import model
> +from wok.plugins.kimchi.config import SERIAL_CONSOLE_TIMEOUT
> from wok.utils import wok_log
>
>
> SOCKET_QUEUE_BACKLOG = 0
> -DEFAULT_TIMEOUT = 120 # seconds
> CTRL_Q = '\x11'
> BASE_DIRECTORY = '/run/wok'
>
> @@ -170,7 +170,7 @@ class SocketServer(Process):
> client console.
> """
> client, client_addr = self._socket.accept()
> - client.settimeout(DEFAULT_TIMEOUT)
> + client.settimeout(SERIAL_CONSOLE_TIMEOUT)
> wok_log.info('[%s] Client connected to %s', self.name,
> self._guest_name)
>
--
Lucio Correia
Software Engineer
IBM LTC Brazil
More information about the Kimchi-devel
mailing list