views:

753

answers:

1

Can I run multiple hudson slaves on a single machine, I mean real slaves with only one build process?

My problem is, I have a slave with 3 build processes, using locks-and-latches (V0.4) to run three different kinds of build jobs. But sometimes I have the problem that more than one build job of one kind runs at the same time, or it blocks the build process from the slave and doesn't run.

Thank you in advance for your insights.

+4  A: 

Yes, Hudson should be capable of running multiple slaves on a single machine. I do a limited form of this with my builds so that each job runs on a separate hard drive. In my case, this means I have a master, with a slave that is run on the same machine as the master. Having 3 slaves each with 1 executor could be done instead of one slave with 3 executors could be done, but it shouldn't impact locking so I only see a use for that if you have different physical drives and want more throughput.

I believe locks in both Hudson (i.e. this job is running) and locks-and-latches (this lock is in use) span all slaves & the master for a given hudson setup. So if slave 1 is running a job that holds Lock A, slave 2 won't be able to start a job that holds lock A either. It isn't entirely clear to me if this is the behavior you're seeking.

There is one important note, though:

Supposedly there is currently a bug in the hudson core that sometimes allows multiple jobs to start with the same lock when using the locks-and-latches plugin. I am not an expert on the internals of Hudson locking, nor the locks-and-latches plugin, but if you want a more in-depth explanation there is a conversation that sounds related on the hudson users mailing list ([email protected]).

here is the archived conversation

The author of the locks-and-latches plugin is usually pretty responsive to questions.

Joshua McKinnon