Triggering callbacks on system reboot

We are using subscriptions mechanism to trigger our callbacks which setup stuff in the data plane. So whenever there is any change in the database we are notified and we make the necessary configuration changes using our callbacks.

My concern now is that in case of a silent reboot for the device to get to the exact operational state before reboot we require all the callbacks to be triggered which currently does not happen because the database didn’t change.

Is there a way for confd to trigger these callbacks automatically on reboot?


You can invoke cdb_trigger_subscriptions( ) upon restart of ConfD (Phase 2). This function makes it possible to trigger CDB subscriptions for configuration data even though the configuration has not been modified. The caller will trigger all subscription points passed in the sub_points array (or all subscribers if the array is of zero length) in priority order, and the call will not return until the last subscriber has called cdb_sync_subscription_socket().