# Application behavior when confd\_load is used to repace the config

**URL:** <https://dmap-community.ductus.global/t/application-behavior-when-confd-load-is-used-to-repace-the-config/974>\
**Category:** General\
**Created:** [January 23, 2017, 7:56am UTC](https://dmap-community.ductus.global/t/application-behavior-when-confd-load-is-used-to-repace-the-config/974 "2017-01-23T07:56:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasanthrp](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@prasanthrp](https://dmap-community.ductus.global/u/prasanthrp)\
**Post date:** [January 23, 2017, 7:56am UTC](https://dmap-community.ductus.global/t/application-behavior-when-confd-load-is-used-to-repace-the-config/974/1 "2017-01-23T07:56:50Z")

</div>

Hello,

confd\_load tool has two options to load and xml.

1. When used with -m argument, it merges the existing configuration with the incoming one.
2. Without -m, it replaces the original configuration, with the new one.

When second option(without -m, that is replace) is used, how does the delete notification to subscribers work?  
Will confd sends delete for all original configurations and create for the new configuration  
OR  
Delete only for the configurations that are not present in new configuration? With some smart diff approach.

For example in current configuration I have  
ip\_interface\_01  
ip\_interface\_02  
ip\_interface\_03  
ip\_interface\_04

And in new configuration

ip\_interface\_01  
ip\_interface\_02  
ip\_interface\_03  
ip\_interface\_05

and I load the new config with confd\_load -l new.xml,

will I get  
4 deletes and 4 create?  
OR  
1 delete and 1 create?

Thanks, Prasanth

---

<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:** [January 23, 2017, 8:56am UTC](https://dmap-community.ductus.global/t/application-behavior-when-confd-load-is-used-to-repace-the-config/974/2 "2017-01-23T08:56:45Z")

</div>

Hi,  
A good way to find out what the confd\_load and confd\_cmd tools are doing is to add “-d -d” debug level.  
Example:

```
$ confd_load -d -d -l -m test.xml 
TRACE Connected (maapi) to ConfD
starting user session ctxt=system user=system groups=[system]
TRACE MAAPI_START_USER_SESSION --> CONFD_OK
TRACE MAAPI_START_TRANS --> CONFD_OK
TRACE MAAPI_LOAD_CONFIG_FILE --> CONFD_OK
TRACE MAAPI_APPLY_TRANS --> CONFD_OK
TRACE MAAPI_END_USER_SESSION --> CONFD_OK

```

So now you can see that the confd\_load tool use maapi\_load\_config() to set the configuration. See confd\_lib\_maapi(3) man page for details on maapi\_load\_config().

As for deleting and creating configuration in the same transaction, you will always get the resulting diff only in your subscriber / callpoint handler
