Opened 4 years ago

Closed 4 years ago

#3341 closed defect (fixed)

plugin system fails with two installs of Buildbot

Reported by: tardyp Owned by:
Priority: major Milestone: 0.9.+
Version: master Keywords:
Cc:

Description (last modified by sa2ajj)

If you install the buildbot from debian distro, and install Buildbot nine with pip,

then you got one Buildbot eight in /usr and one Buildbot nine in /usr/local

This confused one user in the irc:

2015-08-19 19:47:34+0200 [-] Log opened.
2015-08-19 19:47:34+0200 [-] twistd 14.0.2 (/usr/bin/python 2.7.9) starting up.
2015-08-19 19:47:34+0200 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2015-08-19 19:47:34+0200 [-] Starting BuildMaster -- buildbot.version: 0.9.0b2
2015-08-19 19:47:34+0200 [-] Loading configuration from '/home/slave/test/master.cfg'
2015-08-19 19:47:34+0200 [-] error while parsing config file:
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/threading.py", line 763, in run
	    self.__target(*self.__args, **self.__kwargs)
	  File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 196, in _worker
	    result = context.call(ctx, function, *args, **kwargs)
	  File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
	    return self.currentContext().callWithContext(ctx, func, *args, **kw)
	  File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
	    return func(*args,**kw)
	--- <exception caught here> ---
	  File "/usr/local/lib/python2.7/dist-packages/buildbot/config.py", line 194, in loadConfig
	    exec f in localDict
	  File "/home/slave/trolo/master.cfg", line 18, in <module>
	    c['slaves'] = [buildslave.BuildSlave("example-slave", "pass")]
	  File "/usr/local/lib/python2.7/dist-packages/buildbot/plugins/db.py", line 238, in __getattr__
	    raise AttributeError(str(err))
	exceptions.AttributeError: Unknown component name: BuildSlave
	
2015-08-19 19:47:34+0200 [-] Configuration Errors:
2015-08-19 19:47:34+0200 [-]   error while parsing config file: Unknown component name: BuildSlave (traceback in logfile)
2015-08-19 19:47:34+0200 [-] Halting master.
2015-08-19 19:47:34+0200 [-] BuildMaster is stopped
2015-08-19 19:47:34+0200 [-] Main loop terminated.
2015-08-19 19:47:34+0200 [-] Server Shut Down.

irc logs:

maxime: can you paste the whole traceback?
17:50		the error message is not one line, i'm sure
17:53	maxime	sa2ajj: no it's not indeed, let me paste that somewhere
17:55	sa2ajj	thanks
17:56	maxime	sa2ajj: http://pastebin.com/KrptPjUR
17:56	infobob	http://paste.pound-python.org/[…]ftAVwx4L5gN1ksbc/ (repasted for maxime)
17:56	sa2ajj	infobob: thanks
17:57	maxime	nice pastebin
17:57	sa2ajj	interesting
17:58		lissyx joined #buildbot
17:58	sa2ajj	this looks like setup is not complete
17:58		how did you install it?
17:59		funnily the error is thrown from the code i developed :)
17:59	maxime	sa2ajj: I used pip
17:59		pip install buildbot==0.9.0b2
18:00	sa2ajj	judging from the paths, 'sudo ...'
18:00	maxime	yeah I jumped to using root for that command
18:00	sa2ajj	can you run a couple of lines?
18:00	maxime	sure
18:01	sa2ajj	start python
18:01		then 'import buildbot.plugins.db'
18:01		'from pprint import pprint'
18:01		'pprint(buildbot.plugins.db.info())'
18:02	maxime	all the dictionnaries are empty, maybe you want the list ?
18:03	sa2ajj	if they are empty, then corresponding changes to the "global" database was not done :(
18:03		and that explains the error
18:04		can you run (i assume you used sudo) 'sudo pip install --reinstall buildbot=0.9.0b2' and capture the output and then paste it
18:04	maxime	Yup, gimme just a 2s, I don't use sudo
18:04	sa2ajj	sure
18:04		oh, not using sudo... :)
18:05	maxime	I have pip 1.5.6 and I don't have a --reinstall options it would seem
18:06	sa2ajj	wait, it might be my bad
18:06	maxime	ah --force-reinstall ?
18:06	sa2ajj	yeah, looks like it
18:06	* sa2ajj	. o O (there are so many tools with _almost_ the same set of options)
18:07	sa2ajj	but it might bring in more updates to other packages
18:07		i'd suggest you play in a virtualenv sandbox
18:07		(first)
18:07	maxime	it's a test machine, so there's no worrying about trashing it
18:08		http://pastebin.com/BcbfSJyM
18:08	infobob	http://paste.pound-python.org/[…]zBpBSvd5Wl0bT0Gz/ (repasted for maxime)
18:08	maxime	nice bot :)
18:08	sa2ajj	ah, ok :)
18:09	maxime	the dicts are still empty :/
18:10	sa2ajj	oh, you seem to have the old installation of buildbot in /usr/lib/python2.7/dist-packages and a new one in /usr/local/lib/python2.7/dist-packages
18:10		this might lead to problems
18:10	maxime	indeed !

Change History (7)

comment:1 Changed 4 years ago by tardyp

  • Milestone changed from undecided to 0.9.0
  • Type changed from undecided to defect
  • Version changed from 0.8.12 to master

comment:2 Changed 4 years ago by tardyp

  • Description modified (diff)

comment:3 Changed 4 years ago by sa2ajj

  • Description modified (diff)
  • Summary changed from plugin system fails with two installs of buildbot to plugin system fails with two installs of Buildbot

comment:4 Changed 4 years ago by dustin

Is this something we need to fix? I'm tempted to say that just shouldn't work..

comment:5 Changed 4 years ago by dustin

  • Milestone changed from 0.9.0 to 0.9.+

comment:6 Changed 4 years ago by sa2ajj

I do not think there's anything to fix here.

comment:7 Changed 4 years ago by dustin

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.