Commit failed while subscriber/validator is started during commit transaction

Hi,

I have a scenario where the commit is failed because the validator process that is required to perform the validation is not started. Please find the scenario below with an example and suggest any ideas to solve this.

config x ------ This config starts a process which is a validator process for validating the config y
config y
commit

The above commit failed in our case because its done in a single transaction and when the config y is sent it expects the validator process to be up and running.

Having two commit transactions will work one for config x and one commit for config y but this is not user friendly. Starting the validator process during system startup is also not accepted from security point of view.

Any help on this issue will be greatly appreciated.

Best Regards,
Vijay

Hi,
From your description I assume you are using tailf:validate in your yang model to invoke a validation callback that you implemented in C?

ConfD doesn’t start any processes for you, ConfD just expects you to register a validation callback to be invoked by ConfD using control and worker sockets that you register. See ConfD 6.3 UG 9.7. Validating Data in C

if I understand it correctly, you need config x to be fully applied before config y is being applied.

One option may be to use pre-commit (two phase) subscriptions and different subscription priorities.
In this case, you need to handle ABORT message (e.g. perform revert of applied config x in your system).
In pre commit phase, two phase subscription can still abort transaction in case of error (this is not possible with regular subscription), which can be also used for validation purpose.

See ConfD User Guide, confd_lib_cdb, function cdb_subscribe2.