Ack but see inline for minor comments.
Please merge attached patch for improved logging.
Another annoying thing is that the opensafd script logs that everything was
"successfully stopped", another problem...
Thanks,
Hans
On 08/14/2013 03:03 PM, [email protected] wrote:
osaf/services/saf/avsv/avnd/avnd_clc.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
During opensaf stop, if last component returns error for the the clean up then
AMFND fails to exit. This
leads stopping of opensaf to hang untill opensafd times out. This patch ensures
that if last component
returns failure for cleanup, then AMFND should exit.
diff --git a/osaf/services/saf/avsv/avnd/avnd_clc.c
b/osaf/services/saf/avsv/avnd/avnd_clc.c
--- a/osaf/services/saf/avsv/avnd/avnd_clc.c
+++ b/osaf/services/saf/avsv/avnd/avnd_clc.c
@@ -2097,6 +2097,11 @@ uint32_t avnd_comp_clc_terming_cleanfail
/* just transition to 'term-failed' state */
avnd_comp_pres_state_set(comp, SA_AMF_PRESENCE_TERMINATION_FAILED);
add blank line here
+ if ((AVND_TERM_STATE_OPENSAF_SHUTDOWN_STARTED == cb->term_state) &&
all_comps_terminated()) {
please reverse first expression, add new line before all_comps()
white space for the below lines is wrong (spaces)
+ LOG_NO("Terminated all AMF components");
+ LOG_NO("Shutdown completed, exiting");
+ exit(0);
+ }
TRACE_LEAVE();
return rc;
# HG changeset patch
# Parent cc84329f355cc516a3e10bcdf3020dc717dca44d
diff --git a/osaf/services/saf/avsv/avnd/avnd_clc.c
b/osaf/services/saf/avsv/avnd/avnd_clc.c
--- a/osaf/services/saf/avsv/avnd/avnd_clc.c
+++ b/osaf/services/saf/avsv/avnd/avnd_clc.c
@@ -2063,7 +2063,7 @@ uint32_t avnd_comp_clc_terming_cleanfail
/* just transition to 'term-failed' state */
avnd_comp_pres_state_set(comp, SA_AMF_PRESENCE_TERMINATION_FAILED);
if ((AVND_TERM_STATE_OPENSAF_SHUTDOWN_STARTED == cb->term_state) &&
all_comps_terminated()) {
- LOG_NO("Terminated all AMF components");
+ LOG_WA("Terminated all AMF components (with
failures)");
LOG_NO("Shutdown completed, exiting");
exit(0);
}
diff --git a/osaf/services/saf/avsv/avnd/avnd_comp.c
b/osaf/services/saf/avsv/avnd/avnd_comp.c
--- a/osaf/services/saf/avsv/avnd/avnd_comp.c
+++ b/osaf/services/saf/avsv/avnd/avnd_comp.c
@@ -2751,8 +2751,13 @@ void avnd_comp_pres_state_set(AVND_COMP
SaAmfPresenceStateT prv_st = comp->pres;
osafassert(newstate <= SA_AMF_PRESENCE_ORPHANED);
- LOG_IN("'%s' Presence State %s => %s", comp->name.value,
- presence_state[comp->pres], presence_state[newstate]);
+ if (newstate == SA_AMF_PRESENCE_TERMINATION_FAILED ||
+ newstate == SA_AMF_PRESENCE_INSTANTIATION_FAILED)
+ LOG_WA("'%s' Presence State %s => %s", comp->name.value,
+ presence_state[comp->pres],
presence_state[newstate]);
+ else
+ LOG_IN("'%s' Presence State %s => %s", comp->name.value,
+ presence_state[comp->pres],
presence_state[newstate]);
comp->pres = newstate;
/* inform avd of the change in presence state for all
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel