Skipping validation callbacks if daemons didn't register them?

In case anything is messed up on my machine, I’d like to apply a minimal predefined configuration to confd. So with any given running configuration, I want to be able to:

  1. stop confd and all applications subscribed to it
  2. start confd without any application running
  3. load my minimal configuration and commit it
  4. restart confd, this time with all subscriber applications

So it all works, except for one thing.

One of my applications has a validation point that it registers in phase0. For some reason, in step (3) I cannot commit my new minimal configuration. It looks like confd still needs to run the external validation callback, even though the application concerned never registered it (since it’s not running).

% commit
Aborted: application communication failure

I tried starting confd with “–ignore-initial-validation”, but I obtain the same result.

From section 9.8. Validation Points and CDB in the UG:

When CDB first starts or upgrades the database it creates a special transaction which, when committed, will invoke validation. An external validation point (written e.g. in C) has to be registered before these transactions are committed, otherwise starting ConfD will fail. Starting ConfD and external applications in a synchronized way is accomplished using ConfD start phases (see the Advanced Topics chapter). To avoid this extra complexity use the --ignore-initial-validation option when starting ConfD (useful during development).

This is to say that --ignore-initial-validation only works for the special init transaction, not for any first commit to an empty DB.

If you instead of loading your minimal config manually put it (in xml format) in the CDB directory ConfD will automatically read your configuration file, apply your config and respect the --ignore-initial-validation flag.

1 Like