vmware / photon

Minimal Linux container host
https://vmware.github.io/photon
Other
3.03k stars 698 forks source link

Raspberry Pi 4 GA after tdnf update and then reboot networking does not work #1204

Closed zanefounty closed 3 years ago

zanefounty commented 3 years ago

full logs attached root@photon-rpi [ /etc/systemd/scripts ]# tdnf update | - removed Removing: iptables-1.8.7-1.ph4.aarch64 Failed to try-restart ip6tables.service: Unit ip6tables.service not found. | - removed Error(1525) : rpm transaction failed

Noticed that there were two systemd-udev version and followed #1127

root@photon-rpi [ ~ ]# tdnf list | grep systemd-udev systemd-udev.aarch64 247.3-1.ph4 @System systemd-udev.aarch64 247.6-1.ph4 @System

rpm --noscripts -e systemd-udev-247.3-1.ph4.aarch64
tdnf reinstall systemd-udev-247.6-1.ph4 this completed with no errors

after reboot networking stops working

can see active packets on eth0 ifconfig and iptables -L -v arp -a shows ip address to mac mappings for inbound traffic to photon, outbound shows incomplete to both default gw and other hosts on same subnet that working prior to reboot

Have reproduced multiple times tested both photon 4 RC and GA. Reboot before tdnf update does not cause this issue

RP4-PH4-tdnfupdate.txt

dcasota commented 3 years ago

A similar issue has been documented in https://github.com/vmware/photon/issues/1194, see @gorans73 workaround. What's the configuration in /etc/systemd/network before reboot?

ssahani commented 3 years ago

@oliverkurth has a solution for. From initrd the drivers are missing /etc/dracut.conf.d/broadcom.conf add_drivers+="bcm_phy_lib broadcom" root@photon-rpi [ ~ ]#.

oliverkurth commented 3 years ago

You need to call mkinitrd -q /boot/initrd.img-$(uname -r) $(uname -r) after that. Root cause is that these modules are missing in the initrd. Any recreation of the initd, as happens during an upgrade, would break it.

ssahani commented 3 years ago

Thanks @oliverkurth

zanefounty commented 3 years ago

@dcasota i tried both static and dhcp

Confirmed workaround above resolves the issue and can login after reboot and network interface is working correctly

`Creating /boot/initrd.img-5.10.42-3.ph4 Error(1525) : rpm transaction failed root@photon-rpi [ ~ ]# nano /etc/dracut.conf.d/broadcom.conf

--! added add_drivers+="bcm_phy_lib broadcom"

root@photon-rpi [ /etc/dracut.conf.d ]# cat /etc/dracut.conf.d/broadcom.conf add_drivers+="bcm_phy_lib broadcom" root@photon-rpi [ /etc/dracut.conf.d ]# mkinitrd -q /boot/initrd.img-$(uname -r) $(uname -r) Creating /boot/initrd.img-5.10.4-5.ph4 root@photon-rpi [ /etc/dracut.conf.d ]# cat /etc/dracut.conf.d/broadcom.conf add_drivers+="bcm_phy_lib broadcom" root@photon-rpi [ /etc/dracut.conf.d ]# reboot`

dcasota commented 3 years ago

@zanefounty good to know. On a RPi 5.10.42-3.ph4 minimal installation with static ip configured and tdnf update afterwards, I got the following test result.

14 Security notice(s)
Run 'tdnf updateinfo info' to see the details.
root@virtualhere1 [ ~ ]# tdnf updateinfo info

0 updates.
No data available
root@virtualhere1 [ ~ ]# networkctl status eth0
● 2: eth0
                     Link File: /usr/lib/systemd/network/99-default.link
                  Network File: /etc/systemd/network/10-static-en.network
                          Type: ether
                         State: routable (configured)
             Alternative Names: enabcm6e4ei0
                          Path: platform-BCM6E4E:00
                        Driver: bcmgenet
                    HW Address: dc:a6:32:c8:a3:b6 (Raspberry Pi Trading Ltd)
                           MTU: 1500 (min: 68, max: 1500)
                         QDisc: mq
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 5/5
              Auto negotiation: yes
                         Speed: 100Mbps
                        Duplex: full
                          Port: tp
                       Address: 192.168.0.9
                                fe80::dea6:32ff:fec8:a3b6
                       Gateway: 192.168.0.1 (Dell Inc.)
                           DNS: 62.2.24.162
             DHCP6 Client DUID: DUID-EN/Vendor:0000ab11e7b0efbe36719a4c0000

Jul 03 19:47:59 anywhere1 systemd-networkd[466]: eth0: Link UP
Jul 03 19:47:59 anywhere1 systemd-networkd[466]: eth0: Gained carrier
Jul 03 19:47:59 anywhere1 systemd-networkd[466]: eth0: Gained IPv6LL
Jul 03 19:47:59 anywhere1 systemd-networkd[466]: eth0: Link DOWN
Jul 03 19:47:59 anywhere1 systemd-networkd[466]: eth0: Lost carrier
Jul 03 19:47:59 anywhere1 systemd-networkd[466]: eth0: Link UP
Jul 03 19:47:59 anywhere1 systemd-networkd[466]: eth0: Gained carrier
Jul 03 19:48:01 anywhere1 systemd-networkd[466]: eth0: Gained IPv6LL
ssahani commented 3 years ago

fixed by https://github.com/vmware/photon/commit/46eff8a53411c8a56e75f01605b15247f0f62963