How to identify configuration stored in external database only?

Hi,

We have configuration stored in confd, external database and (confd and
external database together). Is there any easy way to identify configuration stored
ONLY in external database?

Thanks, Prasanth

Not sure if you are asking for a way to find out from ConfD’s northbound interfaces.

External to ConfD, the only way to find out if configuration data is stored in an external database is by looking for the tailf:callpoint annotation in the YANG models.

To find out if callpoints are being used in a running instance of ConfD, you can invoke it from for example through NETCONF as follows:

netconf-console --get -x confd-state/internal/callpoints

However, it won’t tell you which part of the data model makes use of those callpoints.

If you would like the ability to find out if a configurable data node in your YANG models is being stored in an external database, you may want to consider annotating it with meta-data which allows you to query from the northbound interface at runtime. Chapter 8 of the ConfD UG describes how to use the configuration meta-data feature of ConfD.

I need this info for debugging purpose. Also don’t need this info from northbound interfaces. Basically I want to find out from confd setup, if the CONFIGURATION is stored in external database or cdb or on both.

The callpoint in yang file alone doesn’t say where is it stored.

Can I get this info from confd with confd --status or something like that?
How does ConfD achieve storing configuration on both external database as well as cdb?

Thanks

You can find out about the callpoints and whether CDB is being used or not by using either “confd --status” or NETCONF through the netconf-console.

Using intro/6-c_config as an example, here’s an illustration of how to use the two suggested mechanisms:

$ confd --status


callpoints:
id=hcp daemonId=0 daemonName=hosts_daemon
id=icp daemonId=0 daemonName=hosts_daemon

cdb:
current transaction id: 1501-880807-768995
running:
filename: ./confd-cdb/A.cdb
disk size: 1.3 kB
ram size: 8.8 kB
read locks: 0
write lock: unset
operational:
filename: ./confd-cdb/O.cdb
disk size: 4 bytes
ram size: 136 bytes
subscription lock: unset
no pending subscription notifications
no registered cdb clients

$ netconf-console --get -x /confd-state/internal
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <data>
    <confd-state xmlns="http://tail-f.com/yang/confd-monitoring">
      <internal>
        <callpoints>
          <callpoint>
            <id>hcp</id>
            <daemon>
              <id>0</id>
              <name>hosts_daemon</name>
            </daemon>
          </callpoint>
          <callpoint>
            <id>icp</id>
            <daemon>
              <id>0</id>
              <name>hosts_daemon</name>
            </daemon>
          </callpoint>
        </callpoints>
        <cdb>
          <datastore>
            <name>running</name>
            <transaction-id>1501-880807-768995</transaction-id>
            <filename>./confd-cdb/A.cdb</filename>
            <disk-size>1428</disk-size>
            <ram-size>9081</ram-size>
            <read-locks>0</read-locks>
            <write-lock-set>false</write-lock-set>
            <waiting-for-replication-sync>false</waiting-for-replication-sync>
          </datastore>
          <datastore>
            <name>operational</name>
            <filename>./confd-cdb/O.cdb</filename>
            <disk-size>4</disk-size>
            <ram-size>136</ram-size>
            <subscription-lock-set>false</subscription-lock-set>
          </datastore>
        </cdb>
      </internal>
    </confd-state>
  </data>
</rpc-reply>