Michael Hanselmann [Mon, 28 Feb 2011 15:26:00 +0000 (16:26 +0100)]
NEWS: Replace smartquotes, start lines with uppercase
- Sphinx converts ASCII quotes ("") to smartquotes (“”) automatically
- Sentences or list items start with an uppercase letter
- Changed description of non-verbose “gnt-* list” output slightly
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Mon, 28 Feb 2011 17:01:43 +0000 (18:01 +0100)]
Fix LU processor's GetECId
The exception was never actually raised.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Adeodato Simo <dato@google.com>
Michael Hanselmann [Mon, 28 Feb 2011 15:15:09 +0000 (16:15 +0100)]
gnt-cluster master-failover: Undrain queue
- Move functions for drain status (tracked via file) from jqueue to jstore
- Undrain queue on master failover if necessary
- Add QA test
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Mon, 28 Feb 2011 14:12:14 +0000 (15:12 +0100)]
Update NEWS and release 2.4.0 rc3
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Mon, 28 Feb 2011 13:30:45 +0000 (14:30 +0100)]
Merge branch 'devel-2.4' into stable-2.4
* devel-2.4:
1-char comment typo fix
Expand some acronyms, add to glossary
query_unittest: Fix argument to set()
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Mon, 28 Feb 2011 10:06:14 +0000 (11:06 +0100)]
Fix potential data-loss bug in disk wipe routines
For the 2.4 release, we only add the missing RPC calls. However, this
needs to be fixed properly, by preventing usage of mis-configured
disks.
Also add a bit more logging so that it's directly clear on which node
the wipe is being done.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
René Nussbaumer [Fri, 25 Feb 2011 13:42:19 +0000 (14:42 +0100)]
Query: Add additional test to node.powered for OOB handling
This patch covers the testing of _GetNodePower of query.py not only for
unavailable but also for OOB support and returning the right
node.powered.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Stephen Shirley [Fri, 25 Feb 2011 15:02:14 +0000 (16:02 +0100)]
1-char comment typo fix
Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 25 Feb 2011 13:13:16 +0000 (14:13 +0100)]
gnt-* list-fields: Show field description
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
René Nussbaumer [Thu, 24 Feb 2011 13:32:21 +0000 (14:32 +0100)]
gnt-instance reboot start instance if not yet started
This patch starts the instance when gnt-instance reboot is invoked on a
instance already stopped.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Tue, 15 Feb 2011 10:16:19 +0000 (11:16 +0100)]
Update the DD of OOB with gnt-cluster epo
This command came up in a local discussion about how much logic we
should put into gnt-node power off. We decided to go with a separate
convenience command which takes care of all the steps through the
procedures to turn down the cluster into a state suitable for a shutdown
of the underlying machine.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 24 Feb 2011 18:20:13 +0000 (19:20 +0100)]
utils: Export NiceSortKey function
The ability to split a string into a list of strings and integers can be
handy elsewhere and is necessary for sorting query results by names.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Stephen Shirley [Thu, 24 Feb 2011 15:19:07 +0000 (16:19 +0100)]
Expand some acronyms, add to glossary
Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Thu, 24 Feb 2011 13:51:13 +0000 (14:51 +0100)]
Fix test output splattering
Instead of hardcode to ToStdout in the helper class, we should use
a user provided feedback function. In unittests this is a noop.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Thu, 24 Feb 2011 11:58:52 +0000 (12:58 +0100)]
Generate query fields in man pages
This patch replaces the hand-written lists of fields, sometimes
incomplete, wrong or inconsistent, with generated ones. What's not very
nice yet is the representation for numbered lists (“nic.ip/0: IP address
of 1st network interface”, “nic.ip/1: IP address of 2nd network
interface”, etc.), but some kind of grouping can be done later.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Wed, 23 Feb 2011 17:05:22 +0000 (18:05 +0100)]
Add script to generate query fields documentation
- All lines matching "@QUERY_FIELDS_${resource}@" in the input will be
replaced with a definition list describing the fields for $resource
- The core code is kept in the Sphinx extension, so that it could be
used from there, too
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Wed, 23 Feb 2011 13:58:47 +0000 (14:58 +0100)]
Add query field descriptions
- Make “doc” parameter to MakeField non-optional
- Add descriptions for all fields
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Tue, 22 Feb 2011 14:18:48 +0000 (15:18 +0100)]
query: Add support for field description
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Tue, 22 Feb 2011 17:58:38 +0000 (18:58 +0100)]
Add function to format ordinals
See [1] for the rules.
[1] http://en.wikipedia.org/wiki/Names_of_numbers_in_English#Ordinal_numbers
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
René Nussbaumer [Wed, 16 Feb 2011 10:05:56 +0000 (11:05 +0100)]
Introducing gnt-cluster epo
This is a convenience command to do an automated EPO in the possible limits of
Ganeti.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Wed, 16 Feb 2011 12:09:00 +0000 (13:09 +0100)]
Move OOB_TIMEOUT_OPT to cli.py
OOB commands where we need to be able to specify the timeout are
enhancing over the border of just gnt-node so we move it into cli.py
for easy reuse in other cli parts.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Wed, 23 Feb 2011 16:13:38 +0000 (17:13 +0100)]
epydoc.conf: Avoid newlines, rebuild if necessary
Using $(strip …) ensures there won't be any newlines in the value.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 23 Feb 2011 17:04:48 +0000 (18:04 +0100)]
Add constants for node roles
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 23 Feb 2011 13:39:08 +0000 (14:39 +0100)]
Add constants for instance status
They've been hardcoded for too long.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
René Nussbaumer [Wed, 23 Feb 2011 13:29:00 +0000 (14:29 +0100)]
Merge remote branch 'devel-2.4'
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Wed, 23 Feb 2011 13:16:12 +0000 (14:16 +0100)]
query_unittest: Fix argument to set()
Commit
e431074f introduced an uncatched bug. This patch fixes this. The
set is expecting a list or iteratable to work on, so it splitted the
provided instance name into a set of characters. This caused the
exp_status never been set and therefore not catched in one assert rule
further below who checks that every status was tested.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Tue, 22 Feb 2011 18:02:28 +0000 (19:02 +0100)]
query: Use aliases for legacy instance NIC fields
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 23 Feb 2011 12:25:09 +0000 (13:25 +0100)]
Merge branch 'devel-2.4'
* devel-2.4:
Fix title of query field containing instance name
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 22 Feb 2011 17:00:56 +0000 (18:00 +0100)]
Add unittest for cli.FormatResultError
Also make the parameter for verbosity mandatory.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 22 Feb 2011 17:17:57 +0000 (18:17 +0100)]
Fix title of query field containing instance name
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 22 Feb 2011 17:14:22 +0000 (18:14 +0100)]
cmdlib: Fix pylint error
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 15 Feb 2011 18:52:25 +0000 (19:52 +0100)]
cmdlib: Use filters internally for queries
This is in preparation for implementing real query filters.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 22 Feb 2011 15:36:44 +0000 (16:36 +0100)]
Merge branch 'devel-2.4'
* devel-2.4: (60 commits)
Update news and bump version for 2.4.0 rc2
Fix pylint warnings
TestRapiInstanceRename use instance name
Change the list formatting to a 'special' chars
Add support for merging node groups
Add option to rename groups on conflict
Fix minor docstring typo
Add QA rapi test for instance reinstall
RAPI: remove required parameters for reinstall
Fix HV/OS parameter validation on non-vm nodes
NodeQuery: mark live fields as UNAVAIL for non-vm_capable nodes
NodeQuery: don't query non-vm_capable nodes
Fix LUClusterRepairDiskSizes and rpc result usage
Fix RPC mismatch in blockdev_getsize[s]
Remove superfluous redundant requirement
Don't remove master_candidate flag from merged nodes
Use a consistent ECID base
listrunner: convert from getopt to optparse
listrunner: fix agent usage
Revert "Disable the cluster-merge tool for the moment"
...
Conflicts:
NEWS: Trivial
lib/cli.py: Dropped _RSTATUS_TO_TEXT from master and used
RSS_DESCRIPTION from devel-2.4 instead, adjusted users accordingly
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Mon, 21 Feb 2011 15:51:42 +0000 (16:51 +0100)]
Add/rename label for LUXI in documentation
The HTTP server design doc will refer to the LUXI protocol,
so conflicts need to be avoided.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Mon, 21 Feb 2011 10:28:00 +0000 (11:28 +0100)]
Update news and bump version for 2.4.0 rc2
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Mon, 21 Feb 2011 09:36:10 +0000 (10:36 +0100)]
Merge branch 'devel-2.4' into stable-2.4
* devel-2.4: (23 commits)
Fix pylint warnings
Change the list formatting to a 'special' chars
Add support for merging node groups
Add option to rename groups on conflict
Fix minor docstring typo
Fix HV/OS parameter validation on non-vm nodes
NodeQuery: mark live fields as UNAVAIL for non-vm_capable nodes
NodeQuery: don't query non-vm_capable nodes
Remove superfluous redundant requirement
Don't remove master_candidate flag from merged nodes
Use a consistent ECID base
listrunner: convert from getopt to optparse
listrunner: fix agent usage
Revert "Disable the cluster-merge tool for the moment"
Fix cluster-merging by not stopping noded
Fix error msg for instances on offline nodes
Minor reordering to match param order
cluster verify and instance disks on offline nodes
Cluster verify and N+1 warnings for offline nodes
Handle gnt-instance shutdown --all for empty clusters
Use gnt-node add --force-join to add foreign nodes
Add --force-join option to gnt-node add
Fix iterating over node groups
Of the above commits present in the devel-2.4 branch, only the “Add
--force-join option to gnt-node add” is a potential issue, but this
has been QA-ed successfully. The other fixes are split in three
groups:
- non-core changes (cluster-merge, listrunner)
- trivial fixes (docstrings, etc.)
- bugs that we want fixed
As such, instead of cherry-picking only individual patches, I propose
that we unify stable and devel 2.4 and make a new RC out of the
result.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Stephen Shirley [Fri, 18 Feb 2011 15:25:59 +0000 (16:25 +0100)]
Fix pylint warnings
- 1 80-char line infraction
- 4 changes in how arguments are passed to logging functions
- 3 pylint disable-msg's because cluster-merge needs to access ganeti
config internals
Signed-off-by: Stephen Shirley <diamond@google.com>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Guido Trotter [Fri, 18 Feb 2011 12:52:58 +0000 (12:52 +0000)]
TestRapiInstanceRename use instance name
Currently the QA rename job wrongly passed the whole info dict to the
client.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Fri, 18 Feb 2011 12:51:03 +0000 (13:51 +0100)]
Change the list formatting to a 'special' chars
And also enable verbose display via the, well, verbose option. Man
page and tests are updated, and the formatting is moved from 4 if
statements to a data structure.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Stephen Shirley [Fri, 18 Feb 2011 12:59:46 +0000 (13:59 +0100)]
Add support for merging node groups
Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Stephen Shirley [Fri, 18 Feb 2011 12:30:37 +0000 (13:30 +0100)]
Add option to rename groups on conflict
Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Stephen Shirley [Thu, 17 Feb 2011 16:00:24 +0000 (17:00 +0100)]
Fix minor docstring typo
Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Fri, 18 Feb 2011 11:33:09 +0000 (11:33 +0000)]
Add QA rapi test for instance reinstall
This tests at least the basic case, unfortunately there is no way to
check all possibilities using the provided rapi client, as that will use
the new method unless the cluster doesn't support it.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Fri, 18 Feb 2011 11:20:01 +0000 (11:20 +0000)]
RAPI: remove required parameters for reinstall
Before
c744425f354f1bef2d0d7d306e2d00c494d67d2b instance reinstall
accepted the "os" and "nostartup" optional query parameters. With that
commit it was changed to allow "os" "start" and "osparams" via body
rather than encoded in the URL. Unfortunately that commit introduced a
bug, which required the "os" parameter to be passed for body requests,
and at least one of "os" or "nostartup" for query request.
This fix makes sure all parameters are optional again.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Thu, 17 Feb 2011 16:06:59 +0000 (17:06 +0100)]
Fix HV/OS parameter validation on non-vm nodes
Currently, there is at least one LU that does wrong validation of HV
parameters (against all nodes, LUClusterSetParams). It's possible to
fix this case, but I went and modified the base functions to filter
out non-vm_capable nodes so all callers are protected.
Note: the _CheckOSParams function is never called with all nodes list,
so modifying it shouldn't be needed. However, I think it's safe to do
so (and it shouldn't hurt as an instance's node shouldn't ever lack
the vm_capable bit).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Feb 2011 13:42:57 +0000 (14:42 +0100)]
NodeQuery: mark live fields as UNAVAIL for non-vm_capable nodes
Since we don't have the data per design, UNAVAIL is appropriate here,
while NODATA is not.
The patch also adds a comment: if we extend the live fields list to
contain other data in the future, we need to reevaluate this solution.
This should fix issue 143. The listing now shows (node2==ofline,
node3==not vm_capable):
Node DTotal DFree MTotal MNode MFree Pinst Sinst
node1 698.6G 630.5G 32.0G 1.0G 30.0G 8 7
node2 (offline) (offline) (offline) (offline) (offline) 9 4
node3 (unavail) (unavail) (unavail) (unavail) (unavail) 0 0
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Feb 2011 13:41:29 +0000 (14:41 +0100)]
NodeQuery: don't query non-vm_capable nodes
Because non-vm_capable nodes most likely don't have a hypervisor
configured and/or storage, so the call will fail anyway.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Tue, 15 Feb 2011 13:39:44 +0000 (14:39 +0100)]
Fix LUClusterRepairDiskSizes and rpc result usage
This LU was introduced before the RPC result conversion from .data to
.payload, and it has managed to keep the old-style usage (how? it's
the only LU that does so). Fix by changing to payload, and add some
extra logging for easier diagnose.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Tue, 15 Feb 2011 13:29:08 +0000 (14:29 +0100)]
Fix RPC mismatch in blockdev_getsize[s]
Commit
92fd2250 added consistency checks in the RPC layer, which broke
the call_blockdev_getsizes RPC call (declared with 's' at the end in
rpc.py, without 's' in the node daemon).
The immediate fix is to correct the rpc function name, the long term
one will be to remove this duplication.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Stephen Shirley <diamond@google.com>
Iustin Pop [Mon, 14 Feb 2011 10:47:28 +0000 (11:47 +0100)]
Fix dist archive generation
As reported in issue 140, the timestamps of the generated files can be
older than the commit timestamp, leading to needless rebuilds of man
pages and such. Furthermore, with the man pages not built, it
currently fails, as there is no dependency on them.
Therefore, we change the ‘dist’ rule so that it forces a
maintainer-clean and then explicitly rebuilds the needed targets, so
that we have up-to-date timestamps.
Last, we also ship the HTML versions of the man pages.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Mon, 14 Feb 2011 09:25:10 +0000 (10:25 +0100)]
luxi backend: show attribute names in errors
Currently, this backend just gives:
Error: failed to load data. Details:
Node 'node2': Cannot convert value JSNull, error: Unable to read Double
That is because for Luxi we get an array back from the query, as
opposed to RAPI where we get a dict (and thus have the key at
hand). This patch moves the hardcoded 'convert' functions to a
genericConvert, that also takes the attribute name, with the result
that the error message is now:
Error: failed to load data. Details:
Node 'node2', attribute 'mtotal': Cannot convert value 'JSNull', error: Unable to read Double
which is better for debugging.
The patch also adds quotes around the value in the Utils.fromJVal
function.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Adeodato Simo <dato@google.com>
René Nussbaumer [Thu, 17 Feb 2011 11:51:36 +0000 (12:51 +0100)]
Rephrase a misleading pydoc for netutils.TcpPing
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Stephen Shirley <diamond@google.com>
Stephen Shirley [Tue, 15 Feb 2011 16:40:54 +0000 (17:40 +0100)]
Remove superfluous redundant requirement
The condition is already covered by the previous requirement.
Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Stephen Shirley [Tue, 15 Feb 2011 14:29:03 +0000 (15:29 +0100)]
Don't remove master_candidate flag from merged nodes
Prevents lots of spurious warnings like:
2011-02-10 17:00:22,776: CRITICAL Configuration data is not consistent:
Not enough master candidates: actual 3, target 4
Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Stephen Shirley [Tue, 15 Feb 2011 14:06:03 +0000 (15:06 +0100)]
Use a consistent ECID base
ECID was being calculated completely differently in
__MergeNodeGroups() and _MergeConfig()
Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 16 Feb 2011 16:21:03 +0000 (17:21 +0100)]
listrunner: convert from getopt to optparse
The “-A” (use agent) was not documented, and instead of adding manual
listing, I converted it to optparse like the other CLI tools.
Note that I cleaned up a bit the usage and help texts.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 16 Feb 2011 12:32:29 +0000 (13:32 +0100)]
listrunner: fix agent usage
By delaying the agent key query until after the fork, we prevent the
problem of simultaneous access to the agent.
Tested that it works against 80 hosts in parallel without error; the
current version breaks already at 20 hosts.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Wed, 16 Feb 2011 11:50:35 +0000 (12:50 +0100)]
Fix build error when using docutils 0.4
Docutils 0.4 doesn't provide the “Directive” class and Sphinx supplies
its own version which doesn't have the “assert_has_content” method.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
René Nussbaumer [Thu, 3 Feb 2011 12:07:54 +0000 (13:07 +0100)]
Adding more details to gnt-node man-page
This adds some recently added flags to the man-page of gnt-node command.
It also describes their purpose and handling.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
René Nussbaumer [Thu, 3 Feb 2011 12:57:56 +0000 (13:57 +0100)]
Remove force_master support from LUOobCommand
As per discussion on the man-page[1] update, this functionality should be
removed and replaced by just give the command to run if the user insists
of power cycle/power off the master and refuse to operate.
[1] http://groups.google.com/group/ganeti-devel/browse_thread/thread/
95d4879a747cc295
This also removes the --all flag from gnt-node power because it was
buggy and would have added too much logic for special cases.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 15 Feb 2011 13:35:00 +0000 (14:35 +0100)]
Add pylint disables to Sphinx extension
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 15 Feb 2011 12:36:09 +0000 (13:36 +0100)]
RAPI documentation: Use constants and assertions
This doesn't cover everything yet, but it's a good demonstration on how
to use “pyeval” and “pyassert”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 15 Feb 2011 12:35:22 +0000 (13:35 +0100)]
errors: Add list of possible failure types
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 15 Feb 2011 12:34:43 +0000 (13:34 +0100)]
Sphinx extension: Allow evaluation of Python expressions
There are quite many hardcoded constants (e.g. “[…] one of ``file``,
``lvm-pv`` or ``lvm-vg`` […]). By using constants it'll be easier to
identify these.
With such lists of values it's also easy to miss some when
extending/changing something. By adding assertions inlined with reST,
these can also be detected.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 15 Feb 2011 12:30:36 +0000 (13:30 +0100)]
Sphinx extension: Don't use “from … import …”
Import with full name instead to reduce potential conflicts.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 15 Feb 2011 13:01:14 +0000 (14:01 +0100)]
RAPI: Remove “__version__” for instance creation
If left in data, FillOpCode will complain. This fixes the QA breakage
after commit
526a662af.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Mon, 14 Feb 2011 16:30:19 +0000 (17:30 +0100)]
RAPI: Use FillOpCode for adding node group
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Mon, 14 Feb 2011 15:38:15 +0000 (16:38 +0100)]
RAPI: Use FillOpCode for renaming groups
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Mon, 14 Feb 2011 15:35:13 +0000 (16:35 +0100)]
Make OpGroupRename consistent with OpInstanceRename
OpInstanceRename uses “instance_name” (like almost all other OpInstance*
opcodes), not “old_name”, to specify the original name. OpGroupRename is
made consistent by renaming “old_name” to “group_name”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Mon, 14 Feb 2011 15:14:06 +0000 (16:14 +0100)]
RAPI: Clean up instance creation, use generated docs
- Use FillOpCode and unify parameter names between RAPI and opcode
- Generate parameter documentation
- Improve opcode parameter documentation
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Mon, 14 Feb 2011 13:10:18 +0000 (14:10 +0100)]
RAPI: Generate documentation for assigning nodes to groups
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Mon, 14 Feb 2011 13:09:57 +0000 (14:09 +0100)]
RAPI: Use FillOpCode for modifying node group
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Mon, 14 Feb 2011 12:41:57 +0000 (13:41 +0100)]
RAPI: Use FillOpCode for renaming instances
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Mon, 14 Feb 2011 16:20:33 +0000 (17:20 +0100)]
baserlib.FillOpCode: Allow parameter rename
Some RAPI parameters don't match the name of the underlying
opcode. With this patch they can be renamed while filling
the opcode.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Stephen Shirley [Thu, 10 Feb 2011 16:32:26 +0000 (17:32 +0100)]
Revert "Disable the cluster-merge tool for the moment"
This reverts commit
c0711f2cb989facd60430ab18c5b0e59a1f279ac.
Signed-off-by: Stephen Shirley <diamond@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Stephen Shirley [Thu, 10 Feb 2011 10:52:13 +0000 (11:52 +0100)]
Fix cluster-merging by not stopping noded
cli.RunWhileClusterStopped() stops noded on all of the nodes in the
original cluster. This prevents /etc/hosts updates on the master, and
config redistribution doesn't reach the other nodes in the original
cluster. As all we want to do is merge while the master is stopped,
simply stop it and start it again after.
Signed-off-by: Stephen Shirley <diamond@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Thu, 10 Feb 2011 13:55:08 +0000 (14:55 +0100)]
Fix bug in iallocator data structures build
Commit
a1cef11c fixed non-vm_capable nodes export, but broke
inadvertently offline nodes. The update of the dict only needs to
happen for online nodes, in the 'if' block.
Without this patch, offline nodes keep the data from the last node
that was not offline; end result is that all nodes are considered
online (unless the first node is offline, in which case an error will
be raised).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Thu, 10 Feb 2011 10:06:26 +0000 (11:06 +0100)]
Update exit code information in the hbal man page
Also fixes a small typo.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Adeodato Simo <dato@google.com>
Adeodato Simo [Thu, 10 Feb 2011 12:30:16 +0000 (12:30 +0000)]
Fix broken hscolour.css symlink in tarball
The file apidoc/Ganeti/HTools/hscolour.css was a broken symlink in the
tarball. This was happening because `tar --transform` was being allowed to
act in symlink targets.
Pass the flag "S" to tar --transform, to keep symlink targets intact (and
hence valid).
Signed-off-by: Adeodato Simo <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Tue, 8 Feb 2011 11:04:11 +0000 (12:04 +0100)]
Fix html docs builds
This fixes the doc builds broken by commit
b292b986, but is only an
ugly workaround due to our dependency chain.
opcodes.py imports (both directly and indirectly) constants.py, which
imports _autoconf.py. Hence one could say that all .py files have a
logical dependency on _autoconf.py, since you can't "import opcodes"
before _autoconf.py is built. So the sphinx rule should depend on
_autoconf.py as a prerequisite.
But we can't use a normal prerequisite, since that would cause the
html docs to be rebuilt whenever _autoconf.py gets rebuilt, i.e. even
on end-users machines after ./configure; this is bad, and it also
breaks distcheck (as the html files are not removed in distclean,
since we do want them distributed).
So we only add an order-only prerequisite, which does the right thing
(although our dependency chain is still ugly).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Adeodato Simo <dato@google.com>
Iustin Pop [Wed, 9 Feb 2011 09:04:39 +0000 (10:04 +0100)]
Fix error msg for instances on offline nodes
Currently, for both primary and secondary offline nodes, we give the
same message:
- ERROR: instance instance14: instance lives on offline node(s) node3
- ERROR: instance instance15: instance lives on offline node(s) node3
- ERROR: instance instance16: instance lives on offline node(s) node3
- ERROR: instance instance17: instance lives on offline node(s) node3
This is confusing, as an offline primary is in a different category
than a secondary. The patch changes the warnings to have different
error messages:
- ERROR: instance instance14: instance has offline secondary node(s) node3
- ERROR: instance instance15: instance has offline secondary node(s) node3
- ERROR: instance instance16: instance lives on offline node node3
- ERROR: instance instance17: instance lives on offline node node3
Thanks to Alexander Schreiber <als@google.com> for reporting this
issue.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Alexander Schreiber <als@google.com>
Stephen Shirley [Tue, 8 Feb 2011 16:42:18 +0000 (17:42 +0100)]
Minor reordering to match param order
Signed-off-by: Stephen Shirley <diamond@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Tue, 8 Feb 2011 16:07:13 +0000 (17:07 +0100)]
cluster verify and instance disks on offline nodes
Currently, cluster-verify says:
- ERROR: instance instance14: couldn't retrieve status for disk/0 on node3: node offline
- ERROR: instance instance14: instance lives on offline node(s) node3
- ERROR: instance instance15: couldn't retrieve status for disk/0 on node3: node offline
- ERROR: instance instance15: instance lives on offline node(s) node3
This is redundant as the “lives on offline node” message should be all we need to
understand the cluster situation.
The patch fixes this and also corrects a very old idiom.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Stephen Shirley <diamond@google.com>
Iustin Pop [Tue, 8 Feb 2011 15:56:23 +0000 (16:56 +0100)]
Cluster verify and N+1 warnings for offline nodes
Currently, cluster verify shows warnings N+1 warnings for offline
nodes having any redundant instances since the memory data that we
have for those nodes is zero, so any instance will trigger the
warning.
As the comment says, we already list secondary instances on offline
nodes, so that warning is enough, and we skip the N+1 one.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Stephen Shirley <diamond@google.com>
Stephen Shirley [Mon, 7 Feb 2011 15:35:34 +0000 (16:35 +0100)]
Handle gnt-instance shutdown --all for empty clusters
The current code gives:
Failure: prerequisites not met for this operation:
error type: wrong_input, error details:
Selection filter does not match any instances
Signed-off-by: Stephen Shirley <diamond@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 4 Feb 2011 16:39:47 +0000 (17:39 +0100)]
RAPI: Use FillOpCode for replacing disks
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 3 Feb 2011 17:50:02 +0000 (18:50 +0100)]
Generate parts of RAPI documentation from opcodes
This replaces hardcoded lists of parameters with automatically generated
ones, making maintenance easier.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 3 Feb 2011 17:46:19 +0000 (18:46 +0100)]
Add sphinx extension
For now this just registers a single new directive, “opcode_params”,
which can be used to generate opcode parameter documentation.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 4 Feb 2011 16:23:55 +0000 (17:23 +0100)]
Add opcode parameter descriptions
These will be used in automatically generated parts of the RAPI
documentation. Not all opcodes are documented so far, but each added
opcode's parameters need to be fully documented (verified by an
assertion).
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 4 Feb 2011 13:55:28 +0000 (14:55 +0100)]
opcodes: Prepare addition of parameter descriptions
For now they're all set to None, but a following patch will set descriptions.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 2 Feb 2011 15:41:34 +0000 (16:41 +0100)]
ht: Add descriptive text representations
This patch adds text descriptions to all T* checks. Converting to a
string (e.g. str(ht.TNone)) will produce a user-readable text. This
will be used for Opcode parameter documentation.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Fri, 4 Feb 2011 15:46:38 +0000 (16:46 +0100)]
gnt-instance reinstall: display OS changes
Currently, when reinstalling an instance, especially when selecting an
OS interactively, is hard to be sure one has chosen the correct OS.
This patch adds displaying the selected OS. I'm not entirely happy, as
it's not very good English (e.g. keeping the same OS should be "but
keep the same OS", and changing should be "and also change …") but I
didn't find a better handling of all the cases:
node1# gnt-instance reinstall -o lenny-image+default instance1
This will reinstall the instance 'instance1' (and change the OS to
'lenny-image+default') which removes all data. Continue?
y/[n]/?: n
node1# gnt-instance reinstall instance1
This will reinstall the instance 'instance1' (and keep the same OS)
which removes all data. Continue?
y/[n]/?: n
node1# gnt-instance reinstall instance1 instance2
The reinstall will operate on 2 instances.
Note: this will remove *all* data for the below instances! It will
keep the same OS.
Do you want to continue?
node1# gnt-instance reinstall -o lenny-image+default instance1
instance2
The reinstall will operate on 2 instances.
Note: this will remove *all* data for the below instances! It will
change the OS to 'lenny-image+default'.
Do you want to continue?
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Fri, 4 Feb 2011 13:48:00 +0000 (14:48 +0100)]
Allow passing timeout for oob helper in gnt_node.py
This allow to pass in --oob-timeout to define the timeout before the
out-of-band helper is beeing aborted.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Stephen Shirley [Tue, 1 Feb 2011 15:59:46 +0000 (16:59 +0100)]
Use gnt-node add --force-join to add foreign nodes
Signed-off-by: Stephen Shirley <diamond@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Stephen Shirley [Tue, 1 Feb 2011 15:59:45 +0000 (16:59 +0100)]
Add --force-join option to gnt-node add
This is needed so cluster-merge can add nodes from other clusters.
Signed-off-by: Stephen Shirley <diamond@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Stephen Shirley [Tue, 1 Feb 2011 16:14:18 +0000 (17:14 +0100)]
Fix iterating over node groups
Current line tries to unpack dict incorrectly
Signed-off-by: Stephen Shirley <diamond@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 4 Feb 2011 12:18:33 +0000 (13:18 +0100)]
RAPI: Use FillOpCode for modifying instance
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 2 Feb 2011 17:53:04 +0000 (18:53 +0100)]
RAPI: Use FillOpCode for migrating instance
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 2 Feb 2011 17:40:04 +0000 (18:40 +0100)]
RAPI: Use FillOpCode for exporting instance
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Fri, 4 Feb 2011 09:25:03 +0000 (10:25 +0100)]
Update NEWS file for the 0.3.0 release
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>