photon icon indicating copy to clipboard operation
photon copied to clipboard

photon os 4.0 loses static ip after update 5-10 .61-5 .ph4-esx to 5.10.78-4.ph4-esx

Open IgnacioProcisa opened this issue 4 years ago • 8 comments

Hello, today I have updated photon 0s 4 from version 5-10 .61-5 .ph4-esx, having three security notifications.

My MVs have two network adapters, eth0 with static ip and eth1 with dynamic ip. Running smoothly. Prep versión partida1 Post versión post Operational & securityinfo Previo_LI Post update Networkctl status post_LI Static IP configured and not modify configuracionred_LI

After installing the updates, the eth0 adapter does not have the ip that is configured manually, doing an ip or an ifconfig the adapter appears without IP. If we do a networkctl, it tells me that the adapter is degraded and configuring. Checking in other VMs without updating the status is routable and configured.

I can only get ip again using a DHCP for the eth0 adapter.

What has happened?

IgnacioProcisa avatar Dec 10 '21 13:12 IgnacioProcisa

Can you attach Networkd logs from journal ? It seems these IP is dropped by kernel. Does restart Networkd restores your ip ?

ssahani avatar Dec 10 '21 16:12 ssahani

Same issue here at a freshly installed Photon OS with ISO "photon-4.0-ca7c9e933.iso". After updating with tdnf update and a reboot, eth0 didn't use the configured Static IP. A restart of systemd-networkd didn't solve the problem. I've managed to solve the issue with deleting the file /etc/systemd/network/99-dhcp-en.network

Here are some screenshot while it was not working:

networkd log from journal image

networkctl status 2 image

/etc/systemd/network/99-static-en.network image

Z3nto avatar Dec 30 '21 10:12 Z3nto

Thanks for the data. If you see eth0 configured on 99-dhcp-en.network networkctl status 2

you need to rename 99-static-en.network file to 10-static-en.network` like that. Note that all configuration files are collectively sorted and processed in lexical order.

ssahani avatar Jan 03 '22 08:01 ssahani

i have had the same issue on CBL Mariner.

the error was that the config file needs to be readable by group systemd-network

terefang avatar Mar 16 '22 08:03 terefang

Same issue on a fresh install of 4.0 Rev2 from ISO (photon-minimal-4.0-c001795b8): after tdnf upgrade/tdnf distro-sync, /etc/systemd/network/99-dhcp-en.network is added alongside the existing /etc/systemd/network/99-static-en.network (which contains the manual IP configuration set up during installation), overriding the static configuration which breaks networking on a DHCP-less network.

Please use a higher priority for the installer-generated static network file, so it doesn't get overridden by the 99-dhcp catch-all.

LaXiS96 avatar Feb 02 '23 15:02 LaXiS96

Thanks for the data. If you see eth0 configured on 99-dhcp-en.network networkctl status 2

you need to rename 99-static-en.network file to 10-static-en.network` like that. Note that all configuration files are collectively sorted and processed in lexical order.

thank you, this fixed my issue after doing an update.

root@...[ ~ ]# tdnf -y install systemd (updated to systemd.x86_64.247.13-2.ph4) (a library update should not cause a network disconnect)

joel72265 avatar Feb 16 '23 12:02 joel72265

Hi @joel72265 , I think renaming 99-static-en.network file to 10-static-en.network itself should solve your issue. Could you share from which version of systemd you upgraded it to 247.13-2?

tapakund avatar Feb 16 '23 13:02 tapakund

Hi @tapakund, here are the steps I followed

VMware Photon OS 4.0 build 2f5aad892 root@ [ ~ ]# ping 8.8.8.8 (can ping) root@ [ ~ ]# ping 192.xxx.xxx.xxx (can ping LAN) root@ [ ~ ]# tdnf list systemd systemd.x86_64 247.10-6.ph4 @System root@ [ ~ ]# ls /etc/systemd/network 99-static-en.network root@ [ ~ ]# tdnf -y install systemd root@ [ ~ ]# systemctl restart systemd-networkd root@ [ ~ ]# tdnf list systemd systemd.x86_64 247.13-2.ph4 @System root@ [ ~ ]# ping 8.8.8.8 (can ping) root@ [ ~ ]# ping 192.xxx.xxx.xxx (cannot ping from LAN, cannot ping, SSH to Photon) root@ [ ~ ]# ls /etc/systemd/network 99-static-en.network 99-dhcp-en.network root@ [ ~ ]# rm /etc/systemd/network/99-dhcp-en.network root@ [ ~ ]# systemctl restart systemd-networkd root@ [ ~ ]# ping 8.8.8.8 (can ping) root@ [ ~ ]# ping 192.xxx.xxx.xxx (can ping LAN)

joel72265 avatar Feb 21 '23 12:02 joel72265