client/tools/osad/osad-conf/osad.conf | 7 +++++++ client/tools/osad/osad.spec | 8 +++++++- client/tools/osad/src/osad.py | 10 ++++++++++ rel-eng/packages/osad | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-)
New commits: commit 56c4c22960b830ba03822a2ef2504e4c339896b8 Author: Jan Pazdziora jpazdziora@redhat.com Date: Fri Dec 9 10:47:46 2011 +0100
Automatic commit of package [osad] release [5.10.29-1].
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec index 20eb43c..f28dd5f 100644 --- a/client/tools/osad/osad.spec +++ b/client/tools/osad/osad.spec @@ -16,7 +16,7 @@ Group: System Environment/Daemons License: GPLv2 URL: https://fedorahosted.org/spacewalk Source0: https://fedorahosted.org/releases/s/p/spacewalk/%%7Bname%7D-%%7Bversion%7D.t... -Version: 5.10.28 +Version: 5.10.29 Release: 1%{?dist} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -275,6 +275,12 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {} %endif
%changelog +* Fri Dec 09 2011 Jan Pazdziora 5.10.29-1 +- 691847, 664491 - adding tcp_keepalive_timeout and tcp_keepalive_count options + to osad.conf. +- 691847, 664491 - read the keepalive settings from osad.conf and apply them to + the osad socket. + * Fri Dec 02 2011 Jan Pazdziora 5.10.28-1 - Using password_in for parameter name to avoid confusion.
diff --git a/rel-eng/packages/osad b/rel-eng/packages/osad index 11cb47b..a384f3f 100644 --- a/rel-eng/packages/osad +++ b/rel-eng/packages/osad @@ -1 +1 @@ -5.10.28-1 client/tools/osad/ +5.10.29-1 client/tools/osad/
commit 0c859a376540c6ea2cbcf87d09164f76c30a475d Author: Jan Pazdziora jpazdziora@redhat.com Date: Fri Dec 9 10:47:01 2011 +0100
691847, 664491 - adding tcp_keepalive_timeout and tcp_keepalive_count options to osad.conf.
diff --git a/client/tools/osad/osad-conf/osad.conf b/client/tools/osad/osad-conf/osad.conf index b4d4a37..9c8b1f7 100644 --- a/client/tools/osad/osad-conf/osad.conf +++ b/client/tools/osad/osad-conf/osad.conf @@ -48,3 +48,10 @@ rhn_check_command = /usr/sbin/rhn_check # Turn the enable_failover option to 1 if you want the connections # to try Satellite's jabberd if RHN Proxy's is not available. enable_failover = 0 + +# Enable kernel keepalive timer on the osad client side socket +# in case the satellite/proxy side socket is closed without osad realising it +# After 'tcp_keepalive_timeout' seconds the kernel will probe the connection +# After 'tcp_keepalive_count' unsuccessful probes, the kernel will close the connection +tcp_keepalive_timeout = 1800 +tcp_keepalive_count = 3
commit 586766a1030c9607ea97b9d9b87196d9e760541f Author: Jan Pazdziora jpazdziora@redhat.com Date: Fri Dec 9 10:46:06 2011 +0100
691847, 664491 - read the keepalive settings from osad.conf and apply them to the osad socket.
diff --git a/client/tools/osad/src/osad.py b/client/tools/osad/src/osad.py index f0b2351..9f1774f 100644 --- a/client/tools/osad/src/osad.py +++ b/client/tools/osad/src/osad.py @@ -20,6 +20,7 @@ import types import string from rhn import rpclib import random +import socket
from up2date_client.config import initUp2dateConfig from up2date_client import config @@ -97,6 +98,9 @@ class Runner(jabber_lib.Runner): self.debug_level = debug_level set_debug_level(debug_level)
+ self._tcp_keepalive_timeout = config['tcp_keepalive_timeout'] + self._tcp_keepalive_count = config['tcp_keepalive_count'] + log_debug(3, "Updating configuration")
client_ssl_cert = config['ssl_ca_cert'] @@ -210,6 +214,9 @@ class Runner(jabber_lib.Runner): c.client_id = self._client_name c.shared_key = self._shared_key c.time_drift = self._time_drift + c._sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) + c._sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPIDLE, self._tcp_keepalive_timeout) + c._sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPCNT, self._tcp_keepalive_count)
# Update the jabber ID systemid = open(self._systemid_file).read() @@ -268,6 +275,9 @@ class Runner(jabber_lib.Runner): run_rhn_check = 1 ret['run_rhn_check'] = int(run_rhn_check)
+ ret['tcp_keepalive_timeout'] = int(osad_config.get('tcp_keepalive_timeout', defval=1800)) + ret['tcp_keepalive_count'] = int(osad_config.get('tcp_keepalive_count', defval=3)) + systemid = osad_config.get('systemid') if systemid is None: systemid = self.get_up2date_config()['systemIdPath']
spacewalk-commits@lists.fedorahosted.org