diff --git a/apps/backend/backend_commit.c b/apps/backend/backend_commit.c index 0a967473..1a8076fc 100644 --- a/apps/backend/backend_commit.c +++ b/apps/backend/backend_commit.c @@ -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) diff --git a/yang/clixon/clixon-config@2024-11-01.yang b/yang/clixon/clixon-config@2024-11-01.yang index b0012fb2..79838fdd 100644 --- a/yang/clixon/clixon-config@2024-11-01.yang +++ b/yang/clixon/clixon-config@2024-11-01.yang @@ -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