Bug 951981 - cannot import naked distro tree
Summary: cannot import naked distro tree
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: lab controller
Version: 0.12
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: 0.12.1
Assignee: Raymond Mancy
QA Contact:
URL:
Whiteboard: DistroManagement
Keywords: Regression
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-15 01:06 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
9 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2013-04-23 05:03:47 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.