openwisp / openwisp-config

OpenWRT configuration agent for OpenWISP Controller
https://openwisp.io/docs/dev/openwrt-config-agent/
GNU General Public License v3.0
374 stars 58 forks source link

[bug] Configuration download error is not detected #125

Closed nemesifier closed 3 years ago

nemesifier commented 3 years ago

If the checksum view of OpenWISP controller returns a good response (200 OK) but the server returns an error (eg: a 500 internal server error because of a bug) during the download of the configuration, the agent will not detect this error and try to apply the configuration anyway, even though the configuration is not valid.

This can affect negatively a running service because the running configuration is removed and the new one is empty.

The problem must be detected and the agent must not attempt to apply the configuration.