Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 732408 - net-wireless/unifi 6.0.3/6.0.4 - Wrong/harmful device provisioning
Summary: net-wireless/unifi 6.0.3/6.0.4 - Wrong/harmful device provisioning
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Ben Kohler
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-13 07:54 UTC by Joël
Modified: 2020-12-03 06:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joël 2020-07-13 07:54:06 UTC
Network flooded and devices badly provisioned (see below)

Reproducible: Didn't try

Steps to Reproduce:
net-wireless/unifi 5.14.17 running with all devices provisioned & working
* /etc/init.d/unifi stop
* emerge net-wireless/unifi 6.0.3
* /etc/init.d/unifi start
* Clean reboot
Actual Results:  
After the reboot, my 3 UniFi devices (2x AP-Pro and 1x AP-SHD) went crazy:
* Network was basically flooded/unusable. For typically, as soon as I plugged one of them into a Gbit switch, nothing could talk across that switch anymore. I didn't capture a tcpdump sorry!
* Looks like they were provisioned with both 2.4 and 5 GHz radios off!

In short that rendered my whole LAN unusable. Took me a couple hours to find that the Unifis were the culprits.

Expected Results:  
All devices properly provisioned and working, like with prior versions of UniFi controller

Steps to resolve:
* /etc/init.d/unifi stop
* emerge net-wireless/unifi 5.14.17
* restore /var/lib/unifi from an earlier backup
* /etc/init.d/unifi start

At this point the devices immediately got reprovisioned and everything went back to normal.
Comment 1 Ben Kohler gentoo-dev 2020-07-13 11:28:45 UTC
Do you know if they got automatic firmware updates that came with unifi-6.0.3?
Comment 2 Joël 2020-07-13 11:47:01 UTC
(In reply to Ben Kohler from comment #1)
> Do you know if they got automatic firmware updates that came with
> unifi-6.0.3?

Hi Ben, I'm pretty certain that they did not, because:
* I always keep Firmware auto-update disabled in the Controller settings (and indeed, it never happened automatically so far)
* After the controller downgrade, the devices only got reprovisioned (no firmware up/downgrade) and the problem went away
Comment 3 Ben Kohler gentoo-dev 2020-07-16 13:56:02 UTC
I don't see anything specific regarding your issue in the changelog but you may still want to try 6.0.4 to see if the issue still exists there
Comment 4 Joël 2020-07-20 16:40:01 UTC
(In reply to Ben Kohler from comment #3)
> I don't see anything specific regarding your issue in the changelog but you
> may still want to try 6.0.4 to see if the issue still exists there

Hi Ben,

Thanks for the update. I tried it as follows:

* /etc/init.d/unifi stop
* Backed up /var/lib/unifi
* Upgraded net-wireless/unifi from 5.14.17 to 6.0.4
* No problems
* Forced controller to provision one UniFi device
* Mayhem!! Everything (on the network switch) was almost dead. Only way to connect to my embedded system was through the serial console
* Unplugged the offending Unifi device
* Network was fine again
* Stopped controller, restored backup and downgraded it to 5.14.18
* /etc/init.d/unifi start (and waited for it to start)
* Plugged in the UniFi device
* This automatically happened: "adopting" and then "provisioning"
* And everything was fine again.

So in my case at least, the provisioning by controller 6.x appears to be the culprit.

I would kindly suggest that you package.mask version >=6 by default, what do you think? It could happen to other people, so (imho) ~amd64 might not be sufficient.

Thanks again!
Comment 5 Ben Kohler gentoo-dev 2020-08-27 20:06:32 UTC
If you are still experiencing this problem or able to reproduce it, can you report it upstream?
Comment 6 Conrad Kostecki gentoo-dev 2020-09-01 16:36:43 UTC
Hi Joël,
I also would like to encourage you to report that problem to upstream (aka Ubiquiti), since I don't think, we can do anything here about it.

I am using a couple of UniFi APs and all are provisioning and working correctly. I don't think, that this is any way realted to our package, since we are not even compiling, but only installed a bunch of files. I strongly suspect, that this would even happend with the upstream packages on Ubuntu for example. As a conclusion, I would close here for now.

Conrad
Comment 7 Joël 2020-12-03 06:19:15 UTC
Hi Conrad,

Thanks for your help and apologies for the late reply.

I have good news: the problem is definitely gone with 6.1.26 (and maybe also with earlier 6.1.x versions). All good now!

Thanks again for maintaining this package, and all the best! :)