Thomas Thrainer [Tue, 4 Mar 2014 10:04:22 +0000 (11:04 +0100)]
Update NEWS file for 2.10.1
Set the release date to tomorrow and mentioned fixed bugs in the NEWS
file.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Mon, 3 Mar 2014 14:57:12 +0000 (15:57 +0100)]
Use node UUIDs for executing LU hooks
LUNodeAdd, the only LU using a node name still, is changed to overwrite
PreparePostHookNodes() and use node UUIDs only as well.
This allows to remove the support for 3-tuples as results of
BuildHooksNodes() and removes the translation to node names.
Fixes issue 742.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 3 Mar 2014 14:49:57 +0000 (15:49 +0100)]
Add PreparePostHookNodes to LUs
This method can be used to alter the list of node UUIDs on which post
hooks are executed. PreparePostHookNodes is called after Exec, so LUs
can use data only known after the execution of the LU.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Mon, 3 Mar 2014 17:36:36 +0000 (18:36 +0100)]
Fix error propagation in post-commit hooks
An error in the post-commit hooks could not be propagated correctly and could
result in e.g. the return code of gnt-cluster verify to be 0 even in presence of
an error in its output.
Fixes Issue 744.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Hrvoje Ribicic [Wed, 26 Feb 2014 10:36:11 +0000 (11:36 +0100)]
Merge branch 'origin/stable-2.9' into stable-2.10
* stable-2.9
Make gnt-debug locks display fake job locks properly
Make NiceSort treat integers well
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Hrvoje Ribicic [Tue, 25 Feb 2014 16:28:59 +0000 (16:28 +0000)]
Make gnt-debug locks display fake job locks properly
When a job is dependent on other jobs, a fake lock is created whose
pending entry contains a list of job ids waiting on the job. gnt-debug
locks did not expect the job ids to be ints, crashing when encountering
them. This patch fixes the situation by forcing a string cast.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Hrvoje Ribicic [Tue, 25 Feb 2014 16:25:29 +0000 (16:25 +0000)]
Make NiceSort treat integers well
NiceSort is invoked on arrays that may contain strings, but in other
situations can contain ints as well. As this surprisingly makes sense,
add a tiny modification to make NiceSort work in these conditions.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Klaus Aehlig [Tue, 25 Feb 2014 15:20:33 +0000 (16:20 +0100)]
Merge branch 'stable-2.9' into stable-2.10
* stable-2.9
Revision bump for 2.9.5
Set release date for 2.9.5
Add NEWS entry for 2.9.5
Conflicts:
NEWS: take both additions
configure.ac: ignore revision bump
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Klaus Aehlig [Tue, 25 Feb 2014 12:50:25 +0000 (13:50 +0100)]
Revision bump for 2.9.5
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Tue, 25 Feb 2014 12:50:08 +0000 (13:50 +0100)]
Set release date for 2.9.5
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Mon, 24 Feb 2014 14:09:32 +0000 (15:09 +0100)]
Add NEWS entry for 2.9.5
Describe the changes since 2.9.4 for the soon-to-be-released
version 2.9.5.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Mon, 24 Feb 2014 13:51:09 +0000 (14:51 +0100)]
Merge branch 'stable-2.9' into stable-2.10
* stable-2.8
Fix expression describing optional parameters
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Klaus Aehlig [Mon, 24 Feb 2014 13:42:49 +0000 (14:42 +0100)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Fix expression describing optional parameters
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Klaus Aehlig [Mon, 24 Feb 2014 13:29:15 +0000 (14:29 +0100)]
Fix expression describing optional parameters
The NIC's network and vlan are also newly added, hence need to be
considered optional to remain backwards compatible.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Mon, 24 Feb 2014 11:38:12 +0000 (12:38 +0100)]
Merge branch 'stable-2.9' into stable-2.10
* stable-2.9
Fix net-common script in case of routed mode
Document hspace's SPN parameters
Document spindles in TSPEC
man: Update the manual page of gnt-node FAILOVER
Make hbal deal with no-LVM storage space properly
* stable-2.8
Improve job status assert affected by race condition
Export and import Disk/NIC name
Fix backup import in case NIC is inside a network
Override get() method of ConfigParser
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Dimitris Aragiorgis [Fri, 22 Nov 2013 19:59:42 +0000 (21:59 +0200)]
Fix net-common script in case of routed mode
setup_route should run in case or routed mode and not
openvswitch.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Cherry-picked from
49c60905e75519c6380af97275b7ff8198eb4660.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Mon, 24 Feb 2014 10:05:12 +0000 (11:05 +0100)]
Document hspace's SPN parameters
With the introduction of spindles as resources, the machine-readable
output of hspace(1) has been extended. Document the additional parameters.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Mon, 24 Feb 2014 09:51:03 +0000 (10:51 +0100)]
Document spindles in TSPEC
As spindles are now considered a resource, they are also output in
the TSPEC parameter of hspace --machine-readable. Document this
interface change.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Petr Pudlak [Mon, 24 Feb 2014 08:27:57 +0000 (09:27 +0100)]
Let the instance's tuple of nodes start with the primary
Before the tuple of nodes of an instance was created from a set, listing
the nodes in alphabetical order. This patch ensures that the primary
node is always the first one in the list.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Petr Pudlak [Mon, 24 Feb 2014 08:26:08 +0000 (09:26 +0100)]
Fix the test that checks for the order of instance's nodes
The test checks if the first node in the tuple is the primary node, but
because it names the node so that it's the least one alphabetically, the
test always succeeds. This fixes the test.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Petr Pudlak [Mon, 24 Feb 2014 09:05:44 +0000 (10:05 +0100)]
man: Update the manual page of gnt-node FAILOVER
In particular explicitly note that a node failover causes all instances
to be stopped and later restarted (issue #724).
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Thu, 20 Feb 2014 16:14:30 +0000 (17:14 +0100)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Improve job status assert affected by race condition
Export and import Disk/NIC name
Fix backup import in case NIC is inside a network
Override get() method of ConfigParser
Conflicts:
lib/cmdlib/instance.py: manually apply
0973f9ed on
the stable-2.9 version
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Thu, 20 Feb 2014 14:11:32 +0000 (15:11 +0100)]
Improve job status assert affected by race condition
In the sliver of time between choosing a waiting job to be executed and
trying to acquire locks for its execution, the status of the job can be
changed to canceling. An assert checking the job status neglected to
take this into account, and raised an error that managed to perpetually
lock the job in the canceling state. This patch resolves the issue by
making the assert accept the canceling state as well, and exiting if
the job was cancelled.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Dimitris Aragiorgis [Thu, 13 Feb 2014 14:47:01 +0000 (16:47 +0200)]
Export and import Disk/NIC name
Name of Disk/NIC were not exported during backup until now.
Use the exported info during gnt-backup import.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Dimitris Aragiorgis [Thu, 13 Feb 2014 14:47:00 +0000 (16:47 +0200)]
Fix backup import in case NIC is inside a network
Network UUID is written in .ini file during backup export
but is not used by _ReadExportParams(). This patch fixes it.
Please note that in case a network is given, link and mode should
not be included in NIC options.
This fixes issue 716.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Dimitris Aragiorgis [Thu, 13 Feb 2014 14:46:59 +0000 (16:46 +0200)]
Override get() method of ConfigParser
During backup import/export SafeConfigParser() is used to
save/restore instance's configuration. There is a possibility if an
export is done with a different Ganeti version, a specific value not
to be saved during export (e.g. the NIC/Disk name) but still
requested during import.
With this patch we override the get() method of SafeConfigParser()
and catch NoOptionError if raised and return None. Additionally we
translate "None" values read from .ini file into None.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Wed, 19 Feb 2014 13:18:05 +0000 (14:18 +0100)]
Make hbal deal with no-LVM storage space properly
Since 2.6, hbal crashes when used on a cluster where no
LVM storage is enabled at all. The problem is that it
always queries for fields that only sometimes make
sense for certain types of storage. This patch will
make it fall-back to a default value if those fields
are not returned by a query. This way it will simply
disregard the space information in its calculation
which is the best we can do in this situation, because
not all storage types support space reporting.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Thomas Thrainer [Wed, 19 Feb 2014 09:06:56 +0000 (10:06 +0100)]
Revision bump for the 2.10.0 release
Remove the ~rc3 suffix from the version for the official 2.10.0 release.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 19 Feb 2014 09:04:21 +0000 (10:04 +0100)]
Update NEWS file for 2.10.0
Mention the bug fix commited to the 2.8 branch and set the release date
to tomorrow.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 19 Feb 2014 08:21:41 +0000 (09:21 +0100)]
Merge branch 'stable-2.9' into stable-2.10
* stable-2.8
Fix integer overflow problem in hbal
Add missing space
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Thu, 13 Feb 2014 16:04:09 +0000 (17:04 +0100)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Fix integer overflow problem in hbal
Add missing space
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 13 Feb 2014 12:39:38 +0000 (13:39 +0100)]
Fix integer overflow problem in hbal
waitForJobs in src/Ganeti/Jobs.hs has an integer overflow that (at least on
amd64) causes it to break after waiting for ~10 minutes. This results in hbal
sleeping forever (when compiled with squeeze's ghc 6.12.1) or crashing (when
compiled with precise's ghc 7.4.1) whenever it has to wait ~10 minutes for a
jobset to complete.
Thanks to gjo@google.com for finding the bug and suggesting the fix.
Fixes Issue 717.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Thu, 13 Feb 2014 12:23:36 +0000 (12:23 +0000)]
Add missing space
Also, refactor the line to keep it under 80 chars.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Thomas Thrainer [Tue, 11 Feb 2014 08:45:58 +0000 (09:45 +0100)]
Revision bump for 2.10.0~rc3
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Thomas Thrainer [Tue, 11 Feb 2014 08:41:59 +0000 (09:41 +0100)]
Update NEWS file for 2.10.0~rc3
Mention changes between 2.10.0~rc2 and 2.10.0~rc3 and set the release
date to tomorrow.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Klaus Aehlig [Mon, 10 Feb 2014 14:28:26 +0000 (15:28 +0100)]
Merge branch 'stable-2.9' into stable-2.10
* stable-2.9
Revision bump for 2.9.4
Set release date for 2.9.4
Note UUID identification change in NEWS file
Allow classic queries to use either names or UUIDs
Document the change of noded's group in NEWS
Conflicts:
NEWS: take all stable-2.9 additions, effectively
restoring the 2.9.4 entry, hence effectively
reverting
78cb4606
configure.ac: ignore revision bump
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Mon, 10 Feb 2014 12:26:45 +0000 (13:26 +0100)]
Revision bump for 2.9.4
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Mon, 10 Feb 2014 12:26:10 +0000 (13:26 +0100)]
Set release date for 2.9.4
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Jose A. Lopes [Fri, 7 Feb 2014 12:07:11 +0000 (13:07 +0100)]
Fix 'JobIdListOnly' type from 'List' to 'Map'
* This patch fixes a type discrepancy between the Haskell type
'Ganeti.OpCodes.JobIdListOnly' and the Python type predicate
'ganeti.ht.TJobIdListOnly', the former being a list and the latter a
dictionary.
* Remove some whitespace
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Hrvoje Ribicic [Fri, 7 Feb 2014 12:31:08 +0000 (13:31 +0100)]
Note UUID identification change in NEWS file
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Thu, 6 Feb 2014 09:28:48 +0000 (09:28 +0000)]
Allow classic queries to use either names or UUIDs
When UUIDs are used in CLI commands, such addressing of objects fails
or succeeds inconsistently across object types. Worse yet, some calls
do not fail, but simply return no result. This is due to the way the
classical queries are handled in the Haskell code - a filter is built,
checking if the names match. If the names do not match, but the object
can still be retrieved through UUID, the query is successful, but there
is nothing to return.
This patch remedies the situation by extending the filter into an or
clause checking for either name or uuid. For objects that have no uuid
field, the name is reused, making the filter equivalent to the old one.
Works towards resolving issue 703.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Thomas Thrainer [Thu, 6 Feb 2014 11:00:58 +0000 (12:00 +0100)]
Remove NEWS entry for 2.9.4
Remove the NEWS entry for 2.9.4 temporarily until it actually gets
released. Otherwise check-news would complain about the unreleased
version below released ones.
The NEWS entry will be added back once 2.9.4 is released and the
corresponding commits are merged up to 2.10 again.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Klaus Aehlig [Thu, 6 Feb 2014 10:14:25 +0000 (11:14 +0100)]
Document the change of noded's group in NEWS
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Thu, 6 Feb 2014 08:58:34 +0000 (09:58 +0100)]
Merge branch 'stable-2.9' into stable-2.10
* stable-2.9
Make the LUInstanceCreate return node names, not UUIDs
Document new handling of degraded instances in NEWS
Gracefully handle degraded instances in verification
Be aware of the degraded case when cleaning up an instance
Document changes to file-based disks in NEWS
Preserve disk basename on instance rename
Update NEWS file
Modify test to reflect RAPI operation changes
Add QA tests for RAPI multi-instance allocation
Fix multi-allocation RAPI method
Assign unique filenames to filebased disks
* stable-2.8
Fix execution group of NodeD
Conflicts:
NEWS (took both changes)
lib/config.py (trivial)
test/py/ganeti.cmdlib_unittest.py
(manually reapplied changes to
test/py/cmdlib/instance_unittest.py)
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Dimitris Aragiorgis [Mon, 3 Feb 2014 21:36:55 +0000 (23:36 +0200)]
Workaround for monitor bug related to greeting msg
QMP may return multiple greeting messages upon connection.
This is reported on qemu-devel. The fix is one-liner but
until it get's released this is a quick and dirty workaround
that flushes the client's buffer after getting the first
greeting message.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Dimitris Aragiorgis [Mon, 3 Feb 2014 21:36:54 +0000 (23:36 +0200)]
hotplug: Verify if a command succeeded or not
Just after issuing _CallHoplugCommands() we invoke
_VerifyHotplugCommand() which parses `info pci` result
and searches for given PCI slot and device id.
If we previously had removed a device but it is still there
abort. Do the same if we had add a device but it is not found.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Dimitris Aragiorgis [Mon, 3 Feb 2014 21:36:53 +0000 (23:36 +0200)]
hotplug: Call each qemu commmand with an own socat
Previously we issued one socat command with two "\n" separated
actions (e.g. netdev_add ...\ndevice_add...)
After having observed a strange monitor behavior [1] splitting
those commands and introducing a sleep time in between, may reduce
any race possibilities. Additionally it will be a step forward
parsing monitor output of each command and decide whether to
modify runtime files or raise a HotplugError.
This patch simply changes _CallHotplugCommand() to take a
list of commands and issue them separately. Introduces one second
sleep after each command and removes sleep from HotModDevice().
[1] https://groups.google.com/d/msg/ganeti-devel/hCQnmuqKtU0/UWGnw251cskJ
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Wed, 5 Feb 2014 17:54:15 +0000 (18:54 +0100)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Fix execution group of NodeD
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Michele Tartara [Wed, 5 Feb 2014 17:46:32 +0000 (17:46 +0000)]
Fix execution group of NodeD
The Node deamon was executed with the wrong gid (gnt-daemons) instead of the one
assigned to it by configure.ac.
Fixes Issue 707.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Mon, 3 Feb 2014 10:43:53 +0000 (10:43 +0000)]
Make the LUInstanceCreate return node names, not UUIDs
The LUInstanceCreate returned names instead of UUIDs in 2.6. Along the
way, the names were internally replaced with UUIDs, and the abstraction
leaked. This patch fixes the issue.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Fri, 31 Jan 2014 09:40:27 +0000 (10:40 +0100)]
upgrade: start daemons after ensure-dirs
On upgrading a cluster, we only can rely on daemons starting
up cleanly, if all needed directories are generated first. So
ensure-dirs needs to be run first.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Klaus Aehlig [Fri, 31 Jan 2014 09:45:39 +0000 (10:45 +0100)]
upgrade design: ensure-dirs before starting daemons
Align the automatic upgrade procedure with the manual upgrade
instructions and run ensure-dirs before starting the new daemons.
This is necessary, as only after ensuring that all needed directories
are present we can rely on the new daemons starting up cleanly.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Klaus Aehlig [Thu, 30 Jan 2014 15:34:27 +0000 (16:34 +0100)]
Document new handling of degraded instances in NEWS
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Klaus Aehlig [Thu, 30 Jan 2014 15:30:00 +0000 (16:30 +0100)]
Gracefully handle degraded instances in verification
The current code assumes that every instance either is of type
diskless or has at least one disk. However, with the option to
remove individual disk degraded 0-disk non-diskless instances
can occur. While such instances usually are not useful, Ganeti
still should be operational in their presence.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Klaus Aehlig [Thu, 30 Jan 2014 15:08:06 +0000 (16:08 +0100)]
Be aware of the degraded case when cleaning up an instance
In the case of a degraded file-based instance, the file storage directory
for that instance cannot be obtained by looking at the first disk. Use
the standard location, computed from first principles, in this case.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Dimitris Aragiorgis [Thu, 30 Jan 2014 12:44:47 +0000 (14:44 +0200)]
Fix network management section in admin.rst
..and clarify that IPv6 info currently does not get used
by Ganeti it self.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Thu, 30 Jan 2014 15:14:54 +0000 (16:14 +0100)]
Adapt release date for 2.10.0-rc2
Postpone the rc2 release to Friday 31st.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Thu, 30 Jan 2014 11:54:14 +0000 (12:54 +0100)]
Document changes to file-based disks in NEWS
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Klaus Aehlig [Thu, 30 Jan 2014 11:46:03 +0000 (12:46 +0100)]
Preserve disk basename on instance rename
For file-based instances, upon rename, the directory containing
the instance disks is moved. Therefore, the basename needs to
be preserved in this case. Fix this. Note that so far, this
worked by accident as before
94e252a3 file names used to be
"disk" followed by the index.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Thomas Thrainer [Wed, 29 Jan 2014 14:39:32 +0000 (15:39 +0100)]
Revision bump for 2.10.0-rc2
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Tue, 28 Jan 2014 14:03:32 +0000 (15:03 +0100)]
Update NEWS file in preparation of 2.10.0rc2
Include changes made in 2.8, 2.9 and in 2.10 in the NEWS file.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Hrvoje Ribicic [Tue, 28 Jan 2014 19:21:37 +0000 (19:21 +0000)]
Update NEWS file
This patch updates the NEWS file with NEWS of the bugfix, adding the
new 2.9.4 version in progress.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Wed, 29 Jan 2014 13:04:57 +0000 (14:04 +0100)]
Modify test to reflect RAPI operation changes
A rlib2 unittest tested for the wrong behaviour, and this patch changes
the inputs and expected values to account for this.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Tue, 28 Jan 2014 18:04:44 +0000 (18:04 +0000)]
Add QA tests for RAPI multi-instance allocation
The instance multi-allocation had no tests to detect its breakage, and
this patch fixes that.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Tue, 28 Jan 2014 15:26:32 +0000 (15:26 +0000)]
Fix multi-allocation RAPI method
The OpInstanceMultiAlloc that the instances-multi-alloc RAPI method
uses accepts a list of OpInstanceCreate opcodes rather than a list of
dictionaries as provided by the method. This patch correctly constructs
the opcodes, allowing the RAPI call to work as expected.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Dimitris Aragiorgis [Wed, 29 Jan 2014 10:42:51 +0000 (12:42 +0200)]
Add Network Management section in admin.rst
This section provides some basic info regarding gnt-network design,
adds a simple hands-on example and refers to external components
that gnt-network can interact with, in order instances will get
the desired configuration.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Ilias Tsitsimpis [Tue, 28 Jan 2014 15:23:46 +0000 (17:23 +0200)]
Assign unique filenames to filebased disks
With the new format for cmdline arguments, the user is able to add a
disk to an instance at a specific index. But filebased disks' filenames
have the form "{0}/disk{1}" where '{0}' is the file_storage_dir and
'{1}' is the index of the disk. So if an instance has 3 disks and we
try to create a new one at index 1, the operation will fail because the
filename "{0}/disk1" already exists.
This patch fixes the above problem and also makes the naming of file and
shared disks uniform with other templates.
Signed-off-by: Ilias Tsitsimpis <iliastsi@grnet.gr>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Tue, 28 Jan 2014 10:19:47 +0000 (11:19 +0100)]
Enable network tags in Haskell code
Prior to the creation of the 2.10 branch, network tags were broken, and
the Haskell code introduced there mistakenly accepted this as the
desired functionality. This patch fixes this in a very simple way.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Mon, 27 Jan 2014 12:23:52 +0000 (13:23 +0100)]
Merge branch 'stable-2.9' into stable-2.10
* stable-2.9
Revision bump for 2.9.3
Schedule 2.9.3 release
Document fix of issue 691 in NEWS
NEWS: fix typo in 2.8.4 release
Fix 'hvparams' of '_InstanceStartupMemory' on hypervisors
Add missing option to gnt-instance documentation
Update NEWS file
Fix disk_type error in hypervisor parameter documentation
Update NEWS file: issue 687 and configure fix
luxid: fix detection of master node in node query
query: fix detection of master in _GetNodeRole()
Break line longer than 80 chars in configure.ac
Technical writing: improve documentation and glossary
configure: allow detection of Sphinx 1.2+
Remove deprecated _ERROR_DATA_KEY in QMP
Technical writing: improve main documentation page
Update the NEWS file with the Issue 640 fix
Ensure that all the hypervisors exist in the config file
Fix testEncodeInstance test input
* stable-2.8
Version bump for 2.8.4 and NEWS update
Update NEWS file with news about job cancellation bugfix
Fix QA flakiness
Linting fix: remove unused import
Add missing parameter entry to man file
Add QA test for job cancellation
Add correct locking of master node to gnt-debug delay
Add job id type assert to jqueue.py
Add job id transformation/check to Luxi Python client
Start-master/stop-master always fail if confd is disabled
Improve backwards compatibility of Issue 649 fix
Add missing NEWS entries from stable-2.8
Change usb_devices separator to whitespace
Add support for blktap2 file-driver
Update opcodes test to include network tags
Make network tags searchable
Add network tag tests to QA
Fix RAPI network tag handling
Fix gnt-network list-tags
Conflicts:
NEWS
configure.ac
doc/index.rst
lib/constants.py
lib/hypervisor/hv_kvm.py
src/Ganeti/OpParams.hs
src/Ganeti/Query/Server.hs
test/hs/Test/Ganeti/OpCodes.hs
test/py/ganeti.hypervisor.hv_xen_unittest.py
test/py/ganeti.rpc_unittest.py
Resolution:
NEWS: take both additions
configure.ac: ignore revision bump
doc/index.rst: take stable-2.9 changes
lib/constants.py: ignore stable-2.9 changes, but redo
7bc2c09762 in the new constants framework
(rest trivial)
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Klaus Aehlig [Thu, 23 Jan 2014 12:46:05 +0000 (13:46 +0100)]
Haskell style: explicit errors, visible in the type
While it is already standard in the Ganeti code base, explicitly
document that we do not like Exceptions and use sum types instead.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Klaus Aehlig [Thu, 16 Jan 2014 15:36:14 +0000 (16:36 +0100)]
Clarify spacing in record syntax
So far, our code base does not have a consistent way of spacing
records. To work towards more consistency, add a recommendation
into out style guide. We standardize on what seems most common
in the Haskell world and also is the dominant form in our code
base.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Petr Pudlak [Thu, 9 Jan 2014 13:36:28 +0000 (14:36 +0100)]
Improve the point-free section of the style guide
Distinguish declaring functions in the point-free style and using
a very similar technique to avoid parentheses (which isn't technically
point-free).
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Santi Raffa [Wed, 8 Jan 2014 16:02:10 +0000 (16:02 +0000)]
Add code style document to documentation
The Ganeti code style has been stored on the project wiki at:
https://code.google.com/p/ganeti/wiki/StyleGuide
https://code.google.com/p/ganeti/wiki/HaskellStyleGuide
This commit combines the two pages into an .rst file with minimal
formatting and language changes. Note that the style guide introduced
in this commit does not fit the code base in a number of ways,
including:
* Some Haskell files have lines longer than 78 characters
* Some Haskell files have trailing whitespace
* Some Python docstring initial sentences lack punctuation at the end
The decision to either change the offending lines to fit the guidelines,
to change the guidelines to fit the codebase or to simply ignore the
discrepancies is left for other commits to solve.
Signed-off-by: Santi Raffa <rsanti@google.com>
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Jose A. Lopes [Mon, 27 Jan 2014 09:08:56 +0000 (10:08 +0100)]
Export docs from wiki to repo
Export documents about 'cluster keys replacement' and 'design file
based storage' from the wiki to the repository.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Fri, 24 Jan 2014 10:42:08 +0000 (11:42 +0100)]
Revision bump for 2.9.3
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Fri, 24 Jan 2014 10:41:44 +0000 (11:41 +0100)]
Schedule 2.9.3 release
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Fri, 24 Jan 2014 10:32:59 +0000 (11:32 +0100)]
Document fix of issue 691 in NEWS
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Guido Trotter [Thu, 23 Jan 2014 16:07:25 +0000 (17:07 +0100)]
NEWS: fix typo in 2.8.4 release
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Petr Pudlák <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Fri, 24 Jan 2014 00:24:51 +0000 (01:24 +0100)]
Fix 'hvparams' of '_InstanceStartupMemory' on hypervisors
Most hypervisors were calling '_InstanceStartupMemory' but not passing
the 'hvparams' keyword argument. Actually, it is not necessary to
pass this argument given that it is an attribute in the instance
object, which is passed. This patch removes the 'hvparams' arg all
together, fixes the function and the calls to it.
Fixes issue 691.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Thu, 23 Jan 2014 17:24:50 +0000 (18:24 +0100)]
Add missing option to gnt-instance documentation
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Thu, 23 Jan 2014 15:40:02 +0000 (16:40 +0100)]
Update NEWS file
With the merge of stable-2.8 into stable-2.9, quite a few fixes
got inherited.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Klaus Aehlig [Thu, 23 Jan 2014 13:24:08 +0000 (14:24 +0100)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Version bump for 2.8.4 and NEWS update
Update NEWS file with news about job cancellation bugfix
Fix QA flakiness
Linting fix: remove unused import
Add missing parameter entry to man file
Add QA test for job cancellation
Add correct locking of master node to gnt-debug delay
Add job id type assert to jqueue.py
Add job id transformation/check to Luxi Python client
Start-master/stop-master always fail if confd is disabled
Improve backwards compatibility of Issue 649 fix
Add missing NEWS entries from stable-2.8
Change usb_devices separator to whitespace
Conflicts:
NEWS: take both additions
configure.ac: ignore revision bump
lib/cmdlib/test.py: manually redo changes of stable-2.8
on stable-2.9 version
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Hrvoje Ribicic [Thu, 23 Jan 2014 10:20:40 +0000 (10:20 +0000)]
Fix disk_type error in hypervisor parameter documentation
According to the code, presenting disks as paravirtual is supported on
both HVM and KVM, while IDE works only on KVM. This patch updates docs
to be accurate.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Thu, 23 Jan 2014 08:52:42 +0000 (08:52 +0000)]
Version bump for 2.8.4 and NEWS update
Update the version number to 2.8.4 and insert the final details for this
release in the NEWS file, including the release date.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Thu, 9 Jan 2014 17:10:58 +0000 (17:10 +0000)]
Run drbdsetup syncer only on network attach
As late as DRBD 8.3.11, the drbdsetup syncer command has a bug causing
nodes to hang from time to time, requiring manual intervention to fix.
The use of the command cannot be avoided, but the incidence of use can
be reduced.
By invoking the command only when the network part of a DRBD device is
configured, activate-disks and similar commands can avoid invoking the
troublesome command. This patch does this by moving the invocation from
Assemble to _AssembleNet.
Works towards fixing issue 650.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Hrvoje Ribicic [Mon, 20 Jan 2014 16:25:02 +0000 (17:25 +0100)]
Update NEWS file with news about job cancellation bugfix
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Mon, 20 Jan 2014 16:22:23 +0000 (17:22 +0100)]
Fix QA flakiness
The newly added job QA has some flakiness with respect to its use of
gnt-job watch. Fix this by waiting until the canceling status is
replaced with the canceled status, or a timeout is reached.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Mon, 20 Jan 2014 15:30:05 +0000 (16:30 +0100)]
Linting fix: remove unused import
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Mon, 20 Jan 2014 13:12:38 +0000 (14:12 +0100)]
Update NEWS file: issue 687 and configure fix
Add entries to the NEWS file for the two user-visible changes that
happened since the last update: issue 687 got fixed, and configure
now supports Sphinx versions 1.2+.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Apollon Oikonomopoulos [Mon, 20 Jan 2014 12:55:26 +0000 (14:55 +0200)]
luxid: fix detection of master node in node query
Ganeti.Config.getNodeRole would rely on clusterMasterNode returning the
master node name, however clusterMasterNode returns the master node's
UUID. We fix this and a similar issue in Ganeti.Query.Node.nodeFields.
Together with
1ec34e26, this fixes issue #687.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Mon, 20 Jan 2014 12:06:45 +0000 (13:06 +0100)]
Add missing parameter entry to man file
The gnt-instance manual was lacking an entry for the vnc-password-file
hypervisor parameter. This patch adds one, and also some information on
the default value of the parameter.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Thu, 16 Jan 2014 10:14:08 +0000 (10:14 +0000)]
Add QA test for job cancellation
This patch introduces a QA test in which a job is cancelled while
waiting.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Thu, 16 Jan 2014 12:08:18 +0000 (12:08 +0000)]
Add correct locking of master node to gnt-debug delay
The gnt-debug delay command required locks for all nodes except the
master - this patch fixes the issue by adding master to the locks
whenever needed.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Wed, 15 Jan 2014 13:51:01 +0000 (13:51 +0000)]
Add job id type assert to jqueue.py
While the changes introduced in previous patches should stop any job
id parameters reaching the queue as strings, add an assertion here to
catch any strings making it through.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Hrvoje Ribicic [Wed, 15 Jan 2014 13:48:51 +0000 (13:48 +0000)]
Add job id transformation/check to Luxi Python client
This patch adds checks to the Luxi client, making sure that job ids
are converted from strings to ints before being passed on, or that an
error is reported.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Apollon Oikonomopoulos [Fri, 17 Jan 2014 15:32:38 +0000 (17:32 +0200)]
query: fix detection of master in _GetNodeRole()
Commit
1c3231aa changed the invocation of _GetNodeRole() to pass the
master node by UUID and not by name, but didn't change the
implementation to compare the nodes by name. As a result, the master
node (which is also a master candidate) would always fall through to the
second option and be marked as 'C' instead as 'M'.
We fix this by modifying the implementation of _GetNodeRole() to perform
the comparison by UUID and also change the respective tests to test the
new API.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Fri, 17 Jan 2014 00:43:43 +0000 (01:43 +0100)]
Start-master/stop-master always fail if confd is disabled
In 'daemons/daemon-util.in', 'start-master' and 'stop-master' always
fail if confd is disabled.
Fixes issue 685.
Signed-off-by: Jose A. Lopes <jabolopes@gmail.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Dimitris Aragiorgis [Fri, 10 Jan 2014 13:00:08 +0000 (15:00 +0200)]
Include target node in hooks nodes for migration
In case of DRBD, hooks run on both primary (source) and secondary
(target) nodes. To get the same behavior for DTS_EXT_MIRROR, where we
do not have secondary node, we should explicitly add target node to
hooks nodes during instance migration/failover.
CheckPrereq() of TLMigrateInstance runs before BuildHooksManager(),
thus target_node calculated by Iallocator is available under
self._migrater.target_node. Use this value instead of
self.op.target_node which can be None.
Update NEWS and related doc entries.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Jose A. Lopes [Thu, 16 Jan 2014 18:33:53 +0000 (19:33 +0100)]
Fix configure dirs
Fix overridable configure directories, namely, --bindir, --sbindir,
and --mandir.
Variables 'bindir', 'sbindir', and 'mandir' are exported from
'configure.ac' to 'Makefile.am'. At first, it would seem to be
possible to do the following:
MANDIR := $(mandir)
...
mandir = $(versionedsharedir)$(datarootdir)/$(MANDIR)
However, this does not work in the output of 'configure' (i.e., the
'Makefile'), these variables will be reordered:
mandir = $(versionedsharedir)$(datarootdir)/$(MANDIR)
...
MANDIR := $(mandir)
As a result, 'MANDIR' will capture not the exported value from
'configure.ac' but the 'mandir' defined in the 'Makefile'.
The solution is explicitly export these variables from 'configure.ac'
with different names, namely, 'BINDIR', 'SBINDIR', and 'MANDIR':
AC_SUBST([BINDIR], $bindir)
AC_SUBST([SBINDIR], $sbindir)
AC_SUBST([MANDIR], $mandir)
The rest is just fixing the paths and the symlinks in the 'Makefile'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Petr Pudlak [Fri, 17 Jan 2014 08:19:52 +0000 (09:19 +0100)]
Docs: Update the version of ganeti-instance-debootstrap
The installation manual used version 0.12, which had some bugs.
This patch updates it to the latest 0.14.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>