-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move 'hooks' to their respective backends #3392
Conversation
With NetworkManager active, systemd-networkd/networkd-dispatcher are used for br0/ap0 support but the hooks were not being installed on the first pass through network as systemd_networkd_active was not detected when ansibled stated.
Should this PR me revised to take into account...? Or conversely, should this PR be merged just as it is? |
It's actually an enhancement also extending RasPiOS support when NetworkManager is used. The 'bug' would be contained to Ubuntu on RPi hardware and a second pass through networking would install the hooks. |
Question: if people running non-RPi hardware want AP+STA mode (e.g. using ap0) — shouldn't we allow them to explore that possibility? (So as to enable wifi_up_down to see if that works on their hardware.) Particularly given the severe shortage of Raspberry Pi hardware over the past 14 months ~ exploring other hardware options has become important to a lot of communities in 2022. Certainly CAVEAT: If I'm misunderstanding certain aspects of this commit, I apologize! ASIDE: This commit has a small syntax error on the end of Line 72 (dangling double-quote) just fyi. |
What kinds of testing are likely most useful? (For RasPiOS and otherwise!) |
Think you misunderstand the purpose of the 'hooks' that are used solely to workaround limitations and quarks with the wifi firmware used on RPis. I have documented where others have needed to use similar code to archive satisfactory results within the PRs that birthed the existence of wifi_up_down, please go back are read them.
Currently wifi_up_down is the default for all detected wifi hardware, the hooks are firmware specific as used on the RPis. The 'can_be_ap' is more useful to ferret out WiFi hardware that cannot be used with AP, which is the primary use of the WiFi device, that is the starting point for a forced opt out of wifi_up_down mode by not installing the support for hostapd. Without feedback from the user base about hardware that doesn't support cloning for ap0, think there has been one issue where can_be_ap was true but didn't support wifi_up_down since introduced there is nothing to write code from. Given I review all diagnostics I can point to where 'ap0 just works' as in #3330 #3385 from recent memory otherwise the installer might blowup before admin-console gets installed given the point where the cloning occurs. I would expect more issues reported because the cloning failed but I hear crickets about any failures related to that.
You decided RPis/RasPiOS were the primary target hardware/distro to be supported which I found rather short sighted and I kept Ubuntu network support alive anyway over the years. Without that piece in place Mint would not of become possible. Now there has been shift back to Ubuntu given the hardware requirements of some the roles and/or the use of docker with them.
Fixed. |
Removed via a revert/rebase, grouped with the other 11 packages now. |
In the end the same files are installed on RasPiOS just in a slightly different order with dhcpcd running the show. On Ubuntu server same thing same files different order with systemd-networkd running the show. With NetworkManager in the mix, the diagnostics hooks should be installed correctly now on the first pass though network as systemd-networkd is really what is used for br0 support. |
A MEDIUM-sized IIAB test install (of this PR) has begun on 10.8.0.26 = 181-rpi4-64lite-PR3392, after I ran:
|
Install is complete. iiab-diagnostics output: |
FYI the RPi 4's internal WiFi hotspot works, when tested with a phone's browser (over WiFi) with the usual URL's:
|
Thanks much for explaining.
I agree, this is a pattern but not all have been written up for analysis. So definitely something to monitor going forward.
👍
FWIW Raspberry Pi OS is the dominant OS by far, even despite the ongoing Raspberry Pi supply chain problems. Regardless, we should strengthen our Ubuntu support where that's possible — acknowledging that both OS's are moving targets — so supporting the most common use cases is indeed the best we can do! With Debian 12 (Bookworm) release "freezes" expected Q1 2023, which is not far away. So possibly that might add a few quirks 😉 |
Quick IIAB install tested on a Mint 21 VM using:
iiab-diagnostics after reboot: http://sprunge.us/RGQDuV?bash Any further tests needed? |
Nothing is triggering the need to configure br0 without a second network adapter, as quick workaround/test could you try adding to local_vars:
then |
Done. Prior to reboot,
Right after reboot, ssh connections where being dropped (the very moment after typing in a correct password) which is behavior I'd not seen before. Quite strange. Likewise when attempting to ssh in as root, it was a bit similar...but with this twist:
In any case, a couple minutes later, ssh logins started to work again properly. Finally, iiab-diagnostics was run, and its output is: http://sprunge.us/axrXFI?bash |
Thanks, looks like on Mint we are good to go..
|
Great. Uncomment line 59 of roles/network/tasks/sysd-netd-debian.yml so this can be merged? (Any test scenarios we should emphasize after this is merged?) |
I was going to leave that for the next while as a placekeeper, as greater detail can be gathered on simple single interface machines, helps to promote learning of how networkd-dispatcher transitions between the 'states'. |
Fixes bug:
With NetworkManager active, systemd-networkd/networkd-dispatcher are used for br0/ap0 support but the hooks were not being installed on the first pass through network as systemd_networkd_active was not detected when ansibled stated.
Description of changes proposed in this pull request:
Move 'hooks' to their respective backends
Smoke-tested on which OS or OS's:
RasPiOS