- Jul 25, 2008
-
-
Oleksiy Mishchenko authored
The set triggers exception on a list-tags command and RAPI calls for tags since it is not serializable by JSON. Reviewed-by: iustinp
-
- Jul 24, 2008
-
-
Oleksiy Mishchenko authored
Reviewed-by: imsnah
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
So far no error reporting to the client is done. Clients don't get noticed if a job doesn't exist or couldn't be archived because of its current status. The internal cache is always cleaned when the preconditions didn't fail to make sure that the actual disk status will be reread next time. Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
They aren't be tuples on the client side. Reviewed-by: iustinp
-
Guido Trotter authored
The submitted WritePidFile, RemovePidfile and IsPidFileAlive functions miss unit tests. Adding a simple one which covers their basic functionality. Reviewed-by: iustinp
-
- Jul 23, 2008
-
-
Michael Hanselmann authored
A later patch will add a memory based job storage class, hence this code is going into a separate class. It also changes the number format to always use at least 10 digits, allowing up to 9'999'999'999 jobs to be sorted without using a custom function. Reviewed-by: iustinp
-
Guido Trotter authored
Rather than searching for the ganeti daemons by name we'll use the pidfile they create to stop them. This change also adds the --oknodo option to start-stop-daemon when stopping ganeti (which means it won't give an error if it wasn't started). Reviewed-by: iustinp
-
Guido Trotter authored
Reviewed-by: iustinp
-
Guido Trotter authored
Reviewed-by: iustinp
-
Guido Trotter authored
WritePidFile is a helper function that writes the current pid in a pidfile within the ganeti run directory. RemovePidFile tries to delete it. Reviewed-by: iustinp
-
Guido Trotter authored
This helper function reads a pid from a file containing it and checks whether it refers to a live process. Reviewed-by: iustinp
-
Guido Trotter authored
An implementation mistake from the original design caused nodes to be locked before instances, rather than after. This patch inverts the level numbering, changing also the relevant unittests and the recursive locking function starting point. Reviewed-by: iustinp
-
Oleksiy Mishchenko authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
The job ID is now a string, hence logging must use %s instead of %d. Reviewed-by: iustinp
-
Iustin Pop authored
We can use zip for simplifying this function. Actually, at this point I'm not sure if it needs to be a separate function at all. Reviewed-by: imsnah
-
Michael Hanselmann authored
The docstring says that _NewSerialUnlocked returns “a string representing the job identifier”. Until now it returned an integer and this patch changes it. Reviewed-by: iustinp
-
Iustin Pop authored
This patch adds distribution of the queue serial file after each write to it (but before a new job is created and written with that ID, and before a response is returned, so we should be safe from crashes in between). Currently it only logs if a node cannot be contacted, it should abort if > 50% errors are seen. Reviewed-by: imsnah
-
Iustin Pop authored
This will be needed for master failover. If we don't have a valid queue directory, we need to reinitialize it, but we should keep the existing serial number. As such, we abstract the reading of the serial and if we find a valid serial, we do not reset it. Reviewed-by: imsnah
-
Guido Trotter authored
This was a TODO for 2.0 Reviewed-by: iustinp
-
- Jul 22, 2008
-
-
Guido Trotter authored
Grab a lock for the instance we're working on, and update its params. Reviewed-by: iustinp
-
Guido Trotter authored
When we set the instance params we're not adding a new instance, but just updating an existing one, so why using AddInstance? Reviewed-by: iustinp
-
Guido Trotter authored
For ConnectConsole we just need to lock the instance we're connecting to. We make a few rpcs to its primary node, but node daemons can now handle multiple queries and nodes cannot be removed till they have instances on them anyway. Note that since we return the ssh command, and that's executed outside of the ganeti daemon, without any locks held, the instance can then be subject to operations while we're connected to it, but that was the previous behavior as well. Reviewed-by: iustinp
-
Guido Trotter authored
LUs that take an instance name as input and need to expand its name and lock it can use it to simplify their ExpandNames call. Possibly, and _ExpandAndLockNode will come as well. Reviewed-by: iustinp
-
Guido Trotter authored
LUQueryClusterInfo and LUDumpClusterConfig can be made concurrent and don't need to acquire any locks. In fact they don't interact with the cluster at all, but just with its configuration, which is thread-safe by design. Reviewed-by: iustinp
-
Guido Trotter authored
Two top level definitions were separated only by one empty line. Fixing this. Reviewed-by: imsnah
-
Oleksiy Mishchenko authored
Reviewed-by: imsnah
-
Michael Hanselmann authored
Not passing the argument means it has the value None. Iterating None doesn't work: >>> "123" in None Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: iterable argument required Hence I rename it to "exclude" instead of "exceptions", which may be confusing, and make it mandatory. If one wants to clean all cache entries, an empty list can be passed. Reviewed-by: iustinp
-
Oleksiy Mishchenko authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
This patch splits the single threading.Condition object used in the worker pool for synchronization into three. - worker_to_pool: Notified if a worker wants to notify the pool - pool_to_worker: Notified if the pool wants to notify a single or all workers - pool_to_pool: Used for synchronization in Quiesce Reviewed-by: ultrotter
-
- Jul 21, 2008
-
-
Michael Hanselmann authored
This also fixes a TODO added by ultrotter by killing the parent process when QuitGanetiException is raised. Reviewed-by: ultrotter
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Michael Hanselmann authored
This signal handler class abstracts some of the code previously used in other places. It also uninstalls its handler when Reset() is called or the class is destructed, thereby restoring the previous behaviour. Reviewed-by: iustinp
-
- Jul 17, 2008
-
-
Oleksiy Mishchenko authored
Reviewed-by: imsnah
-
- Jul 16, 2008
-
-
Oleksiy Mishchenko authored
Reviewed-by: imsnah
-
Guido Trotter authored
Create a new ForkingHTTPServer in ganeti-noded by deriving both from NodeDaemonHttpServer and ForkingMixin. This will allow us to process concurrent requests. Reviewed-by: imsnah
-
- Jul 15, 2008
-
-
Iustin Pop authored
Reviewed-by: imsnah
-