Bug 968122
Summary: | SystemError : Unsupported PPC machine type: PMac | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ronald Maas <rmaas> |
Component: | python-blivet | Assignee: | Brian Lane <bcl> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 19 | CC: | anaconda-maint-list, awilliam, bcl, dlehman, dshea, g.kaviyarasu, hamzy, jonathan, mkolman, rmaas, sbueno, soopurman, vanmeeuwen+fedora |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | ppc64 | ||
OS: | Linux | ||
Whiteboard: | AcceptedFreezeException | ||
Fixed In Version: | python-blivet-0.17-1.fc19 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-06-28 07:18:10 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 834091 |
Description
Ronald Maas
2013-05-29 03:03:09 UTC
The thread startomg https://lists.fedoraproject.org/pipermail/ppc/2013-June/002291.html on the Fedora PPC mailing list describes the same issue. Just looking at the following code in python-blivet platform.py: def getPlatform(): """Check the architecture of the system and return an instance of a Platform subclass to match. If the architecture could not be determined, raise an exception.""" if arch.isPPC(): ppcMachine = arch.getPPCMachine() if (ppcMachine == "PMac" and arch.getPPCMacGen() == "NewWorld"): return NewWorldPPC() elif ppcMachine in ["iSeries", "pSeries"]: return IPSeriesPPC() elif ppcMachine == "PS3": return PS3() else: raise SystemError, "Unsupported PPC machine type: %s" % ppcMachine It seems arch.getPPCMacGen() returns a different value than "NewWorld" on Apple G5. Basically this condition is redundant because all 64-bit Powermacs are "NewWorld". So changing the line if (ppcMachine == "PMac" and arch.getPPCMacGen() == "NewWorld"): to something like if ppcMachine == "PMac": should solve the problem For what it's worth, I also encountered this bug on a quad-core PowerMac G5 with the f19-20130613-GA-TC3 build of the Fedora-19-ppc64-netinst.iso. Can you boot and append rd.break to the boot command line edit /usr/lib/python2.7/site-packages/blivet/platform.py and change the line as you propose and see if that fixes the problem? (In reply to Ronald Maas from comment #1) (In reply to Mark Hamzy from comment #3) I'm happy to report that doing so worked as expected and allowed me to get into Anaconda proper on my PowerMac G5. So I guess it should be changed that way in the source... What is the pmac gen? You can either attach /proc/cpuinfo or you can post the output of 'grep pmac-generation /proc/cpuinfo'. Changing the line allows me to run Anaconda in text mode (using boot arguments 'text rd.break'). Running Anaconda in graphical mode displays a checkerboard like pattern and is unusable (probably an unrelated issue). Will try VNC mode in the week-end cat /proc/cpuinfo processor: : 0 cpu : PPC970MP, altivec supported clock : 1000.000000MHz revision : 1.0 (pvr 0044 0100) processor: : 1 cpu : PPC970MP, altivec supported clock : 1000.000000MHz revision : 1.0 (pvr 0044 0100) timebase : 33333333 platform : PowerMac model : PowerMac11,2 machine : PowerMac11,2 motherboard : PowerMac11,2 MacRISC4 Power Macintosh detected as : 337 (PowerMac G5 Dual Core) pmac flags : 00000000 L2 cache : 1024K unified pmac-generation : NewWorld Hey Ronald, Can you perform another test for me, please? Edit /usr/lib/python2.7/site-packages/blivet/arch.py and add 'PowerMac' : 'PMac' to the end of the ppcType = { dictionary (at line 86) in the function getPPCMachine(). (Don't forget to add a comma on the line above.) We believe this should fix your issue. Hi Mark, Suggested code change did not work. Did some more digging and found out problem was caused by a bug in arch.getPPCMacGen() I changed the following lines in getPPCMacGen() for _type in pmacGen: if _type in gen: return type to for _type in pmacGen: if gen.find(_type) != -1: return _type And that solved the issue. Anaconda is starting successfully in text mode. (In reply to Ronald Maas from comment #8) > Suggested code change did not work. Did some more digging and found out > problem was caused by a bug in arch.getPPCMacGen() > > I changed the following lines in getPPCMacGen() > > for _type in pmacGen: > if _type in gen: > return type > > to > > for _type in pmacGen: > if gen.find(_type) != -1: > return _type > > And that solved the issue. Anaconda is starting successfully in text mode. The part that matters is s/type/_type/ in the return statement -- '_type in gen' is functionally identical to 'gen.find(_type) != -1'. Are you saying that this works in combination with Mark's suggested change or instead of it? Instead of it. I tried Mark's suggested change, but that made no difference as arch.getPPCMachine() already worked correctly with the original ppcType dictionary. So type is a function/keyword. See: http://www.cafepy.com/article/python_types_and_objects/python_types_and_objects.html It looks like, while you platform name is 'PowerMac,' 'Mac' is enough to match it. So, I think the only change necessary is to return the variable _type rather than the type 'type.' Ronald, Can you test with the following? diff --git a/blivet/arch.py b/blivet/arch.py index d4ffc7b..12cb30d 100644 --- a/blivet/arch.py +++ b/blivet/arch.py @@ -63,6 +63,7 @@ def getPPCMachine(): platform = None # ppc machine hash + # Note: This is a substring match! ppcType = { 'Mac' : 'PMac', 'Book' : 'PMac', 'CHRP IBM' : 'pSeries', @@ -133,6 +134,7 @@ def getPPCMacID(): # @return The powermac generation, or 0 if not powermac. def getPPCMacGen(): # XXX: should NuBus be here? + # Note: This is a substring match! pmacGen = ['OldWorld', 'NewWorld', 'NuBus'] if not isPPC(): @@ -154,7 +156,7 @@ def getPPCMacGen(): for _type in pmacGen: if _type in gen: - return type + return _type log.warning("Unknown Power Mac generation: %s" %(gen,)) return 0 BTW, you can ignore the comment additions. Just the one change at line 157. This is what I will post to the devel list. Being that we are close to GA, I don't want to make riskier changes when I rewrite it. Mark, I changed line 157 to return _type and Anaconda started successfully. Thanks all for your help to get this fixed. Mark, I rebooted the G5 and except for the code change suggested by you in line 157 of arch.py, no other changes were done to the Anaconda scripts. Proposing this as a FinalFreezeException. This increases the supported machines installable by anaconda. Discussed at 2013-06-24 freeze exception review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2013-06-24/f19final-blocker-review-8.2013-06-24-16.00.log.txt . Accepted as an FE issue: the fix looks safe and only in PPC code (so can't break any primary arches), and this slightly improves our PPC machine support, can't be fixed post-release. anaconda-19.30.10-1.fc19, python-blivet-0.17-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-blivet-0.17-1.fc19,anaconda-19.30.10-1.fc19 Package python-blivet-0.17-1.fc19, anaconda-19.30.11-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 python-blivet-0.17-1.fc19 anaconda-19.30.11-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-11679/python-blivet-0.17-1.fc19,anaconda-19.30.11-1.fc19 then log in and leave karma (feedback). Package python-blivet-0.17-1.fc19, anaconda-19.30.12-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 python-blivet-0.17-1.fc19 anaconda-19.30.12-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-11679/python-blivet-0.17-1.fc19,anaconda-19.30.12-1.fc19 then log in and leave karma (feedback). python-blivet-0.17-1.fc19, anaconda-19.30.13-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. |