- Feb 18, 2010
-
-
Michael Hanselmann authored
This function could be useful in other places and this way we can easily unittest it. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 13, 2010
-
-
Michael Hanselmann authored
Having a proper name instead of just a number makes debugging easier. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 05, 2010
-
-
Iustin Pop authored
This changes from submitting jobs to get the tags (in cli scripts) to queries, which (since the tags query is a cheap one) should be much faster. The tags queries are already done without locks (in the generic query paths for instances/nodes/cluster), so this shouldn't break tags query via gnt-* list-tags. On a small cluster, the runtime of gnt-cluster/gnt-instance list tags more than halves; on a big cluster (with many MCs) I expect it to be more than 5 times faster. The speed of the tags get is not the main gain, it is eliminating a job when a simple query is enough. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jan 04, 2010
-
-
Iustin Pop authored
Many of our functions have to follow a given API, and thus we have to keep a given signature, but pylint doesn't understand this. Therefore, we silence this warning. The patch does a few other cleanups. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Of all daemons, only rapi did abort when given argument. None of our daemons use any arguments, but they accepted them blindly. This is a very bad experience for the user. This patch adds checking and exiting in all daemons, in a uniform way. One other option would have been to add a flag to GenericMain (noargs=True). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
This patch should have only: - pylint disables - docstring changes - whitespace changes Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
- Nov 25, 2009
-
-
Iustin Pop authored
This patch removes the quotes from CommaJoin and converts most of the callers (that I could find) to it. Since CommaJoin does str(i) for i in param, we can remove these, thus simplifying slightly a few calls. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 06, 2009
-
-
Guido Trotter authored
This is ok because adding a node or instance cannot happen in a query. We get the ec id from the LU and pass it to _EnsureUUID, which will then for now not use it. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
When the processor is executing a job, it can export the execution id to its callers. This is not supported for Queries, as they're not executed in a job. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 02, 2009
-
-
Iustin Pop authored
This finishes the conversion of OpPrereqError creation to two-argument style. Any leftovers as one-argument are not breaking anything, just losing information about the errors. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 29, 2009
-
-
Iustin Pop authored
This is not needed anymore - the original change was more than a year ago when masterd was in its incipient phase. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 25, 2009
-
-
Iustin Pop authored
Currently the luxi error handling is hardcoded as special encoding on the masterd-side and special decoding on the client side. This patch moves it to errors.py such that other parts of the code can reuse the same encoding. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> (cherry picked from commit 6956e9cd)
-
- Sep 17, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 15, 2009
-
-
Michael Hanselmann authored
This can be useful for debugging locking problems. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
There are two major arguments for this: - There will be more callbacks (e.g. for lock debugging) and extending the parameter list is a lot of work. - In the jqueue module this allows us to keep per-job or per-opcode variables in a separate class. Instead of having to clean up the worker class after processing one job, these references will automatically go out of scope. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 31, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Aug 27, 2009
-
-
Iustin Pop authored
Currently the luxi error handling is hardcoded as special encoding on the masterd-side and special decoding on the client side. This patch moves it to errors.py such that other parts of the code can reuse the same encoding. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 26, 2009
-
-
Michael Hanselmann authored
This can be used during maintenance work. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
One shouldn't fork a Python process after using threads. Master voting is done before forking (utils.Daemonize), but it also uses threads. Hence it's now called from a separate process. This patch also fixes the check function to actually exit if the current machine is not the master (introduced in 04ccf5e9). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This will be used to do the master voting. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 25, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 20, 2009
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 10, 2009
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 29, 2009
-
-
Guido Trotter authored
When the parameter is set to True and start_daemons is also True, ganeti-masterd will be started with the new --no-voting --yes-do-it options. This new option is set to True only on masterfailover, when no_voting is used. This changed the behavior from 2.0, where we didn't start the master daemon at all, when this option was used. The manpage is also updated to remove the 2.0 only change. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 25, 2009
-
-
Guido Trotter authored
With three ganeti daemons, and one or two more coming, the daemon's main function started becoming too much cut&pasted code. Collapsing most of it in a daemon.GenericMain function. Some more code could be collapsed between the two http-based daemons, but since the new daemons won't be http-based we won't do it right now. As a bonus a functionality for overriding the network port on the command line for all network based nodes is added. Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 24, 2009
-
-
Guido Trotter authored
The <DAEMON>_PID constants were created to reference a daemon pid file, but actually contain a daemon's name, because the various functions that work with pidfiles abstract the filename from the daemon name themselves. Removing the constants and using the actual daemon name constants in their place. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
The original LOG_<DAEMON_NAME> constants for daemon logfiles are gone. In their place there is a DAEMONS_LOGFILES dict, indexed by daemon name. This is a minor change with the objective to uniform most of the daemon's main() functions code, which is very similar one to the other. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jul 23, 2009
-
-
Guido Trotter authored
Various modules set it to True when called in debugging mode, but the utils module supports no such global. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jul 19, 2009
-
-
Iustin Pop authored
As a workaround for the job submit timeouts that we have, this patch adds a new luxi call for multi-job submit; the advantage is that all the jobs are added in the queue and only after the workers can start processing them. This is definitely faster than per-job submit, where the submission of new jobs competes with the workers processing jobs. On a pure no-op OpDelay opcode (not on master, not on nodes), we have: - 100 jobs: - individual: submit time ~21s, processing time ~21s - multiple: submit time 7-9s, processing time ~22s - 250 jobs: - individual: submit time ~56s, processing time ~57s run 2: ~54s ~55s - multiple: submit time ~20s, processing time ~51s run 2: ~17s ~52s which shows that we indeed gain on the client side, and maybe even on the total processing time for a high number of jobs. For just 10 or so I expect the difference to be just noise. This will probably require increasing the timeout a little when submitting too many jobs - 250 jobs at ~20 seconds is close to the current rw timeout of 60s. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> (cherry picked from commit 2971c913)
-
- Jul 14, 2009
-
-
Guido Trotter authored
SimpleStore is a lot less heavyweight than SimpleConfigReader, and to just get the master name we can use that. This is the only usage of SimpleConfigReader currently, but we're not going to delete the class, as new usages will come in for ganeti-confd (in 2.1). Using it there, though, will make the class even more heavy to load, so it makes sense for this simple usage to be converted. Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 08, 2009
-
-
Guido Trotter authored
When the parameter is set to True and start_daemons is also True, ganeti-masterd will be started with the new --no-voting --yes-do-it options. This new option is set to True only on masterfailover, when no_voting is used. This changed the behavior from 2.0, where we didn't start the master daemon at all, when this option was used. The manpage is also updated to remove the 2.0 only change. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This will be used by ganeti-noded to start ganeti-masterd in a --no-voting masterfailover. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 07, 2009
-
-
Michael Hanselmann authored
If a user used ^Z to stop the program, poll() in socket.recv would return EAGAIN due to SIGSTOP. This patch changes luxi.Transport.Recv to ignore EAGAIN. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 15, 2009
-
-
Iustin Pop authored
This is used in multiple places outside cmdlib.py, so it's a more interesting patch. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- May 21, 2009
-
-
Iustin Pop authored
As a workaround for the job submit timeouts that we have, this patch adds a new luxi call for multi-job submit; the advantage is that all the jobs are added in the queue and only after the workers can start processing them. This is definitely faster than per-job submit, where the submission of new jobs competes with the workers processing jobs. On a pure no-op OpDelay opcode (not on master, not on nodes), we have: - 100 jobs: - individual: submit time ~21s, processing time ~21s - multiple: submit time 7-9s, processing time ~22s - 250 jobs: - individual: submit time ~56s, processing time ~57s run 2: ~54s ~55s - multiple: submit time ~20s, processing time ~51s run 2: ~17s ~52s which shows that we indeed gain on the client side, and maybe even on the total processing time for a high number of jobs. For just 10 or so I expect the difference to be just noise. This will probably require increasing the timeout a little when submitting too many jobs - 250 jobs at ~20 seconds is close to the current rw timeout of 60s. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- May 04, 2009
-
-
Iustin Pop authored
Currently, lib/luxi.py used lib/serializer.py for encoding/decoding messages, but the master daemon uses directly the simplejson module. This is wrong as any non-trivial change to serializer.py will break the master daemon. The patch changes masterd to use exactly the same functions as luxi.py for encoding/decoding of messages. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 06, 2009
-
-
Iustin Pop authored
This patch raises an error in the master daemon in case the user requests a locking query; accordingly, all clients were modified to send only lockless queries. This is short-term fix, for proper fix the clients should be modified to submit a job when the user request a locking query. The other approach would be to ignore the flag passed by the client; this would be worse as client's wouldn't get at least an error. The possible impact of this is multiple: - some commands could have been not converted, and thus fail; this can be remedied easily - the consistency of commands is lost; e.g. node failover will not lock the node *while we get the node info*, so we could miss some data; this is again in the thread of atomic operations which are missing in the current model of query-and-act from gnt-* scripts Reviewed-by: imsnah, ultrotter
-
Iustin Pop authored
This patch will log data about queries, which are today completely invisible (at the default log level) in the master log file. Reviewed-by: imsnah
-
- Feb 27, 2009
-
-
Guido Trotter authored
Some hypervisors (KVM) need RUN_GANETI_DIR to exist even at cluster init time. This patch creates it in InitCluster just before hv parameter checking. Since the code to make list of directories is already repeated twice in the code, and this would be the third time, we abstract it into an utils.EnsureDirs function and we call that one from ganti-noded, ganeti-masterd and bootstrap. Reviewed-by: iustinp
-
- Feb 12, 2009
-
-
Iustin Pop authored
This patch introduces a 'force' mode for the master daemon startup where the voting process is not done, but the user has to confirm manually the startup (before forking, of course). Reviewed-by: imsnah
-