summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0d3e288)
raw | patch | inline | side by side (parent: 0d3e288)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Mar 2009 10:16:03 +0000 (10:16 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Mar 2009 10:16:03 +0000 (10:16 +0000) |
When reqeueing, always use 1 minute.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13492 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13492 594d385d-05f5-0310-b6e9-bd551577e9d8
trunk/gosa-si/server/events/gosaTriggered.pm | patch | blob | history |
diff --git a/trunk/gosa-si/server/events/gosaTriggered.pm b/trunk/gosa-si/server/events/gosaTriggered.pm
index 73a4e95b6a3986958f09de48f9e4b1995eae05f5..8742aec166f18e1ee7ba6854a05dda85dcde8924 100644 (file)
);
if($ldap_mesg->count == 1) {
$ogroup_entry= $ldap_mesg->pop_entry();
+ &main::daemon_log("$session_id DEBUG: A GosaGroupOfNames with cn '$ogroup' was found in base '".$main::ldap_base."'!", 5);
} elsif ($ldap_mesg->count == 0) {
&main::daemon_log("$session_id ERROR: A GosaGroupOfNames with cn '$ogroup' was not found in base '".$main::ldap_base."'!", 1);
$main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting' WHERE id = $jobdb_id");
return undef;
} else {
&main::daemon_log("$session_id INFO: System with mac address '$mac' was moved to base '".$main::ldap_base."'! Re-queuing job.", 4);
- $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting' WHERE id = $jobdb_id");
- $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET timestamp = '".(&calc_timestamp(&get_time(), 'plus', 10))."' WHERE id = $jobdb_id");
+ $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting', timestamp = '".(&calc_timestamp(&get_time(), 'plus', 10))."' WHERE id = $jobdb_id");
return undef;
}
}
my $oclass_result = $ldap_entry->update($ldap_handle);
if ($oclass_result->code() != 0) {
&main::daemon_log("$session_id ERROR: Adding the ObjectClass '$oclass' failed (code '".$oclass_result->code()."') with '".$oclass_result->{'errorMessage'}."'!", 1);
+ } else {
+ &main::daemon_log("$session_id DEBUG: Adding the ObjectClass '$oclass' to '".($ldap_entry->dn())."' succeeded!", 5);
}
}
}
my $replace_result = $ldap_entry->update($ldap_handle);
if ($replace_result->code() != 0) {
&main::daemon_log("$session_id ERROR: Setting the FAIstate to install failed with code '".$replace_result->code()."') and message '".$replace_result->{'errorMessage'}."'!", 1);
+ } else {
+ &main::daemon_log("$session_id DEBUG: Setting the FAIstate to install for '".($ldap_entry->dn())."' succeeded!", 5);
}
}
} else {
my $add_result = $ldap_entry->update($ldap_handle);
if ($add_result->code() != 0) {
&main::daemon_log("$session_id ERROR: Setting the FAIstate to install failed with code '".$add_result->code()."') and message '".$add_result->{'errorMessage'}."'!", 1);
+ } else {
+ &main::daemon_log("$session_id DEBUG: Setting the FAIstate to install for '".($ldap_entry->dn())."' succeeded!", 5);
}
}
# $ldap_entry = Net::LDAP::Entry->new();
# $ldap_entry->dn("cn=$mac,$base");
&main::daemon_log("$session_id WARNING: No System with mac address '$mac' was found in base '".$main::ldap_base."'! Re-queuing job.", 4);
- $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting' WHERE id = $jobdb_id");
- $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET timestamp = '".(&calc_timestamp(&get_time(), 'plus', 10))."' WHERE id = $jobdb_id");
+ $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting', timestamp = '".(&calc_timestamp(&get_time(), 'plus', 60))."' WHERE id = $jobdb_id");
return undef;
} else {
&main::daemon_log("$session_id ERROR: More than one system with mac address '$mac' was found in base '".$main::ldap_base."'!", 1);
my $ogroup_result = $ogroup_entry->update($ldap_handle);
if ($ogroup_result->code() != 0) {
&main::daemon_log("$session_id ERROR: Updating the ObjectGroup '$ogroup' failed (code '".$ogroup_result->code()."') with '".$ogroup_result->{'errorMessage'}."'!", 1);
+ } else {
+ &main::daemon_log("$session_id DEBUG: Updating the ObjectGroup '$ogroup' for member '".($ldap_entry->dn())."' succeeded!", 5);
}
} else {
&main::daemon_log("$session_id DEBUG: System with mac address '$mac' is already a member of ObjectGroup '$ogroup'.", 5);
if ($activate_result->code() != 0) {
&main::daemon_log("$session_id ERROR: Activating system '".$ldap_entry->dn()."' failed (code '".$activate_result->code()."') with '".$activate_result->{'errorMessage'}."'!", 1);
} else {
+ &main::daemon_log("$session_id DEBUG: Activating system '".$ldap_entry->dn()."' succeeded!", 5);
$activate_client = 1;
}
} else {
if ($activate_result->code() != 0) {
&main::daemon_log("$session_id ERROR: Activating system '".$ldap_entry->dn()."' failed (code '".$activate_result->code()."') with '".$activate_result->{'errorMessage'}."'!", 1);
} else {
+ &main::daemon_log("$session_id DEBUG: Activating system '".$ldap_entry->dn()."' succeeded!", 5);
$activate_client = 1;
}
}
if($activate_client == 1) {
+ &main::daemon_log("$session_id DEBIG: Activating system with mac address '$mac'!", 5);
# Create delivery list
my @out_msg_l;
# Return delivery list of messages
return @out_msg_l;
- } else {
+ } else {
&main::daemon_log("$session_id WARNING: Activating system with mac address '$mac' failed! Re-queuing job.", 4);
- $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting' WHERE id = $jobdb_id");
- $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET timestamp = '".(&calc_timestamp(&get_time(), 'plus', 10))."' WHERE id = $jobdb_id");
+ $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting', timestamp = '".(&calc_timestamp(&get_time(), 'plus', 60))."' WHERE id = $jobdb_id");
}
return undef;
}