Bug 1379106 - AttributeError: 'NoneType' object has no attribute 'format'
Summary: AttributeError: 'NoneType' object has no attribute 'format'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b6cef6756aa93aee10e850ee18b...
: 1392244 (view as bug list)
Depends On:
Blocks: F25FinalFreezeException
TreeView+ depends on / blocked
 
Reported: 2016-09-25 01:23 UTC by Neal Gompa
Modified: 2017-04-30 19:08 UTC (History)
15 users (show)

Fixed In Version: anaconda-25.20.9-1.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-19 06:03:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (1.56 MB, text/plain)
2016-09-25 01:23 UTC, Neal Gompa
no flags Details
File: anaconda.log (110.13 KB, text/plain)
2016-09-25 01:23 UTC, Neal Gompa
no flags Details
File: environ (510 bytes, text/plain)
2016-09-25 01:23 UTC, Neal Gompa
no flags Details
File: journalctl (1011.69 KB, text/plain)
2016-09-25 01:23 UTC, Neal Gompa
no flags Details
File: lsblk_output (1.65 KB, text/plain)
2016-09-25 01:23 UTC, Neal Gompa
no flags Details
File: nmcli_dev_list (1.20 KB, text/plain)
2016-09-25 01:23 UTC, Neal Gompa
no flags Details
File: os_info (449 bytes, text/plain)
2016-09-25 01:23 UTC, Neal Gompa
no flags Details
File: program.log (105.18 KB, text/plain)
2016-09-25 01:23 UTC, Neal Gompa
no flags Details
File: storage.log (297.26 KB, text/plain)
2016-09-25 01:23 UTC, Neal Gompa
no flags Details
File: ifcfg.log (4.12 KB, text/plain)
2016-09-25 01:23 UTC, Neal Gompa
no flags Details
Errors naconda (318.64 KB, text/plain)
2016-11-06 18:33 UTC, Fomalhaut
no flags Details
Log-files created when building livecd utility livemedia-creator. (422.79 KB, application/x-xz)
2016-11-06 18:35 UTC, Fomalhaut
no flags Details
kickstart fed to livemedia-creator by Neal Gompa (15.15 KB, text/plain)
2016-11-08 17:30 UTC, Adam Williamson
no flags Details
/etc/sysconfig/anaconda file generated inside Neal's live image (269 bytes, text/plain)
2016-11-08 17:39 UTC, Adam Williamson
no flags Details

Description Neal Gompa 2016-09-25 01:23:35 UTC
Description of problem:
I launched Anaconda and clicked "Continue" (it selected the correct language and keyboard settings).

Version-Release number of selected component:
anaconda-core-25.20.3-1.fc25.x86_64

The following was filed automatically by anaconda:
anaconda 25.20.3-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python3.5/site-packages/pyanaconda/ui/lib/space.py", line 78, in check
    dev_required_size = self.payload.requiredDeviceSize(self.storage.root_device.format)
  File "/usr/lib64/python3.5/site-packages/pyanaconda/ui/gui/hubs/__init__.py", line 240, in _updateContinue
    if self._checker and not self._checker.check():
  File "/usr/lib64/python3.5/site-packages/pyanaconda/ui/gui/hubs/__init__.py", line 214, in _createBox
    self._updateContinue()
  File "/usr/lib64/python3.5/site-packages/pyanaconda/ui/gui/hubs/__init__.py", line 353, in refresh
    self._createBox()
  File "/usr/lib64/python3.5/site-packages/pyanaconda/ui/gui/__init__.py", line 1019, in _on_continue_clicked
    nextAction.refresh()
AttributeError: 'NoneType' object has no attribute 'format'

Additional info:
addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img root=live:CDLABEL=PantheonOS-F25 rd.live.image quiet
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.8.0-0.rc7.git0.1.fc25.x86_64
other involved packages: anaconda-gui-25.20.3-1.fc25.x86_64
product:        Fedora
release:        Fedora release 25 (Twenty Five)
type:           anaconda
version:        25

Comment 1 Neal Gompa 2016-09-25 01:23:42 UTC
Created attachment 1204472 [details]
File: anaconda-tb

Comment 2 Neal Gompa 2016-09-25 01:23:43 UTC
Created attachment 1204473 [details]
File: anaconda.log

Comment 3 Neal Gompa 2016-09-25 01:23:44 UTC
Created attachment 1204474 [details]
File: environ

Comment 4 Neal Gompa 2016-09-25 01:23:48 UTC
Created attachment 1204475 [details]
File: journalctl

Comment 5 Neal Gompa 2016-09-25 01:23:49 UTC
Created attachment 1204476 [details]
File: lsblk_output

Comment 6 Neal Gompa 2016-09-25 01:23:50 UTC
Created attachment 1204477 [details]
File: nmcli_dev_list

Comment 7 Neal Gompa 2016-09-25 01:23:51 UTC
Created attachment 1204478 [details]
File: os_info

Comment 8 Neal Gompa 2016-09-25 01:23:52 UTC
Created attachment 1204479 [details]
File: program.log

Comment 9 Neal Gompa 2016-09-25 01:23:54 UTC
Created attachment 1204480 [details]
File: storage.log

Comment 10 Neal Gompa 2016-09-25 01:23:56 UTC
Created attachment 1204481 [details]
File: ifcfg.log

Comment 11 Scott Dowdle 2016-10-18 19:21:24 UTC
I have this problem too on the Fedora 25 beta-based remix I build with livemedia-creator.  The image build and is bootable but running anaconda, it crashes with the error of this but report.  This error seems to have been introduced in the anaconda-25.20.5-1.fc25.x86_64 update (or a related package associated with that update) as I did not have this issue prior to the update.

I get the error when using KVM VMs to test installs... either with a disk image that has pre-existing partition table w/partitions, or with a completely new disk image that is unpartitioned.

Comment 12 Scott Dowdle 2016-10-19 18:05:53 UTC
I would assume this issue would affect all Fedora 25 respin and remix makers... and maybe any official Fedora 25 live media built after the anaconda update.

Comment 13 Scott Dowdle 2016-10-28 20:36:25 UTC
Seems if I use 25.20.5-1, it works... but if I use 25.20.4-1... bam... it this error happens right after picking the language and keyboard (step one).  I assume it is probing the disks or something when it happens.

Comment 14 Fomalhaut 2016-11-06 18:27:25 UTC
*** Bug 1392244 has been marked as a duplicate of this bug. ***

Comment 15 Fomalhaut 2016-11-06 18:32:03 UTC
Attempting to install "Fedora 25beta" builded livemedia-creator utility.
he LiveCD, collected from the same-the kickstart file, but the utility of live-cd creator works without problems.

Comment 16 Fomalhaut 2016-11-06 18:33:20 UTC
Created attachment 1217807 [details]
Errors naconda

Comment 17 Fomalhaut 2016-11-06 18:35:10 UTC
Created attachment 1217808 [details]
Log-files created when building livecd utility livemedia-creator.

Comment 18 Neal Gompa 2016-11-07 11:14:55 UTC
This is still occurring for me with Anaconda 25.20.6-1. It hasn't stopped being a problem for me.

Comment 19 Fedora Blocker Bugs Application 2016-11-07 13:30:00 UTC
Proposed as a Freeze Exception for 25-final by Fedora user ngompa using the blocker tracking app because:

 It is not possible to create remixes or respins of Fedora 25 that use Anaconda as the installer because this bug causes the installer to crash with the traceback error right after selecting the language.

Comment 20 Martin Kolman 2016-11-08 13:08:31 UTC
Fix posted for review:
https://github.com/rhinstaller/anaconda/pull/864

Comment 21 Jiri Konecny 2016-11-08 15:52:40 UTC
It will be nice to fix this in Fedora 25 because it could cause other issues in spins. 
The problem here is that when the live image is created with something else than automatic kickstart installation it will miss some spokes and they can be mandatory for the installation, like StorageSpoke. The same is true for dir install.

Comment 22 Adam Williamson 2016-11-08 16:18:28 UTC
+1 FE for me, it's best to have this working with the release tree.

Comment 23 Kevin Fenzi 2016-11-08 16:20:41 UTC
+1 FE

Comment 24 Matthew Miller 2016-11-08 16:31:30 UTC
I'm +1 to the FE, although with the big note that it's really _better_ to create live images or respins with kickstarts rather than in interactive mode.

Comment 25 Adam Williamson 2016-11-08 16:37:14 UTC
OK, so it seems like this is being triggered by people running livemedia-creator and actually *interacting with the installer* as it creates the live image. I think that's kind of unintended usage, and would weaken my +1, but there is also this:

