calaos / calaos_base

Calaos server
https://calaos.fr
GNU General Public License v3.0
160 stars 37 forks source link

Inconsicent configuration management while sending configuration #150

Open StevenLeRoux opened 4 years ago

StevenLeRoux commented 4 years ago

When you push a configuration on Calaos_server (from installer), it seems it tries to apply it before flushing the configuration file.

If a power cut happens when you push the configuration file, and while calaos is loading it, then both io.xml and rules.xml will stay as empty files. At the next startup, Calaos_server will be unable to start because of these corrupted files.

We need to prevent this situation from happening, and we could also make the server to default to a new io/rules files if it can't open any of these files. Or detect is they are 0 sized, which is abnormal.