[Kimchi-devel] [PATCH] [Kimchi] Use Wok session timeout value to configure serial console
Rodrigo Trujillo
rodrigo.trujillo at linux.vnet.ibm.com
Tue May 31 18:50:26 UTC 2016
Reviewed-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
On 05/31/2016 10:36 AM, Rodrigo Trujillo wrote:
> Just a question below:
>
> Rodrigo
>
> On 05/31/2016 01:57 AM, Aline Manera wrote:
>> Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
>> ---
>> kimchi.conf | 3 ---
>> serialconsole.py | 10 ++++++----
>> tests/test_config.py.in | 1 -
>> 3 files changed, 6 insertions(+), 8 deletions(-)
>>
>> diff --git a/kimchi.conf b/kimchi.conf
>> index c451703..239b0b4 100644
>> --- a/kimchi.conf
>> +++ b/kimchi.conf
>> @@ -10,8 +10,5 @@ uri = "/plugins/kimchi"
>> # in the same network. Check README-federation for more details.
>> federation = False
>>
>> -# Serial console timeout (seconds)
>> -SERIAL_CONSOLE_TIMEOUT = 120
>> -
>> # Automatically create ISO pool on server start up
>> create_iso_pool = True
>> diff --git a/serialconsole.py b/serialconsole.py
>> index d290798..13ef331 100644
>> --- a/serialconsole.py
>> +++ b/serialconsole.py
>> @@ -27,10 +27,11 @@ import time
>>
>> from multiprocessing import Process
>>
>> -from wok.plugins.kimchi import model
>> -from wok.plugins.kimchi.config import config
>> +from wok.config import config as wok_config
>> from wok.utils import wok_log
>>
>> +from wok.plugins.kimchi import model
>> +
>>
>> SOCKET_QUEUE_BACKLOG = 0
>> CTRL_Q = '\x11'
>> @@ -207,8 +208,9 @@ class SocketServer(Process):
>> client console.
>> """
>> client, client_addr = self._socket.accept()
>> - client.settimeout(config.get('kimchi', {}).
>> - get('SERIAL_CONSOLE_TIMEOUT', 120))
>> +
>> + session_timeout = wok_config.get('server', 'session_timeout')
>> + client.settimeout(int(session_timeout) * 60)
> I see that Wok timeout is 10, so new console timeout will change from
> 120 to 600, is this
> expected ?
>
>> wok_log.info('[%s] Client connected to %s', self.name,
>> self._guest_name)
>>
>> diff --git a/tests/test_config.py.in b/tests/test_config.py.in
>> index 48abd5b..a6728e8 100644
>> --- a/tests/test_config.py.in
>> +++ b/tests/test_config.py.in
>> @@ -82,7 +82,6 @@ class ConfigTests(unittest.TestCase):
>> 'kimchi': {
>> 'federation': False,
>> 'create_iso_pool': True,
>> - 'SERIAL_CONSOLE_TIMEOUT': 120
>> },
>> '/': {
>> 'tools.trailing_slash.on': False,
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>
More information about the Kimchi-devel
mailing list