Skip to content

[bug] Device config status does not update to "modified" when organization variable is changed #1070

@pandafy

Description

@pandafy

Describe the bug
Changing configuration variable in the Organization settings does not change the device's config status.

Steps To Reproduce

  1. Create a shared template:
    • Name: WiFi
    • Organization: Shared
    • Type: Generic
    • Backend: OpenWrt
    • Default Values:
      {
          "ssid": "Shared"
      }
    • Config:
      {
          "interfaces": [
              {
                  "wireless": {
                      "mode": "access_point",
                      "radio": "radio0",
                      "ssid": "{{ ssid }}"
                  },
                  "type": "wireless",
                  "name": "wlan0",
                  "network": "br-lan"
              }
          ]
      }
  2. Create a device and apply this template to the device.
  3. Wait for the device's config status to change to "applied". You can also update it manually in the Django shell:
    Config.objects.update(status='applied')
  4. In the organization settings, add a configuration variable and save the organization setting.
    {
        "ssid": "OrgA"
    }

Expected behavior
After adding the variable, the device's config status should change to "modified" and OpenWISP should try to push the configuration to the device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    To do (Python & Django)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions