You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current update configuration algorithm uses a (dangerous) shortcut - totally my fault.
In order to remove specific UCI configuration that may be removed from the OpenWISP web interface, it loops over a stored copy of the previous UCI configuration downloaded from openwisp and removes all those options from the current active configuration. This basically removes everything that was sent via OpenWISP.
Once that is done, it applies the new configuration, adding all the options present in the new downloaded conf to the active conf of the device.
This is causing #69 but can may also cause unexpected problems if the process halts for some reason, although this case is now be prevented by da41186, but still, there are very good reasons to make this algorithm smarter.
I think the following should work:
loop over the sections and options (for each section also loop over its options) of the previous ow2 configuration (in /etc/openwisp/stored)
look for each specific section and its options in the new configuration that has just been downloaded from OpenWISP and if one of these is not found it means that section/option has been removed from the OpenWISP web UI and it can be safely removed from the current active configuration
The text was updated successfully, but these errors were encountered:
This proposal should help to fix #69 as well.
The current update configuration algorithm uses a (dangerous) shortcut - totally my fault.
In order to remove specific UCI configuration that may be removed from the OpenWISP web interface, it loops over a stored copy of the previous UCI configuration downloaded from openwisp and removes all those options from the current active configuration. This basically removes everything that was sent via OpenWISP.
Once that is done, it applies the new configuration, adding all the options present in the new downloaded conf to the active conf of the device.
This is causing #69 but can may also cause unexpected problems if the process halts for some reason, although this case is now be prevented by da41186, but still, there are very good reasons to make this algorithm smarter.
I think the following should work:
/etc/openwisp/stored
)The text was updated successfully, but these errors were encountered: