diff --git a/ironic/drivers/modules/console_utils.py b/ironic/drivers/modules/console_utils.py index c8195ddf2b..55358a66e7 100644 --- a/ironic/drivers/modules/console_utils.py +++ b/ironic/drivers/modules/console_utils.py @@ -282,13 +282,17 @@ def start_socat_console(node_uuid, port, console_cmd): # put together the command and arguments for invoking the console args = ['socat'] + # set timeout check for user's connection. After 10min of inactivity + # on client side, connection will be closed. + # TODO(ashestakov) Make timeout value configurable + args.append('-T600') args.append('-L%s' % pid_file) console_host = CONF.my_ip if netutils.is_valid_ipv6(console_host): - arg = 'TCP6-LISTEN:%(port)s,bind=[%(host)s],reuseaddr,fork' + arg = 'TCP6-LISTEN:%(port)s,bind=[%(host)s],reuseaddr' else: - arg = 'TCP4-LISTEN:%(port)s,bind=%(host)s,reuseaddr,fork' + arg = 'TCP4-LISTEN:%(port)s,bind=%(host)s,reuseaddr' args.append(arg % {'host': console_host, 'port': port}) diff --git a/ironic/releasenotes/notes/fix-socat-command-afc840284446870a.yaml b/ironic/releasenotes/notes/fix-socat-command-afc840284446870a.yaml new file mode 100644 index 0000000000..85b55e5912 --- /dev/null +++ b/ironic/releasenotes/notes/fix-socat-command-afc840284446870a.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - Fixes issue with socat console support where an unlimited + number of connections could be created, resulting in the prior + session being destroyed. Connections are now limited + to a single connection per server. Socat now closes the + console connection upon disconnect or timeout 10min. To reconnect, + users should re-activate the console.