Upgrade Alma 8 to Alma 9 leapp preupgrade error

I’m running into an issue with upgrading Alma8.9 to Alma9.
When running the leapp preupgrade, I get the following error:

====> * network_deprecations
Ensures that network configuration doesn’t rely on unsupported settings
Process Process-167:
Traceback (most recent call last):
File “/usr/lib64/python3.6/multiprocessing/process.py”, line 258, in _bootstrap
File “/usr/lib64/python3.6/multiprocessing/process.py”, line 93, in run
self._target(*self._args, **self._kwargs)
File “/usr/lib/python3.6/site-packages/leapp/repository/actor_definition.py”, line 74, in _do_run
actor_instance.run(*args, **kwargs)
File “/usr/lib/python3.6/site-packages/leapp/actors/init.py”, line 289, in run
File “/etc/leapp/repos.d/system_upgrade/el8toel9/actors/networkdeprecations/actor.py”, line 23, in process
File “/etc/leapp/repos.d/system_upgrade/el8toel9/actors/networkdeprecations/libraries/networkdeprecations.py”, line 27, in process
cp = utils.parse_config(open(path, mode=‘r’).read())
File “/etc/leapp/repos.d/system_upgrade/common/libraries/utils.py”, line 33, in parse_config
File “/usr/lib64/python3.6/configparser.py”, line 722, in read_string
self.read_file(sfile, source)
File “/usr/lib64/python3.6/configparser.py”, line 717, in read_file
self._read(f, source)
File “/usr/lib64/python3.6/configparser.py”, line 1079, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: ‘’, line: 2

I don’t think there’s enough of the log to go on here. Might be easier to read if you put in it a preformatted or code block, too.

My guess is it failed trying to evaluate an interface definition in /etc/sysconfig/network-scripts

Have you tried using Elevate instead of leapp directly?

I was following the Elevate documentation

Looks like this might be relevant on that page:

It looks like it’s suggesting that the old /etc/sysconfig/network-scripts files are problematic for EL9 upgrades, which is where your preupgrade failed.

On EL8/EL9, these definitions now live in /etc/NetworkManager/system-connections (with slightly different syntax):


Ref. Chapter 37. NetworkManager connection profiles in keyfile format Red Hat Enterprise Linux 8 | Red Hat Customer Portal

My replies keep removed…

You need to convert the old network scripts to /etc/NetworkManaget/system-connections keyfiles. You can use nmcli to do it. I unfortunately can’t seem to link to the Red Hat docs without getting automatically flagged.

Yes!, that’s exactly what it is. I forgot to reply back. I was able to resolved my issue by adding a section header to /etc/NetworkManager/system-connections/eth0.nmconnection. Ran the sudo leapp preupgrade command again and the issue is gone! I really appreciate your effort in helping me resolve this issue!

1 Like

Awesome! Would you mind marking this solved then so the next person that sees it will find the solution?