clicon / clixon-controller

Clixon network controller
Apache License 2.0
13 stars 4 forks source link

Device auto-changes of config at commit causes "Device config changed" #6

Closed olofhagsand closed 1 year ago

olofhagsand commented 1 year ago

Some devices change config after commit. One example is a <uid> tag added when committing a new user for system authentication. But currently the clixon controller caches the "committed" config (as sent from the controller), unless an explicit pull has been made. This means that if two successive commits are made to such a device, the second commit will have a mismatch between its cache (from the former commit) and the remote device config (which included the ). The result is that the clixon controller aborts the second commit and prints the "Device config changed" error message. Work-arounds: none Solution proposals: 1) Do a vendor-specific patch for such fields that change on commit 2) Do a mandatory pull after each commit (to the cache only) 3) Do a mandatory pull after each commit and replace the device config (including the cache)

olofhagsand commented 1 year ago

Fixed according to solution (3) above, ie get the new config from the device post-commit. @krihal please verify original error

olofhagsand commented 1 year ago

New patch, @khn please verify