CDB operational data not getting persisted

Hello Folks,
I am storing an operational data in CDB which I want to be persisted so that it can be reused across confd reboots. I have followed the steps as described in the user guide, which being:

  1. cdb_start_session(sock, CDB_OPERATIONAL)
  2. cdb_set_namespace
  3. Bunch of CONFD_SET_TAG calls
  4. cdb_end_session

Also, I have annotated the yang file with ‘tailf:cdb-oper’ and ‘tailf:persistent true’. Still, the operational data does not get persisted.
I have verified that the operational data does get updated by reading back the value after updating it, only thing is that it is not persisted. I starts again with the default value configured in the yang.

Any hints ?

Thanks in advance.

Should work. Have you enabled the operational data store in the ConfD configuration file? E.g. “confd.conf”.

You can use $CONFD_DIR/examples.confd/cdb_oper/loadhist as a reference for using CDB for persistent storage of operational data.

From the UG:

/confdConfig/cdb/operational/enabled (xs:boolean) [false]
Whether to enable storage of operational data in CDB.

Yeah, operational DB is enabled.

Great, then I suggest you compare with the $CONFD_DIR/examples.confd/cdb_oper/loadhist example, check what the issue might be, or post your related YANG and c-code so we can take a look at it.

I had followed the example as it is. But currently I dont have this requirement, so I have stopped working on it.
Thanks for your help.