Startup data store read access in confD

Hi,

I am trying to read the startup datastore using the MAAPI API from within the init_cb callback. However, I am encountering the following error:

Failed to start startup transaction: item does not exist.

Code snippet:

if (maapi_start_user_session(sock, “admin”, “system”, groups, 1, &ip, CONFD_PROTO_TCP) < 0) {
TRACE_DEBUG(“Failed to start user session: %s”, confd_strerror(confd_errno));
}

int startup_th = maapi_start_trans(sock, CONFD_STARTUP, CONFD_READ);
if (startup_th < 0) {
TRACE_DEBUG(“Failed to start startup transaction: %s”, confd_strerror(confd_errno));
}

Is it permitted to access the startup datastore during the initialization callback (init_cb)?
If so, in which start phase or part of the code should this access be performed to ensure it works correctly?

Hi,

Have you enabled startup in confd.conf and followed the other recommendations in the User Guide concerning the startup DB? What would you like to do with it if you could connect?

Best,

Scott