Bug 857940

Summary: AttributeError: 'ZIPL' object has no attribute 'storage'
Product: [Fedora] Fedora Reporter: Jan Stodola <jstodola>
Component: anacondaAssignee: David Cantrell <dcantrell>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: anaconda-maint-list, dan, g.kaviyarasu, jonathan, maier, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: s390x   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-16 10:01:44 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 467765    
Description Flags
installation steps
anaconda traceback
proposed patch to fix s390 bootloader setup none

Description Jan Stodola 2012-09-17 10:36:08 EDT
Description of problem:

Installing kernel (237/237)
Performing post-install setup tasks
Performing post-install setup tasks
Installing bootloader
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 87, in run
    threading.Thread.run(self, *args, **kwargs)
  File "/usr/lib64/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 123, in doInstall
    writeBootLoader(storage, payload, instClass)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 2203, in writeBootLoader
  File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 943, in write
  File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 2008, in install
    device = self.storage.devicetree.getDeviceByName(name)
AttributeError: 'ZIPL' object has no attribute 'storage'

Version-Release number of selected component (if applicable):
anaconda 18.8

How reproducible:

Steps to Reproduce:
1. run installation on s390x in text mode
2. proceed through the installation
3. see traceback at the end of the install
Actual results:

Expected results:
installation finishes without traceback
Comment 1 Jan Stodola 2012-09-17 10:37:37 EDT
Created attachment 613693 [details]
installation steps
Comment 6 Steffen Maier 2012-09-19 13:51:56 EDT
Just a quick tought: In comparison to the other bootloaders inheriting from BootLoader such as GRUB or Yaboot, ZIPL seems to be missing a constructor where the storage object is gets passed in:

  class ZIPL(BootLoader):
+     def __init__(self, storage):
+         BootLoader.__init__(self, storage)

However, I don't know if the creators/callers of a ZIPL type object also need to be adapted to pass a storage object to the constructor.
Comment 7 Dan Horák 2012-09-19 14:37:46 EDT
I went with this and it seems to actually install the bootloader (there were zipl output messages in the anaconda debug output) although it still throws the error

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index b0aff48..1db30eb 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1948,6 +1948,9 @@ class ZIPL(BootLoader):
     image_label_attr = "short_label"
     preserve_args = ["cio_ignore"]
+    def __init__(self, platform=None):
+        super(ZIPL, self).__init__(platform=platform)
     # configuration
Comment 8 Dan Horák 2012-09-20 05:06:13 EDT
Created attachment 614793 [details]
anaconda traceback

traceback when the  __init__() method is added
Comment 9 David Lehman 2012-09-20 10:15:07 EDT
Created attachment 614941 [details]
proposed patch to fix s390 bootloader setup

Please try this patch and see if it fixes the problem.
Comment 10 Dan Horák 2012-09-20 10:37:24 EDT
(In reply to comment #9)
> Created attachment 614941 [details]
> proposed patch to fix s390 bootloader setup
> Please try this patch and see if it fixes the problem.

tested and WORKS here, thanks
Comment 11 Jan Stodola 2012-09-27 02:49:11 EDT
David, Jesse, could you commit David's patch from comment 9 to anaconda git so that we have the fix in next anaconda build? I'm still facing this issue with anaconda-18.10. Thank you.
Comment 12 Fedora Update System 2012-10-02 10:12:47 EDT
anaconda-18.11-1.fc18 has been submitted as an update for Fedora 18.
Comment 13 Fedora Update System 2012-10-02 15:47:15 EDT
Package anaconda-18.11-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-18.11-1.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 14 Fedora Update System 2012-10-03 20:57:34 EDT
anaconda-18.12-1.fc18 has been submitted as an update for Fedora 18.
Comment 15 Jan Stodola 2012-10-16 10:01:44 EDT
No longer able to reproduce with anaconda-18.16.

Thanks, closing this bug.