<mkolman> this [config file] is aimed at tools running before anaconda being able to tell it that some screen don't have to be shown
<mkolman> but no tools are using this mechanism just yet
<mkolman> but Gnome Initial Setup will probably be picking up support soon (F26)
<adamw> so even if we completely fail to write the file it shouldn't cause any practical consequences for f25?
<mkolman> so that should be it :)
<mkolman> exactly

so basically, since the fix could only possibly have any significant consequences if flags.flags.imageInstall or flags.flags.dirInstall didn't exist at all (which I don't *think* is possible), I can still be +1.

Can Neal or Fomalhaut or Scott confirm our understanding of what they did? Did you actually interact with the installer run by livemedia-creator ?

Comment 26 Neal Gompa 2016-11-08 17:14:42 UTC
Adam:

I did not do anything with the installer. It ran fully automated via the kickstart passed into livemedia-creator.

This bug occurs with kickstart-based creation for me. Always has. I didn't even know you could build it interactively...

Comment 27 Neal Gompa 2016-11-08 17:16:09 UTC
Ah, it just occurred to me that the misinterpretation is with my FE proposal comment. I mean that the ISO built by livemedia-creator will not be installable with Anaconda, not that I'm interactively creating the ISO with Anaconda.

Comment 28 Adam Williamson 2016-11-08 17:30:45 UTC
Created attachment 1218637 [details]
kickstart fed to livemedia-creator by Neal Gompa

Comment 29 Scott Dowdle 2016-11-08 17:32:16 UTC
I too build a remix with a kickstart file.  There is one point during the build (and it uses anaconda to do the build) where it seems to just sit there for a long time... and looking at top, I don't see anything going on... so I hit return/enter and see a message something like "anaconda is done, hit enter to quit" (sorry I don't the exact message handy).  After hitting return, it seems to start doing stuff again.

It could be I just imagined that and that hitting return actually does nothing (other than print that message)... OR maybe that is why it thinks it is "interactive"?  I'm not sure.

Comment 30 Adam Williamson 2016-11-08 17:39:18 UTC
Created attachment 1218638 [details]
/etc/sysconfig/anaconda file generated inside Neal's live image

This is the /etc/sysconfig/anaconda that wound up in Neal's live image. He says that the livemedia-creator anaconda ran fully non-interactively, yet it seems it decided to write out this file anyhow.

I've just checked an official Fedora live image, the 2016-11-07 KDE nightly live, and it does have a /etc/sysconfig/anaconda , but the contents are only:

# This file has been generated by the Anaconda Installer 25.20.5-1

[ProgressSpoke]
visited = 1

So there must be some difference which causes the file to list many more spokes as 'visited' for Neal and the other reporters, but it seems that it's not the reason Martin thought it was (the person building the live image interacting with anaconda directly).

Martin's fix would probably still work to fix this case, but I figure it's worth noting the issue may not be exactly what we thought it was.

Comment 31 Adam Williamson 2016-11-08 17:40:37 UTC
One thought on Martin's fix: what about livemedia-creator's virt mode? In that mode, is it still doing an image or directory install?

Comment 32 Adam Williamson 2016-11-08 17:43:06 UTC
Scott: you need a 'shutdown' directive in the kickstart.

Comment 33 Adam Williamson 2016-11-08 18:27:05 UTC
OK, so we have a new theory here!

Here is what we now think is happening, from the very beginning. Say I'm a person who wants to build my own live image, and I do this:

1. Interactively install Fedora 25 to the system on which I will run the live image build
2. Boot to the installed Fedora 25, set up the environment for building a live image - install livemedia-creator and so on
3. Run the live image build directly from the Fedora 25 system - not in a mock root, as official live images are built - and with --no-virt

Because the initial install to the host system (step 1) was interactive, the host system will have a /etc/sysconfig/anaconda . And if you then run livemedia-creator --no-virt directly from that system, rather than in a mock chroot, the anaconda process that's run to create the live image will actually *read in that /etc/sysconfig/anaconda* at the start. It reads it into a ConfigParser instance. At the end of install, it then writes the contents of that ConfigParser instance back out to the install sysroot.

So it's not that the livemedia-creator anaconda process is marking spokes visited as it goes along - it isn't. Rather, it's effectively 'passing through' the visited spokes information *from the system on which livemedia-creator is running*.

