summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2019-04-16 09:42:12 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2019-04-16 09:42:12 +0200
commit0c9a512c58d20f3db9327b6a7614761c162b245e (patch)
tree7224f529fc9b445c599f3b19e6f3b6351259b491
parente3cacac7b753cb2e238836a91a14c2d937a3c87e (diff)
downloadATCD-0c9a512c58d20f3db9327b6a7614761c162b245e.tar.gz
When we have a listener disconnect and we have a notify child death enable mark the server as wait for death and wait on the signal. In the restart functionality check whether the restart has succeeded, if not, we are in a final state. Extended the start server with more logging to know why the restart failed
* TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp:
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp45
1 files changed, 42 insertions, 3 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp
index dc26641df7f..a5078b1f7c2 100644
--- a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp
@@ -564,8 +564,12 @@ AsyncAccessManager::notify_child_death (int pid)
if ((this->status_ == ImplementationRepository::AAM_WAIT_FOR_DEATH) &&
this->rh_list_.size() > 0)
{
- this->send_start_request ();
- return true;
+ // When we have successfully made another start request we just let the
+ // waiters wait on the result of the new start request
+ if (this->send_start_request ())
+ {
+ return true;
+ }
}
this->status (ImplementationRepository::AAM_SERVER_DEAD);
this->final_state ();
@@ -593,7 +597,18 @@ AsyncAccessManager::listener_disconnected (void)
this->report ("listener_disconnected");
}
- this->status (ImplementationRepository::AAM_SERVER_DEAD);
+ if (this->info_->death_notify)
+ {
+ // We get a death notify of the activator so we can wait on the death
+ // of the process
+ this->status (ImplementationRepository::AAM_WAIT_FOR_DEATH);
+ }
+ else
+ {
+ // We don't get a death notify of the activator so we have to assume at
+ // this point the server is death
+ this->status (ImplementationRepository::AAM_SERVER_DEAD);
+ }
}
void
@@ -679,6 +694,12 @@ AsyncAccessManager::send_start_request (void)
if ((this->locator_.opts ()->lockout () && !this->info_.edit ()->start_allowed ()) ||
(this->retries_ == 0))
{
+ if (ImR_Locator_i::debug () > 4)
+ {
+ ORBSVCS_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::send_start_request, server <%C> not started because retries exceeded\n"),
+ this, this->info_->ping_id()));
+ }
this->status (ImplementationRepository::AAM_RETRIES_EXCEEDED);
return false;
}
@@ -688,6 +709,12 @@ AsyncAccessManager::send_start_request (void)
if (this->info_->is_mode (ImplementationRepository::MANUAL) &&
!this->manual_start_)
{
+ if (ImR_Locator_i::debug () > 4)
+ {
+ ORBSVCS_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::send_start_request, server <%C> not started because only a manual start is allowed\n"),
+ this, this->info_->ping_id()));
+ }
this->status (ImplementationRepository::AAM_NOT_MANUAL);
return false;
}
@@ -696,6 +723,12 @@ AsyncAccessManager::send_start_request (void)
if (startup->cmdline.length () == 0)
{
+ if (ImR_Locator_i::debug () > 4)
+ {
+ ORBSVCS_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::send_start_request, server <%C> not started because no commandline has been configured\n"),
+ this, this->info_->ping_id()));
+ }
this->status (ImplementationRepository::AAM_NO_COMMANDLINE);
return false;
}
@@ -705,6 +738,12 @@ AsyncAccessManager::send_start_request (void)
if (ainfo.null () || CORBA::is_nil (ainfo->activator.in ()))
{
+ if (ImR_Locator_i::debug () > 4)
+ {
+ ORBSVCS_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::send_start_request, server <%C> not started because no activator has been found\n"),
+ this, this->info_->ping_id()));
+ }
this->status (ImplementationRepository::AAM_NO_ACTIVATOR);
return false;
}