ConfD User Community

Can we configure a data on running datastore using confd_cli

Hi ALL
I have one question
Can we configure a data on running data-store using confd_cli ? If yes then why it is by-default changing candidate data-store ?

and I am was searching available datastore ,I got below output

user# show netconf-state datastores  
           LOCKED           LOCKED                             LOCKED                           
           BY       LOCKED  BY                           LOCK  BY       LOCKED          LOCKED  
NAME       SESSION  TIME    SESSION  TRANSACTION ID      ID    SESSION  TIME    SELECT  NODE    
------------------------------------------------------------------------------------------------
running    -        -       -        1629-795380-403470                                         
candidate  -        -       -        -                                

Why startup datastore is not there and If it is disable by default then how to enable it
Thanks

see ConfD’s main configuration file confd.conf, e.g. man confd.conf in system shell, and corresponding section /confdConfig/datastores/startup/enabled

(or in ConfD user guide’s end parts where man pages are included as well)

Thanks @josephm
Is running data-store is persistent ??
Means when my device will reboot then running datastore will hold previous data ??

yes, reboot (daemon restart) will keep running-config if you don’t have startup datastore enabled (as described in the man page for the “startup”).

It really depends on what scenario you need.
The startup datastore follows usual management concept.
Other use-case might be to initialize empty database only once on first startup, and keep configured/modified contents for sub-sequent reboots. For such needs, you can use _init.xml files in the ConfD starting process (again , details in user guide).

Thanks @josephm for helping

I have one more question
Can we configure a data on running data-store using confd_cli ? If yes then why it is by-default changing candidate data-store ?

You can either write directly to running, or via candidate (if you have it enabled) - confd.conf: /confdConfig/datastores/running/access.

Plus a bit confusing might be a CLI style/mode being used (see params -J, -C, -I in confd_cli man page).

e.g. -I / Cisco IOS style - applies each config command directly as standalone operation automatically, and there is no “commit” command.

-C / Cisco XR style - keeps set of operations “buffered” (it can also be re-configured to do auto-commiting as well), but it’s not datastore related explicitly. Only when you issues commit command, it writes all the changes to running (one way or the other, depending on running/access setting mentioned above)