- Jun 12, 2012
-
-
Iustin Pop authored
Commit 4b42c3d6 broke non-root user mode since, while trying to do a cleanup a move all local variable definitions to the start of the function; however, the plain_name var is only defined later, so this actually doesn't work. Note that enabling set -u doesn't _directly_ work, since we rely on some variables which are usually undefined (EXTRA_*_ARGS, etc.). It can be fixed, but in a later patch. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- May 23, 2012
-
-
Jun Futagawa authored
This adds support to daemon-util for Red Hat based distributions that do not have a start-stop-daemon. If /sbin/start-stop-daemon is not available, daemon-util will source /etc/rc.d/init.d/functions. check(), start(), and stop() are updated to use the relevant functions from /etc/rc.d/init.d/functions. Thanks to Stephen Fromm and Michael Hanselmann for improving the error handling, style, and comments. Signed-off-by:
Jun Futagawa <jfut@integ.jp> Reviewed-by:
Michael Hanselmann <hansmi@google.com> (cherry picked from commit 4b42c3d6)
-
- Mar 28, 2012
-
-
Michael Hanselmann authored
Eric Rostetter sent a patch adding a “status” action, but unfortunately his code was apparently specific to Red Hat. I hope this implementation is more distribution-agnostic; after all “status_of_proc” is part of LSB. Example output: $ /etc/init.d/ganeti status ganeti-noded is not running ... failed! ganeti-masterd is running. ganeti-rapi is running. ganeti-confd is running. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Dec 21, 2011
-
-
Michael Hanselmann authored
Serializing to JSON using “simplejson” is significantly slower when indentation and/or sorting of dictionary keys is used. In simplejson 1.x the difference isn't that big, but with simplejson 2.x the difference can be up to a factor of 7.5. The reason is that the latter no longer uses C functions when sorting or indentation is used. With this patch we revert everything to simplejson's defaults, which should provide us with the best performance available. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 17, 2011
-
-
Iustin Pop authored
We still allow explicit shutdown of confd, but we prevent manual or automatic start-up. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 30, 2011
-
-
Andrea Spadaccini authored
In version 0.21, pylint unified all the disable-* (and enable-*) directives to disable (resp. enable). This leads to a lot of DeprecationWarning being emitted even if one uses the recommended version of pylint (0.21.1, as stated in devnotes.rst). This commit changes all the disable-msg directives to disable. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 25, 2011
-
-
Michael Hanselmann authored
Identified using the “pep8” utility. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 19, 2011
-
-
René Nussbaumer authored
While it sets the permission on all files in queue/archive accordingly it doesn't do so for the created archive directories. This patch fixes this problem. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 05, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 04, 2011
-
-
Michael Hanselmann authored
Watcher state files can stay around if node groups are removed. With this patch they're removed after 21 days. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 24, 2011
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 06, 2011
-
-
Michael Hanselmann authored
When the source cluster takes too long to create a snapshot, the destination would time out. Unfortunately no good error message was written unless debug logging was enabled, not even to the log file. This will be improved with this patch. Another patch to be backported from master will hopefully avoid this situation completely. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Dec 16, 2010
-
-
Michael Hanselmann authored
The “ensure-dirs” script as included in Ganeti 2.3 is very slow when working with big queues requiring a change of permissions on many or all files. $ find /var/lib/ganeti/queue/ | wc -l 52354 Before this change: $ time /usr/local/lib/ganeti/ensure-dirs -f real 16m4.739s While not adressed in this patch, I'd like to record the overall ineffiency of the “ensure-dirs” script, even after this change: $ time /usr/local/lib/ganeti/ensure-dirs -f real 5m57.362s […] $ strace -e clone,execve -f -c /usr/local/lib/ganeti/ensure-dirs -f % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 50.08 5.147090 49 104774 clone 49.92 5.131094 49 104739 execve More changes will be needed. Just for comparision, a small Python snippet changing permissions on all files (“ensure-dirs” changes the owner too): $ time python -c 'import os; from ganeti import utils; [os.chmod(i, 0644) for i in utils.ListVisibleFiles("/var/lib/ganeti/queue/archive/big")]' real 0m0.605s […] Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 29, 2010
-
-
Michael Hanselmann authored
This reduces the number of notifications in “ganeti-rapi”. Until now it was notified for every change in …/lib/ganeti and had to check whether the users file was affected. A symlink is always created in cfgupgrade to not break tools referring to the old name. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 19, 2010
-
-
René Nussbaumer authored
Further investigations have to be done for merging some of these bits together with import-export daemon which uses similiar logic. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 16, 2010
-
-
René Nussbaumer authored
As we need this functionality in other places than just locking it makes sense to move it to utils rather than keeping it in locking Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 29, 2010
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Oct 28, 2010
-
-
Michael Hanselmann authored
A new constant, LUXI_VERSION, is used to verify the peer's version. The version is optional, so old(er) clients and servers talking to peers not supporting it won't break. Example with mismatching library: $ gnt-instance list Unhandled Ganeti error: LUXI version mismatch, server 2020000, request 1010000 Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This will show a warning if, for example, one side of a DRBD disk becomes unavailable. The data is collected separately from the other verification data. Example output: * Verifying instance status - ERROR: instance inst1: disk/0 on node2 is faulty Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 26, 2010
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 14, 2010
-
-
Iustin Pop authored
During cluster maintenance, when the watcher is disabled, it's useful to run it just once. This is incovenient to do currently, as the watcher needs to be unpaused, then run, then paused again. This patch adds an option “--ignore-pause” that can be used to ignore the cluster-level setting. Also the man page is updated as it was missing the options available. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 13, 2010
-
-
Michael Hanselmann authored
I didn't know why the code previously used “pyinotify.EventsCodes.ALL_FLAGS” instead of using the flags from “pyinotify.EventsCodes” directly. Turns out that Pyinotify 0.8 has them in “pyinotify”, not “pyinotify.EventsCodes”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
We noticed several issues when just watching the file, among them race conditions upon replacing the file using rename(2) (the new watcher would be created too soon). By just watching the directory for events on the rapi_users file, this can be avoided. A nice side-effect is that now the users file is also reloaded if it didn't exist upon ganeti-rapi's start (see the documentation update). Since ganeti-rapi now becomes active for virtually every change in the configuration directory (…/lib/ganeti), moving the rapi_users file to a separate directory will be considered. It doesn't have to happen in or before this patch, though. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Reading the file before this function allows for better error reporting. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Currently, masterd startup with old software versions is very confusing for users: we present two tracebacks, with a message in the middle about "version mismatch". This can lead to users believing that all that needs to be done is to fix the config file. This patch attempts to improve this by handling this case in masterd itself (not in the child), and showing a more friendly message for this case. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 07, 2010
-
-
Iustin Pop authored
This makes almost all of the daemons show error messages, and not return until they finished listening on the appropriate sockets. Masterd is the only one "special", as it doesn't do enough initialization in the server creation, only later. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, GenericMain does a two-staged workflow: - Check, before forking - then Exec, after forking This means we don't have any possibility to treat preparation work (before the daemon is ready for work) different from the actual work. The patch adds another PreExec function that is run just before Exec, and which should ensure that the daemon is ready for serving client before it returns. Its result is then sent as the third argument to Exec. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 24, 2010
-
-
Michael Hanselmann authored
As already noted in the design document, an opcode's priority is increased when the lock(s) can't be acquired within a certain amount of time, except at the highest priority, where in such a case a blocking acquire is used. A unittest is provided. Priorities are not yet used for acquiring the lock(s)—this will need further changes on mcpu. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Sep 13, 2010
-
-
Michael Hanselmann authored
This patch moves the code watching the users file into a a separate class to not mix it with HTTP serving. The users file is now driven from outside the HTTP server class. Also the documentation is updated to mention the automatic reloading. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Sep 10, 2010
-
-
René Nussbaumer authored
Please note: This only works if the file existed upon startup. If the file was created later, ganeti-rapi has to be restarted. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 07, 2010
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
This partially reverts commit 8b72b05c. Basically it removes the user involved changes Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 06, 2010
-
-
René Nussbaumer authored
The startup of the daemons would take a lot of time otherwise, also it's not needed to set the permissions of those file over and over again, because if the daemons are once migrated to the user they will keep creating the file for that user. The full run is intended as initial upgrade Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-