- Mar 21, 2013
-
-
Michele Tartara authored
This commit adds the core infrastructure of the monitoring daemon, and integrates it in the build and test systems. The actual functionality of the monitoring daemon is still completely missing. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 20, 2012
-
-
Dimitris Aragiorgis authored
Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 08, 2012
-
-
Iustin Pop authored
As I wrote during/after the review on commit 2958c56e, “ganeti-cleaner: Separate queue cleaning code”, while I appreciated the permission separation, I didn't like too much the file-based approach: - it is a very simple script, and lots of the code is duplicated between the two; I wouldn't like to see "ganeti-vmcapable-cleaner", "ganeti-master-candidate-cleaner", etc. in the future - ganeti-master-cleaner "pollutes" the namespace, creating tab-completion conflicts with ganeti-masterd This patch simply merges the master-cleaner back into cleaner, while keeping the separate user permissions scheme, separate log files, etc. Additionally, it fixes two bugs in the unit-test (not run with set -u and wrong path in the master-cleaner log files test; yay for even worse safety than Python?). And finally, since we have now support for --help-completion, it adds bash completion support for this script :) (needs to be applied on top of my argument support patch series). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 28, 2012
-
-
Michael Hanselmann authored
This code does not need to run as root, therefore it's better to split it out. It is now run with the same permissions as the master daemon. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 27, 2012
-
-
Michael Hanselmann authored
Instead of having a different set in (almost) every shell script, this inserts the most commonly used variables at build time. This way the code for injecting a root directory for virtual clusters also is just needed once. I chose inserting the variables using “sed” at build time over a runtime script as the latter would need to be located from within the script and the path would be different depending on the environment (unittest vs. actual installation). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
… instead of comparing with two different values in two placse. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Sep 21, 2012
-
-
Michael Hanselmann authored
GANETI_ROOTDIR contains the root directory for the current “virtual node”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- 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)
-
- May 21, 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>
-
- 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>
-