Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add latent buildslave for OpenStack #666

Merged
merged 11 commits into from Apr 5, 2013
Merged

Add latent buildslave for OpenStack #666

merged 11 commits into from Apr 5, 2013

Conversation

ghost
Copy link

@ghost ghost commented Mar 18, 2013

The buildslave has limited functionality for interacting with OpenStack's Nova component. Booting and terminating instances works correctly, but no interfacing with the network part.

The buildslave has limited functionality for interacting with
OpenStack's Nova component. Booting and terminating instances
works correctly, but no interfacing with the network part.
@@ -0,0 +1,181 @@
# This file is part of Buildbot. Buildbot is free software: you can
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is different from the other latent buildslaves, but I'd like to start moving things to the buildbot.buildslave package. Could you rename to master/buildbot/buildslave/openstack.py, and make the similar rename for the tests?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very quick shipping, item as described
Chanel bags http://www.assureur-ideal.com/Chanel-Handbags/

@djmitche
Copy link
Member

Otherwise, please add docs and an entry to the release notes. Thanks!

@djmitche
Copy link
Member

I'm happy. @tomprince is going to have a look shortly.

def _get_image(self, os_client):
# If self.image is a callable, then pass it the list of images. The
# function should return the image's UUID to use.
if hasattr(self.image, '__call__'):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be if callable(...):. And it should document the fact that it is calls the function in a thread (or maybe be run in the main thread).

I'm not sure what the use case is, so I don't know if this will likely call into the synchronous client library.

@tomprince
Copy link
Member

We use camelCase rather than underscore (following twisted). (We do use underscores occasionaly, in naming test methods, as a phrase seperator.

self.patch(openstack, "nce", None)
self.patch(openstack, "client", None)
self.assertRaises(config.ConfigErrors, self.ConcreteBuildSlave,
'bot', 'pass', 'flavor', 'image', 'user', 'pass', 'tenant', 'auth')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Id be happier if these passed arguments as keyword arguments. Given the number of arguments, users should be passing them that way.

@tomprince
Copy link
Member

It would be nice if the fakes tracked the calls with side-effects, and then made assertions about them.

Sean Kelly added 5 commits March 19, 2013 09:54
Not using an abstract slave, so do not need a concrete version. Some of
the lines are a bit long; this will be fixed later.
Due to the number of required arguments, use keywords for them to be
clearer about what's being specified. Also changed the flavor to be an
integer because the docs say to pass the flavor ID, not name.
Use keyword arguments in the examples and list the keyword arguments
with a brief description on each.
@djmitche
Copy link
Member

@tomprince, please have a look at the updates here when you're back on dry land.

The instance name was included in the log message, but this is identical
to the slave name. Instead, include the image UUID as this could
actually help in debugging.
@djmitche
Copy link
Member

djmitche commented Apr 1, 2013

@tomprince - ping?

@djmitche
Copy link
Member

djmitche commented Apr 5, 2013

I'm going to get this merged. @tomprince, please have a look when you get a chance and we can fix any problems post-merge.

@djmitche djmitche merged commit 6cdebac into buildbot:master Apr 5, 2013
# started.
return defer.succeed(None)
instance = self.instance
self.instance = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stop_instance can be called from the reactor right? If so, I dont think unseating self.instance is right, as that could make the worker thread crash, which references self.instance in a few places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants