Fixed bug that deletes running on startup if backup started with -m running.
This commit is contained in:
parent
c3f7a50e61
commit
a150eec7be
2 changed files with 12 additions and 1 deletions
|
|
@ -1,5 +1,11 @@
|
|||
# Clixon Changelog
|
||||
|
||||
* Fixed bug that deletes running on startup if backup started with -m running.
|
||||
When clixon starts again, running is lost.
|
||||
The error was that the running (or startup) configuration may fail when
|
||||
clixon backend starts.
|
||||
The fix now makes a copy of running and copies it back on failure
|
||||
|
||||
## 3.3.3 (25 November 2017)
|
||||
|
||||
Thanks to Matthew Smith, Joe Loeliger at Netgate; Fredrik Pettai at
|
||||
|
|
|
|||
|
|
@ -536,8 +536,13 @@ startup_mode_running(clicon_handle h,
|
|||
if (load_extraxml(h, extraxml_file, "tmp") < 0)
|
||||
goto done;
|
||||
/* Commit original running */
|
||||
if (candidate_commit(h, "candidate") < 0)
|
||||
if (candidate_commit(h, "candidate") < 0){
|
||||
clicon_log(LOG_NOTICE, "%s: Commit of saved running failed, exiting.", __FUNCTION__);
|
||||
/* Reinstate original */
|
||||
if (xmldb_copy(h, "candidate", "running") < 0)
|
||||
goto done;
|
||||
goto done;
|
||||
}
|
||||
/* Merge user reset state and extra xml file (no commit) */
|
||||
if (db_merge(h, "tmp", "running") < 0)
|
||||
goto done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue