diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 7a652eb60fb5a4bd8c68b5c5a28af6d275c5dd4a..d73b3c7630b1b65a00ccb0a060de25ce07bba640 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
our $global_kernel;
my ($foreground, $ping_timeout);
-my ($bus_activ, $bus, $msg_to_bus, $bus_cipher);
my ($server);
my ($gosa_server, $job_queue_timeout, $job_queue_loop_delay);
my ($messaging_db_loop_delay);
$arp_activ, $gosa_unit_tag,
$GosaPackages_key, $gosa_ip, $gosa_port, $gosa_timeout,
$foreign_server_string, $server_domain, $ServerPackages_key, $foreign_servers_register_delay,
+ $wake_on_lan_passwd, $job_synchronization, $modified_jobs_loop_delay,
);
# additional variable which should be globaly accessable
our $server_address;
our $server_mac_address;
-our $bus_address;
our $gosa_address;
-our $no_bus;
our $no_arp;
our $verbose;
our $forground;
our $cfg_file;
our ($ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password, $ldap_server_dn);
+# dak variables
+our $dak_base_directory;
+our $dak_signing_keys_directory;
+our $dak_queue_directory;
+our $dak_user;
# specifies the verbosity of the daemon_log
$verbose = 0 ;
# specifies the timeout seconds while checking the online status of a registrating client
$ping_timeout = 5;
-$no_bus = 0;
-$bus_activ = "true";
$no_arp = 0;
my $packages_list_under_construction = "/tmp/packages_list_creation_in_progress";
my @packages_list_statements;
"xmlmessage DEFAULT 'none'",
"macaddress DEFAULT 'none'",
"plainname DEFAULT 'none'",
+ "siserver DEFAULT 'none'",
+ "modified DEFAULT '0'",
);
-# holds all other gosa-sd as well as the gosa-sd-bus
+# holds all other gosa-si-server
our $known_server_db;
our $known_server_tn = "known_server";
my $known_server_file_name;
"log-file" => [\$log_file, "/var/run/".$prg.".log"],
"pid-file" => [\$pid_file, "/var/run/".$prg.".pid"],
},
-"bus" => {
- "activ" => [\$bus_activ, "true"],
- },
"server" => {
"port" => [\$server_port, "20081"],
"known-clients" => [\$known_clients_file_name, '/var/lib/gosa-si/clients.db' ],
"ldap-admin-password" => [\$ldap_admin_password, ""],
"gosa-unit-tag" => [\$gosa_unit_tag, ""],
"max-clients" => [\$max_clients, 10],
+ "wol-password" => [\$wake_on_lan_passwd, ""],
},
"GOsaPackages" => {
"ip" => [\$gosa_ip, "0.0.0.0"],
"job-queue-loop-delay" => [\$job_queue_loop_delay, 3],
"messaging-db-loop-delay" => [\$messaging_db_loop_delay, 3],
"key" => [\$GosaPackages_key, "none"],
+ "dak-base" => [\$dak_base_directory, "/srv/archive"],
+ "dak-keyring" => [\$dak_signing_keys_directory, "/srv/archive/keyrings"],
+ "dak-queue" => [\$dak_queue_directory, "/srv/archive/queue"],
+ "dak-user" => [\$dak_user, "deb-dak"],
},
"ClientPackages" => {
"key" => [\$ClientPackages_key, "none"],
"domain" => [\$server_domain, ""],
"key" => [\$ServerPackages_key, "none"],
"key-lifetime" => [\$foreign_servers_register_delay, 120],
+ "job-synchronization-enabled" => [\$job_synchronization, "true"],
+ "synchronization-loop" => [\$modified_jobs_loop_delay, 5],
}
);
-c <file> : config file
-f : foreground, process will not be forked to background
-v : be verbose (multiple to increase verbosity)
- -no-bus : starts $prg without connection to bus
-no-arp : starts $prg without connection to arp module
EOF
sub check_outgoing_xml_validity {
- my ($msg) = @_;
+ my ($msg, $session_id) = @_;
my $msg_hash;
eval{
}
};
if($@) {
- daemon_log("WARNING: outgoing msg is not gosa-si envelope conform", 5);
- daemon_log("$@ ".(defined($msg) && length($msg)>0)?$msg:"Empty Message", 8);
+ daemon_log("$session_id WARNING: outgoing msg is not gosa-si envelope conform: ", 5);
+ daemon_log("$@ ".(defined($msg) && length($msg)>0)?$msg:"Empty Message", 5);
$msg_hash = undef;
}
# msg is from a new client or gosa
($msg, $msg_hash, $module) = &input_from_unknown_host($next_msg, $session_id);
- # msg is from a gosa-si-server or gosa-si-bus
+ # msg is from a gosa-si-server
if(( !$msg ) || ( !$msg_hash ) || ( !$module )){
($msg, $msg_hash, $module) = &input_from_known_server($next_msg, $heap->{'remote_ip'}, $session_id);
}
my $done = 0;
my $sql;
my $res;
+
# check whether this message should be processed here
if ($error == 0) {
$header = @{$msg_hash->{'header'}}[0];
$target = @{$msg_hash->{'target'}}[0];
$source = @{$msg_hash->{'source'}}[0];
+ my $not_found_in_known_clients_db = 0;
+ my $not_found_in_known_server_db = 0;
+ my $not_found_in_foreign_clients_db = 0;
+ my $local_address;
my ($target_ip, $target_port) = split(':', $target);
if ($target =~ /^\d+\.\d+\.\d+\.\d+:\d+$/) {
- my $server_address = &get_local_ip_for_remote_ip($target_ip).":$server_port";
- }
+ $local_address = &get_local_ip_for_remote_ip($target_ip).":$server_port";
+ } else {
+ $local_address = $server_address;
+ }
# target and source is equal to GOSA -> process here
if (not $done) {
# target is own address without forward_to_gosa-tag -> process here
if (not $done) {
- if (($target eq $server_address) && (not exists $msg_hash->{'forward_to_gosa'})) {
+ if (($target eq $local_address) && (not exists $msg_hash->{'forward_to_gosa'})) {
$done = 1;
if ($source eq "GOSA") {
- $msg =~ s/<\/xml>/<forward_to_gosa>$server_address,$session_id<\/forward_to_gosa><\/xml>/;
+ $msg =~ s/<\/xml>/<forward_to_gosa>$local_address,$session_id<\/forward_to_gosa><\/xml>/;
}
- print STDERR "target is own address without forward_to_gosa-tag -> process here\n";
+ #print STDERR "target is own address without forward_to_gosa-tag -> process here\n";
}
}
# target is a client address in known_clients -> process here
- if (not $done) {
- $sql = "SELECT * FROM $known_clients_tn WHERE (hostname='$target' OR macaddress LIKE '$target')";
- $res = $known_clients_db->select_dbentry($sql);
- if (keys(%$res) > 0) {
- $done = 1;
- my $hostname = $res->{1}->{'hostname'};
- $msg =~ s/<target>$target<\/target>/<target>$hostname<\/target>/;
- print STDERR "target is a client address in known_clients -> process here\n";
- }
- }
-
+ if (not $done) {
+ $sql = "SELECT * FROM $known_clients_tn WHERE (hostname='$target' OR macaddress LIKE '$target')";
+ $res = $known_clients_db->select_dbentry($sql);
+ if (keys(%$res) > 0) {
+ $done = 1;
+ my $hostname = $res->{1}->{'hostname'};
+ $msg =~ s/<target>$target<\/target>/<target>$hostname<\/target>/;
+ #print STDERR "target is a client address in known_clients -> process here\n";
+ } else {
+ $not_found_in_known_clients_db = 1;
+ }
+ }
+
# target ist own address with forward_to_gosa-tag not pointing to myself -> process here
if (not $done) {
my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
my $gosa_at;
my $gosa_session_id;
- if (($target eq $server_address) && (defined $forward_to_gosa)){
+ if (($target eq $local_address) && (defined $forward_to_gosa)){
my ($gosa_at, $gosa_session_id) = split(/,/, $forward_to_gosa);
- if ($gosa_at ne $server_address) {
+ if ($gosa_at ne $local_address) {
$done = 1;
- print STDERR "target is own address with forward_to_gosa-tag not pointing to myself -> process here\n";
+ #print STDERR "target is own address with forward_to_gosa-tag not pointing to myself -> process here\n";
}
}
}
# if message should be processed here -> add message to incoming_db
- if ($done) {
-
- # if a job or a gosa message comes from a foreign server, fake module to GosaPackages
- # so gosa-si-server knows how to process this kind of messages
- if ($header =~ /^gosa_/ || $header =~ /job_/) {
- $module = "GosaPackages";
- }
-
- my $res = $incoming_db->add_dbentry( {table=>$incoming_tn,
- primkey=>[],
- headertag=>$header,
- targettag=>$target,
- xmlmessage=>$msg,
- timestamp=>&get_time,
- module=>$module,
- sessionid=>$session_id,
- } );
+ if ($done) {
+ # if a job or a gosa message comes from a foreign server, fake module to GosaPackages
+ # so gosa-si-server knows how to process this kind of messages
+ if ($header =~ /^gosa_/ || $header =~ /^job_/) {
+ $module = "GosaPackages";
+ }
- }
+ my $res = $incoming_db->add_dbentry( {table=>$incoming_tn,
+ primkey=>[],
+ headertag=>$header,
+ targettag=>$target,
+ xmlmessage=>&encode_base64($msg),
+ timestamp=>&get_time,
+ module=>$module,
+ sessionid=>$session_id,
+ } );
+ }
# target is own address with forward_to_gosa-tag pointing at myself -> forward to gosa
if (not $done) {
my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
my $gosa_at;
my $gosa_session_id;
- if (($target eq $server_address) && (defined $forward_to_gosa)){
+ if (($target eq $local_address) && (defined $forward_to_gosa)){
my ($gosa_at, $gosa_session_id) = split(/,/, $forward_to_gosa);
- if ($gosa_at eq $server_address) {
+ if ($gosa_at eq $local_address) {
my $session_reference = $kernel->ID_id_to_session($gosa_session_id);
if( defined $session_reference ) {
$heap = $session_reference->get_heap();
$heap->{'client'}->put($msg);
}
$done = 1;
- print STDERR "target is own address with forward_to_gosa-tag pointing at myself -> forward to gosa\n";
+ #print STDERR "target is own address with forward_to_gosa-tag pointing at myself -> forward to gosa\n";
}
}
$sql = "SELECT * FROM $foreign_clients_tn WHERE (hostname='$target' OR macaddress LIKE '$target')";
$res = $foreign_clients_db->select_dbentry($sql);
if (keys(%$res) > 0) {
- my $hostname = $res->{1}->{'hostname'};
+ my $hostname = $res->{1}->{'hostname'};
+ my ($host_ip, $host_port) = split(/:/, $hostname);
+ my $local_address = &get_local_ip_for_remote_ip($host_ip).":$server_port";
my $regserver = $res->{1}->{'regserver'};
my $sql = "SELECT * FROM $known_server_tn WHERE hostname='$regserver'";
my $res = $known_server_db->select_dbentry($sql);
if (keys(%$res) > 0) {
my $regserver_key = $res->{1}->{'hostkey'};
- $msg =~ s/<source>GOSA<\/source>/<source>$server_address<\/source>/;
+ $msg =~ s/<source>GOSA<\/source>/<source>$local_address<\/source>/;
$msg =~ s/<target>$target<\/target>/<target>$hostname<\/target>/;
if ($source eq "GOSA") {
- $msg =~ s/<\/xml>/<forward_to_gosa>$server_address,$session_id<\/forward_to_gosa><\/xml>/;
+ $msg =~ s/<\/xml>/<forward_to_gosa>$local_address,$session_id<\/forward_to_gosa><\/xml>/;
}
&send_msg_to_target($msg, $regserver, $regserver_key, $header, $session_id);
}
$done = 1;
- print STDERR "target is a client address in foreign_clients -> forward to registration server\n";
- }
+ #print STDERR "target is a client address in foreign_clients -> forward to registration server\n";
+ } else {
+ $not_found_in_foreign_clients_db = 1;
+ }
}
# target is a server address -> forward to server
my $hostkey = $res->{1}->{'hostkey'};
if ($source eq "GOSA") {
- $msg =~ s/<source>GOSA<\/source>/<source>$server_address<\/source>/;
- $msg =~ s/<\/xml>/<forward_to_gosa>$server_address,$session_id<\/forward_to_gosa><\/xml>/;
+ $msg =~ s/<source>GOSA<\/source>/<source>$local_address<\/source>/;
+ $msg =~ s/<\/xml>/<forward_to_gosa>$local_address,$session_id<\/forward_to_gosa><\/xml>/;
}
&send_msg_to_target($msg, $target, $hostkey, $header, $session_id);
$done = 1;
- print STDERR "target is a server address -> forward to server\n";
- }
+ #print STDERR "target is a server address -> forward to server\n";
+ } else {
+ $not_found_in_known_server_db = 1;
+ }
+ }
+
+ # target is not in foreign_clients_db, known_server_db or known_clients_db, maybe it is a complete new one -> process here
+ if ( $not_found_in_foreign_clients_db
+ && $not_found_in_known_server_db
+ && $not_found_in_known_clients_db) {
+ my $res = $incoming_db->add_dbentry( {table=>$incoming_tn,
+ primkey=>[],
+ headertag=>$header,
+ targettag=>$target,
+ xmlmessage=>&encode_base64($msg),
+ timestamp=>&get_time,
+ module=>$module,
+ sessionid=>$session_id,
+ } );
+ $done = 1;
+ }
- }
if (not $done) {
daemon_log("$session_id ERROR: do not know what to do with this message: $msg", 1);
+ if ($source eq "GOSA") {
+ my %data = ('error_msg' => &encode_base64($msg), 'error_string' => "Do not know what to do with this message!");
+ my $error_msg = &build_msg("error", $local_address, "GOSA", \%data );
+
+ my $session_reference = $kernel->ID_id_to_session($session_id);
+ if( defined $session_reference ) {
+ $heap = $session_reference->get_heap();
+ }
+ if(exists $heap->{'client'}) {
+ $error_msg = &encrypt_msg($error_msg, $GosaPackages_key);
+ $heap->{'client'}->put($error_msg);
+ }
+ }
}
+
}
return;
my $client_answer = "";
# prepare all variables needed to process message
- my $msg = $task->{'xmlmessage'};
+ #my $msg = $task->{'xmlmessage'};
+ my $msg = &decode_base64($task->{'xmlmessage'});
my $incoming_id = $task->{'id'};
my $module = $task->{'module'};
my $header = $task->{'headertag'};
foreach my $answer ( @{$answer_l} ) {
# check outgoing msg to xml validity
- my $answer_hash = &check_outgoing_xml_validity($answer);
+ my $answer_hash = &check_outgoing_xml_validity($answer, $session_id);
if( not defined $answer_hash ) { next; }
$answer_header = @{$answer_hash->{'header'}}[0];
}
if( $found_ip_flag == 0) {
daemon_log("$session_id WARNING: no host found in known_clients with mac address '$answer_target'", 3);
- if( $bus_activ eq "true" ) {
- daemon_log("$session_id INFO: try to forward msg '$answer_header' to bus '$bus_address'", 5);
- my $sql_statement = "SELECT * FROM known_server WHERE hostname='$bus_address'";
- my $query_res = $known_server_db->select_dbentry( $sql_statement );
- while( my ($hit_num, $hit) = each %{ $query_res } ) {
- my $bus_address = $hit->{hostname};
- my $bus_key = $hit->{hostkey};
- my $error = &send_msg_to_target($answer, $bus_address, $bus_key, $answer_header, $session_id);
- &update_jobdb_status_for_send_msgs($answer, $error);
- last;
- }
- }
-
}
# answer is for one specific host
# get encrypt_key
my $encrypt_key = &get_encrypt_key($answer_target);
if( not defined $encrypt_key ) {
- # unknown target, forward msg to bus
+ # unknown target
daemon_log("$session_id WARNING: unknown target '$answer_target'", 3);
- if( $bus_activ eq "true" ) {
- daemon_log("$session_id INFO: try to forward msg '$answer_header' to bus '$bus_address'", 5);
- my $sql_statement = "SELECT * FROM known_server WHERE hostname='$bus_address'";
- my $query_res = $known_server_db->select_dbentry( $sql_statement );
- my $res_length = keys( %{$query_res} );
- if( $res_length == 0 ){
- daemon_log("$session_id WARNING: send '$answer_header' to '$bus_address' failed, ".
- "no bus found in known_server", 3);
- }
- else {
- while( my ($hit_num, $hit) = each %{ $query_res } ) {
- my $bus_key = $hit->{hostkey};
- my $error = &send_msg_to_target($answer, $bus_address, $bus_key, $answer_header,$session_id );
- &update_jobdb_status_for_send_msgs($answer, $error);
- }
- }
- }
next;
}
my $error = &send_msg_to_target($answer, $answer_target, $encrypt_key, $answer_header,$session_id);
sub session_start {
my ($kernel) = $_[KERNEL];
- &trigger_db_loop($kernel);
$global_kernel = $kernel;
$kernel->yield('register_at_foreign_servers');
$kernel->yield('create_fai_server_db', $fai_server_tn );
$kernel->yield('create_fai_release_db', $fai_release_tn );
$kernel->yield('watch_for_next_tasks');
$kernel->sig(USR1 => "sig_handler");
- $kernel->sig(USR2 => "create_packages_list_db");
+ $kernel->sig(USR2 => "recreate_packages_db");
$kernel->delay_set('watch_for_new_jobs', $job_queue_loop_delay);
$kernel->delay_set('watch_for_done_jobs', $job_queue_loop_delay);
+ $kernel->delay_set('watch_for_modified_jobs', $modified_jobs_loop_delay);
$kernel->delay_set('watch_for_new_messages', $messaging_db_loop_delay);
$kernel->delay_set('watch_for_delivery_messages', $messaging_db_loop_delay);
$kernel->delay_set('watch_for_done_messages', $messaging_db_loop_delay);
$kernel->delay_set('watch_for_old_known_clients', $job_queue_loop_delay);
-}
-sub trigger_db_loop {
- my ($kernel) = @_ ;
-# $kernel->delay_set('watch_for_new_jobs', $job_queue_loop_delay);
-# $kernel->delay_set('watch_for_done_jobs', $job_queue_loop_delay);
-# $kernel->delay_set('watch_for_new_messages', $messaging_db_loop_delay);
-# $kernel->delay_set('watch_for_delivery_messages', $messaging_db_loop_delay);
-# $kernel->delay_set('watch_for_done_messages', $messaging_db_loop_delay);
-# $kernel->delay_set('watch_for_old_known_clients', $job_queue_loop_delay);
}
sub watch_for_done_jobs {
my ($kernel,$heap) = @_[KERNEL, HEAP];
- my $sql_statement = "SELECT * FROM ".$job_queue_tn." WHERE status='done'";
+ my $sql_statement = "SELECT * FROM ".$job_queue_tn." WHERE ((status='done') AND (modified='0'))";
my $res = $job_db->select_dbentry( $sql_statement );
while( my ($id, $hit) = each %{$res} ) {
}
+# if a job got an update or was modified anyway, send to all other si-server an update message
+# of this jobs
+sub watch_for_modified_jobs {
+ my ($kernel,$heap) = @_[KERNEL, HEAP];
+
+ my $sql_statement = "SELECT * FROM $job_queue_tn WHERE ((siserver='localhost') AND (modified='1'))";
+ my $res = $job_db->select_dbentry( $sql_statement );
+
+ # if db contains no jobs which should be update, do nothing
+ if (keys %$res != 0) {
+
+ if ($job_synchronization eq "true") {
+ # make out of the db result a gosa-si message
+ my $update_msg = &db_res2si_msg ($res, "foreign_job_updates", "KNOWN_SERVER", "MY_LOCAL_ADDRESS");
+
+ # update all other SI-server
+ &inform_all_other_si_server($update_msg);
+ }
+
+ # set jobs all jobs to modified = 0, wait until the next modification for updates of other si-server
+ $sql_statement = "UPDATE $job_queue_tn SET modified='0' ";
+ $res = $job_db->update_dbentry($sql_statement);
+ }
+
+ $kernel->delay_set('watch_for_modified_jobs', $modified_jobs_loop_delay);
+}
+
+
sub watch_for_new_jobs {
if($watch_for_new_jobs_in_progress == 0) {
$watch_for_new_jobs_in_progress = 1;
my ($kernel,$heap) = @_[KERNEL, HEAP];
- # check gosa job queue for jobs with executable timestamp
+ # check gosa job quaeue for jobs with executable timestamp
my $timestamp = &get_time();
my $sql_statement = "SELECT * FROM $job_queue_tn WHERE status='waiting' AND (CAST (timestamp AS INTEGER)) < $timestamp ORDER BY timestamp";
my $res = $job_db->exec_statement( $sql_statement );
}
+
sub watch_for_new_messages {
my ($kernel,$heap) = @_[KERNEL, HEAP];
my @coll_user_msg; # collection list of outgoing messages
# fetch key to encrypt msg propperly for usr/host
my $sql = "SELECT * FROM $known_clients_tn WHERE (hostname='$receiver_host')";
&daemon_log("0 DEBUG: $sql", 7);
- my $res = $known_clients_db->select_dbentry($sql);
+ my $res = $known_clients_db->exec_statement($sql);
# host is already down
if (not ref(@$res[0]) eq "ARRAY") { next; }
my $res = $incoming_db->exec_statement($sql);
}
- $kernel->delay_set('watch_for_next_tasks', 1);
+ $kernel->delay_set('watch_for_next_tasks', 0.1);
}
if ($session_id == 0) {
daemon_log("$session_id DEBUG: get_ldap_handle invoked without a session_id, create a new ldap_handle", 7);
$ldap_handle = Net::LDAP->new( $ldap_uri );
- $ldap_handle->bind($ldap_admin_dn, password => $ldap_admin_password);
+ $ldap_handle->bind($ldap_admin_dn, password => $ldap_admin_password) or daemon_log("$session_id ERROR: Bind to LDAP $ldap_uri as $ldap_admin_dn failed!");
} else {
my $session_reference = $global_kernel->ID_id_to_session($session_id);
# used handle is still valid - or if we've to reconnect...
#if (not exists $heap->{ldap_handle}) {
$ldap_handle = Net::LDAP->new( $ldap_uri );
- $ldap_handle->bind($ldap_admin_dn, password => $ldap_admin_password);
+ $ldap_handle->bind($ldap_admin_dn, password => $ldap_admin_password) or daemon_log("$session_id ERROR: Bind to LDAP $ldap_uri as $ldap_admin_dn failed!");
$heap->{ldap_handle} = $ldap_handle;
#}
}
if ($mesg->count) {
my @entries = $mesg->entries;
+ if (0 == @entries) {
+ daemon_log("$session_id ERROR: ldap search failed: ldap_base=$ldap_base, filter=$search", 1);
+ }
+
foreach my $entry (@entries) {
# Only modify entry if it is not set to '$state'
if ($entry->get_value("FAIstate") ne "$state"){
daemon_log("$session_id DEBUG FAIstate at host '".$entry->dn."' already at state '$st'", 7);
}
}
+ } else {
+ daemon_log("$session_id ERROR: LDAP search failed: ldap_base=$ldap_base, filter=$search", 1);
}
+
# if no ldap handle defined
} else {
daemon_log("$session_id ERROR: no LDAP handle defined for update FAIstate", 1);
}
+ return;
}
}
}
- }
+ } else {
+ daemon_log("$session_id ERROR: LDAP search failed in function change_goto_state: ldap_base=$ldap_base, filter=$search", 1);
+ }
}
}
+sub run_recreate_packages_db {
+ my ($kernel, $session, $heap) = @_[KERNEL, SESSION, HEAP];
+ my $session_id = $session->ID;
+ &main::daemon_log("$session_id INFO: Recreating FAI Packages DB ('$fai_release_tn', '$fai_server_tn', '$packages_list_tn')", 4);
+ $kernel->yield('create_fai_release_db');
+ $kernel->yield('create_fai_server_db');
+ return;
+}
+
+
sub run_create_fai_server_db {
my ($kernel, $session, $heap, $table_name) = @_[KERNEL, SESSION, HEAP, ARG0];
my $session_id = $session->ID;
close( $PACKAGES );
unlink( "$path.in" );
- &main::daemon_log("$session_id DEBUG: unlink '$path.in'", 1);
}
"c|config=s" => \$cfg_file,
"f|foreground" => \$foreground,
"v|verbose+" => \$verbose,
- "no-bus+" => \$no_bus,
"no-arp+" => \$no_arp,
);
daemon_log("status: $server_status", 1);
daemon_log($server_status_hash->{$server_status}.": $server_revision", 1);
-if ($no_bus > 0) {
- $bus_activ = "false"
-}
-
# connect to incoming_db
unlink($incoming_file_name);
$incoming_db = GOSA::DBsqlite->new($incoming_file_name);
@@ -2966,6 +3020,11 @@ daemon_log("0 INFO: found foreign server in config file and DNS: $all_foreign_se
# add all found foreign servers to known_server
my $act_timestamp = &get_time();
foreach my $foreign_server (@foreign_server_list) {
+
+ # do not add myself to known_server_db
+ if (&is_local($foreign_server)) { next; }
+ ######################################
+
my $res = $known_server_db->add_dbentry( {table=>$known_server_tn,
primkey=>['hostname'],
hostname=>$foreign_server,
watch_for_delivery_messages => \&watch_for_delivery_messages,
watch_for_done_messages => \&watch_for_done_messages,
watch_for_new_jobs => \&watch_for_new_jobs,
+ watch_for_modified_jobs => \&watch_for_modified_jobs,
watch_for_done_jobs => \&watch_for_done_jobs,
watch_for_old_known_clients => \&watch_for_old_known_clients,
create_packages_list_db => \&run_create_packages_list_db,
create_fai_server_db => \&run_create_fai_server_db,
create_fai_release_db => \&run_create_fai_release_db,
+ recreate_packages_db => \&run_recreate_packages_db,
session_run_result => \&session_run_result,
session_run_debug => \&session_run_debug,
session_run_done => \&session_run_done,