ManageIQ / manageiq-appliance-build

Scripts to build ManageIQ appliances
Apache License 2.0
10 stars 55 forks source link

Stop using legacy network interface names (eth0) #573

Closed bdunne closed 1 month ago

bdunne commented 1 month ago

It's no longer working for GCE and Azure appliances, they mark the connection as unmanaged and won't allow it to come up. Also, our scripts no longer depend on the interface name in EL9.

net.ifnames=0 reverts to legacy adapter names (eth0) biosdevname does the same for Dell systems and requires a package we don't have installed network-scripts are no longer used by NetworkManager

miq-bot commented 1 month ago

Checked commit https://github.com/bdunne/manageiq-appliance-build/commit/f9c43db554b2644112bb5a9f18e478a6abd3b9ea with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint 0 files checked, 0 offenses detected Everything looks fine. :cookie:

Fryguy commented 1 month ago

Thanks for figuring this out @bdunne

cc @agrare thought you might be interested.

Fryguy commented 1 month ago

LGTM, but would like a second set of eyes. @agrare ?

bdunne commented 1 month ago

I tested removing these kernel args from both Azure and GCP appliances locally and the interfaces came up.

bdunne commented 1 month ago

May also be related to https://github.com/ManageIQ/manageiq/issues/22973

agrare commented 1 month ago

Love it, and great that "doing the right thing" fixes these issues also. We do still assume eth0 in a few places that we'll need to update:

manageiq/app/models/miq_server/environment_management.rb:          eth0 = LinuxAdmin::NetworkInterface.new("eth0")
manageiq-appliance_console/bin/appliance_console:  eth0 = LinuxAdmin::NetworkInterface.new(NETWORK_INTERFACE)
agrare commented 1 month ago

There is one more place in appliance_console with eth0, database replication:

lib/manageiq/appliance_console/database_replication_primary.rb:      self.primary_host      = LinuxAdmin::NetworkInterface.new(NETWORK_INTERFACE).address
lib/manageiq/appliance_console/database_replication_standby.rb:      self.standby_host      = LinuxAdmin::NetworkInterface.new(NETWORK_INTERFACE).address
lib/manageiq/appliance_console/database_replication.rb:    NETWORK_INTERFACE = 'eth0'.freeze

Okay I've updated https://github.com/ManageIQ/manageiq-appliance_console/pull/263 to take care of the database replication issue.

bdunne commented 1 month ago

Ok, I think all related PRs are merged now.