OpenWISP 22.05 & Config Validation Issue

19 views
Skip to first unread message

ant...@vofr.net

unread,
Sep 12, 2022, 10:58:32 AM9/12/22
to OpenWISP
Hello!

Yesterday I upgraded to OpenWISP 22.05 via Ansible and the upgrade seemed to be successful.  However, I'm running into an issue with some configuration failing validation and could use some pointers on troubleshooting.

Whenever I try to save config changes, it complains about the following:

Invalid configuration triggered by "#/radios/1", validator says:

{'protocol': '802.11ac', 'name': 'radio1', 'phy': '', 'channel': 0, 'channel_width': 20, 'tx_power': 20, 'country': 'US', 'disabled': False, 'driver': 'mac80211', 'hwmode': '11g'} is not valid under any of the given schemas


Here's how the radio configuration looks via the UI:
radio1.pngradio2.png
Looking at the validation error, it seems the configuration for the two radios may have gotten mixed up?  It has hwmode as 11g for the radio that's configured for 802.11ac.

Any tips/recommendations on how I can solve this?

Thank you!

Federico Capoano

unread,
Sep 12, 2022, 11:22:06 AM9/12/22
to open...@googlegroups.com
Try the following:

destroy radio1 and recreate it.

Is this only a template or do you have it in many places?

It's most likely caused by this change: https://github.com/openwisp/netjsonconfig/issues/190

From the following conf:

{'protocol': '802.11ac', 'name': 'radio1', 'phy': '', 'channel': 0, 'channel_width': 20, 'tx_power': 20, 'country': 'US', 'disabled': False, 'driver': 'mac80211', 'hwmode': '11g'}

I see that this is the case, you had a definition of 802.11 AC for a 2GHz interface, most probably defaulting to 802.11n.

Let me know how it goes!
Best regards
Federico Capoano

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/961f102c-b57b-43d4-a0e7-fb3f895af75fn%40googlegroups.com.

Martin Süfke

unread,
Sep 12, 2022, 11:23:46 AM9/12/22
to open...@googlegroups.com

Hello Anthony,

I have a recent-ish OpenWISP install (installed by Ansible) and I tried replicating your problem - no success. My Radios are saved smoothly when created as a device configuration.
However once saved, my "radio config" does not show the settings for "channel width (mhz)" and "country" which I set for the 5GHz Radio to 80MHz (VHT80 Mode) and US like you showed, so error, too, but different.

Questions:
1) Are you changing a device's configuration or a template?

2) Could you please click on 'Advanced Mode (JSON)' (on the Right side of where you configured the radios, somewhat down from the top but not at the bottom) and send that JSON ?
That would make your configuration a lot clearer than the two screenshots.

3) Can you entirely delete the Radios and save the configuration, then re-create the Radios step-by-step and save in between? Error happens again?

-Martin

On 12.09.22 16:58, 'ant...@vofr.net' via OpenWISP wrote:
Hello!

Yesterday I upgraded to OpenWISP 22.05 via Ansible and the upgrade seemed to be successful.  However, I'm running into an issue with some configuration failing validation and could use some pointers on troubleshooting.

Whenever I try to save config changes, it complains about the following:

Invalid configuration triggered by "#/radios/1", validator says:

{'protocol': '802.11ac', 'name': 'radio1', 'phy': '', 'channel': 0, 'channel_width': 20, 'tx_power': 20, 'country': 'US', 'disabled': False, 'driver': 'mac80211', 'hwmode': '11g'} is not valid under any of the given schemas


Here's how the radio configuration looks via the UI: …

<snip> cut short </snap>


ant...@vofr.net

unread,
Sep 12, 2022, 2:29:38 PM9/12/22
to OpenWISP
Thanks for the quick responses, Federico and Martin!

Federico, you asked: Is this only a template or do you have it in many places?  It is only defined in once place.  It is a single template that is simply for defining the radios.

Martin, you asked:

1) Are you changing a device's configuration or a template?  This is a great question.  This is happening when I am editing a device's configuration. I was adding location information to a device and upon saving I would get the validation error per my original post.  I have not yet created/modified any templates since the upgrade.  

2) Could you please click on 'Advanced Mode (JSON)' (on the Right side of where you configured the radios, somewhat down from the top but not at the bottom) and send that JSON ?

That would make your configuration a lot clearer than the two screenshots.  Absolutely!  See below.

{
    "radios": [
        {
            "protocol": "802.11ac",
            "name": "radio0",
            "phy": "",
            "channel": 0,
            "channel_width": 80,
            "country": "US",
            "disabled": false,
            "driver": "mac80211",
            "hwmode": "11a"
        },
        {
            "protocol": "802.11n",


            "name": "radio1",
            "phy": "",
            "channel": 0,
            "channel_width": 20,
            "tx_power": 20,
            "country": "US",

            "disabled": false,


            "driver": "mac80211",
            "hwmode": "11g"
        }

    ]
}

3) Can you entirely delete the Radios and save the configuration, then re-create the Radios step-by-step and save in between? Error happens again?  I have not tried this yet, but per Federico's response as well as yours, this sounds like it may be what I need to do.  However, given the JSON output from above, I'm wondering if it's possible to re-push the radio config?  It appears to be correct template wise.

ant...@vofr.net

unread,
Sep 12, 2022, 2:42:34 PM9/12/22
to OpenWISP
OK.  I just tried something silly.  Instead of deleting and re-creating the radio config completely, I changed radio1 to 802.11g, saved, waited for the config to propagate to the APs, changed it back to 802.11n, saved, waited for the config to propagate.  Now I was able to edit the device config (add the map/location information), save, and no validation error!  JSON output of the template still looks good.

{
    "radios": [
        {
            "protocol": "802.11ac",
            "name": "radio0",
            "phy": "",
            "channel": 0,
            "channel_width": 80,
            "country": "US",
            "disabled": false,
            "driver": "mac80211",
            "hwmode": "11a"
        },
        {
            "protocol": "802.11n",
            "name": "radio1",
            "phy": "",
            "channel": 0,
            "channel_width": 20,
            "tx_power": 20,
            "country": "US",
            "disabled": false,
            "driver": "mac80211",
            "hwmode": "11g"
        }
    ]
}


Reply all
Reply to author
Forward
0 new messages