This doesn't affect our official live image builds because we run them in a mock chroot, which won't have a /etc/sysconfig/anaconda. (It's really, really a good idea to do this anyway if you want to use --no-virt, but this is still a bug). It's affecting the reporters because they're running lmc directly on Fedora 25 systems, not in a mock chroot.

If we're right this time, there's an easy workaround for this: before running your `livemedia-creator --no-virt` command, run `rm -f /etc/sysconfig/anaconda`.

Comment 34 Scott Dowdle 2016-11-08 19:06:56 UTC
Thanks Adam (who doesn't like computers anymore).  I'll give that a try.  I'll add a shutdown and I'll remove /etc/sysconfig/anaconda from my build host.  Waiting for my rsync of the F25 repos to finish first.  Will let you know if I can duplicate your findings.

This page doesn't mention mock but yeah, I'm sure the livemedia-creator man page does:
https://fedoraproject.org/wiki/Livemedia-creator-_How_to_create_and_use_a_Live_CD

Comment 35 Scott Dowdle 2016-11-08 19:09:21 UTC
Hmm, I wonder if any other artifacts from the host pollute the build when not run inside of mock?

Comment 36 Adam Williamson 2016-11-08 19:11:17 UTC
So the background is that bcl really designed livemedia-creator to use a VM for the install process. The --no-virt mode had to be added because the VM approach just is not compatible with how Koji works, so it was added and Koji was built to use --no-virt in a mock chroot.

I think bcl still believes the VM mode is the 'most correct' way to use lmc, but my pragmatic view is that the best way to use the tool is however we use it to build the official live images, because that's the method that's going to get the most testing and that we're going to care about the most if it breaks. So I recommend running it the way Koji does: with --no-virt , in a mock chroot.

That page has been kinda haphazardly edited by various people over time, so I'm not sure it exactly reflects any 'official' guidance at this point :) If I get time maybe I'll try and collaborate with bcl and releng to revise it a bit.

And yes, it is entirely possible that there may be other cases of host environment pollution like this that we haven't spotted yet, which is an excellent reason to use a mock chroot like koji does.

I keep meaning to write a helper for this - currently when I have to build a live image I just do all the mock setup manually, which is a drag - but never have the time.

Comment 37 Scott Dowdle 2016-11-08 20:33:21 UTC
Now my build is failing each run claiming that a package is missing.  What package it says is missing seems to be fairly random and oddly they are packages I'm not even asking for.  Every run seems to pick a different package it fails on.  Here's an example from my anaconda.log:

- - - - -

13:27:07,322 WARN anaconda: /usr/lib/python3.5/site-packages/dnf/base.py:1280: DeprecationWarning: group_install() expects group id                        instead of Comps object.
  dnf.logging.depr(msg)

13:27:09,735 ERR anaconda: You have specified that the package 'file-roller-nautilus' should be installed.  This package does not exist.  Would you like to ignore this package and continue with installation?
1

- - - - -

I assume this is what happens when I successfully got past the problem removing /etc/sysconfig/anaconda from the host fixed.

Oddly, this used to work.  Now I'm completely lost.

Comment 38 Martin Kolman 2016-11-08 20:50:42 UTC
I've update the PR[0] to also don't read the user interaction config from the host during image and directory installs, for obvious reasons.

[0] https://github.com/rhinstaller/anaconda/pull/864

Comment 39 Scott Dowdle 2016-11-08 21:21:28 UTC
Just to be clear, my package list is generated from the build system's package list... so it is complete and there shouldn't be any undeclared dependencies.  What I do is get the build host (a VM, so I don't want to do a nested VM for the build) installed with the exact set of packages I want, and then I generate a package list from the host for my kickstart using the following command on the host:

rpm -qa --qf "%{n}\n" | grep -v pubkey | sort > package-list.txt

Then I embed package-list.txt into my kickstart (since, unlike livecd-creator, livemedia-creator doesn't do %includes).  Every once in a while a package I have installed on the host (that is in my package-list.txt and the kickstart) gets removed from the repos.  I remove that package from the host, generate a new package list, and then embed it into my kickstart.  I always hated not knowing what packages might get sucked in so I've been doing this "complete package list" for several releases now.  Anyway...

Why it is trying to pull in random packages I'm not even asking for (and that aren't being resolved as dependencies) I have no idea.  ARGH.  It fails on different package each time even though nothing is changing in my kickstart.  It wasn't doing that until today.

I'm guessing no one else can duplicate this issue, huh?

Comment 40 Adam Williamson 2016-11-08 21:31:11 UTC
I don't know, but it's clearly outside the scope of this bug, so could you perhaps discuss it elsewhere? Thanks.

Comment 41 Scott Dowdle 2016-11-08 23:49:34 UTC
It was related to me doing a build (and failing) so I could test the hypothesis but your point is well taken.  Luckily it is building on another host so hopefully I can actually test RSN.

Comment 42 Scott Dowdle 2016-11-09 02:58:32 UTC
Finally got it built and it isn't dying at that step anymore.  That is after removing /etc/sysconfig/anaconda on the build host.

Comment 43 Neal Gompa 2016-11-09 11:07:58 UTC
Likewise, getting rid of /etc/sysconfig/anaconda (I renamed it to anaconda.bkp in my case) fixed the issue for me.

Comment 44 Adam Williamson 2016-11-14 19:42:48 UTC
Discussed at 2016-11-14 freeze exception review meeting: https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2016-11-14/f25-blocker-review.2016-11-14-17.00.html . Accepted as a freeze exception issue on the grounds that making it easy for respin folks to build respins OOTB is useful, and the change really shouldn't be able to break anything else.

Comment 45 Fedora Update System 2016-12-14 18:43:54 UTC
anaconda-25.20.9-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-69bb5a1d7c

Comment 46 Ben Williams 2016-12-15 15:06:00 UTC
Similar problem has been detected:

installing updated F25 iso created with livemedia-creator using the updated lvm2 packages from testing 

addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img root=live:CDLABEL=F25-MATE rd.live.image quiet
hashmarkername: anaconda
kernel:         4.8.13-300.fc25.x86_64
other involved packages: anaconda-gui-25.20.8-1.fc25.x86_64
package:        anaconda-core-25.20.8-1.fc25.x86_64
packaging.log:  
product:        Fedora
reason:         AttributeError: 'NoneType' object has no attribute 'format'
release:        Fedora release 25 (Twenty Five)
version:        25

Comment 47 Adam Williamson 2016-12-15 15:12:42 UTC
test and karma https://bodhi.fedoraproject.org/updates/FEDORA-2016-69bb5a1d7c , please :)

Comment 48 Ben Williams 2016-12-15 15:52:03 UTC
Similar problem has been detected:

installing updated iso created with LMC using the lvm2 and anaconda from testing 

addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img root=live:CDLABEL=F25-MATE rd.live.image quiet
hashmarkername: anaconda
kernel:         4.8.13-300.fc25.x86_64
other involved packages: anaconda-gui-25.20.9-1.fc25.x86_64
package:        anaconda-core-25.20.9-1.fc25.x86_64
packaging.log:  
product:        Fedora
reason:         AttributeError: 'NoneType' object has no attribute 'format'
release:        Fedora release 25 (Twenty Five)
version:        25

Comment 49 Ben Williams 2016-12-15 19:14:00 UTC
(In reply to Ben Williams from comment #48)
> Similar problem has been detected:
> 
> installing updated iso created with LMC using the lvm2 and anaconda from
> testing 
> 
> addons:         com_redhat_kdump
> cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst
> --method=livecd:///dev/mapper/live-base
> cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img
> root=live:CDLABEL=F25-MATE rd.live.image quiet
> hashmarkername: anaconda
> kernel:         4.8.13-300.fc25.x86_64
> other involved packages: anaconda-gui-25.20.9-1.fc25.x86_64
> package:        anaconda-core-25.20.9-1.fc25.x86_64
> packaging.log:  
> product:        Fedora
> reason:         AttributeError: 'NoneType' object has no attribute 'format'
> release:        Fedora release 25 (Twenty Five)
> version:        25

nm anaconda worked was misconfig on my part new anaconda fix my issue

Comment 50 Fedora Update System 2016-12-16 05:32:14 UTC
anaconda-25.20.9-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-69bb5a1d7c

Comment 51 Fedora Update System 2016-12-19 06:03:03 UTC
anaconda-25.20.9-1.fc25 has been pushed to the Fedora 25 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.