Bug 1703152 - initial-setup fails with no network - AttributeError: 'NoneType' object has no attribute 'upper'
Summary: initial-setup fails with no network - AttributeError: 'NoneType' object has n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: initial-setup
Version: 30
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Kolman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedFreezeException
Depends On:
Blocks: F30FinalBlocker F30FinalFreezeException
TreeView+ depends on / blocked
 
Reported: 2019-04-25 16:08 UTC by Paul Whalen
Modified: 2019-04-26 22:33 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-26 22:33:23 UTC
Type: Bug


Attachments (Terms of Use)

Description Paul Whalen 2019-04-25 16:08:33 UTC
Description of problem:
Initial-setup fails on some hardware when there is no network connected. 

Version-Release number of selected component (if applicable):
initial-setup-0.3.69-1.fc30.aarch64
anaconda-tui-30.25.6-1.fc30

How reproducible:
Everytime

Steps to Reproduce:
1. Boot a Pine 64 Plus with no network
2. Initial-setup fails

Actual results:

Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]: Traceback (most recent call last):
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:   File "/usr/lib/python3.7/site-packages/pydbus/registration.py", line 82, in call_method
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:     result = method(*parameters, **kwargs)
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:   File "/usr/lib64/python3.7/site-packages/pyanaconda/modules/network/network_interface.py", line 139>
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:     self.implementation.create_device_configurations()
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:   File "/usr/lib64/python3.7/site-packages/pyanaconda/modules/network/network.py", line 378, in creat>
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:     self._device_configurations.reload()
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:   File "/usr/lib64/python3.7/site-packages/pyanaconda/modules/network/device_configuration.py", line >
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:     self.add_connection(connection)
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:   File "/usr/lib64/python3.7/site-packages/pyanaconda/modules/network/device_configuration.py", line >
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:     should_add, reason = self._should_add_connection(connection)
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:   File "/usr/lib64/python3.7/site-packages/pyanaconda/modules/network/device_configuration.py", line >
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:     iface = get_iface_from_connection(self.nm_client, uuid)
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:   File "/usr/lib64/python3.7/site-packages/pyanaconda/modules/network/nm_client.py", line 50, in get_>
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:     iface = get_iface_from_hwaddr(nm_client, mac)
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:   File "/usr/lib64/python3.7/site-packages/pyanaconda/modules/network/nm_client.py", line 66, in get_>
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]:     if address.upper() == hwaddr.upper():
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]: AttributeError: 'NoneType' object has no attribute 'upper'
Apr 12 15:19:02 localhost.localdomain org.fedoraproject.Anaconda.Modules.Network[1258]: INFO:pydbus.registration:name is not registered
Apr 12 15:19:02 localhost.localdomain initial-setup[1049]: Initial Setup crashed due to unhandled exception:
                                                           Traceback (most recent call last):
                                                             File "/usr/libexec/initial-setup/initial-setup-text", line 10, in <module>
                                                               is_instance.run()
                                                             File "/usr/lib/python3.7/site-packages/initial_setup/__init__.py", line 342, in run
                                                               self._initialize_network()
                                                             File "/usr/lib/python3.7/site-packages/initial_setup/__init__.py", line 249, in _initialize_network
                                                               network_proxy.CreateDeviceConfigurations()
                                                             File "/usr/lib/python3.7/site-packages/pydbus/proxy_method.py", line 102, in __call__
                                                               raise error
                                                           pyanaconda.modules.common.errors.DBusError: 'NoneType' object has no attribute 'upper'

Expected results:
No crash

Additional info:

Same error in anaconda when attempting an installation in beaker - https://bugzilla.redhat.com/show_bug.cgi?id=1699091

Comment 1 Paul Whalen 2019-04-25 16:11:36 UTC
Nominating for dicussion as a possible blocker for F30 final.

Comment 2 Adam Williamson 2019-04-25 16:49:04 UTC
Seems this would happen if device.get_hw_address or device.get_permanent_hw_address returned None. The code that actually crashes here has not changed since Feb 2018, but the path we reach it on - specifically the call to network_proxy.CreateDeviceConfigurations() - was added in initial-setup 0.3.67 in March 2019, as part of the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1685992 , an earlier blocker in this cycle.

anaconda itself also calls CreateDeviceConfigurations during network init, so in theory it could hit this too. I do wonder if something anaconda does *before* that filters out devices which would trigger this, but initial-setup doesn't do the same. I don't see anything *obvious* that does that, but there's some non-obvious stuff in there...

Comment 3 Adam Williamson 2019-04-25 17:02:05 UTC
The obvious fix here is very simple, btw, it's just:

-if address.upper() == hwaddr.upper():
+if address and address.upper() == hwaddr.upper():

but the more important question for right now is "why is this happening and how often is it likely to happen", since we need to know if we can ship RC1. That's what I'm trying to figure out.

Comment 4 Fedora Update System 2019-04-25 19:25:47 UTC
anaconda-30.25.6-2.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7184d9d0c0

Comment 5 Ben Cotton 2019-04-25 20:59:21 UTC
Discussed in the Fedora 30 Go/No-Go meeting blocker review:
https://meetbot.fedoraproject.org/fedora-meeting-1/2019-04-25/f30-final-go_no_go-meeting.2019-04-25-17.01.log.html#l-562

This appears to hit a narrow case, but can't be fixed in an update. We defer a decision on blocker status

Comment 6 Julen Landa Alustiza 2019-04-26 10:25:58 UTC
initial-setup works on kde with 30-1.2 x86_64

Comment 7 Lukas Brabec 2019-04-26 10:56:46 UTC
I don't have Pine 64 Plus, but on Raspberry Pi 3 the initial-setup works both with and without ethernet cable connected on images Fedora-{Minimal,Xfce}-armhfp-30-1.2

Comment 8 David Yaffe 2019-04-26 17:15:12 UTC
I hit this when trying to do a netinstall of F30 on my 2013 Macbook Pro, as there is no physical ethernet interface on the system, and the wireless card was not detected. I resolved the problem using a Wi-Pi usb adapter to get the install going.

I can redownload the latest image and retest if required.

Comment 9 Fedora Update System 2019-04-26 22:33:23 UTC
anaconda-30.25.6-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.