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
Currently all files which are also included in the new configuration to be applied are included in the backup which is created before applying the new configuration. There can be situations though when this is not sufficient.
Imagine the following situation:
The network configuration is modified by the agent. Before modifying /etc/config/network, the agent creates a copy in /etc/openwisp/stored/.
Some time later, that change to the network configuration is removed from the device config on the controller. The previous state of /etc/config/network is restored with the help of the copy of the file in /etc/openwisp/stored/.
Unfortunately, the previous state doesn't work anymore, due to a change in the network the device is connected to, or due to a firmware upgrade (for example DSA). The configuration test fails and the backup created before applying that configuration change is used to restore the configuration before the change.
Unfortunately, the file network is not included in the backup because it's not included in the new configuration tarball either.
Restoring the last working configuration failed.
Solution:
Files included in the currently applied configuration (all files currently modified by the agent) need to be included in the backup as well.
An example of how to reproduce the issue:
Preconditions:
the device can reach the OpenWISP controller and is registered
the wan interface of the device will be configured by OpenWISP
the agent uses the following configuration test script:
#!/bin/sh
logger "Trying to reach google.de..."
ping -c 3 google.de
Procedure:
The following configuration is provided by the controller:
The agent downloads and applies the configuration. The configuration test succeeds.
Now the above configuration is removed on the controller.
The agent downloads and applies the configuration. The configuration test fails.
The previous configuration should be restored but the backup doesn't include the network file. Thus the network configuration after the restore is incomplete.
The text was updated successfully, but these errors were encountered:
Currently all files which are also included in the new configuration to be applied are included in the backup which is created before applying the new configuration. There can be situations though when this is not sufficient.
Imagine the following situation:
/etc/config/network
, the agent creates a copy in/etc/openwisp/stored/
./etc/config/network
is restored with the help of the copy of the file in/etc/openwisp/stored/
.network
is not included in the backup because it's not included in the new configuration tarball either.Solution:
Files included in the currently applied configuration (all files currently modified by the agent) need to be included in the backup as well.
An example of how to reproduce the issue:
Preconditions:
Procedure:
The following configuration is provided by the controller:
The agent downloads and applies the configuration. The configuration test succeeds.
Now the above configuration is removed on the controller.
The agent downloads and applies the configuration. The configuration test fails.
The previous configuration should be restored but the backup doesn't include the
network
file. Thus the network configuration after the restore is incomplete.The text was updated successfully, but these errors were encountered: