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

[apply-config] order of items in a list is not set as defined in NetJSON #89

Closed okraits closed 4 years ago

okraits commented 5 years ago

Assuming this is a problem in openwisp-config and not in netjsonconfig.

If there is an array of items (for example ntp servers), then the order of the items is not preserved when the configuration is stored on the device via UCI.

nemesifier commented 5 years ago

How to replicate the issue? Is the configuration on the controller changed?

okraits commented 5 years ago
  1. Make sure there are no ntp servers defined in /etc/config/system.
  2. Add 3 ntp servers in the device config or in a template.
  3. When the config is applied on the device, the order of ntp servers is not set as defined on the controller.
katsmark commented 5 years ago

Hello. I am a complete newbie in this field. I have a question. Why are we not using the entire list sent from the controller, but adding items from it to the existing list? What if we need to remove items from the existing list? For example, we want to remove one of the ntp servers from the default list. Thanks!

nemesifier commented 4 years ago

@katsmark: https://github.com/openwisp/openwisp-config/issues/82