google-code-export / go-susi

Automatically exported from code.google.com/p/go-susi
GNU General Public License v2.0
1 stars 0 forks source link

Do not forward job if target client is known go-susi #155

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Job forwarding creates a variety of problems and is only necessary because 
gosa-si-clients do not accept messages from servers other than the one where 
they are registered. go-susi does not share this behaviour, so when the target 
client is a known go-susi, the server with the job can execute it directly even 
when the client is registered elsewhere.

Implementation:

Only add <key> elements to new_foreign_client messages when the key is 
identical to one of the module keys. This identifies a go-susi client because 
go-susi uses one of the module keys from the config instead of generating a 
fresh one.

When a server has a <key> for a client (after the above change this only 
happens when the client is go-susi), do not forward the job even if the client 
is registered elsewhere.

Make sure that UpdateClient() removes all old <key> elements when a 
new_foreign_client is received without a <key> element. This would happen if a 
go-susi is replaced with gosa-si-client on a client (e.g. because an older 
release is installed on a client that used to have a newer release).

Original issue reported on code.google.com by mux2...@gmail.com on 20 Sep 2013 at 9:29

GoogleCodeExporter commented 9 years ago
Consider also issue #167. The forwarding feature cannot be eliminated 
completely and forwarding may be required even for go-susi clients.

Original comment by mux2...@gmail.com on 6 Feb 2014 at 8:52