Bug 949341 - UnboundLocalError: local variable 'h' referenced before assignment (anaconda crashes leaving the network spoke after creating a fake infiniband bond element)
Summary: UnboundLocalError: local variable 'h' referenced before assignment (anaconda ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 19
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Radek Vykydal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-07 21:47 UTC by Reartes Guillermo
Modified: 2013-04-30 04:37 UTC (History)
7 users (show)

Fixed In Version: anaconda-19.21-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-30 04:37:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
anaconda-tb-xxx file (225.76 KB, text/plain)
2013-04-07 21:47 UTC, Reartes Guillermo
no flags Details
anaconda.log (1.91 KB, text/plain)
2013-04-07 21:47 UTC, Reartes Guillermo
no flags Details
program.log (19.89 KB, text/plain)
2013-04-07 21:48 UTC, Reartes Guillermo
no flags Details
storage.log (85.74 KB, text/plain)
2013-04-07 21:48 UTC, Reartes Guillermo
no flags Details
ifcfg log (1.15 KB, text/plain)
2013-04-07 21:49 UTC, Reartes Guillermo
no flags Details

Description Reartes Guillermo 2013-04-07 21:47:05 UTC
Created attachment 732452 [details]
anaconda-tb-xxx file

Description of problem:

I created a kvm guest without network cards of any type.

It is possible to crash anaconda by creating a fake infiniband device in the Network Spoke.

Since it does not happen by default and it is something one has to intentionally do, i have set the severity to low. 

Version-Release number of selected component (if applicable):
F19a TC5 (19.16-1)

How reproducible:
always


Steps to Reproduce:

0. Leave defaults in the Welcome Screen, Accept Fate.
1. One enters automatically the Network Configuration Spoke.
2. There are no network cards, that is correct since the guest has none.
3. Click '+' to add a Network, Select 'Bond' and 'Add'
4. In the 'Editing Bond connection 1', click 'Add' to add 'Bonded connections.
5. In 'Choose Connection Type' select 'Infiniband' and click 'Create'.
6. In 'Editing bonf0 slave1' dialog, just press 'Save...' (don't do anything).
7. In 'Editing Bond connection 1' dialog, now press 'Save...' (now is not grayed out).
8. The 'Bond(bond0)' "network" is now visible in the Network Configuration Spoke.
9. Press 'continue' to reach the Main Hub, Anaconda crashes.

Actual results:
anaconda crashes instead of rejecting the network configuration.

Expected results:
no crash but the network configuration should have been rejected.

Additional info:

anaconda 19.16-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 566, in get_bond_slaves_from_ifcfgs
    if h.upper() == hwaddr.upper():
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 505, in kickstartNetworkData
    slaves = get_bond_slaves_from_ifcfgs([ifcfg.iface, ifcfg.get("UUID")])
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/network.py", line 1331, in getKSNetworkData
    retval = network.kickstartNetworkData(ifcfg=device_cfg)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/network.py", line 1254, in apply
    network_data = getKSNetworkData(dev)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/__init__.py", line 67, in _on_continue_clicked
    self.apply()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/network.py", line 1296, in _on_continue_clicked
    StandaloneSpoke._on_continue_clicked(self, cb)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/__init__.py", line 72, in <lambda>
    self.window.connect("continue-clicked", lambda *args: self._on_continue_clicked(cb))
UnboundLocalError: local variable 'h' referenced before assignment

Comment 1 Reartes Guillermo 2013-04-07 21:47:49 UTC
Created attachment 732453 [details]
anaconda.log

Comment 2 Reartes Guillermo 2013-04-07 21:48:12 UTC
Created attachment 732454 [details]
program.log

Comment 3 Reartes Guillermo 2013-04-07 21:48:43 UTC
Created attachment 732455 [details]
storage.log

Comment 4 Reartes Guillermo 2013-04-07 21:49:04 UTC
Created attachment 732456 [details]
ifcfg log

Comment 5 Fedora Update System 2013-04-23 01:38:24 UTC
anaconda-19.21-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/anaconda-19.21-1.fc19

Comment 6 Fedora Update System 2013-04-23 03:00:24 UTC
Package anaconda-19.21-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-19.21-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-6338/anaconda-19.21-1.fc19
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-04-24 16:37:27 UTC
Package anaconda-19.21-1.fc19, python-meh-0.23-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-19.21-1.fc19 python-meh-0.23-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-6338/python-meh-0.23-1.fc19,anaconda-19.21-1.fc19
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-04-30 04:37:45 UTC
anaconda-19.21-1.fc19, python-meh-0.23-1.fc19 has been pushed to the Fedora 19 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.