René Nussbaumer [Tue, 21 Oct 2008 14:24:06 +0000 (14:24 +0000)]
Adding support to specify the MAC of an instance in batcher
This patch adds MAC awareness of batcher at instance creation time.
Reviewed-by: iustinp
Guido Trotter [Mon, 20 Oct 2008 10:11:58 +0000 (10:11 +0000)]
Fix typo in gnt-backup(8)
The manpage wrongly reported the mac address option as -m rather than
--mac
Reviewed-by: imsnah
Guido Trotter [Mon, 20 Oct 2008 09:45:39 +0000 (09:45 +0000)]
Update protocol version
r1808 changes an OS object field name from api_version to api_versions
and its type from int to list of int. This needs a protocol version
increase in order to avoid incompatibilities.
Reviewed-by: imsnah
Guido Trotter [Mon, 20 Oct 2008 09:45:18 +0000 (09:45 +0000)]
Use constants.VALUE_AUTO for ip comparison too
Reviewed-by: imsnah
Guido Trotter [Mon, 20 Oct 2008 09:38:46 +0000 (09:38 +0000)]
Document mac option for gnt-backup import
Reviewed-by: iustinp
Guido Trotter [Mon, 20 Oct 2008 09:35:18 +0000 (09:35 +0000)]
LUCreateInstance: reuse mac address on import
When importing an instance with the same name as the exported one if the
mac address is "auto" we try to reuse the previous mac address. One can
still force generation of a new one with mac="generate".
Reviewed-by: iustinp
Guido Trotter [Mon, 20 Oct 2008 09:35:06 +0000 (09:35 +0000)]
LUCreateInstance: accept mac = VALUE_GENERATE
VALUE_GENERATE is handled exactly the same as VALUE_AUTO and the mac
address is generated randomly.
Reviewed-by: iustinp
Guido Trotter [Mon, 20 Oct 2008 09:34:54 +0000 (09:34 +0000)]
Add mac option to gnt-backup import
Before 'auto' was the only allowed possibility
Reviewed-by: iustinp
Guido Trotter [Mon, 20 Oct 2008 09:34:32 +0000 (09:34 +0000)]
Add VALUE_AUTO and VALUE_GENERATE constants
'auto' is used in multiple place in the code with a meaning similar to
'default', 'generate' will be used to force generation of mac addresses
when the default would be to reuse an old one.
Reviewed-by: iustinp
Guido Trotter [Mon, 13 Oct 2008 13:19:20 +0000 (13:19 +0000)]
OS API: support for multiple versions in an OS
Allow multiple api versions in an OS. This is according to the OS API
changes design doc, by which an OS can support multiple versions of the
Ganeti API and if one is supported by Ganeti it will work. Since up to
version 5 of the API mandates an OS could support only one version, this
change is retrocompatible with it and requires no version bump up.
Reviewed-by: iustinp
Alexander Schreiber [Tue, 7 Oct 2008 12:19:10 +0000 (12:19 +0000)]
Change default instance reboot type to hard.
Reviewed-by: ultrotter, iustinp
Iustin Pop [Fri, 3 Oct 2008 14:31:53 +0000 (14:31 +0000)]
Fix a mistake in the gnt-backup man page
The actual location is /export, not /exports.
Reviewed-by: ultrotter
Iustin Pop [Fri, 3 Oct 2008 11:59:44 +0000 (11:59 +0000)]
Export the cpu nodes and sockets from Xen
The patch changed the xen hypervisor to compute the number of cpu
sockets/nodes and enables the command line and the RAPI to show this
information (for RAPI is enabled by default in node details, for gnt-one
one can use the new “cnodes” and “csockets” fields).
Reviewed-by: ultrotter
René Nussbaumer [Fri, 3 Oct 2008 09:53:50 +0000 (09:53 +0000)]
Update of batcher
* Adding support for a state file
* Tidy up of code constructs
* Several fixes of typos
Iustin Pop [Thu, 2 Oct 2008 11:22:17 +0000 (11:22 +0000)]
A small whitespace change
Reviewed-by: amishchenko
Iustin Pop [Thu, 2 Oct 2008 11:21:33 +0000 (11:21 +0000)]
Fix errors when the node info RPC is incomplete
If ganeti starts before xend, the node information will not have all the
fields filled in. The patch changes so that missing keys will be treated
as unknown (this applies to other cases as well, not only xend not
started).
Reviewed-by: ultrotter
Iustin Pop [Sat, 27 Sep 2008 18:47:46 +0000 (18:47 +0000)]
Add checks for tcp/udp port collisions
In case the config file is manually modified, or in case of bugs, the
tcp/udp ports could be reused, which will create various problems
(instances not able to start, or drbd disks not able to communicate).
This patch extends the ConfigWriter.VerifyConfig() method (which is used
in cluster verify) to check for duplicates between:
- the ports used for DRBD disks
- the ports used for network console
- the ports marked as free in the config file
Also, if the cluster parameter ‘highest_used_port’ is actually lower
than the computed highest used port, this is also flagged as an error.
The output from gnt-cluster verify will show (output manually wrapped):
node1 # gnt-cluster verify
* Verifying global settings
- ERROR: tcp/udp port 11006 has duplicates: instance3.example.com/network port,
instance2.example.com/drbd disk sda
- ERROR: tcp/udp port 11017 has duplicates: instance3.example.com/drbd disk sda,
instance3.example.com/drbd disk sdb, cluster/port marked as free
- ERROR: Highest used port mismatch, saved 11010, computed 11017
* Gathering data (2 nodes)
...
Reviewed-by: ultrotter
René Nussbaumer [Thu, 25 Sep 2008 09:34:41 +0000 (09:34 +0000)]
Fix iallocator name
Patch on revision 1686 used the wrong field: ial.name, which is the instance
name and not the iallocator name. self.op.iallocator is the right field.
Sorry for this inconvenience.
Reviewed-by: imsnah
René Nussbaumer [Wed, 24 Sep 2008 13:49:35 +0000 (13:49 +0000)]
Fix a broken format string
This patch fixes a broken format string. It's expecting 3 parameters, but only
gets 2. This change will add the missing parameter.
Reviewed-by: imsnah
Guido Trotter [Wed, 24 Sep 2008 12:09:09 +0000 (12:09 +0000)]
Release Ganeti 1.2.6 (version update)
Reviewed-by: iustinp
Guido Trotter [Wed, 10 Sep 2008 15:16:05 +0000 (15:16 +0000)]
ganeti 1.2.6~rc1
Release a new Ganeti 1.2.6 candidate.
release candidate 1 includes:
- the NEWS file
- HVM backwards compatibility fixes
- disable LUGrowDisk in burnin, for diskless instances
- manpage fixes
- protocol version bump up
- burnin fix on hvm clusters
Reviewed-by: iustinp
Alexander Schreiber [Wed, 10 Sep 2008 09:14:16 +0000 (09:14 +0000)]
Make burnin aware of hvm device type flags
Reviewed-by: ultrotter
Iustin Pop [Mon, 8 Sep 2008 15:49:36 +0000 (15:49 +0000)]
Update protocol version
Commit 1535 introduced new fields in the instance objects, which are
serialized and and transmitted over the wire. As such, even if the
call signatures are not changed, the contents of the objects are changed
and we need to increase the version.
Reviewed-by: ultrotter
Alexander Schreiber [Mon, 8 Sep 2008 10:36:09 +0000 (10:36 +0000)]
Fix gnt-instance man page: s/auto_balance/auto-balance/
Reviewed-by: ultrotter
Alexander Schreiber [Thu, 4 Sep 2008 11:57:43 +0000 (11:57 +0000)]
Use a default vnc_bind_address if None is specified
This patch makes Ganeti use the default VNC bind address if None is
specified in the config file to avoid trouble with upgraded
HVM clusters.
Reviewed-by: imsnah
Guido Trotter [Thu, 4 Sep 2008 09:05:02 +0000 (09:05 +0000)]
burnin: don't try to grow diskless instances
When burnin is run on a diskless instance, it fails when trying
GrowDisk, because a non-existant disk cannot be grown. This patch
disables the test for that disk template.
Reviewed-by: iustinp
Guido Trotter [Wed, 3 Sep 2008 16:18:08 +0000 (16:18 +0000)]
Add fix of the drbd speed race condition to NEWS
Reviewed-by: imsnah
Alexander Schreiber [Wed, 3 Sep 2008 14:07:38 +0000 (14:07 +0000)]
Added HVM console access update
Reviewed-by: ultrotter
Guido Trotter [Wed, 3 Sep 2008 08:48:26 +0000 (08:48 +0000)]
update NEWS for version 1.2.6
Reviewed-by: iustinp
Guido Trotter [Tue, 2 Sep 2008 15:39:01 +0000 (15:39 +0000)]
Small 1.2.6 fixes
Found going through the 1.2.5/1.2.6~rc0 diff
- Remove a slipped empty line
- Change if statement to be more direct (nested if, rather than
if...pass...elif)
Reviewed-by: iustinp
Guido Trotter [Tue, 2 Sep 2008 11:45:39 +0000 (11:45 +0000)]
Change version for rc0 release of ganeti 1.2.6
Reviewed-by: iustinp
Iustin Pop [Mon, 1 Sep 2008 09:21:51 +0000 (09:21 +0000)]
Import internal batcher tool
This patch adds a slightly modified version of the internal ‘batcher’
tool by Tim Boring. It still has some small usability issues, but it can
be used for 'bulk' instance creation.
The tool will be installed under the 'tools' directory and its
associated README under the doc directory.
Author: Tim Boring <tjboring@gmail.com>
Reviewed-by: imsnah
Alexander Schreiber [Fri, 29 Aug 2008 14:41:08 +0000 (14:41 +0000)]
Tiny doc typo fix
Reviewed-by: ultrotter
Alexander Schreiber [Thu, 28 Aug 2008 15:29:25 +0000 (15:29 +0000)]
Change gnt-instance reinstall --interactive to --select-os
Reviewed-by: ultrotter
Iustin Pop [Thu, 28 Aug 2008 15:22:47 +0000 (15:22 +0000)]
Export all instance fields in RAPI
This just adds the newly added field to LUQueryInstances into the RAPI
instance queries.
Reviewed-by: imsnah
Iustin Pop [Thu, 28 Aug 2008 13:52:44 +0000 (13:52 +0000)]
Small typos in the gnt-instance man page
Reviewed-by: imsnah
Iustin Pop [Thu, 28 Aug 2008 13:52:36 +0000 (13:52 +0000)]
Allow instance info to only query the config file
This patch adds a new '-s' parameter to ‘gnt-instance info’ that makes
it return only 'static' information. This is much faster, especially for
drbd instances.
Reviewed-by: imsnah
Michael Hanselmann [Thu, 28 Aug 2008 13:49:58 +0000 (13:49 +0000)]
Implement more options for “gnt-backup import”
HVM options were missing.
Reviewed-by: iustinp
Michael Hanselmann [Thu, 28 Aug 2008 13:49:47 +0000 (13:49 +0000)]
Add more fields to “gnt-instance list”
Reviewed-by: iustinp
Iustin Pop [Thu, 28 Aug 2008 11:24:41 +0000 (11:24 +0000)]
Fix auto_balance and memory modification
The secondary nodes should not be checked for free memory in case of non
auto-balanced instances.
Reviewed-by: ultrotter
Michael Hanselmann [Thu, 28 Aug 2008 10:26:51 +0000 (10:26 +0000)]
Include qa_rapi in distribution
It was missing.
Reviewed-by: ultrotter, amishchenko
Iustin Pop [Thu, 28 Aug 2008 08:50:45 +0000 (08:50 +0000)]
Update command line help for instance list
Reviewed-by: ultrotter
Iustin Pop [Thu, 28 Aug 2008 08:50:36 +0000 (08:50 +0000)]
Documentation for auto_balance
The man pages for gnt-instance and gnt-backup are updated with this
parameter.
Reviewed-by: ultrotter
Iustin Pop [Thu, 28 Aug 2008 08:50:25 +0000 (08:50 +0000)]
Use the auto_balance in cluster verify
This patch changes the cluster verify in two ways:
- do not use instances marked with auto_balance=False in N+1 memory
checks
- report, if any, the number of instances with auto_balance=False
Reviewed-by: imsnah
Iustin Pop [Thu, 28 Aug 2008 08:50:15 +0000 (08:50 +0000)]
Query/manipulation of the auto_balance attribute
This patch allows:
- setting of the auto_balance parameter in the instance creation and
import
- modification later via gnt-instance modify
- listing it via gnt-instance list
- printing it in gnt-instance info
Reviewed-by: ultrotter
Iustin Pop [Thu, 28 Aug 2008 08:50:03 +0000 (08:50 +0000)]
Add a new auto_balance parameters to instances
This new parameters will be initialized to true if it's missing from the
config file.
Reviewed-by: ultrotter
Guido Trotter [Wed, 27 Aug 2008 11:25:56 +0000 (11:25 +0000)]
Check memory size before setting it
With this change when a user asks for a new memory size for an instance,
the number is checked instead of just applied. The operation fails only
if the instance would not be able to restart on its primary node, but
generates warnings should it be impossible to failover the instance or
should the computation be impossible due to nodes being unreachable.
Reviewed-by: iustinp
Guido Trotter [Wed, 27 Aug 2008 11:25:32 +0000 (11:25 +0000)]
Pass the force param to SetInstanceParms
It was already allowed in gnt-instance modify, but ignored.
It will be used to force skipping parameter checks.
Reviewed-by: imsnah
Alexander Schreiber [Tue, 26 Aug 2008 12:27:04 +0000 (12:27 +0000)]
Fix wrong wording of instance rename error message.
Reviewed-by: imsnah
Alexander Schreiber [Tue, 26 Aug 2008 11:53:08 +0000 (11:53 +0000)]
Document behaviour of gnt-instance console for HVM
Reviewed-by: imsnah
Michael Hanselmann [Mon, 25 Aug 2008 12:32:00 +0000 (12:32 +0000)]
Work around a DRBD sync speed race condition
When DRBD is doing its dance to establish a connection with its
peer, it also sends the synchronization speed over the wire. In
some cases setting the sync speed only after setting up both
sides can race with DRBD connecting, hence we set it here before
telling DRBD anything about its peer.
Reviewed-by: iustinp
Alexander Schreiber [Mon, 25 Aug 2008 09:27:14 +0000 (09:27 +0000)]
Document gnt-instance reinstall --interactive
Reviewed-by: ultrotter
Alexander Schreiber [Fri, 22 Aug 2008 16:26:09 +0000 (16:26 +0000)]
Implement interactive gnt-instance reinstall
Reviewed-by: ultrotter
Alexander Schreiber [Fri, 22 Aug 2008 12:00:59 +0000 (12:00 +0000)]
more information for VNC console port
This patch extends the gnt-instance info again. If vnc_bind_address is
set to 127.0.0.1 then the 'VNC console port' line will also print the
nodename on which to connect to localhost.
While this duplicates info from the Node:primary output, it should make
it simpler for scripts that look for VNC console port information.
Reviewed-by: ultrotter
Alexander Schreiber [Fri, 22 Aug 2008 09:58:04 +0000 (09:58 +0000)]
Allow access to HVM serial console
This patch changes the behaviour of gnt-instance console for HVM instances.
Now the warning message directing the user to VNC (stating the necessary
host:port pair) is no longer printed but instead access to the serial
console of the instance is attempted. The VNC console access information
can now be found via gnt-instance info (requires previous patch
37e41abdeb
"Display VNC console port in gnt-instance info").
Reviewed-by: imsnah
Alexander Schreiber [Fri, 22 Aug 2008 09:50:27 +0000 (09:50 +0000)]
Display VNC console port in gnt-instance info.
This patch shows the host:port pair needed to access the console of an
HVM instance as part of the gnt-instance info output. It is a precondition
for allowing serial console access to HVM instances.
Reviewed-by: imsnah
Alexander Schreiber [Fri, 22 Aug 2008 08:18:46 +0000 (08:18 +0000)]
Check HVM device type on instance modify as well.
Reviewed-by: ultrotter
Alexander Schreiber [Thu, 21 Aug 2008 16:07:28 +0000 (16:07 +0000)]
Add HVM device type flags 3/4
This patch adds the frontend handling (gnt-instance command) for
the HVM device type patchset.
Reviewed-by: ultrotter
Alexander Schreiber [Thu, 21 Aug 2008 16:03:31 +0000 (16:03 +0000)]
Add HVM device type flags 2/4
This patch adds the backend support for the HVM device flags.
Reviewed-by: ultrotter
Alexander Schreiber [Thu, 21 Aug 2008 15:27:14 +0000 (15:27 +0000)]
Add HVM device type flags 1/4
This patch adds the constants and instance object additions.
Reviewed-by: ultrotter
Alexander Schreiber [Thu, 21 Aug 2008 15:03:16 +0000 (15:03 +0000)]
Add HVM device type flag 4/4
And finally, document the new flags.
Reviewed-by: ultrotter
Guido Trotter [Wed, 13 Aug 2008 15:00:47 +0000 (15:00 +0000)]
Convert RunCmd to an epydoc docstring
Reviewed-by: imsnah
Guido Trotter [Wed, 13 Aug 2008 15:00:24 +0000 (15:00 +0000)]
FakeHypervisor: fix a function signature
StartInstance takes 'block_devices', not 'force' as its third argument.
Even if this is not used in the fake hypervisor it's better to have the
correct argument name to avoid confusion.
Reviewed-by: imsnah
Alexander Schreiber [Tue, 5 Aug 2008 16:04:17 +0000 (16:04 +0000)]
remove two end-of-line semicolons
Reviewed-by: imsnah
Iustin Pop [Mon, 4 Aug 2008 09:10:29 +0000 (09:10 +0000)]
Another typo in the install doc
Reviewed-by: imsnah
Iustin Pop [Mon, 4 Aug 2008 09:10:05 +0000 (09:10 +0000)]
Update the module build section of install doc
Reviewed-by: imsnah
Iustin Pop [Mon, 4 Aug 2008 09:09:44 +0000 (09:09 +0000)]
Fix a typo in the install doc
Reviewed-by: imsnah
Iustin Pop [Tue, 22 Jul 2008 09:22:48 +0000 (09:22 +0000)]
Make the 1.2.5 release
Reviewed-by: imsnah
Guido Trotter [Fri, 18 Jul 2008 10:30:39 +0000 (10:30 +0000)]
Fix LUReplaceDisks with iallocator
self._RunAllocator() sets self.op.remote_node, but doesn't return the
new remote node. If we set it to the return value of the function we
basically reset it to None, and iallocator is never run.
Reviewed-by: imsnah
Iustin Pop [Mon, 14 Jul 2008 13:53:31 +0000 (13:53 +0000)]
Bump version to 1.2.5~rc2
Since we had some more code changes, let's make another rc.
Reviewed-by: ultrotter
Iustin Pop [Fri, 11 Jul 2008 13:53:50 +0000 (13:53 +0000)]
Fix backend.NodeVolumes handling of LVM output
This is the same fix as for GetVolumeList.
I've checked manually and all other places that call lvm commands are
already checking the output validity in terms of correct number of
fields.
Reviewed-by: ultrotter
Iustin Pop [Fri, 11 Jul 2008 13:09:11 +0000 (13:09 +0000)]
Include process ID in the watcher logs
Since the watcher is launched by cron, and we can have the situation of
two processes running at the same time (the lock will prevent problems),
we need to have the pid in the log so that it's clear which messages
come from which program.
Reviewed-by: imsnah
Iustin Pop [Fri, 11 Jul 2008 13:09:03 +0000 (13:09 +0000)]
Fix backend.GetVolumeList handling of LVM output
This patch is fix for the case when ‘lvs’ spits out error messages on
stdout. It's just a simple check that we have the needed number of
separators in the line.
Reviewed-by: imsnah
Alexander Schreiber [Tue, 8 Jul 2008 17:57:58 +0000 (17:57 +0000)]
doc fix: Describe default values for HVM instance options & cleanup.
Describes the default values used for the HVM instance options when
creating HVM instances and cleans up the HVm specifics of the HVM cluster
init.
Reviewed-by: iustinp
Alexander Schreiber [Tue, 8 Jul 2008 17:27:02 +0000 (17:27 +0000)]
Clarify cluster IP requirement.
Reviewed-by: iustinp
Iustin Pop [Tue, 8 Jul 2008 08:56:05 +0000 (08:56 +0000)]
Fix some style issues in rapi
This patch add a properly commented __init__.py from the lib directory
and removes the shebang from the other modules, per the rest of the
code.
Reviewed-by: amishchenko
Iustin Pop [Mon, 7 Jul 2008 11:51:40 +0000 (11:51 +0000)]
Bump version to 1.2.5~rc1
Reviewed-by: amishchenko
Iustin Pop [Mon, 7 Jul 2008 11:51:32 +0000 (11:51 +0000)]
Update news file for 1.2.5
Reviewed-by: imsnah
Iustin Pop [Mon, 7 Jul 2008 08:00:10 +0000 (08:00 +0000)]
Fix compatibility with twisted 8.x
After much investigation, I realized that our old method of restarting
the reactor will not work easily (if at all) with twisted 8.x. So the
logical consequence is that we must not restart the reactor, but instead
create one fully anew.
Since twisted doesn't allow one to re-install a new reactor, we just
pretend there was no reactor ever installed; this works as the old
reactor was (or should have been, as otherwise we wouldn't have returned
from the reactor.run() call in Client.run()) already stopped and since
we delete it, no other references to it should exist and it should be
cleared away.
The actual implementation is as follows:
- we remove the ReReactor class, as we don't need it, as instead we
use a standard PollReactor
- at each rpc.Client creation, we:
- delete the twisted.internet.reactor from the list of loaded
modules
- create a new PollReactor()
- replace the twisted main reactor with it
- we move the use of the install_twisted_signal_handlers from the
ReReactor class to the Client.run() function
The deletion from sys.modules is needed to skip twisted checks and
should be safe (per the python documentation of sys.modules:
"sys.modules... can be manipulated to force reloading of modules and
other tricks").
The patch has been tested and passes burnin on both debian stable
(twisted 2.4.0) and unstable (twisted 8.1.0).
Reviewed-by: imsnah
Oleksiy Mishchenko [Mon, 7 Jul 2008 07:13:59 +0000 (07:13 +0000)]
QA for instance migration.
Reviewed-by: imsnah
Iustin Pop [Fri, 4 Jul 2008 15:58:19 +0000 (15:58 +0000)]
Fix some issues with the watcher
This patch fixes two bugs:
- the state file is not saved because we use the method for checking
for udpated data
- in two places 'Error' was used instead of 'Exception', which breaks
error handling
Additionally:
- the unused 're' import has been removed
- a variable named 'id' which collides with a builtin function has
been renamed
Note that comparing the serialized forms might create false negatives
(due to the dicts being reordered) but that will just cause an extra
write of the file, which is sub-optimal but harmless.
Reviewed-by: ultrotter
Iustin Pop [Fri, 4 Jul 2008 12:01:31 +0000 (12:01 +0000)]
Fix error handling in _CheckNodeFreeMemory
If the remote node is down, the rpc layer will return 'False' for the
node result, and not a dict.
The patch adds extra checks that we have the node and that its result is
a dict.
Reviewed-by: imsnah
Michael Hanselmann [Tue, 1 Jul 2008 12:17:45 +0000 (12:17 +0000)]
Set locale when building manpages
docbook2man includes the date in the current locale into
the output document. Therefore we need to use the "C"
locale.
Reviewed-by: iustinp
Michael Hanselmann [Tue, 1 Jul 2008 12:17:33 +0000 (12:17 +0000)]
Document additional options in manpages
Reviewed-by: iustinp
Iustin Pop [Tue, 1 Jul 2008 08:00:30 +0000 (08:00 +0000)]
Ganeti version 1.2.5~rc0
Let's a release candidate, the only other needed things will be
non-functional changes (QA and some documentation updates).
Reviewed-by: imsnah
Iustin Pop [Tue, 1 Jul 2008 07:54:57 +0000 (07:54 +0000)]
Further increase the migration delays
More testing shows that an even bigger timeout is better and allows many
more migrations before xen breaks.
Reviewed-by: imsnah
Oleksiy Mishchenko [Fri, 27 Jun 2008 16:04:08 +0000 (16:04 +0000)]
QA parameter for grow-disk size
Reviewed-by: iustinp
Iustin Pop [Fri, 27 Jun 2008 14:02:58 +0000 (14:02 +0000)]
Instance migration: add delays around migration
It seems that xen can have issues that are triggered by too fast
migrations. For now, until we have more experience with it, we should
add some delays before/after the migration call so that things have
enough time to settle down (e.g. hot plug scripts, etc.).
Note that I don't have solid data that this will fix it, or that indeed
xen is the culprit, but for now this seems the simplest way to try to
mitigate it.
Reviewed-by: ultrotter
Iustin Pop [Fri, 27 Jun 2008 13:46:21 +0000 (13:46 +0000)]
Fix burnin for migration cleanup
I forgot again to add the cleanup parameter to the burnin. This patch
adds it and also runs migration cleanup for the instances.
Reviewed-by: imsnah
Oleksiy Mishchenko [Fri, 27 Jun 2008 13:19:02 +0000 (13:19 +0000)]
QA for gnt-instance disk-grow option.
Reviewed-by: imsnah
Guido Trotter [Fri, 27 Jun 2008 12:07:49 +0000 (12:07 +0000)]
Change fping to TcpPing in two LUs
Two LUs are using RunCmd to call fping, in order to check for an IP
presence on the network. Substituting it with TcpPing will get rid of
it, which makes it not break in the new world order, where the master
cannot fork.
Reviewed-by: iustinp
Iustin Pop [Fri, 27 Jun 2008 09:14:00 +0000 (09:14 +0000)]
Implement cleanup for broken instance migration
The patch adds a new option for the “gnt-instance migrate” called
‘--cleanup’ that makes this command to perform a recovery from a
(possibly) failed migration instead of actually migrating the instance.
The cleanup checks that the instance runs on the correct node (or
update the config if not), and makes sure the disks are in single-master
mode by reconfiguring the drbd devices.
The patch also fixes a wrong description in an error message for the
migration prerequisite checks.
Reviewed-by: ultrotter
Iustin Pop [Thu, 26 Jun 2008 15:03:02 +0000 (15:03 +0000)]
Rework the migration implementation
The current migration code has many issues related to the
synchronization between nodes in the drbd network reconfiguration part.
As such, a new algorithm is implemented that uses the master as a
synchronization point, and implementing a cache of bdevs in the backend
to allow the rpc to resume from the previous state.
The code also splits the LU code in a few methods, so that we can reuse
it better when we implement the ‘--recover’ flag.
Reviewed-by: ultrotter
Iustin Pop [Thu, 26 Jun 2008 10:32:45 +0000 (10:32 +0000)]
Improve some corner cases in instance migration
Since the backend.DrbdReconfigNet function is called from the rpc layer,
it's better not to raise exception but to return a meaningful error
message.
The patch adds two try.. except blocks around the ReAttachNet() calls
which are the ones which most often return errors (among the few errors
that we have for now).
The patch also adds two SetDiskID calls in cmdlib's LUMigrateInstance
before the change-to-secondary which are needed depending on what is
saved in the config file.
Reviewed-by: ultrotter
Guido Trotter [Wed, 25 Jun 2008 08:14:41 +0000 (08:14 +0000)]
Add an instance_migratable rpc call
This call will check whether an instance is up on its primary, and that
it has been started with symlinks. We currently have no on-secondary
checks, nor any hypervisor specific call.
Reviewed-by: iustinp
Guido Trotter [Wed, 25 Jun 2008 08:14:27 +0000 (08:14 +0000)]
backend: improve MigrateInstance docstring
Document the arguments accepted by backend.MigrateInstance
Reviewed-by: iustinp
Guido Trotter [Wed, 25 Jun 2008 08:14:17 +0000 (08:14 +0000)]
backend: Fix a few instance related docstrings
{Start,Shutdown,Reboot}Instance take instance objects, not names.
Reviewed-by: iustinp
Guido Trotter [Wed, 25 Jun 2008 08:14:08 +0000 (08:14 +0000)]
Only burnin migrate with drbd8
Currently burnin would try (and fail) with remote_raid1 as well.
Reviewed-by: iustinp
Guido Trotter [Wed, 25 Jun 2008 08:13:57 +0000 (08:13 +0000)]
Add gnt-node migrate
This is the same as gnt-node failover, and is also a cut&paste of its
code (almost). It will be really really useful to quickly empty a
healthy node. I can be persuaded to merge MigrateNode and FailoverNode
in a common codebase, but could also forget about it and submit it if
nobody cares.
Reviewed-by: iustinp
Iustin Pop [Wed, 25 Jun 2008 06:45:52 +0000 (06:45 +0000)]
Cleanup LV status computation
Currently, when seeing if a LV is degraded or not (i.e. virtual volume),
we first attach to the device (which does an lvdisplay), then do a lvs
in order to display the lv_attr. This generates two external commands to
do (almost) the same thing.
This patch changes the Attach() method for LVs to call lvs and display
both the major/minor (needed for attach) and the lv_status (needed for
GetSyncStatus). Thus, later in GetSyncStatus, we don't need to run lvs
again, and instead just return the value computed in Attach().
Reviewed-by: imsnah