diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb85f5b7..b11f8c1f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
* [5.1.0](#510) Expected: April
* [5.0.0](#500) 27 February 2021
+ * [5.0.1](#501) 10 March 2021
* [4.9.0](#490) 18 December 2020
* [4.8.0](#480) 18 October 2020
* [4.7.0](#470) 14 September 2020
@@ -61,11 +62,25 @@ Developers may need to change their code
### Corrected Bugs
+* Fixed: [The config false leaf shouldn't be configed in startup stage #189](https://github.com/clicon/clixon/issues/189)
* Fixed: [CLIXON is not waiting for the hello message #184](https://github.com/clicon/clixon/issues/184)
* See also API changes
* Fixed: [comma in yang list name will lead to cli setting error #186](https://github.com/clicon/clixon/issues/186)
* Reverted blocked signal behavior introduced in 5.0.
+## 5.0.1
+
+10 March 2021
+
+### Minor features
+
+* Introduced a delay before making process start/stop/restart processes for race conditions when configuring eg restconf
+* For restconf `CLICON_BACKEND_RESTCONF_PROCESS`, restart restconf if restconf is edited.
+
+### Corrected Bugs
+
+* Reverted blocked signal behavior introduced in 5.0.
+
## 5.0.0
27 February 2021
@@ -77,6 +92,10 @@ Other changes since 4.9 include NETCONF call home, a new client API, and a modif
Thanks Netgate and input from the Clixon community for making this possible!
+### Known Issues
+
+* Changed behavior in signal handlers and some race conditions, use 5.0.1 instead
+
### New features
* RESTCONF configuration is extended and changed for both fcgi and evhtp
diff --git a/apps/backend/backend_commit.c b/apps/backend/backend_commit.c
index 0946ed39..785c46e0 100644
--- a/apps/backend/backend_commit.c
+++ b/apps/backend/backend_commit.c
@@ -261,6 +261,14 @@ startup_common(clicon_handle h,
goto done;
goto fail;
}
+ /* After upgrade check no state data */
+ if ((ret = xml_non_config_data(xt, &xret)) < 0)
+ goto done;
+ if (ret == 0){
+ if (clicon_xml2cbuf(cbret, xret, 0, 0, -1) < 0)
+ goto done;
+ goto fail;
+ }
/* Sort xml */
if (xml_sort_recurse(xt) < 0)
goto done;
diff --git a/lib/src/clixon_xml_map.c b/lib/src/clixon_xml_map.c
index 7e3f30d7..1b0c2890 100644
--- a/lib/src/clixon_xml_map.c
+++ b/lib/src/clixon_xml_map.c
@@ -1478,9 +1478,8 @@ xml_non_config_data(cxobj *xt,
clicon_err(OE_UNIX, errno, "cbuf_new");
goto done;
}
- cprintf(cb, "%s in module %s: state data node unexpected",
- yang_argument_get(y), yang_argument_get(ys_module(y)));
- if (netconf_invalid_value_xml(xerr, "application", cbuf_get(cb)) < 0)
+ cprintf(cb, "module %s: state data node unexpected", yang_argument_get(ys_module(y)));
+ if (netconf_bad_element_xml(xerr, "application", yang_argument_get(y), cbuf_get(cb)) < 0)
goto done;
retval = 0;
goto done;
diff --git a/test/test_netconf.sh b/test/test_netconf.sh
index 99d6a712..66db8293 100755
--- a/test/test_netconf.sh
+++ b/test/test_netconf.sh
@@ -200,7 +200,7 @@ new "netconf discard-changes"
expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO]]>]]>" "^]]>]]>$"
new "netconf edit state operation should fail"
-expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLOe0up]]>]]>" "^applicationinvalid-valueerroroper-status in module ietf-interfaces: state data node unexpected]]>]]>"
+expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLOe0up]]>]]>" "^applicationbad-elementoper-statuserrormodule ietf-interfaces: state data node unexpected]]>]]>"
new "netconf get state operation"
expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO]]>]]>" "^eth1ex:ethtrueup42foo]]>]]>$"
diff --git a/test/test_startup.sh b/test/test_startup.sh
index 607f21fa..bb188711 100755
--- a/test/test_startup.sh
+++ b/test/test_startup.sh
@@ -6,7 +6,7 @@
# - An extra xml configuration file starts with an "extra" interface
# - running db starts with a "run" interface
# - startup db starts with a "start" interface
-# There is also an "invalid" XML and a "broken" XML
+# There is also an "invalid" XML and a "broken" XML and a "state" XML
# There are two steps, first run through everything OK
# Then try with invalid and broken XML and ensure the backend quits and all is untouched
@@ -57,6 +57,9 @@ invalidvar=')
brokenvar='brokenex:ethtrue'
+# Startup XML with state
+statevar='startupupex:ethtrue'
+
# Create a pre-set running, startup and (extra) config.
# The configs are identified by an interface called run, startup, extra.
# Depending on startup mode (init, none, running, or startup)
@@ -184,6 +187,9 @@ if [ $valgrindtest -ne 2 ]; then
new "Run broken startup in startup mode"
testfail startup "$runvar" "$brokenvar" "$extravar"
+
+ new "Run broken startup with state data in startup mode"
+ testfail startup "$runvar" "$statevar" "$extravar"
fi
rm -rf $dir
diff --git a/test/test_yang.sh b/test/test_yang.sh
index 8964ca82..0595de62 100755
--- a/test/test_yang.sh
+++ b/test/test_yang.sh
@@ -212,7 +212,7 @@ new "cli show leaf-list"
expectpart "$($clixon_cli -1f $cfg show xpath /x/f/e urn:example:clixon)" 0 "foo"
new "netconf set state data (not allowed)"
-expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO42]]>]]>" "^applicationinvalid-valueerrorstate in module example: state data node unexpected]]>]]>$"
+expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO42]]>]]>" "^applicationbad-elementstateerrormodule example: state data node unexpected]]>]]>$"
new "netconf set presence and not present"
expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO]]>]]>" "^]]>]]>$"