Commit graph

975 commits

Author SHA1 Message Date
Anders Ingemann
a3fdeddd79 Rename virtualbox_tests.py to be less tautological 2015-04-16 22:21:46 +02:00
Anders Ingemann
25051d4c04 Improve __getstate__ for bootstrapinfo
This approach may be a little hacked, but it works for now and
if it breaks at some point in the future because of e.g. circular references
that bridge will have to be crossed then
2015-04-16 22:21:46 +02:00
Anders Ingemann
51bb3dd57f Integration testing for EC2 2015-04-16 22:21:46 +02:00
Anders Ingemann
ec96de3a0e fix log_call logging when command is a string 2015-04-16 22:21:46 +02:00
Anders Ingemann
d26ba8bea4 Simplify exception throwing in sed_i 2015-04-16 22:21:46 +02:00
Anders Ingemann
f63d3c73aa Use subn to count the actual replacements done in inline_replace() 2015-04-16 22:21:46 +02:00
Anders Ingemann
e035f83edf Fix problem when (de-)serializing bootstrapinfo twice 2015-04-16 22:21:46 +02:00
Anders Ingemann
3c642e0b02 Fix serialization of DictClass
using it in Queue.put somehow broke it
2015-04-16 22:21:46 +02:00
Anders Ingemann
51e9e29b24 Move server control code to the top 2015-04-16 22:21:46 +02:00
Anders Ingemann
4582ea1498 Better termination when exiting while connecting to the RPC daemon 2015-04-16 22:21:46 +02:00
Anders Ingemann
9505110d4a *first* start the callback server *then* the RPC daemon
This way we don't stop logging before the daemon is shut down.
2015-04-16 22:21:46 +02:00
Anders Ingemann
686f9e4230 No need to remember the callback server 2015-04-16 22:21:45 +02:00
Anders Ingemann
b067ada15e Introduce some awesome signal handling
We can now press Ctrl+C remotely  while any subprocess of the bootstrapping process is running,
previously SIGINTs weren't propagated to the bootstrapping process because there was a thread
in between it all. Now the bootstrapping process is in it's own process group.
2015-04-16 22:21:45 +02:00
Anders Ingemann
a0e3ba218f Always attempt to close SSH gracefully 2015-04-16 22:21:45 +02:00
Anders Ingemann
e9a3845281 Fix serialization of CalledProcessError 2015-04-16 22:21:45 +02:00
Anders Ingemann
17a4511ee1 Convert remote building state management to work in with statements
exception and state handling is a lot easier now, less class vars etc.
2015-04-16 22:21:45 +02:00
Anders Ingemann
5b48ce58c5 Fix lock handling for virtualbox tests 2015-04-16 22:21:45 +02:00
Anders Ingemann
ef37cd257f Move build servers into separate module 2015-04-16 22:21:45 +02:00
Anders Ingemann
36728cf648 Since bootstrap-vz uses `sudo' to elevate privileges, the root password will never be needed 2015-04-16 22:21:45 +02:00
Anders Ingemann
f1bfee24a0 Prepare integration testing framework to work with providers other than virtualbox
Also, convert with context handlers in classes to functions with generators
This makes the code a lot more readable
2015-04-16 22:21:45 +02:00
Anders Ingemann
75e70c96f7 Fix extlinux booting on jessie when /boot is on another partition 2015-04-16 22:21:45 +02:00
Anders Ingemann
b70e24a848 Switch to using 3 partitions when testing gpt+msdos
Make boot partition a little bigger
2015-04-16 22:21:45 +02:00
Anders Ingemann
4cbc8e4f8e Related to 26bb907, both gpt and msdos partitions need the 1 sector gap now 2015-04-16 22:21:45 +02:00
Anders Ingemann
a62ce1705a Remove the PartitionGap class, it's way too much of a hassle to work with
Instead pad_start and pad_end have been introduced
2015-04-16 22:21:44 +02:00
Anders Ingemann
05006f2d83 Allow using integers for more operations with Sectors 2015-04-16 22:21:44 +02:00
Anders Ingemann
d105d10c76 raise proper Skip exception rather than the plugin class 2015-04-16 22:21:44 +02:00
Anders Ingemann
e5dd68acc7 Extlinux booting on gpt now working 2015-04-16 22:21:44 +02:00
Anders Ingemann
0e19b4c1ed Fix boot detection and extend boot timeout 2015-04-16 22:21:44 +02:00
Anders Ingemann
0f82fbd6af Add some GPT tests 2015-04-16 22:21:44 +02:00
Anders Ingemann
9a50cea204 Add 1 sector gap between partitions on GPT 2015-04-16 22:21:44 +02:00
Anders Ingemann
4d74c72d99 Simplify GPT a little by explicitly taking care of the GPT primary & secondary
Do the math for the GPT offset a little differently
2015-04-16 22:21:44 +02:00
Anders Ingemann
f0402d6a9b Preserve stacktrace when reraising in vbox instance up() 2015-04-16 22:21:44 +02:00
Anders Ingemann
b4cd905977 Fix serialization of UnitError 2015-04-16 22:21:44 +02:00
Anders Ingemann
1569797e5b Properly set the states of different partitions in prebootstrapped plugin 2015-04-16 22:21:44 +02:00
Anders Ingemann
016fef606f Account for PartitioGap in a few more places 2015-04-16 22:21:44 +02:00
Anders Ingemann
31b9cb5caa The dmsetup function still divided self.size by 512, which is not necessary any longer since we are calculating in actual sectors now 2015-04-16 22:21:43 +02:00
Anders Ingemann
44dcdec0ec No need to skip jessie/extlinux tests any longer 2015-04-16 22:21:43 +02:00
Anders Ingemann
744001a9ab grub now works on jessie 2015-04-16 22:21:43 +02:00
Anders Ingemann
8d8a823092 Properly detect successful boot on jessie 2015-04-16 22:21:43 +02:00
Anders Ingemann
6b6b636f3b extlinux is now running on jessie 2015-04-16 22:21:43 +02:00
Anders Ingemann
f6e4903a8e Update the kernel image after package installation 2015-04-16 22:21:43 +02:00
Anders Ingemann
ac7e32d35e Preserve stacktraces when reraising exceptions 2015-04-16 22:21:43 +02:00
Anders Ingemann
b67b174eb5 Extend build server logging when downloading an image 2015-04-16 22:21:43 +02:00
Anders Ingemann
149db4c989 Add new task: DeterminKernelVersion, this can potentially fix a lot of small problems 2015-04-16 22:21:43 +02:00
Anders Ingemann
767b32d20e Improve read_from_socket, a lot... 2015-04-16 22:21:43 +02:00
Anders Ingemann
7ef88d284d Don't try unlocking the machine before locking it
If it's already locked, that should be an error.
2015-04-16 22:21:43 +02:00
Anders Ingemann
0fe3c9e984 Cleanup adfter keyboard interrupts (also do a better job of cleaning up) 2015-04-16 22:21:42 +02:00
Anders Ingemann
87f2d889b7 Delete image after use, apparently the vbox version of delete is to do nothing 2015-04-16 22:21:42 +02:00
Anders Ingemann
bd4cf250a2 Fix spelling 2015-04-16 22:21:42 +02:00
Anders Ingemann
e1946fcb68 Simpler check for whether to create image or use image in prebootstrapped plugin 2015-04-16 22:21:42 +02:00