- Aug 06, 2008
-
-
Michael Hanselmann authored
The code makes sure not to include the master in the list. Reviewed-by: iustinp
-
Michael Hanselmann authored
The job queue must be called from cmdlib when adding or removing nodes to the cluster. Moving it to the context objects makes this possible. Reviewed-by: iustinp
-
Michael Hanselmann authored
Old job files shouldn't be left on nodes removed from a cluster. Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Queries don't create jobs and are more efficient. Log messages are not yet stored anywhere. Reviewed-by: iustinp
-
- Aug 05, 2008
-
-
Michael Hanselmann authored
Newly added nodes are not yet taken care of. Queue locking on non-master nodes is not yet correct. Reviewed-by: iustinp
-
- Aug 04, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
This will be used to move common code out of jqueue. Reviewed-by: iustinp
-
Iustin Pop authored
This patch adds the infrastructure for executing a job in background, instead of foreground, via a new “--submit” option. The behaviour is that the job ID is printed and the script will immediately exit. The patch also converts gnt-node list to this model (yes, this will be a query in the future). Reviewed-by: imsnah
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
Reviewed-by: imsnah
-
- Jul 31, 2008
-
-
Michael Hanselmann authored
This reduces code duplication. A later patch will modify the job queue a bit more and will need a change of this assert. The assertion is also removed from all class-internal functions. Reviewed-by: iustinp
-
Iustin Pop authored
The current SubmitOpCode function is not flexible enough to be used for submitters that don't want to wait for the job finish. The patch splits this in two, a SendJob function and a PollJob one, and the old SubmitOpCode becomes a wrapper. Note that the new SendJob takes a list of opcodes (and not a single opcode anymore). Reviewed-by: imsnah
-
Michael Hanselmann authored
This is needed for job queue replication. Reviewed-by: iustinp
-
Michael Hanselmann authored
This class is a wrapper around fcntl.flock and abstracts opening and closing the lockfile. It'll used for the job queue. (The patch also removes a duplicate import of tempfile into the unittest) Reviewed-by: iustinp
-
Michael Hanselmann authored
The job queue will need to access to configuration, which is provided through the context object, to get a list of nodes. Reviewed-by: iustinp
-
Oleksiy Mishchenko authored
Reviewed-by: imsnah
-
Oleksiy Mishchenko authored
Add instance tag handling, improved error logging. ...oh, yes adopt instance listing for RAPI2! Reviewed-by: iustinp
-
- Jul 30, 2008
-
-
Iustin Pop authored
With the recent startup/shutdown changes (and with the master daemon in place), the cluster destroy needs some fixing. This patch moves the finalization of the destroy out from cmdlib into bootstrap, so we can nicely shutdown the rapi and master daemons. Reviewed-by: ultrotter
-
Guido Trotter authored
It's python, isn't it? Reviewed-by: iustinp
-
Iustin Pop authored
With the recent changes, I forgot the extra parameter to this rpc call. Also the rpc call needs to be done after we setup the config data, for the master daemon to be able to start, so we move it after all other init steps. Reviewed-by: ultrotter
-
Iustin Pop authored
This patch adds a check that we are on the master after failing to connect to the socket, and log nicely the master name. Reviewed-by: ultrotter
-
Guido Trotter authored
Reviewed-by: iustinp
-
Guido Trotter authored
Prevent mistakes with an assert. Reviewed-by: iustinp
-
Iustin Pop authored
This is my fault, sorry. Reviewed-by: imsnah
-
Iustin Pop authored
This is mostly: - whitespace fix (space at EOL in some files, not all, broken indentation, etc) - variable names overriding others (one is a real bug in there) - too-long-lines - cleanup of most unused imports (not all) Reviewed-by: ultrotter
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
The 'old-style' info, error, debug logs do not make much sense. This patch unifies the SetupLogging and SetupDaemon functions. As a result, all the commands logs to a 'commands.log' file. The patch also changes the log setup to keep going if there's an error in setting up the file logging but we're logging to stderr. Also, burnin now logs to its own file (burnin.log). Reviewed-by: ultrotter
-
Iustin Pop authored
The patch changes the log constants by moving the slash to the end of the log dir instead of at the beginning of *each* log file name. It also adds a new LOG_COMMANDS constant (to be used in a next patch). Reviewed-by: ultrotter
-
Iustin Pop authored
This is special in the sense that it can run on any node. As such, we just instantiate ssconf and read the data from it. Reviewed-by: ultrotter
-
Guido Trotter authored
Reviewed-by: iustinp
-
Guido Trotter authored
self.recalculate_locks[locking.LEVEL_NODE] could have any value and everything would work anyway. We'll use the string 'replace' by convention because in the future we might want an 'append' mode. Reviewed-by: iustinp
-
Guido Trotter authored
This function is used to lock instances' primary and secondary nodes after locking instances themselves. Reviewed-by: iustinp
-
Guido Trotter authored
LUs can declare which locks they need by populating the self.needed_locks dictionary, but those locks are always acquired as exclusive. Make it possible to acquire shared locks as well, by declaring a particular level as shared in the self.share_locks dictionary. By default this dictionary is populated so that all locks are acquired exclusively. Reviewed-by: iustinp
-
Guido Trotter authored
This additional LogicalUnit function is optional to implement, but lets you change your locking needs for one level just before locking it, but after the previous levels have been already locked. It is useful for example to calculate what nodes to lock after locking an instance. Reviewed-by: iustinp
-
Guido Trotter authored
LURenameInstance forgot to remove the old lock name and add the new one, making it impossible for parallel LUs to act on the instance (without a master daemon restart). This also fixes burning+rename with the parallelization of {Start,Stop}Instance. Reviewed-by: iustinp
-
Michael Hanselmann authored
We found several issues in the old job queue implementation. It had race conditions, deadlocks and other deficiencies. Short summary: - _QueuedOpCode and _QueuedJob are now more or less data structures with a few utility functions. __Setup is gone. - DiskJobStorage and JobQueue classes merged into one to reduce code complexity. - One lock in JobQueue for almost everything. There's also a lock per opcode for log messages. Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-