Disable CLICON_XMLDB_SYSTEM_ONLY_CONFIG by default

This commit is contained in:
Olof hagsand 2024-11-23 08:36:15 +01:00
parent 199a3fd88e
commit 08c8e43fb8
2 changed files with 4 additions and 6 deletions

View file

@ -236,13 +236,11 @@ startup_common(clixon_handle h,
if ((msdiff = modstate_diff_new()) == NULL)
goto done;
/* Add system-only config to running */
if ((td->td_src = xml_new(DATASTORE_TOP_SYMBOL, NULL, CX_ELMNT)) == NULL)
goto done;
if (clicon_option_bool(h, "CLICON_XMLDB_SYSTEM_ONLY_CONFIG")){
if ((xt = xml_new(DATASTORE_TOP_SYMBOL, NULL, CX_ELMNT)) == NULL)
if (xmldb_system_only_config(h, "/", NULL, &td->td_src) < 0)
goto done;
if (xmldb_system_only_config(h, "/", NULL, &xt) < 0)
goto done;
td->td_src = xt;
xt = NULL;
}
if (clicon_option_bool(h, "CLICON_XMLDB_UPGRADE_CHECKOLD")){
if ((ret = xmldb_get0(h, db, YB_MODULE, NULL, "/", 0, 0, &xt, msdiff, &xerr)) < 0)

View file

@ -1202,7 +1202,7 @@ module clixon-config {
}
leaf CLICON_XMLDB_SYSTEM_ONLY_CONFIG {
type boolean;
default true;
default false;
description
"If set, some fields in the configuration tree are not stored to datastore.
Instead, the application provides a mechanism to save the system-only-config