From 7590395fe3433c005bcb567653df067c1fa0550c Mon Sep 17 00:00:00 2001 From: Olof Hagsand Date: Fri, 22 Feb 2019 14:45:37 +0100 Subject: [PATCH] Starting 3.10 release cycle Moved docs to doc/ --- CHANGELOG.md | 10 ++++++ README.md | 2 +- configure | 4 +-- configure.ac | 4 +-- DEVELOP.md => doc/DEVELOP.md | 29 +++++++++++++---- ROADMAP.md => doc/ROADMAP.md | 6 ++-- doc/startup.md | 62 ++++++++++++++++++++++++++++++++++++ 7 files changed, 104 insertions(+), 13 deletions(-) rename DEVELOP.md => doc/DEVELOP.md (77%) rename ROADMAP.md => doc/ROADMAP.md (91%) create mode 100644 doc/startup.md diff --git a/CHANGELOG.md b/CHANGELOG.md index a4fbd6d5..6f72a7f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Clixon Changelog +## 3.10.0 (Upcoming) + +### Major New features + +### API changes on existing features (you may need to change your code) + +### Minor changes + +### Corrected Bugs + ## 3.9.0 (21 Feb 2019) Thanks for all bug reports, feature requests and support! Thanks to [Netgate](https://www.netgate.com) and other sponsors for making Clixon a better tool! diff --git a/README.md b/README.md index fcf1f2ce..75d0a2a6 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ support. * [Clixon project page](http://www.clicon.org) * [Tests and CI](test/README.md) * [Containers](docker/README.md) - * [Roadmap](ROADMAP.md) + * [Roadmap](doc/ROADMAP.md) * [Reference manual](#reference) ## Background diff --git a/configure b/configure index c05061a9..cf5cab24 100755 --- a/configure +++ b/configure @@ -2167,9 +2167,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu : ${INSTALLFLAGS="-s"} CLIXON_VERSION_MAJOR="3" -CLIXON_VERSION_MINOR="9" +CLIXON_VERSION_MINOR="10" CLIXON_VERSION_PATCH="0" -CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\"" +CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\"" # Fix to specific CLIgen version (eg 3.5) or head (3) CLIGEN_VERSION="3" diff --git a/configure.ac b/configure.ac index ce93442f..13ee24a1 100644 --- a/configure.ac +++ b/configure.ac @@ -43,9 +43,9 @@ AC_INIT(lib/clixon/clixon.h.in) : ${INSTALLFLAGS="-s"} CLIXON_VERSION_MAJOR="3" -CLIXON_VERSION_MINOR="9" +CLIXON_VERSION_MINOR="10" CLIXON_VERSION_PATCH="0" -CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\"" +CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\"" # Fix to specific CLIgen version (eg 3.5) or head (3) CLIGEN_VERSION="3" diff --git a/DEVELOP.md b/doc/DEVELOP.md similarity index 77% rename from DEVELOP.md rename to doc/DEVELOP.md index d4c24e7f..cb59647e 100644 --- a/DEVELOP.md +++ b/doc/DEVELOP.md @@ -50,6 +50,8 @@ configure.ac --. +--> config.status* -+ +--> make* Makefile.in ---' `-> Makefile ---' ``` +Note: remember to run autoheader sometimes (when?) +And when you do note (https://github.com/olofhagsand/cligen/issues/17) which states that cligen_custom.h should be in quote. ## Debug How to debug @@ -96,9 +98,24 @@ EOF ## New release What to think about when doing a new release. -* run test/mem.sh -* New clixon-config.yang revision? -Tagging: -* change CLIXON_VERSION in configure.ac -* git tag -a +* Ensure all tests run OK +* New yang/clicon/clixon-config@XXX.yang revision? +* In configure.ac, for minor releases change CLIXON_VERSION in configure.ac to eg: (minor should have been bumped): +``` + CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\"" +``` +* For patch releases change CLIXON_VERSION_PATCH +* Run autoconf +* Git stuff: +``` + git tag -a +``` + +After release: +* Bump minor version and add a "PRE": +``` + CLIXON_VERSION_MINOR="10" ++ + CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\"" +``` +* Run autoconf diff --git a/ROADMAP.md b/doc/ROADMAP.md similarity index 91% rename from ROADMAP.md rename to doc/ROADMAP.md index 2b884845..c76f0f5e 100644 --- a/ROADMAP.md +++ b/doc/ROADMAP.md @@ -3,8 +3,10 @@ ## High prio - Special handling of the initial startup transaction to avoid exit at startup - Possibly - draft-wu-netconf-restconf-factory-restore-03 + - See (startup.md) - Handle revisions to data model. - Possibly draft-wang-netmod-module-revision-management-01 + - See (startup.md) - (DONE) NACM (RFC 8341) - NACM support for create, read, update, delete operations - ACM support for specifying a module name other than '*' @@ -33,12 +35,12 @@ Not prioritized: - Query parameters - Streams (netconf and restconf) - Extend native stream mode with external persistent timeseries database, eg influxdb. -- Jenkins CI/CD and webhooks +- (DONE)Jenkins/Travis CI/CD and webhooks - YANG - RFC 6022 [NETCONF monitoring](https://github.com/clicon/clixon/issues/39) - Deviation, min/max-elements, action, unique - Containers - - [Docker improvements](https://github.com/clicon/clixon/issues/44) + - (DONE)[Docker improvements](https://github.com/clicon/clixon/issues/44) - Kubernetes Helm chart definition - [gRPC](https://github.com/clicon/clixon/issues/43) diff --git a/doc/startup.md b/doc/startup.md new file mode 100644 index 00000000..9e39e990 --- /dev/null +++ b/doc/startup.md @@ -0,0 +1,62 @@ +# New Clixon Startup functionality + +## Objectives +When Clixon 3.9 backend starts, it assumes a well-formed initial XML +configuration which it parses and validates. Depending on starting +mode (-s command-line) this is the "startup" or "running" +configuration. + +If this initial configuration fails, clixon backend exits. This has +the consequence that an operator cannot manage the system unless with +out-of-band mechanisms. + +## Objectives +This document describes a new startup mechanism with the following goals: +* An operator should be notified of the startup status +* The backend should remain up in case of errors but may enter a "failsafe" mode. +* XML syntax errors should be detected and reported +* Yang module info is added to (startup) datastore database +* Yang module mismatch should be detected and reported +* Validation failures should be detected and reported, specifically of mismatching modules. + +## Proposal + +A new user callback is introduced: +``` + int startup-cb(h, status, module-state-diff, *valid) +``` +which is called once at startup to report startup state to application: +- status is one of: OK, INVALID and ERROR. +- module-state-diff contains a list of RFC7895 differences between the yang modules running in the system, and the ones in the startup config. +- valid is a return value that if set to 0 forces the status to INVALID (if OK on entry). + +A new read-only datastore is introduced: +``` + CLICON_XMLDB_FAILSAFE If set, a failsafe read-only datastore is expected, + in CLICON_XMLDB_DIR, called failsafe_db +``` + +Datastore databases are optionally extended with modules state according to +RFC7895. A new config option is introduced to control this: +``` + CLICON_XMLDB_MODSTATE If set, tag datastores with RFC 7895 YANG Module Library + info. When loaded at startup, a check is made if the system yang modules match +``` + +Proposed algoritm: +0. Backend starts with a set of yang module revisions as of RFC7895. +1. Parse startup XML (or JSON) +2. If syntax failure, call startup-cb(ERROR), copy failsafe db to candidate and commit. Done +3. Check yang module versions between backend and init config XML. (msdiff) +4. Validate startup db. (valid) +5. If valid fails, call startup-cb(Invalid, msdiff), keep startup in candidate and commit failsafe db. Done. +6. Call startup-cb(OK, msdiff) and commit. + +Note: + +1. If done in step 2) the failsafe db is in both candidate and running. The operator need to repair the XML file before reloading. +2. If done in step 5) The operator has the non-valid database in candidate and can edit it, and when ready can commit it. During this time, the failsafe db is running. +3. If done in steps 5 and 6, the module-state-diff contains the (potential) differences in the modules-state diff. + +## Thanks +Thanks matt smith and dave cornejo for input \ No newline at end of file