Some tcp configuration paramters are ignored
The values for tcp_keepalive, tcp_keepidle, tcp_keepalive_count and tcp_keepalive_interval in cinder.conf are not being picked up. Change-Id: Ie0a232ae6b9b9a34d57b48f3b0d8694f90504517 Closes-bug: #1366011
This commit is contained in:
parent
2664da2467
commit
c9e5bb4fe8
@ -39,6 +39,7 @@ from cinder import exception
|
||||
from cinder.i18n import _
|
||||
from cinder.openstack.common import excutils
|
||||
from cinder.openstack.common import log as logging
|
||||
from cinder.openstack.common import network_utils
|
||||
from cinder import utils
|
||||
|
||||
|
||||
@ -210,8 +211,11 @@ class Server(object):
|
||||
socket.SO_REUSEADDR, 1)
|
||||
|
||||
# sockets can hang around forever without keepalive
|
||||
dup_socket.setsockopt(socket.SOL_SOCKET,
|
||||
socket.SO_KEEPALIVE, 1)
|
||||
network_utils.set_tcp_keepalive(dup_socket,
|
||||
CONF.tcp_keepalive,
|
||||
CONF.tcp_keepidle,
|
||||
CONF.tcp_keepalive_count,
|
||||
CONF.tcp_keepalive_interval)
|
||||
|
||||
except Exception:
|
||||
with excutils.save_and_reraise_exception():
|
||||
|
Loading…
x
Reference in New Issue
Block a user