Ticket #1858 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Exception while doing upgrade-master

Reported by: catlee Owned by:
Priority: minor Milestone: undecided
Version: master Keywords:
Cc:

Description

I just had a 0.8.3p1 master and tried to upgrade the db to the latest tip and got this exception. Running upgrade-master a second time seems to have worked.

(buildbot.git)[catlee] src/buildbot/master2 (git)-[master]-% buildbot upgrade-master .
upgrading basedir                                                     
/home/catlee/src/buildbot/master2/public_html/robots.txt has old/modified contents
 writing new contents to /home/catlee/src/buildbot/master2/public_html/robots.txt.new
/home/catlee/src/buildbot/master2/public_html/default.css has old/modified contents
 writing new contents to /home/catlee/src/buildbot/master2/public_html/default.css.new
/home/catlee/src/buildbot/master2/master.cfg.sample has old/modified contents
 overwriting it with new contents
upgrading database
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 462, in __bootstrap
    self.__bootstrap_inner()
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
--- <exception caught here> ---
  File "/home/catlee/.virtualenvs/buildbot.git/lib/python2.5/site-packages/Twisted-10.1.0-py2.5-linux-x86_64.egg/twisted/python/threadpool.py", line 207, in _worker
    result = context.call(ctx, function, *args, **kwargs)
  File "/home/catlee/.virtualenvs/buildbot.git/lib/python2.5/site-packages/Twisted-10.1.0-py2.5-linux-x86_64.egg/twisted/python/context.py", line 59, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/home/catlee/.virtualenvs/buildbot.git/lib/python2.5/site-packages/Twisted-10.1.0-py2.5-linux-x86_64.egg/twisted/python/context.py", line 37, in callWithContext
    return func(*args,**kw)
  File "/home/catlee/src/buildbot/master/buildbot/db/pool.py", line 108, in thd
    rv = callable(self.engine, *args, **kwargs)
  File "/home/catlee/src/buildbot/master/buildbot/db/model.py", line 441, in thd
    engine.drop('version')
  File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 1656, in drop
    connection=connection, **kwargs)
  File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 1682, in _run_visitor
    **kwargs).traverse_single(element)
  File "/usr/lib/python2.5/site-packages/sqlalchemy/sql/visitors.py", line 75, in traverse_single
    meth = getattr(v, "visit_%s" % obj.__visit_name__, None)
exceptions.AttributeError: 'str' object has no attribute '__visit_name__'

Change History

comment:1 Changed 2 years ago by Dustin J. Mitchell

  • Status changed from new to closed
  • Resolution set to fixed

don't use table.drop with a string to drop the 'version' table

Build a fake Table instead. Fixes #1858.

Changeset: 52ec64ba00962f123e4ee9e3f1f14601c4e9dcfc

Note: See TracTickets for help on using tickets.