Michael Hanselmann [Fri, 30 Sep 2011 09:29:50 +0000 (11:29 +0200)]
ssh: Quote strings in error message
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 30 Sep 2011 09:28:59 +0000 (11:28 +0200)]
utils.log: Write error messages to stderr
When “gnt-cluster copyfile” failed it would only print “Copy of file …
to node … failed”. A detailed message is written using logging.error.
Writing error messages to stderr can be helpful in figuring out what
went wrong (the messages also go to the log file, but not everyone might
know about it).
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Fri, 30 Sep 2011 08:30:44 +0000 (10:30 +0200)]
Add signal handling doc to hbal man page
Also remove a bug note, since hbal can now for a long time directly
execute jobs.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 28 Sep 2011 10:38:12 +0000 (12:38 +0200)]
Fix handling of cluster verify hooks
The change to enforce boolean results for cluster verify group opcode
missed the HooksCallBack, which uses a very ugly 1/0
logic. Furthermore, the logic is wrong, since it unconditionally
resets the verify result to true.
The patch is changed to simply treat hook failures as failures, and do
nothing for offline/nodes.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 28 Sep 2011 09:06:06 +0000 (11:06 +0200)]
Redistribute the RAPI certificate
This reverts to the old behaviour in Ganeti 2.4 and before.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Thu, 22 Sep 2011 10:20:39 +0000 (12:20 +0200)]
QA: Add tests for instance start/stop via RAPI
This would have detected the issue fixed in the previous patch.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Thu, 22 Sep 2011 10:19:56 +0000 (12:19 +0200)]
RAPI: Fix wrong check on instance shutdown
Commit
7fa310f6d84 (April 1st, 2011) converted the RAPI resource for
shutting down an instance to FillOpCode. Unfortunately it missed the
fact that the shutdown resource gets its parameters as query arguments.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Thu, 8 Sep 2011 11:36:15 +0000 (13:36 +0200)]
baserlib: Accept empty body in FillOpcode
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
(cherry picked from commit
c6e1a3eef05674d637570c39f25a799cec7ba187)
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Wed, 31 Aug 2011 13:47:47 +0000 (15:47 +0200)]
Version bump for 2.5.0~beta3
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 30 Aug 2011 15:37:54 +0000 (17:37 +0200)]
Makefile: Use $(LN_S) instead of “ln -s”
Some platforms apparently don't support “ln -s”, otherwise Autoconf
wouldn't have AC_PROG_LN_S.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Andrea Spadaccini [Mon, 29 Aug 2011 19:28:41 +0000 (20:28 +0100)]
Fixes to errors/warnings raised by pylint 0.24
Running pylint 0.24.0 revealed 2 errors and 1 warning. Here is how I
fixed them:
* jqueue.py: silenced E1101
* netutils.py: rewrote the list comprehension using extend()
* watcher/__init__.py: fixed a missing format string parameter
These changes are backwards-compatible with pylint 0.21.1.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Fri, 26 Aug 2011 15:31:12 +0000 (16:31 +0100)]
PEP8 for QA
- Makefile.am: added QA directory to the paths checked by pep8
- qa/: fixed the reported errors
- Makefile.am: also, added qa_group.py to qa_scripts
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Tue, 30 Aug 2011 08:47:49 +0000 (10:47 +0200)]
listrunner: Allow passing of arguments to executable
This wasn't possible until now.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Andrea Spadaccini [Mon, 29 Aug 2011 19:15:15 +0000 (20:15 +0100)]
DeprecationWarning fixes for pylint
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>
Michael Hanselmann [Mon, 29 Aug 2011 15:34:24 +0000 (17:34 +0200)]
listrunner: Replace str.split with library functions
- str.split("/").pop() should be os.path.basename
- str.split("\n") should be str.splitlines()
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Tsachy Shacham [Wed, 24 Aug 2011 08:30:22 +0000 (10:30 +0200)]
Minor updates and fixes to CPU pinning design doc
Signed-off-by: Tsachy Shacham <tsachy@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Fri, 26 Aug 2011 14:50:58 +0000 (16:50 +0200)]
Merge branch 'devel-2.4' into devel-2.5
Conflicts:
NEWS (trivial)
configure.ac (trivial)
daemons/ensure-dirs.in (deleted)
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 26 Aug 2011 12:21:35 +0000 (14:21 +0200)]
utils: Fix UnescapeAndSplit parsing bug
If a value passed to UnescapeAndSplit ended with a backslash an
exception would be raised:
$ gnt-instance modify -H mem=x\\ inst1.example.com
[…]
e2 = slist.pop(0)
IndexError: pop from empty list
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Andrea Spadaccini [Thu, 25 Aug 2011 16:47:07 +0000 (17:47 +0100)]
Delete master IPs from mergee master nodes
Added a step in cluster-merge that removes the cluster IP from the
master node of the mergee clusters.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Thu, 25 Aug 2011 10:15:10 +0000 (12:15 +0200)]
Use pep8 utility in “make lint”
This utility checks whether the code conforms to PEP8. Some checks had
to be disabled for Ganeti.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 25 Aug 2011 15:57:25 +0000 (17:57 +0200)]
Two more PEP8 fixes
cmdlib: Avoid wrapping using backslash
gnt_group: Avoid ** magic using keyword arguments (the “pep8” tool
doesn't like the inline comment in this case and will complain about
spaces around the “**” operator)
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 23 Aug 2011 13:12:44 +0000 (15:12 +0200)]
check-python-code: Give location(s) of lines longer than 80 chars
Until now it would only say that there was a line longer than 80
characters, but not where.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 25 Aug 2011 10:36:56 +0000 (12:36 +0200)]
PEP8 style fixes
Identified using the “pep8” utility.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Tue, 23 Aug 2011 12:42:33 +0000 (13:42 +0100)]
Wrap a few long lines
Had to break it as well, today! ;)
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Tue, 23 Aug 2011 16:07:09 +0000 (18:07 +0200)]
listrunner: Avoid exception if machine is rebooted
Handle exceptions gracefully when trying to read the command's output.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Tue, 23 Aug 2011 11:15:12 +0000 (12:15 +0100)]
Remove wrong type declaration from option
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Andrea Spadaccini <spadaccio@google.com>
Andrea Spadaccini [Tue, 23 Aug 2011 10:28:42 +0000 (11:28 +0100)]
Fix wrong method name in cluster-merge
Fixed a wrong method name in the last patch.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Tue, 23 Aug 2011 09:42:51 +0000 (11:42 +0200)]
Version bump 2.4.4
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Tue, 23 Aug 2011 09:47:08 +0000 (10:47 +0100)]
Fix --skip-stop-instances help message
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Tue, 23 Aug 2011 08:48:40 +0000 (09:48 +0100)]
cluster-merge: Add the --skip-stop-instances opt
This option allows to do a check for running instances on the mergee
clusters instead of stopping them.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
René Nussbaumer [Tue, 23 Aug 2011 09:21:36 +0000 (11:21 +0200)]
Update NEWS file
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Tue, 23 Aug 2011 09:10:36 +0000 (11:10 +0200)]
Documentation fix for importing with --src-dir option
Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit
b7d7876bd0e9844fab8be28bfa1fd5d563ec7412)
Conflicts:
lib/cmdlib.py (easily fixed)
René Nussbaumer [Tue, 23 Aug 2011 09:04:27 +0000 (11:04 +0200)]
Adding missing test data for commit
7a380ddfc
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Tue, 23 Aug 2011 07:23:39 +0000 (09:23 +0200)]
Fix a parsing issue with DRBD 8.3.11 in the Linux Kernel
In the Linux kernel commit
4b0715f096 introduced a display bug into
/proc/drbd which broke our regex.
The bug was first introduced into Linux 2.6.39-rc1. This bug is still
unfixed as of today.
This patch adapt the regular expression to workaround this bug for the
time being.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Mon, 22 Aug 2011 15:44:11 +0000 (17:44 +0200)]
watcher: Wait for child processes by default
This patch retains the behaviour of ganeti-watcher in previous Ganeti
versions.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Mon, 22 Aug 2011 09:20:06 +0000 (11:20 +0200)]
Update release date in NEWS for 2.5.0~beta2
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Fri, 19 Aug 2011 11:29:28 +0000 (12:29 +0100)]
Try 3 times before giving up on per-node commands
When contacting lots of nodes some may fail. Give it a couple more
chances before giving up on them.
Possible future TODO: continue, but just mark them as offline.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Thu, 18 Aug 2011 09:25:46 +0000 (10:25 +0100)]
Allow retrying commands in cluster-merge
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 19 Aug 2011 11:23:45 +0000 (12:23 +0100)]
Add a TODO on the VerifyCluster option
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 19 Aug 2011 11:21:59 +0000 (12:21 +0100)]
Transform node readd exceptions into just errors
We are after the point of no return, no point in failing everything
because a node failed to readd. Better to just report it and move on.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 19 Aug 2011 11:20:29 +0000 (12:20 +0100)]
Offline node when adding it to a merged cluster
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 19 Aug 2011 14:44:11 +0000 (16:44 +0200)]
Bump version to 2.5.0~beta2
Also update NEWS file.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Fri, 19 Aug 2011 14:48:26 +0000 (16:48 +0200)]
sphinx_ext: workaround epydoc warning
Similar to commit c29e35f, this works around epydoc breakage by
aliasing the module. Makes 'apidoc' pass again on my machine.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 19 Aug 2011 14:34:08 +0000 (16:34 +0200)]
check-news: Show per-file line number
… not the global line number.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 19 Aug 2011 14:33:48 +0000 (16:33 +0200)]
Unify some file headers
Remove unnecessary commas, add empty lines where necessary to make them
consistent.
I'm working on a script to check this, but it's not yet ready.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 19 Aug 2011 14:31:41 +0000 (16:31 +0200)]
Makefile: Add design-ovf-support to list of doc files
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 19 Aug 2011 12:41:53 +0000 (14:41 +0200)]
ensure-dirs: Fix epydoc error
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Agata Murawska [Fri, 19 Aug 2011 13:01:57 +0000 (15:01 +0200)]
Documentation fix for importing with --src-dir option
Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 19 Aug 2011 11:14:04 +0000 (13:14 +0200)]
ensure-dirs: Check mode and owner before changing
This avoids many calls to chmod(2) and chown(2), and thereby ctime
updates.
Since I had to update the unittests anyway I untangled the code a bit,
split it into more separate functions and added some more tests.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 19 Aug 2011 09:11:19 +0000 (11:11 +0200)]
ensure-dirs: Refine error handling on stat(2)
The “_stat_fn” function is renamed to “_lstat_fn” to reflect its
function. The try/except block just wraps calling lstat(2) and nothing
else.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 19 Aug 2011 09:04:59 +0000 (11:04 +0200)]
ensure-dirs: Change wording of some messages
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 19 Aug 2011 09:00:06 +0000 (11:00 +0200)]
ensure-dirs: Implement debug logging
There was no logging at all.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 19 Aug 2011 08:52:09 +0000 (10:52 +0200)]
ensure-dirs: Set permissions on job files in queue
This was a regression from 2.4.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
René Nussbaumer [Thu, 18 Aug 2011 11:17:15 +0000 (13:17 +0200)]
ensure-dirs: Fix a bug with queue/archive permissions
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>
Michael Hanselmann [Thu, 18 Aug 2011 15:16:10 +0000 (17:16 +0200)]
ensure-dirs: Set permissions on queue lock file
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Wed, 17 Aug 2011 14:22:11 +0000 (16:22 +0200)]
ensure-dirs: Set correct permissions on ssconf files
The files should be 0444, not 0400. This was a regression from 2.4.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Wed, 17 Aug 2011 14:09:06 +0000 (16:09 +0200)]
cfgupgrade: Add confirmation message
A message will be given instead of just dropping the user back to the
prompt in case of a successful upgrade.
[…]
documentation formats). Continue with upgrading configuration?
y/[n]/?: y
Configuration successfully upgraded for version 2.5.0~beta1.
root@master:~#
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Andrea Spadaccini [Mon, 15 Aug 2011 13:20:27 +0000 (14:20 +0100)]
Handle network interfaces without IPs
If the user specified a network interface with no IPs, he would receive
an unhelpful "list index out of range" error. Fixed that.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Andrea Spadaccini [Mon, 15 Aug 2011 12:21:57 +0000 (13:21 +0100)]
Fixed potential unreferenced variable usage
I noticed a path in the code that would use spice_ip_version even if
it was not initialized. This patch fixes it.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Andrea Spadaccini [Fri, 12 Aug 2011 15:22:10 +0000 (16:22 +0100)]
Added documentation for gnt-instance remove --force in the man page
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Fri, 12 Aug 2011 14:54:36 +0000 (15:54 +0100)]
Added documentation for SPICE options in the gnt-instance man page
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Wed, 10 Aug 2011 15:13:35 +0000 (16:13 +0100)]
Added basic support for SPICE
Implemented the following parameters:
- spice_bind
- spice_ip_version
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 15:03:39 +0000 (17:03 +0200)]
NEWS: Add release date for 2.5.1~beta1
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 13:32:10 +0000 (15:32 +0200)]
Fix exit code of “gnt-cluster verify”
With commit
fcad7225e3fc4 LU-generated jobs are used, but the
exit code must still be backwards-compatible.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Tue, 9 Aug 2011 12:10:33 +0000 (14:10 +0200)]
Update NEWS for 2.5
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 09:08:53 +0000 (11:08 +0200)]
Small improvements for cluster verify
- Check if BGL is actually owned
- Show group name as feedback
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 12:48:11 +0000 (14:48 +0200)]
watcher: Use locks when querying for resource information
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 12:47:47 +0000 (14:47 +0200)]
Allow locking to be used via OpQuery
The original design for query2 specifically excluded locking, but now
it's turned out that it would be a good thing to have in watcher. This
patch adds a new parameter to OpQuery and enables its use in LUQuery. A
missing function is added to LUGroupQuery, a comment clarified in
_NodeQuery and all locks declared as shared acquires in the same LU.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 12:06:54 +0000 (14:06 +0200)]
Document job results for RAPI where possible
Some opcodes aren't documented yet.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 12:06:16 +0000 (14:06 +0200)]
opcodes: Add more result checks, add some comments
Some of these will be used by the RAPI documentation.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 12:05:35 +0000 (14:05 +0200)]
sphinx_ext: Allow documenting opcode results
Will be used by RAPI documentation.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 12:03:51 +0000 (14:03 +0200)]
ht: Allow adding comment to type descriptions
This will be used to add some more details to type descriptions, e.g. on
opcode parameters or result values. The implementation is very similar
to “WithDesc”.
I chose to use “[…]” after finding “/*…*/” hard to read and spot. At
some we'll have to introduce proper formatting (e.g. using HTML).
Example with a comment:
List of ((Length 2) and (Item 0 is (NonEmptyString [name of changed
parameter]), item 1 is Anything))
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 10:09:24 +0000 (12:09 +0200)]
Clarify job ID-related type checks, add unittests
Instead of a rather complicated expression only “JobId” is output. Job
ID lists (like generated by “SubmitManyJobs”) are limited to two-item
lists. Unittests are added.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 12 Aug 2011 09:14:07 +0000 (11:14 +0200)]
Change OpClusterVerifyConfig's result, verify results
This patch removes the list of node groups (not used anymore since
commit
fcad7225e3fc) from OpClusterVerifyConfig's result and adds result
verification to all OpClusterVerify* opcodes.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Andrea Spadaccini [Fri, 12 Aug 2011 11:02:18 +0000 (12:02 +0100)]
Fixed error in Makefile.am, changing spaces with tabs
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Fri, 12 Aug 2011 10:08:52 +0000 (11:08 +0100)]
Added the test data files for netutils to Makefile.am
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Thu, 11 Aug 2011 16:15:20 +0000 (18:15 +0200)]
Use LU-generated jobs for verifying cluster
This patch moves the logic for verifying the various node groups in a
cluster into the master daemon. Job dependencies are used to ensure the
configuration, which requires the BGL, is verified first.
With this change it will be possible to expose whole-cluster
verification through the remote API without requiring additional client
logic on top of standard features like LU-generated jobs and job
dependencies.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 11 Aug 2011 16:11:17 +0000 (18:11 +0200)]
opcodes: Use variables for verification parameters
Just some cleanup before the 2.5 release.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 11 Aug 2011 14:37:30 +0000 (16:37 +0200)]
mcpu: Specify actual received type on opcode issue
This helped me debug an issue with opcodes.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 11 Aug 2011 12:10:42 +0000 (14:10 +0200)]
Use resource kind as OpQuery*'s description
This gives a hint as to what's queried. “QUERY(instance)” or
“QUERY(node)” are way better than just “QUERY”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Andrea Spadaccini [Thu, 11 Aug 2011 10:30:47 +0000 (11:30 +0100)]
Added helper functions in netutils and related constants
Added the following functions to netutils:
- IsValidInterface
- GetInterfaceIpAddresses
- _GetIpAddressesFromIpOutput
Added the following static methods to netutils.IPAddress:
- GetAddressFamilyFromVersion
- GetVersionFromAddressFamily
Added unit tests for the new methods in netutils.IPAddress, for the IP
address search regex and for GetInterfaceIpAddresses
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Thu, 11 Aug 2011 10:18:59 +0000 (12:18 +0200)]
Fix epydoc error in rlib2.py
I blindly assumed epydoc would use normal reST, but turns out it uses
its own “epytext” in our configuration. Since the latter doesn't support
blockquotes, I just make the paragraph a literal block.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 10 Aug 2011 15:30:26 +0000 (17:30 +0200)]
Fix typo in rlib2's docstring
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Benjamin Lipton <benlipton@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 10 Aug 2011 15:22:49 +0000 (17:22 +0200)]
Documentation fixes and clarification
- In README, refer to “install.rst”, not “install.html”
- In rapi.rst, wrap line longer than 72 characters
- In rlib2.py, update and clarify description of POST vs. PUT
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 9 Aug 2011 14:42:41 +0000 (16:42 +0200)]
gnt-instance: Rename _SHUTDOWN_* to _EXPAND_*
Once upon a time these constants were only used for stopping instances,
but pretty soon they became more useful. Let's rename them.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 9 Aug 2011 14:24:32 +0000 (16:24 +0200)]
List returned fields in RAPI documentation
Also replace console types with constants.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 9 Aug 2011 13:24:04 +0000 (15:24 +0200)]
rlib2: Exclude oplog/opresult from bulk job list
These fields can get rather large. Excluding them from the big bulk list
reduces the amount of data. They are still available via per-job
requests.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 9 Aug 2011 11:26:11 +0000 (13:26 +0200)]
rlib: Expose node group tags
Commit
1ffd26739d3 added support for tagging node groups. Also add a
check for exposed fields.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Tue, 9 Aug 2011 11:13:49 +0000 (13:13 +0200)]
rapi: Bulk support for jobs
This was requested in issue 181.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Andrea Spadaccini [Tue, 9 Aug 2011 12:31:39 +0000 (13:31 +0100)]
Fixed an error in the documentation of _GetKVMVersion
Fixed an epydoc compilation error that I introduced with last commit.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Tue, 9 Aug 2011 12:11:02 +0000 (14:11 +0200)]
Mention globbing filters in ganeti(7) manpage
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Andrea Spadaccini [Tue, 9 Aug 2011 11:16:49 +0000 (12:16 +0100)]
Removed code duplication for calls to _GetKVMVersion
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Mon, 8 Aug 2011 16:14:10 +0000 (18:14 +0200)]
Fix epydoc breakage caused by
f8638e288c7a
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Andrea Spadaccini [Mon, 8 Aug 2011 14:00:04 +0000 (15:00 +0100)]
Changed NET_PORT_CHECK to REQ_NET_PORT_CHECK, to improve consistency
I originally made this change because I needed the OPT_NET_PORT_CHECK,
and I am committing it even if I don't need anymore OPT_NET_PORT_CHECK
because IMO it improves the consistency of the name of the wrappers.
Also, I changed the code of the check to use inequality operators
chaining.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Mon, 8 Aug 2011 14:00:03 +0000 (15:00 +0100)]
Added check for the ip command at configure time
Also, corrected a few places where the ip command was hardcoded.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Mon, 8 Aug 2011 15:31:59 +0000 (17:31 +0200)]
Detect globbing patterns as query arguments
Short: this patch enables the use of “gnt-instance list '*.site'”.
Detailed description: This patch changes the command line interface code
to try to deduce the kind of filter from the arguments to a “list”
command. If it's a list of plain names an old-style name filter is used.
If filtering is forced or the single argument is potentially a filter,
it is parsed as a query filter string. Any name looking like a globbing
pattern (e.g. “*.site” or “web?.example.com”) is treated as such.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Fri, 5 Aug 2011 09:40:45 +0000 (10:40 +0100)]
cluster-merge: implement params delta mercifulness
Sometimes it's good to tell the user about parameter differences but
then proceed anyway. Strictness is still enforced for those parameters
that would break the cluster (volume group name, storage dir if file
storage is enabled).
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Thu, 4 Aug 2011 14:01:04 +0000 (15:01 +0100)]
cluster-merge: consider file storage enable state
There's no point in checking whether the file storage dir in the two
clusters is the same if file storage is not even enabled
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Mon, 8 Aug 2011 09:34:41 +0000 (11:34 +0200)]
Allow fixing of split instances via relocate
Currently, the IAllocator code requests strictly that the (set of) groups of
the nodes we're relocating from is equal to the set of groups we're
relocating to.
This, however, makes is impossible to fix split instances, since (by
definition) the secondary of a split instance is not in the same group
as the primary node, and after the fixing is it the same.
The patch changes the test from group equality to check that the final
group set (across both primary and secondary nodes) is a subset of the
initial group set (again across both nodes). This means we can't
"extend" the group of nodes but keeping the same or decreasing it is
allowed.
After this patch, one can finally fix (automatically) split instances
via a gnt-instance replace-disks.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Fri, 5 Aug 2011 16:56:57 +0000 (18:56 +0200)]
Revert deprecation of evacuate mode in hail
As discussed offline, the new node-change mode could be used for
evacuation, but it's not directly useful as it returns a list of
opcodes; therefore, we need to partially revert commits fbe5fcf and
5b53ca7 that removed it (and multi-evacuate, which remains removed).
The new version of relocate is actually just a wrapper over the
tryNodeEvac (which does the node evacuate); we run that and then we do
some extra checks that the nodes we got from that function are
consistent with the instance's new state.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>