We have a feature of on every call home,confd should clear the database. So is there any API available so that we can clear the existing data from the database.
If you can figure out any API through which we can clear the data from our application which is connected to the confd server, then it will be helpful.
It depends on what you mean by “clear the existing data”. There is for instance maapi_delete_all which literally clears the existing data, but I don’t think this is what you intended. Can you elaborate?
Thanks for your input.
Basically, I need to clear all the edit-config (R/W) leaf nodes of a container whenever there is a loss in a call home connection.
If there is any API that will delete all the leafs having config=true, then it will solve my problem
Can you explain your use case in more detail? The transaction logic is “all or nothing”, so if a NETCONF connection drops in the middle of a transaction, no changes are applied. It looks like you are trying to repair an incomplete transaction after a connection loss, but that should not be necessary.
when ever the call home fails(netconf connection lost) after the successful connection.I need to delete all the configurations pushed by the client. For example, after call home succedded, Client has configured the Radio as Single carrier 4T4R.But once call home fails and again when it tries to connect i need to clear all the previous configurations pushed by client from confd data base so that the fresh data can be stored and configured accordingly.
Can you use rollbacks for that? There is maapi_list_rollbacks to get a list of available rollbacks, and maapi_load_rollback/maapi_load_rollback_fixed to load a rollback into a transaction. I would say this is a better option than to “manually” revert the changes.
I have tried to use maapi_delete_all api. But it deletes everything including registered call point.
When i tried to deletes a container through an rpc as below, It deletes all the contents of the user-plane-configuration container.
The same feature I am looking for a api through which i can clear the contents of a container from confd application.
So whenever there is a loss in connection with a client, I can call the api to clear the container’s data only.
While executing the above piece of code,i am not getting error. But when i try to fetch the container data by :
netconf-console-tcp --host=10.10.11.172 -port=2023 --get -x /user-plane-configuration,
still it is showing the values in container.
where as if i uncomment the maapi_delete_all api and comment the maapi_delete api,then everything is getting deleted including all call points,action points etc…
Can you please figure out my mistake if any, then it will be really helpful.
I am extremely sorry for late reply.
Thanks a lot for your input.
Now i have added two API as suggested,but now it is also deleting all the call points and action points which was getting deleted by maapi_delete_all API earlier.
id=cb_rpc ** not registered
id=cb_rpc_file_download ** not registered
id=cb_rpc_file_upload ** not registered
id=cb_rpc_reset ** not registered
id=cb_rpc_ret_file_list ** not registered
id=cb_rpc_software_activate ** not registered
id=cb_rpc_software_download ** not registered
id=cb_rpc_software_install ** not registered
id=cb_rpc_start_trouble ** not registered
id=cb_op_fm ** not registered
id=cb_op_hw_component ** not registered
id=cb_op_ptp ** not registered
id=cb_op_rx_carrier ** not registered
id=cb_op_rx_pm ** not registered
id=cb_op_sfp ** not registered
id=cb_op_sw_inv ** not registered
id=cb_op_sync ** not registered
id=cb_op_trans_pm ** not registered
id=cb_op_tx_carrier ** not registered
Now when i execute :
netconf-console-tcp --host=10.21.10.234 -port=2023 --get -x /user-plane-configuration
I am getting message like: unexpected EOF in NETCONF transport
Can you please help me if i am missing anything else,then it will be really helpful.
You cannot delete a callpoint or an action point. What happens is most likely that the application(s) that registered for the callpoints terminated or simply crashed. This is the meaning of the not registered status: there is no application that registers that callpoint.
The “unexpected EOF” is very likely related - if the data that should have been retrieved by that NETCONF query is provided by the application that is no longer running, this would be the response.
You should inspect logs of the application and investigate why it terminated.
It took long time to find the reason of crashing.When i enabled the trace log,found application is halted for some time while executing the maapi_apply_trans API.Later it gave error like external error - application communication failure.
TRACE MAAPI_START_USER_SESSION --> CONFD_OK
TRACE MAAPI_START_TRANS --> CONFD_OK
TRACE MAAPI_SET_NAMESPACE --> CONFD_OK
TRACE MAAPI_DELETE user-plane-configuration --> CONFD_OK
DEBUG external error - application communication failure
If you can figure out what could be the probable reason,then it will help me in further debugging.
This is not enough to tell what went wrong, look into the devel.log, maybe there’s more. My first guess would be that you have configuration stored in an external database and the communication between ConfD and the application responsible for the external database was broken for some reason.