ConfD User Community

Why confd does not stop and close_trans after receiving confd_delayed_reply_error response?


#1

Hello Folks,
I am trying to send error text back to confd using ‘confd_delayed_reply_error’ API when fetching data error. This is how the data provider is implemented:

  1. Confd calls one of the registered API’s, get_next / get_elem etc.
  2. When we dont have the data with us, we return, ‘CONFD_DELAYED_RESPONSE’.
  3. If we encounter some error while fetching the data, I use ‘confd_trans_seterr’ to set the error message followed by ‘confd_delayed_reply_error’.
  4. please note, it is cli not netconf.

In the ‘confd_developer.log’, confd does receive the get_elem error response, but it continues to send the same get_elem request again. We hope confd stop here and close the transaction.

6-Dec-2018::23:09:48.828 E3-2-EPON confd[7074]: devel-c get_next request for callpoint cli_if_status_cp path /base:status/system/upgrade
6-Dec-2018::23:09:48.831 E3-2-EPON confd[7074]: devel-c get_next succeeded for callpoint cli_if_status_cp path /base:status/system/upgrade
6-Dec-2018::23:09:48.832 E3-2-EPON confd[7074]: devel-c get_next request for callpoint cli_if_status_cp path /base:status/system/upgrade
6-Dec-2018::23:09:48.835 E3-2-EPON confd[7074]: devel-c get_next succeeded for callpoint cli_if_status_cp path /base:status/system/upgrade
6-Dec-2018::23:09:48.838 E3-2-EPON confd[7074]: devel-c get_elem request for callpoint cli_if_status_cp path /base:status/system/upgrade{1/1}/summary/system-status
6-Dec-2018::23:09:48.875 E3-2-EPON confd[7074]: devel-c get_elem error {application, “Command Rejected. Upgrade summary is only for active card”} for callpoint cli_if_status_cp path /base:status/system/upgrade{1/1}/summary/system-status

6-Dec-2018::23:09:48.877 E3-2-EPON confd[7074]: devel-c get_elem request for callpoint cli_if_status_cp path /base:status/system/upgrade{1/1}/summary/system-status
6-Dec-2018::23:09:48.884 E3-2-EPON confd[7074]: devel-c get_elem succeeded for callpoint cli_if_status_cp path /base:status/system/upgrade{1/1}/summary/system-status
6-Dec-2018::23:09:48.886 E3-2-EPON confd[7074]: devel-c get_next request for callpoint cli_if_status_cp path /base:status/system/upgrade{1/1}/summary/card
6-Dec-2018::23:09:48.897 E3-2-EPON confd[7074]: devel-c get_next succeeded for callpoint cli_if_status_cp path /base:status/system/upgrade{1/1}/summary/card

Thanks all.


#2

I can reproduce this behavior, it looks like a CLI bug to me (NETCONF works as one would expect).

The documentation says that confd_delayed_reply_error() in the delayed case is equivalent to confd_trans_seterr() followed by return CONFD_ERR in the non-delayed case (in which case the transaction is aborted).

I’ll open an internal ticket.


#3

Thanks @jjohansson, Currently I enhance our external data provider as a workaround to address this issue.