Bug 1078941
| Summary: | workflow commands with no arch specified cause XML-RPC fault: AttributeError: 'OSMajor' object has no attribute 'osminor' | ||
|---|---|---|---|
| Product: | [Retired] Beaker | Reporter: | Bill Peck <bpeck> |
| Component: | web UI | Assignee: | Dan Callaghan <dcallagh> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 0.16 | CC: | aigao, asaha, dcallagh, jburke, jstancek, pbunyan, rmancy, tools-bugs, xjia |
| Target Milestone: | 0.16.1 | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-03-26 23:54:29 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: | |||
possible patch http://gerrit.beaker-project.org/#/c/2941/ This was a regression in 0.16.0 due to SQLAlchemy declarative conversion. The OSMajor.osminor property (which is, confusingly, actually a list of OSVersions) was mistakenly renamed to OSMajor.osversion. Rather than the patch in comment 3 I think we should just change back the property name. Verify: [root@qe-xjia-beaker-client ~]# bkr workflow-simple --family RedHatEnterpriseLinux6 --task /distribution/install --tag None Submitted: ['J:3967'] [root@qe-xjia-beaker-client ~]# bkr workflow-simple --family RedHatEnterpriseLinux6 --task /distribution/install Exception: <Fault 1: '<class \'bkr.common.bexceptions.BX\'>:No distro tree matches Recipe: <distroRequires><and><distro_family value="RedHatEnterpriseLinux6" op="="></distro_family><distro_tag value="STABLE" op="="></distro_tag><distro_method value="nfs" op="="></distro_method><distro_arch value="i386" op="="></distro_arch></and></distroRequires>'> Version: beaker-0.16.1-0.git.17.c71cd22.el6eng.noarch beaker-client-0.16.1-0.git.17.c71cd22.el6eng.noarch Beaker 0.16.1 has been released. |
Description of problem: If you pass in a family without an arch in any of the workflows it will make a call to the server to get a list of arches. This fails with a traceback. Mar 20 13:15:53 beaker-02 beaker-server[5985]: File "/usr/lib/python2.6/site-packages/bkr/server/distro.py", line 91, in get_arch Mar 20 13:15:53 beaker-02 beaker-server[5985]: arches = [arch.arch for arch in OSMajor.by_name(filter['osmajor']).osminor[0].arches] Mar 20 13:15:53 beaker-02 beaker-server[5985]: AttributeError: 'OSMajor' object has no attribute 'osminor' Version-Release number of selected component (if applicable): 0.16.0 How reproducible: Everytime Steps to Reproduce: 1. bkr workflow-simple --family Fedora19 --task /distribution/install Additional info: Fix: diff --git a/Server/bkr/server/distro.py b/Server/bkr/server/distro.py index fe13d7e..bb19dd6 100644 --- a/Server/bkr/server/distro.py +++ b/Server/bkr/server/distro.py @@ -88,7 +88,7 @@ def get_arch(self, filter): elif 'osmajor' in filter: # look up osmajor try: - arches = [arch.arch for arch in OSMajor.by_name(filter['osmajor']).osminor[0].arches] + arches = [arch.arch for arch in OSMajor.by_name(filter['osmajor']).osversion[0].arches] except InvalidRequestError: raise BX(_('Invalid OSMajor: %s' % filter['osmajor'])) return arches