Bug 951981

Summary: cannot import naked distro tree
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: lab controllerAssignee: Raymond Mancy <rmancy>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 0.12CC: asaha, dakini, dcallagh, dgeevarg, ebaak, llim, qwan, rglasz, rmancy
Target Milestone: 0.12.1Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: DistroManagement
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-23 05:03:47 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:

Description Dan Callaghan 2013-04-15 01:06:33 UTC
Description of problem:
Importing a "naked" distro tree (with no .treeinfo) fails in Beaker 0.12.0.

Version-Release number of selected component (if applicable):
0.12.0
  
Actual results:
The traceback from beaker-import is unfortunately useless due to a separate bug:

Traceback (most recent call last):
  File "/usr/bin/beaker-import", line 9, in <module>
    load_entry_point('bkr.labcontroller==0.12.0', 'console_scripts', 'beaker-import')()
  File "/usr/lib/python2.6/site-packages/bkr/labcontroller/distro_import.py", line 1879, in main
    build.process(urls, opts)
  File "/usr/lib/python2.6/site-packages/bkr/labcontroller/distro_import.py", line 1734, in process
    raise BX('failed to add %s to beaker: %s' % (self.tree['name'],e))
  File "/usr/lib/python2.6/site-packages/bkr/common/bexceptions.py", line 4, in __init__
    self.value = value % args
TypeError: not enough arguments for format string

The server-side exception is:

2013-04-15 11:00:52,477 bkr.server.xmlrpccontroller ERROR Error handling XML-RPC method
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bkr/server/xmlrpccontroller.py", line 54, in RPC2
    response = self.process_rpc(method,params)
  File "/usr/lib/python2.6/site-packages/bkr/server/xmlrpccontroller.py", line 43, in process_rpc
    response = obj(*params)
  File "<string>", line 3, in add_distro_tree
  File "/usr/lib/python2.6/site-packages/turbogears/identity/conditions.py", line 249, in require
    return fn(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bkr/server/labcontroller.py", line 137, in add_distro_tree
    arch = Arch.by_name(arch_name)
  File "/usr/lib/python2.6/site-packages/bkr/server/model.py", line 2808, in by_name
    return cls.query.filter_by(arch=arch).one()
[...]
ProgrammingError: (ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3") 'SELECT arch.id AS arch_id, arch.arch AS arch_arch \nFROM arch \nWHERE arch.arch = %s' ([],)

Debug output from beaker-import shows what's going wrong:

{'arch': 'x86_64',
 'arches': [[]],
...

Expected results:
Should import successfully.

Additional info:
Regression in 0.12.0 due to http://git.beaker-project.org/cgit/beaker/commit/?id=6dca4ff3 (options object is mutated with pop).

Comment 2 Raymond Mancy 2013-04-15 08:13:52 UTC
http://gerrit.beaker-project.org/#/c/1882/

Comment 5 Dan Callaghan 2013-04-23 05:03:47 UTC
Beaker 0.12.1 has been released.