Ack code review only.
Also we need to note few things:
Such a check is missing for lock operation on Node, SU and needs to be
fixed in a separate ticket.
Spec says of returning REPAIR_PENDING when SU enters into these states
during the admin operation. So the reason for returning BAD_OPERATION
could be only because of repair is pending upon the SU and the only
acceptable operation in this case will be REPAIRED operation on SU. If
we accept this fact, fix is required for other admin ops on most of the
entities.
Thanks,
Praveen
On 23-Oct-15 10:48 AM, Gary Lee wrote:
> osaf/services/saf/amf/amfd/nodegroup.cc | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
>
> Assume an SU is in SA_AMF_PRESENCE_INSTANTIATION_FAILED or
> SA_AMF_PRESENCE_TERMINATION_FAILED state.
> If an admin operation is issued on a nodegroup hosting this SU, currently
> TRY_AGAIN is returned
> to the caller. This may result in unnecessary retries. It would be more
> appropriate
> to proprogate SA_AIS_ERR_BAD_OPERATION from AVD_SU::check_su_stability() to
> the caller.
>
> diff --git a/osaf/services/saf/amf/amfd/nodegroup.cc
> b/osaf/services/saf/amf/amfd/nodegroup.cc
> --- a/osaf/services/saf/amf/amfd/nodegroup.cc
> +++ b/osaf/services/saf/amf/amfd/nodegroup.cc
> @@ -960,7 +960,7 @@
> rc = check_ng_stability(ng);
> if (rc != SA_AIS_OK) {
> report_admin_op_error(avd_cb->immOiHandle, invocation,
> - SA_AIS_ERR_TRY_AGAIN, NULL,
> + rc, NULL,
> "Some entity is unstable,
> Operation cannot "
> "be performed on '%s'"
> "Check syslog for entity
> details", ng_name->value);
> @@ -1030,7 +1030,7 @@
> rc = check_ng_stability(ng);
> if (rc != SA_AIS_OK) {
> report_admin_op_error(avd_cb->immOiHandle, invocation,
> - SA_AIS_ERR_TRY_AGAIN, NULL,
> + rc, NULL,
> "Some entity is unstable,
> Operation cannot "
> "be performed on '%s'"
> "Check syslog for entity
> details", ng_name->value);
> @@ -1080,7 +1080,7 @@
> rc = check_ng_stability(ng);
> if (rc != SA_AIS_OK) {
> report_admin_op_error(avd_cb->immOiHandle, invocation,
> - SA_AIS_ERR_TRY_AGAIN, NULL,
> + rc, NULL,
> "Some entity is unstable, Operation
> cannot "
> "be performed on '%s'"
> "Check syslog for entity details",
> ng_name->value);
> @@ -1133,7 +1133,7 @@
> rc = check_ng_stability(ng);
> if (rc != SA_AIS_OK) {
> report_admin_op_error(avd_cb->immOiHandle, invocation,
> - SA_AIS_ERR_TRY_AGAIN, NULL,
> + rc, NULL,
> "Some entity is unstable, Operation
> cannot "
> "be performed on '%s'"
> "Check syslog for entity details",
> ng_name->value);
> @@ -1197,7 +1197,7 @@
> rc = check_ng_stability(ng);
> if (rc != SA_AIS_OK) {
> report_admin_op_error(avd_cb->immOiHandle, invocation,
> - SA_AIS_ERR_TRY_AGAIN, NULL,
> + rc, NULL,
> "Some entity is unstable, Operation
> cannot "
> "be performed on '%s'"
> "Check syslog for entity details",
> ng_name->value);
>
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel