# Missing values in cdb\_get\_modifications subscription notification in confd 7.2.1 basic

**URL:** <https://dmap-community.ductus.global/t/missing-values-in-cdb-get-modifications-subscription-notification-in-confd-7-2-1-basic/2983>\
**Category:** CDB and CDB API\
**Created:** [March 17, 2020, 2:17pm UTC](https://dmap-community.ductus.global/t/missing-values-in-cdb-get-modifications-subscription-notification-in-confd-7-2-1-basic/2983 "2020-03-17T14:17:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_N](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@Dave\_N](https://dmap-community.ductus.global/u/Dave_N)\
**Post date:** [March 17, 2020, 2:17pm UTC](https://dmap-community.ductus.global/t/missing-values-in-cdb-get-modifications-subscription-notification-in-confd-7-2-1-basic/2983/1 "2020-03-17T14:17:25Z")

</div>

When I create a reasonably large, reasonably complex object I am finding that not all values are being included the result array of cdb\_get\_modifications. As one example where it happens, the values\_cnt output parameter should be 142 but 140 values are produced instead.

I know that the values are actually in the model because when I execute "netconf-console --get-config -x /path\_to\_object I see the values. Additionalyl, I’ve built my subscription handler off of the examples/cdb\_subscription/modifications/modif-printer.c and the document that it produces is not the same as the xml-output from netconf-console --get\_config.

This happens only for a few of the larger objects in my model. The values dropped are typically part of a container whose other components include a choice. To be clear, the dropped values are peers of the choice.

While I am trying to produce a simple example that reproduces this, are there any known issues with partial data being delivered to the cdb\_get\_modifications for a create event? I am currently running 7.2.1 but can update to 7.3 basic as part of the troubleshooting.

Thanks,

Dave

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [March 18, 2020, 3:53pm UTC](https://dmap-community.ductus.global/t/missing-values-in-cdb-get-modifications-subscription-notification-in-confd-7-2-1-basic/2983/2 "2020-03-18T15:53:43Z")

</div>

Not that I am aware of. I would suspect that the problem lies in the modif-printf.c example.  
You’ll find a better demo/example from the link below that output actual NETCONF XML.

> **[ConfD-Demos/confd-sync-py at master · ConfD-Developer/ConfD-Demos](https://github.com/ConfD-Developer/ConfD-Demos/tree/master/confd-sync-py)**
>
> Store ConfD Demos here. Contribute to ConfD-Developer/ConfD-Demos development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Dave\_N](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@Dave\_N](https://dmap-community.ductus.global/u/Dave_N)\
**Post date:** [March 18, 2020, 4:44pm UTC](https://dmap-community.ductus.global/t/missing-values-in-cdb-get-modifications-subscription-notification-in-confd-7-2-1-basic/2983/3 "2020-03-18T16:44:44Z")

</div>

Thank you for your response.

I have a few additional pieces of information, but unfortunately, not a simple example yet.

1.) I’ve upgraded to 7.3 and the behavior is the same.  
2.) The missing notifications are part of a grouping that appears in the model 8 times. I am notified for the common element 6 times.  
3.) If I “unfactor” the common element and replace the “uses” in the grouping in the missing elements with elements that all have unique names, I get all 8 notifications.

Roughly I have

```auto
grouping user_choice {
    leaf user_choice {
      config true;
      type string;
    }
 }

grouping Level1 {
      container level1_Config {
        uses a_choice;
        uses user_choice;
      }
      container level2_Config {
        uses b_choice;
        uses user_choice;
      }
      container level3_Config {
        uses c_Config_choice;
        uses user_choice;
      }
      container level4_Config {
        uses user_choice;
      }
    }
....

```

That repeats 8 times for where I get the problem. If I replace the “uses user\_choice” with “leaf user\_choice { type string;}” I still have the problem. If I replace that with leaf user\_choice\_tag\_1 { type string;} (and tag each element uniquely user\_choice\_tag\_n, I _DO NOT_ get the problem.

I.E. there seems to be a dependency on the name of element or the repetition of the use of “user\_choice”. Of course there could be an error in my code or model, but I do not get an error compiling the yang models nor when I populate them with data. I just don’t get a full notification set on create. No errrors in develop.log, netconf.log or anywhere else that I’ve seen

My first attempt at simplifying the model did not elicit the behavior so I am still trying to create an example that illustrates the problem.

If it is of relevance, we also rebuild the library with a -DMAXDEPTH=32 -DMAXKEYLEN=16

Thanks for the help and I will endeavor to produce a simpler model that I can share that illustrates this problem.

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [March 19, 2020, 8:35am UTC](https://dmap-community.ductus.global/t/missing-values-in-cdb-get-modifications-subscription-notification-in-confd-7-2-1-basic/2983/4 "2020-03-19T08:35:41Z")

</div>

It is good to know that groupings etc. will not be a factor after compiling your YANG models with confdc. They will be expanded in the schema that is used by CDB.  
Hence replacing “uses” with the contents of the grouping will not make a difference.

Also note that a NETCONF `<get>` will get all the configuration, not just the modifications.  
One way to get all the configuration through a subscriber is to trigger the subscription(s) using cdb\_trigger\_subscriptions().  
An easy way to do this is to use the confd\_cmd tool. E.g.

```auto
$ confd_cmd -dd -c 'trigger_subscriptions'

```

So you can for example use the confd\_cmd tool to subscribe and get the modifications when triggered and then trigger the subscriber from another process / thread:

```java
$ pwd
/Users/tailf/confd-7.3.1/examples.confd/intro/1-2-3-start-query-model
$ make all; confd -c confd.conf --addloadpath /Users/tailf/confd-7.3.1/etc/confd
$ confd_cmd -dd -c 'mset /dhcp/default-lease-time P42H'
mset "/dhcp/default-lease-time" "P42H"
TRACE Connected (maapi) to ConfD
TRACE MAAPI_START_USER_SESSION --> CONFD_OK
TRACE MAAPI_START_TRANS --> CONFD_OK
TRACE MAAPI_SET_ELEM2 /dhcp/default-lease-time --> CONFD_OK
TRACE MAAPI_APPLY_TRANS --> CONFD_OK
TRACE MAAPI_STOP_TRANS --> CONFD_OK
TRACE MAAPI_END_USER_SESSION --> CONFD_OK
$ confd_cmd -dd -c 'subwait_mods "/dhcp" 1 100 "/dhcp" "suppress_defaults"' &
subwait_mods "/" "1" "100" "suppress_defaults"
TRACE Connected (maapi) to ConfD
TRACE MAAPI_LOAD_ALL_NS
TRACE MAAPI_LOAD_MNS_MAPS
TRACE MAAPI_LOAD_HASH_DB
TRACE Connected (cdb) to ConfD
TRACE CDB_SUBSCRIBE / --> CONFD_OK
TRACE CDB_SUBSCRIBE_DONE --> CONFD_OK
SUBSCRIBED TO /
$ confd_cmd -dd -c 'trigger_subscriptions'
trigger_subscriptions
TRACE Connected (cdb) to ConfD
TRACE CDB_TRIGGER_SUBS TRACE CDB_SUBSCRIPTION_EVENT --> 7
COMMIT
TRACE CDB_GET_MODIFICATIONS --> CONFD_OK
default-lease-time P0DT42H
TRACE CDB_SYNC_SUB CDB_DONE_PRIORITY --> CONFD_OK
DONE
 --> CONFD_OK

```
