Bug 1323012 - AttributeError: '_ped.Partition' object has no attribute 'setName'
Summary: AttributeError: '_ped.Partition' object has no attribute 'setName'
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:418d2f3166bd9131d33bb3a8760...
: 1525712 (view as bug list)
Depends On:
Blocks: F28BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2016-04-01 00:23 UTC by Adam Williamson
Modified: 2018-12-13 17:20 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-08 17:19:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (899.72 KB, text/plain)
2016-04-01 00:23 UTC, Adam Williamson
no flags Details
File: anaconda.log (128.25 KB, text/plain)
2016-04-01 00:23 UTC, Adam Williamson
no flags Details
File: dnf.log (4.55 KB, text/plain)
2016-04-01 00:23 UTC, Adam Williamson
no flags Details
File: environ (459 bytes, text/plain)
2016-04-01 00:23 UTC, Adam Williamson
no flags Details
File: lsblk_output (2.14 KB, text/plain)
2016-04-01 00:23 UTC, Adam Williamson
no flags Details
File: lvm.log (172.81 KB, text/plain)
2016-04-01 00:23 UTC, Adam Williamson
no flags Details
File: nmcli_dev_list (1.18 KB, text/plain)
2016-04-01 00:24 UTC, Adam Williamson
no flags Details
File: os_info (451 bytes, text/plain)
2016-04-01 00:24 UTC, Adam Williamson
no flags Details
File: storage.log (135.61 KB, text/plain)
2016-04-01 00:24 UTC, Adam Williamson
no flags Details
File: syslog (250.59 KB, text/plain)
2016-04-01 00:24 UTC, Adam Williamson
no flags Details
File: ifcfg.log (1.67 KB, text/plain)
2016-04-01 00:24 UTC, Adam Williamson
no flags Details
File: packaging.log (8.10 KB, text/plain)
2016-04-01 00:24 UTC, Adam Williamson
no flags Details
File: program.log (65.42 KB, application/octet-stream)
2016-04-01 00:24 UTC, Adam Williamson
no flags Details

Description Adam Williamson 2016-04-01 00:23:43 UTC
Description of problem:
This crash occurs during creation of /boot/efi partition (I think) when installing a current Rawhide image on UEFI with http://dlehman.fedorapeople.org/updates/1322943.0.img applied to get past #1322943.

Version-Release number of selected component:
anaconda-25.5-1

The following was filed automatically by anaconda:
anaconda 25.5-1 exception report
Traceback (most recent call first):
  File "/tmp/updates/blivet/blivet.py", line 215, in do_it
    ped_partition.setName(dev.format.name)
  File "/tmp/updates/blivet/threads.py", line 45, in run_with_lock
    return m(*args, **kwargs)
  File "/tmp/updates/blivet/osinstall.py", line 1111, in turn_on_filesystems
    storage.do_it(callbacks)
  File "/tmp/updates/pyanaconda/install.py", line 201, in doInstall
    turn_on_filesystems(storage, mount_only=flags.flags.dirInstall, callbacks=callbacks_reg)
  File "/usr/lib64/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/tmp/updates/pyanaconda/threads.py", line 253, in run
    threading.Thread.run(self, *args, **kwargs)
AttributeError: '_ped.Partition' object has no attribute 'setName'

Additional info:
addons:         com_redhat_kdump, com_redhat_docker
cmdline:        /usr/bin/python3  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=/images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Fedora-E-dvd-x86_64-rawh quiet inst.updates=http://dlehman.fedorapeople.org/updates/1322943.0.img
dnf.rpm.log:    Mar 31 23:57:51 INFO --- logging initialized ---
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.6.0-0.rc1.git0.1.fc25.x86_64
product:        Fedora
release:        Cannot get release name.
type:           anaconda
version:        rawhide

Comment 1 Adam Williamson 2016-04-01 00:23:51 UTC
Created attachment 1142421 [details]
File: anaconda-tb

Comment 2 Adam Williamson 2016-04-01 00:23:53 UTC
Created attachment 1142422 [details]
File: anaconda.log

Comment 3 Adam Williamson 2016-04-01 00:23:55 UTC
Created attachment 1142423 [details]
File: dnf.log

Comment 4 Adam Williamson 2016-04-01 00:23:56 UTC
Created attachment 1142424 [details]
File: environ

Comment 5 Adam Williamson 2016-04-01 00:23:57 UTC
Created attachment 1142425 [details]
File: lsblk_output

Comment 6 Adam Williamson 2016-04-01 00:23:59 UTC
Created attachment 1142426 [details]
File: lvm.log

Comment 7 Adam Williamson 2016-04-01 00:24:00 UTC
Created attachment 1142427 [details]
File: nmcli_dev_list

Comment 8 Adam Williamson 2016-04-01 00:24:01 UTC
Created attachment 1142428 [details]
File: os_info

Comment 9 Adam Williamson 2016-04-01 00:24:05 UTC
Created attachment 1142429 [details]
File: storage.log

Comment 10 Adam Williamson 2016-04-01 00:24:07 UTC
Created attachment 1142430 [details]
File: syslog

Comment 11 Adam Williamson 2016-04-01 00:24:08 UTC
Created attachment 1142431 [details]
File: ifcfg.log

