Difference between revisions of "SUSE Manager/osa-dispatcher"

From MicroFocusInternationalWiki
Jump to: navigation, search
 
(38 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Introduction to OSAD==
+
==Introduction to <code>osad</code> on SUSE Manager==
  
===osad===
+
===<code>osad</code>===
  
Client-side service written in Python that responds to pings and runs rhn_check when told to by osa-dispatcher.
+
<code>osad</code> is a client-side service written in Python. This service <strong>responds</strong> to pings and runs <code>rhn_check</code> when commanded to by <code>osa-dispatcher</code>.
  
===osa-dispatcher===
+
===<code>osa-dispatcher</code>===
  
Server-side service written in Python that determines when an osad instance needs to be pinged or run rhn_check and send a message telling them to do so.
+
<code>osa-dispatcher</code> is a server-side service written in Python. This service checks when an <code>osad</code> instance on a SUSE Manager Server client requires to be pinged or if it must run an <code>rhn_check</code> and then dispatches a message commanding it to do so.
  
===jabberd===
+
===<code>jabberd</code>===
  
A deamon that implements the XMPP protocol defined in RFC 3920 and 3921. osad and osa-dispatcher both connect to this daemon. It handles authentication as well.
+
<code>jabberd</code> is a server-side service written in C that implements the [https://en.wikipedia.org/wiki/XMPP XMPP] protocol. <code>osad</code> and <code>osa-dispatcher</code> both connect to this daemon to exchange messages. <code>jabberd</code> also handles authentication between server and client.
  
===How these fit together===
+
===<code>osa-dispatcher</code>, <code>osad</code>, and <code>jabberd</code> in Practice===
  
osa-dispatcher runs a query every 5 seconds that checks to see if there are any clients which are overdue for a ping. If a client due for a ping is found, it sends a message through jabberd to the osad instances running on the clients it needs responses from. The osad instances then respond to the message sent through the jabberd server. osa-dispatcher receives the response, and marks the client as 'online'. If osa-dispatcher doesn't receive a response from an osad instance within the timeout range, it is marked offline. The osa-dispatcher daemon also periodically performs a select within the database to see if any clients have any actions they need to perform which have been initiated from the CLI or WebUI. If there are, it sends a message through jabberd to osad telling it to run rhn_check on the client. rhn_check then takes over performing the action.  
+
<code>osa-dispatcher</code> on SUSE Manager runs a database query periodically that checks to see if there are any clients which are overdue for a ping. If clients requiring a ping are found, <code>osa-dispatcher</code> dispatches a message through <code>jabberd</code> to the <code>osad</code> instances running on the clients it needs a response from. The <code>osad</code> instances then respond to the message sent through the <code>jabberd</code> server. <code>osa-dispatcher</code> receives the response, and marks the client as 'online'. If <code>osa-dispatcher</code> does not receive a response from an <code>osad</code> instance on the client within the a timeout range, it is marked 'offline'.
  
 +
The <code>osa-dispatcher</code> daemon also performs a second periodic query to see if there are any clients which have actions that need to be performed. If an action has been scheduled from either the WebUI or the command line, <code>osa-dispatcher</code> dispatches a message through <code>jabberd</code> to the <code>osad</code> instance running on the client to execute the <code>rhn_check</code> command. <code>rhn_check</code> then takes over performing the scheduled action.
  
  
The osa-dispatcher.notify_threshold option is used to adjust the maximum number of osad clients that are simultaneously served actions by the SUSE Manager Server.
+
[[media:Osa-dispatcher.gif| SUSE Manager osa-dispatcher Diagram]]
 +
==Adjusting the <code>osa-dispatcher.notify_threshold</code> parameter==
  
The notifiy_threshold parameter is required as actions performed on clients configured with the OSAD contact method are performed instantly. The issues occure when an action is scheduled on a high number of clients at the same time, the SUSE Manager server can then be overloaded. Setting this parameter to 100 for example will serve 100 clients at once and <strong>queue</strong> up the remaining actions at a later time. The recommended default parameter is 100.
+
The <code>osa-dispatcher.notify_threshold</code> option is used to adjust the maximum number of <code>osad</code> clients that are simultaneously served actions by the SUSE Manager Server.
  
The default settings are located at:
+
The <strong>notifiy_threshold</strong> parameter is <strong>required</strong> as actions performed on clients configured with the <code>osad</code> contact method are performed <strong>instantly</strong>. Issues will occur when an action is scheduled on a high number of clients at the same time, as a result the SUSE Manager Server can then be overloaded by the flood of clients connecting. Setting this parameter to 100 for example will allow <code>osa-dispatcher</code>  to serve only 100 clients at once and <strong>queue</strong> up the remaining actions for the rest of the clients requiring this action at a later time.
 +
 
 +
The current SUSE <strong>notifiy_threshold</strong> parameter is set to unlimited by default in SUSE Manager 2.1, but it is recommended to change this value to 100. For SUSE Manager 3 this parameter will be set to a limited value by default.
 +
 
 +
===Changing the default value===
 +
 
 +
The default settings are located in:
  
 
<code>/usr/share/rhn/config-defaults/rhn_osa-dispatcher.conf</code>
 
<code>/usr/share/rhn/config-defaults/rhn_osa-dispatcher.conf</code>
  
 +
Example rhn_<code>osa-dispatcher.conf</code> file:
  
To override the default values add the <code>notify_threshold = 100</code> parameter to the following file underneath the # OSA configuration # section heading.
+
    # Default log file
 +
    log_file        = /var/log/rhn/<code>osa-dispatcher</code>.log
 +
    # SSL cert
 +
    osa_ssl_cert  = /usr/share/rhn/RHNS-OSA-CERT
 +
    # Jabber server to connect to
 +
    jabber_server  = jabberserver.example.org:5234
 +
    poll_interval = 5
 +
    # number of systems that can run actions until
 +
    # osad-dispatcher stops notifying more clients.
 +
  <strong> # current default is unlimited</strong>
 +
    notify_threshold =
 +
 
 +
 
 +
To override the default value of an unlimited threshold add the <code>osa-dispatcher.notify_threshold = 100</code> parameter to the following file:
  
 
<code>/etc/rhn/rhn.conf</code>
 
<code>/etc/rhn/rhn.conf</code>
 +
 +
===Note===
 +
It should be noted that adjusting the <strong>notify_threshold</strong> parameter to a value higher than that of Apache httpd's <code>MaxClients</code> can result in timeouts occurring on clients connecting to SUSE Manager as latter also limits the number of simultaneous connections. For more information see also [https://wiki.novell.com/index.php/SUSE_Manager/optimizing-apache-and-tomcat the advanced Apache and Tomcat tuning instructions].
 +
 +
===References===
 +
 +
https://fedorahosted.org/spacewalk/wiki/OsadHowTo

Latest revision as of 10:25, 6 August 2015

Introduction to osad on SUSE Manager

osad

osad is a client-side service written in Python. This service responds to pings and runs rhn_check when commanded to by osa-dispatcher.

osa-dispatcher

osa-dispatcher is a server-side service written in Python. This service checks when an osad instance on a SUSE Manager Server client requires to be pinged or if it must run an rhn_check and then dispatches a message commanding it to do so.

jabberd

jabberd is a server-side service written in C that implements the XMPP protocol. osad and osa-dispatcher both connect to this daemon to exchange messages. jabberd also handles authentication between server and client.

osa-dispatcher, osad, and jabberd in Practice

osa-dispatcher on SUSE Manager runs a database query periodically that checks to see if there are any clients which are overdue for a ping. If clients requiring a ping are found, osa-dispatcher dispatches a message through jabberd to the osad instances running on the clients it needs a response from. The osad instances then respond to the message sent through the jabberd server. osa-dispatcher receives the response, and marks the client as 'online'. If osa-dispatcher does not receive a response from an osad instance on the client within the a timeout range, it is marked 'offline'.

The osa-dispatcher daemon also performs a second periodic query to see if there are any clients which have actions that need to be performed. If an action has been scheduled from either the WebUI or the command line, osa-dispatcher dispatches a message through jabberd to the osad instance running on the client to execute the rhn_check command. rhn_check then takes over performing the scheduled action.


SUSE Manager osa-dispatcher Diagram

Adjusting the osa-dispatcher.notify_threshold parameter

The osa-dispatcher.notify_threshold option is used to adjust the maximum number of osad clients that are simultaneously served actions by the SUSE Manager Server.

The notifiy_threshold parameter is required as actions performed on clients configured with the osad contact method are performed instantly. Issues will occur when an action is scheduled on a high number of clients at the same time, as a result the SUSE Manager Server can then be overloaded by the flood of clients connecting. Setting this parameter to 100 for example will allow osa-dispatcher to serve only 100 clients at once and queue up the remaining actions for the rest of the clients requiring this action at a later time.

The current SUSE notifiy_threshold parameter is set to unlimited by default in SUSE Manager 2.1, but it is recommended to change this value to 100. For SUSE Manager 3 this parameter will be set to a limited value by default.

Changing the default value

The default settings are located in:

/usr/share/rhn/config-defaults/rhn_osa-dispatcher.conf

Example rhn_osa-dispatcher.conf file:

   # Default log file
   log_file        = /var/log/rhn/osa-dispatcher.log
   # SSL cert
   osa_ssl_cert  = /usr/share/rhn/RHNS-OSA-CERT
   # Jabber server to connect to
   jabber_server   = jabberserver.example.org:5234
   poll_interval = 5
   # number of systems that can run actions until
   # osad-dispatcher stops notifying more clients.
   # current default is unlimited
   notify_threshold =


To override the default value of an unlimited threshold add the osa-dispatcher.notify_threshold = 100 parameter to the following file:

/etc/rhn/rhn.conf

Note

It should be noted that adjusting the notify_threshold parameter to a value higher than that of Apache httpd's MaxClients can result in timeouts occurring on clients connecting to SUSE Manager as latter also limits the number of simultaneous connections. For more information see also the advanced Apache and Tomcat tuning instructions.

References

https://fedorahosted.org/spacewalk/wiki/OsadHowTo