Comment 12 Adam Williamson 2016-04-01 00:24:11 UTC
Created attachment 1142432 [details]
File: packaging.log

Comment 13 Adam Williamson 2016-04-01 00:24:12 UTC
Created attachment 1142434 [details]
File: program.log

Comment 14 Adam Williamson 2016-04-01 00:25:44 UTC
See e.g. https://openqa.happyassassin.net/tests/2524 . I ran into this while testing the new feature I'm writing for the openQA scheduler to let you run the openQA test set with an arbitrary updates.img applied for all tests...

Comment 15 Brian Lane 2016-04-01 00:35:08 UTC
Introduced by the PEP8 commit (4e8f941b). Should have only changed blivet names, not pyparted.

Comment 16 David Lehman 2016-04-01 13:17:31 UTC
https://github.com/rhinstaller/blivet/pull/354

Comment 17 Adam Williamson 2016-07-05 23:54:30 UTC
openQA UEFI tests were working fine for a while till https://bugzilla.redhat.com/show_bug.cgi?id=1352680 appeared, so I think we can safely say this one's fixed.

Comment 18 Adam Williamson 2017-12-14 01:35:28 UTC
This one seems to have come back in current Rawhide. Here's a traceback from a failed test with Fedora-Rawhide-20171213.n.0:

anaconda 28.13-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python3.6/site-packages/pyanaconda/storage/osinstall.py", line 1250, in do_it
    ped_partition.setName(dev.format.name)
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/storage/osinstall.py", line 2096, in turn_on_filesystems
    storage.do_it(callbacks)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 438, in run_task
    self._task(*self._task_args, **self._task_kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 472, in start
    self.run_task()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 304, in start
    item.start()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 304, in start
    item.start()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation.py", line 366, in doInstall
    installation_queue.start()
  File "/usr/lib64/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/threading.py", line 288, in run
    threading.Thread.run(self)
AttributeError: '_ped.Partition' object has no attribute 'setName'

Once again, this only happens to UEFI installs, so is related to the EFI boot partitions somehow.

Comment 19 Adam Williamson 2017-12-14 01:37:31 UTC
Proposing as an F28 Beta blocker: this appears to prevent all UEFI installs, and thus clearly violates "When using a dedicated installer image, the installer must be able to complete an installation using the text, graphical and VNC installation interfaces" (which we use as the showstopper catch-all for 'showstoppers' like this) in the case of UEFI installs.

Comment 20 Adam Williamson 2017-12-14 01:42:08 UTC
The relevant code has moved (back?) to anaconda since this bug was originally filed...still trying to figure out what changed here.

Comment 21 Adam Williamson 2017-12-14 01:53:27 UTC
OK, I think I see what happened here. After this was initially fixed in blivet by https://github.com/rhinstaller/blivet/pull/354 , a commit which moved that code somewhere else:

https://github.com/storaged-project/blivet/commit/d3ac10d835e75f15629b26e1f8de743844523843

re-introduced the bug; I guess Samantha was working on it *before* PR #354 landed, so it got left out of that move. The commit does this in blivet/blivet.py:

-                if dev.parted_partition.disk.supportsFeature(parted.DISK_TYPE_PARTITION_NAME):
-                    ped_partition = dev.parted_partition.getPedPartition()
-                    ped_partition.set_name(dev.format.name)
-                    log.info("Setting label on %s to '%s'", dev, dev.format.name)

but this in blivet/osinstall.py:

+                if dev.parted_partition.disk.supportsFeature(parted.DISK_TYPE_PARTITION_NAME):
+                    ped_partition = dev.parted_partition.getPedPartition()
+                    ped_partition.setName(dev.format.name)
+                    log.info("Setting label on %s to '%s'", dev, dev.format.name)

note the change back from 'set_name' to 'setName'.

That commit only landed on the 3.x track, though - it was not landed into the 2.1-devel or 2.2-devel branches. So Fedora 27, which had blivet 2.x, didn't get the bug. Then the code was moved *again*, from blivet to anaconda, and it was the incorrect 'setName' version that got landed into anaconda, not the correct 'set_name' version.

The only thing I don't understand now is why this was apparently working for some weeks while python-blivet-3.0.0-0.1.b1.fc28 was in Rawhide, but never mind.

Comment 22 Adam Williamson 2017-12-19 23:03:30 UTC
https://github.com/rhinstaller/anaconda/pull/1281

Comment 23 Adam Williamson 2017-12-19 23:05:41 UTC
I have also applied this as a downstream patch and done a Rawhide build which should fix the bug:

https://koji.fedoraproject.org/koji/taskinfo?taskID=23800415

however, this is just a temporary measure because all the anaconda devs seem to be away and I'd like to try and beat Rawhide into some kind of shape; it should really be merged upstream and a new version released. The downstream patch could disappear if a new version of anaconda is released without this fix included. So I'll leave the bug open until this is merged upstream, to be sure.

Comment 24 Adam Williamson 2018-01-08 17:19:25 UTC
The fix has been merged and is in current anaconda package build, and UEFI installs on openQA are passing, so let's close this.

Comment 25 Vendula Poncova 2018-12-13 17:20:42 UTC
*** Bug 1525712 has been marked as a duplicate of this bug. ***


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