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>
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 [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>
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>
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>
Michele Tartara [Wed, 8 Jan 2014 14:01:24 +0000 (14:01 +0000)]
Improve backwards compatibility of Issue 649 fix
Commit
e6e4ff4cf8d0100f331f94f7a27aa1e03a5d0e7d fixed Issue 649 by switching the
separator for usb_devices from comma to space. That solved the problem with
the command line, but RAPI was able to work with commas too, so, for backwards
compatibility we need to keep supporting that as well.
Also, in order to avoid changing the format of the config file, the default
internal representation is brought back to being comma-based, and it is changed
at the interface level (CLI or RAPI) before being passed on.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Tue, 7 Jan 2014 16:04:48 +0000 (16:04 +0000)]
Add missing NEWS entries from stable-2.8
Some fixes where pushed to the stable-2.8 branch without a corresponding NEWS
entry. This patch adds them.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Tue, 7 Jan 2014 15:05:54 +0000 (16:05 +0100)]
Change usb_devices separator to whitespace
The usb_devices parameter was using comma as a list separator, but this cannot
work because comma is already used as the hypervisor parameter separator.
Change it to use whitespace as a separator, in accordance to what already done
for the extra parameters.
The NEWS file is updated accordingly.
Fixes Issue 649.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Fri, 13 Dec 2013 13:26:23 +0000 (13:26 +0000)]
Add support for blktap2 file-driver
Newer Xen versions use blktap2 instead of blktap. This patch adds support
for it in Ganeti.
Fixes Issue 638.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Hrvoje Ribicic [Thu, 12 Dec 2013 15:33:04 +0000 (16:33 +0100)]
Update opcodes test to include network tags
This patch adds the network tags to the list of all other tag types
that can be tried in QuickCheck tests.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Fri, 13 Dec 2013 12:47:27 +0000 (12:47 +0000)]
Make network tags searchable
This patch adds the network tags to the tags searched by gnt-cluster
search-tags, and in the process cleans up the code slightly.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Thu, 12 Dec 2013 15:36:04 +0000 (16:36 +0100)]
Add network tag tests to QA
The QA did not have a test for network tags until now, and this patch
remedies the situation.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Mon, 16 Dec 2013 13:21:04 +0000 (14:21 +0100)]
Fix RAPI network tag handling
The network tags were absent from an if check used to actually list
tags. The patch fixes the oversight, and adds a proper error message in
case the issue occurs again for a new tag type.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Dimitris Aragiorgis [Thu, 12 Dec 2013 13:04:11 +0000 (15:04 +0200)]
Fix gnt-network list-tags
Define network tags in haskell part.
This fixes issue 641.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Michele Tartara [Mon, 9 Dec 2013 13:21:12 +0000 (14:21 +0100)]
Version bump for 2.8.3
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Mon, 9 Dec 2013 13:20:28 +0000 (14:20 +0100)]
Update NEWS for 2.8.3 release
List all the changes that happened between 2.8.2 and 2.8.3.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Dimitris Aragiorgis [Tue, 10 Dec 2013 09:14:54 +0000 (11:14 +0200)]
Support reseting arbitrary params of ext disks
If param=default and the param already exists then we remove
it from params dict. This is stolen by GetUpdatedParams() which
is used for hvparams modification/inheritance.
This means that 'default' value is not accepted for an arbitrary
param of an ext disk.
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 [Tue, 10 Dec 2013 16:00:55 +0000 (18:00 +0200)]
Allow modification of arbitrary params for ext
Disks of ext template are allowed to have arbitrary parameters
stored in the Disk object's params slot. Those parameters can be
passed during creation of a new disk, either in LUInstanceCreate()
or in LUInsanceSetParams(). Still those parameters can not be
changed afterwards. With this patch we override this limitation.
Currently, for the other disk templates we allow modifying only
'name' and 'mode'. Therefore, we introduce new constants
MODIFIABLE_IDISK_PARAM* to include those params. If any other
parameter is passed, _VerifyDiskModification() will raise an
exception.
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 [Tue, 10 Dec 2013 09:14:52 +0000 (11:14 +0200)]
Do not clear disk.params in UpgradeConfig()
Commits 5dbee5e and cce4616 fix disk upgrades concerning params
slot. Since 2.7 params slot should be empty and gets filled
any time needed.
Still ext template allows passing arbitrary params per disk.
These params should be saved in config file for future use.
For instance if we have the shared-filer provider and we
specify shared_dir param during instance create, this param
is needed when we want to attach the disk e.g., during
retrieving instance info. If it gets overridden during a daemon
restart or a config reload we fail to get the instance's info.
To avoid such a failure, we set params slot to an empty dict
only if params not found in the first place.
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 [Mon, 9 Dec 2013 12:00:27 +0000 (14:00 +0200)]
SetDiskID() before accepting an instance
SetDiskID() fills physical_id slot of a Disk object.
LUInstanceSetParams() does not invoke SetDiskID() upon creation of a
new disk. As a result the physical_id slot of the Disk object in
config data is missing.
In case of ext disk template, in AcceptInstance() we invoke
_GatherAndLinkBlockDevices(). This takes `instance` as an argument
which includes current disks info. So, after adding a disk,
migration of ext instances will fail because FindDevice() expects
the physical_id slot.
With this patch we invoke SetDiskID() for every disk of the instance
before accept_instance() RPC.
Fixes Issue 633.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Petr Pudlak [Thu, 28 Nov 2013 14:38:57 +0000 (15:38 +0100)]
Lock group(s) when creating instances
This is required to prevent race conditions such as removing a network
from a group and adding an instance at the same time. (See issue 621#2.)
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Thu, 5 Dec 2013 09:49:01 +0000 (10:49 +0100)]
Fix job error message after unclean master shutdown
According to commit
599ee321eb, any job-related error messages should
be encoded within a Ganeti-specific error and not passed on as a
string, to allow for easier parsing.
For jobs suffering from an undesirable status after an unclean master
daemon shutdown, the message was not encoded, as reported in issue 618.
This patch fixes the problem.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Wed, 4 Dec 2013 17:49:50 +0000 (18:49 +0100)]
Add default file_driver if missing
If the file driver of an instance with file based storage is not specified, the
default one is automatically added by the UpgradeConfig function.
Fixes Issue 571.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Jose A. Lopes [Mon, 2 Dec 2013 12:07:39 +0000 (13:07 +0100)]
Update tests
Update hypervisor unit tests.
Partial cherry-pick from
d2e4e099e4248832fef8ed7b0755d01bd4178e3a
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Jose A. Lopes [Mon, 2 Dec 2013 11:41:33 +0000 (12:41 +0100)]
Xen handle domain shutdown
Update Xen backend to properly recognize when a domain has been
shutdown by the user and to properly cleanup a shutdown domain when
Ganeti requests Xen to stop this domain.
Partial cherry-pick from
9d22cc90609e3ee8f0f2b34b793a3daced3c0e61
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Jose A. Lopes [Thu, 28 Nov 2013 10:04:25 +0000 (11:04 +0100)]
Fix evacuation out of drained node
* fix node daemon not to skip data, such as, memory and disk size,
when building the node list to send to HBal, given that these data
are important for HBal to determine whether an evacuation is
possible
* fix iallocator to properly load drained nodes from the list passed
by the node daemon, instead of zeroing all the data, such as, the
memory and disk size
* this fixes issue 615
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Bernardo Dal Seno [Tue, 4 Jun 2013 16:38:11 +0000 (18:38 +0200)]
Refactor reading live data in htools
This simplifies different handling of individual items.
Cherry-picked from
8c72f7119f50a11661aacba2a1abffdfdc6f7cfa.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Petr Pudlak [Tue, 3 Dec 2013 08:03:28 +0000 (09:03 +0100)]
master-up-setup: Ping multiple times with a shorter interval
In the case of network problems, one ping packet can possibly get lost.
Sending multiple packets is safer. The interval between packets is set
to 200ms so that the check finishes faster.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Petr Pudlak [Mon, 2 Dec 2013 10:04:54 +0000 (11:04 +0100)]
Add a packet number limit to "fping" in master-ip-setup
This fixes issue #630. Apparently there is a bug in fping 3.5 where it
loops forever without "-c" given an unreachable host, even though
"-c 1" should be the default according to the man page.
The "-c" flag works on Squeeze. Checking the man pages on the Internet,
fping supported "-c" at least since 2007. So there should be no backward
compatibility problems.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Dimitris Aragiorgis [Thu, 28 Nov 2013 08:19:19 +0000 (10:19 +0200)]
Fix a bug in InstanceSetParams concerning names
In case no name is passed in disk modifications we should
keep the old one. If name=none then set disk name to None.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Petr Pudlak [Thu, 28 Nov 2013 10:46:38 +0000 (11:46 +0100)]
build_chroot: hard-code the version of blaze-builder
The newest version does not build on Debian squeeze, so avoid
it being pulled in as a dependency.
This is the same issue that has been fixed in [
1e078ef3] on master.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Jose A. Lopes [Fri, 22 Nov 2013 13:44:02 +0000 (14:44 +0100)]
Fix error printing
Fixes issue 616.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 25 Nov 2013 14:48:41 +0000 (15:48 +0100)]
Allow link local IPv6 gateways
Each host using IPv6 always has a link local address in fe80::/10. It is
common to use fe80::1 as default gateway to ease client configuration.
Ganeti prevented this usage, because it made sure that the IPv6 gateway
is in the IPv6 network the instance is connected to.
This patch also allows to specify a IPv6 gateway in the link local
network in addition to the network the instance is connected to.
This fixes issue 624.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 25 Nov 2013 10:37:06 +0000 (11:37 +0100)]
Fix NODE/NODE_RES locking in LUInstanceCreate
Both NODE and NODE_RES locks were acquired opportunistically if so
requested by the user. LUInstanceCreate requires, however, that the
actually locked elements on NODE and NODE_RES level are the same.
This patch changes the locking of NODE_RES such that those locks are not
acquired opportunistically any more. Instead, the mandatory locks are
set to the acquired NODE locks once they are actually granted.
This fixes issue 622.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Klaus Aehlig [Tue, 26 Nov 2013 19:45:39 +0000 (20:45 +0100)]
eta-reduce isIpV6
This is not only better style, but also fixes a lint error.
Also use the infix form of `elem` to increase readability.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Guido Trotter [Tue, 26 Nov 2013 15:27:17 +0000 (16:27 +0100)]
Ganeti.Rpc: use brackets for ipv6 addresses
We detect an IPv6 vs V4 address based on columns, rather than passing
the family from the cluster object to be more future proof (in case
we'll ever support mixed clusters).
Unfortunately quite a bit more code is required to test this: we need an
arbitrary node that does the right thing w.r.t. ip addresses and also
test-only exports. As such we'll do this out of the stable branch.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Fri, 15 Nov 2013 16:39:56 +0000 (16:39 +0000)]
Update NEWS file with socket permission fix info
The NEWS file now contains a 2.8.3 entry, describing the fix of the
previous patch.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Hrvoje Ribicic [Fri, 15 Nov 2013 10:44:04 +0000 (10:44 +0000)]
Fix socket permissions after master-failover
When using gnt-cluster master-failover, on the soon-to-be-master the
luxi daemon is started by the node daemon. This makes the luxi
daemon inherit the node daemon's umask 077, making the communication
socket unreadable to group members. When using Ganeti with non-root
users, this causes problems, as reported in issue 477.
To fix this, the socket permissions are set explicitly.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Wed, 6 Nov 2013 12:26:24 +0000 (12:26 +0000)]
Version bump for 2.8.2
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Michele Tartara [Wed, 6 Nov 2013 12:25:16 +0000 (12:25 +0000)]
Update NEWS file for 2.8.2 release
Add a section in the file for the new upcoming release.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Apollon Oikonomopoulos [Tue, 5 Nov 2013 14:30:45 +0000 (16:30 +0200)]
DRBD: ensure peers are UpToDate for dual-primary
DrbdAttachNet supports both, normal primary/secondary node operation, and
(during live migration) dual-primary operation. When resources are newly
attached, we poll until we find all of them in connected or syncing operation.
Although aggressive, this is enough for primary/secondary operation, because
the primary/secondary role is not changed from within DrbdAttachNet. However,
in the dual-primary ("multimaster") case, both peers are subsequently upgraded
to the primary role. If - for unspecified reasons - both disks are not
UpToDate, then a resync may be triggered after both peers have switched to
primary, causing the resource to disconnect:
kernel: [1465514.164009] block drbd2: I shall become SyncTarget, but I am
primary!
kernel: [1465514.171562] block drbd2: ASSERT( os.conn == C_WF_REPORT_PARAMS )
in /build/linux-rrsxby/linux-3.2.51/drivers/block/drbd/drbd_receiver.c:3245
This seems to be extremely racey and is possibly triggered by some underlying
network issues (e.g. high latency), but it has been observed in the wild. By
logging the DRBD resource state in the old secondary, we managed to see a
resource getting promoted to primary while it was:
WFSyncUUID Secondary/Primary Outdated/UpToDate
We fix this by explicitly waiting for "Connected" cstate and
"UpToDate/UpToDate" disks, as advised in [1]:
"For this purpose and scenario,
you only want to promote once you are Connected UpToDate/UpToDate."
[1] http://lists.linbit.com/pipermail/drbd-user/2013-July/020173.html
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Mon, 4 Nov 2013 15:20:07 +0000 (15:20 +0000)]
Improve error message for replace-disks
In some conditions, replace-disks will fail if the disks are not properly
activated. Improve the error message suggesting to run activate-disks before
executing replace-disks.
Fixes Issue 606.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Wed, 30 Oct 2013 10:13:48 +0000 (11:13 +0100)]
Add all dependencies for confd as test dependencies
Since our tests pull in confd as a dependency, all build dependencies
for confd are also necessary to run the tests.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Tue, 29 Oct 2013 15:09:14 +0000 (16:09 +0100)]
Add snap-server to the test-relevenat packages
While snap-server is only needed for the optional monitoring daemon,
some tests, notably those testing these optional features, still depend
on it. So, if snap-server is missing, the Haskell tests should not be
run, as they cannot even be build.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Santi Raffa [Wed, 23 Oct 2013 14:20:24 +0000 (16:20 +0200)]
Placate warnings on ganeti.outils_unittest.py
Change ovf.py from using 'if foo:' to 'if foo is not None:' checks as
suggested by the FutureWarnings the OVF library raises otherwise.
This fixes issue 557.
Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Michele Tartara [Thu, 17 Oct 2013 10:36:44 +0000 (12:36 +0200)]
Version bump for 2.8.1
Also, update the NEWS file accordingly.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 16 Oct 2013 11:11:18 +0000 (13:11 +0200)]
Verify that ConfD is running after master-failover
This patch adds additional 'gnt-node list' commands to
the testing of 'gnt-cluster master-failover' in order to
test if ConfD (or LuxiD) is still running after a
master-failover.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Apollon Oikonomopoulos [Wed, 16 Oct 2013 09:17:23 +0000 (12:17 +0300)]
daemon-util: handle luxid in {start,stop}_master()
Luxid was not handled in start_master() and stop_master() at all. As a result,
during a master-failover, luxid would be left running on the old master and
would not start on the new master, leaving the cluster without management until
luxid was manually started.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Santi Raffa [Tue, 15 Oct 2013 08:13:28 +0000 (10:13 +0200)]
Fix typo in storage.FileStorage docstring
Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Wed, 16 Oct 2013 07:32:02 +0000 (09:32 +0200)]
Fix path for serial file
It is actually located inside the queue directory.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 10 Oct 2013 14:03:44 +0000 (14:03 +0000)]
Improve harep documentation
Add a more complete description of how the tool works.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Tue, 8 Oct 2013 11:26:47 +0000 (13:26 +0200)]
Fix typo in walkthrough documentation
Fix typo in walkthrough documentation, where 'instance3' should read
'instance1' in order to be consistent with the output below in the
example.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Costas Drogos [Thu, 3 Oct 2013 09:37:14 +0000 (12:37 +0300)]
Don't attemp ipv6 ssh in case of ipv4 cluster
In case of a cluster with primary-ip-version=4, there is no need
for cluster to try ipv6 ssh connections which may timeout.
So append '-4' on ssh if cluster is ipv4-only
Signed-off-by: Costas Drogos <costas.drogos@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Mon, 7 Oct 2013 07:51:30 +0000 (07:51 +0000)]
Fix outdated documentation for users-setup
The --yes-do-it parameter was not properly documented yet. Add it to the
administration guide.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 27 Sep 2013 13:02:14 +0000 (15:02 +0200)]
Fix wrong release date in the NEWS file
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 27 Sep 2013 12:32:58 +0000 (14:32 +0200)]
Version bump for 2.8.0
Also, update the NEWS file accordingly.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Tue, 6 Aug 2013 15:19:49 +0000 (15:19 +0000)]
Add daemon split design doc
This describes the future planned structure of Ganeti daemons.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Thu, 26 Sep 2013 11:32:57 +0000 (13:32 +0200)]
Merge branch 'stable-2.7' into stable-2.8
Conflicts are trivially solved.
* stable-2.7
Version bump for 2.7.2 (updated NEWS file)
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Conflicts:
NEWS
configure.ac
Michele Tartara [Thu, 26 Sep 2013 07:53:10 +0000 (09:53 +0200)]
Version bump for 2.7.2
Change the version number and the NEWS file for the 2.7.2 bugfix release.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Fri, 20 Sep 2013 11:45:47 +0000 (13:45 +0200)]
Add additional tests for utils.Retry
Also have some tests where the time the various components
(inspecting the time function, calling the function, etc) have
a non-trivial time. Also, have two tests demonstrating that
the number of retries actually depends on the amount of time
the function takes to complete.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Thu, 19 Sep 2013 15:05:29 +0000 (17:05 +0200)]
Make retry tests independent of actual time
Even in the tests, real time is used. While, generally, the assumptions
about execution time are pretty safe, in some rare circumstances, e.g.,
on machines with extremely heavy load they do not hold true, thus rendering
the tests flaky. Fix this, by mocking time.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Thu, 19 Sep 2013 16:12:21 +0000 (18:12 +0200)]
Fix corner-case in handling of remaining retry time
Consider a remaining time of 0 as already timed out. Otherwise,
there is no guarantee that calling utils.Retry with timeout 0
will call the function precisely once; it might run in time
shorter than the resolution of timer.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Michele Tartara [Wed, 18 Sep 2013 13:38:18 +0000 (15:38 +0200)]
Perform proper cleanup on termination of Haskell daemons
Haskell deamons did not perform proper cleanup at termination. There was no code
for removing the pid file, and the code in LuxiD for removing the unix socket
file was not working, because it is implemented with a "finally" statement,
which is executed only when the main loop of the daemon is exited (either
normally, or through an exception), but not when it is terminated by a SIGTERM.
This commit adds a proper handler for SIGTERM, which transforms it into a
successful termination exception. This allows both the newly added cleanup code
for pid files and the unmodified cleanup code for unix sockets to be executed.
Fixes Issue 581 and 582.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Tue, 17 Sep 2013 08:43:02 +0000 (10:43 +0200)]
Version bump for 2.8 rc3
Also, add to the NEWS file a couple of items that were still missing.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Mon, 16 Sep 2013 11:52:45 +0000 (13:52 +0200)]
Merge branch 'stable-2.7' into stable-2.8
* stable-2.7
Fix incorrect manpage reference to htools
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Martin Zobel-Helas [Mon, 16 Sep 2013 11:42:46 +0000 (13:42 +0200)]
Fix incorrect manpage reference to htools
the manpages for hcheck, hinfo and hroller have an incorrect reference
to htools(7) which does not exist. This patch links them to htools(1).
This bug also fixes Debian BTS#721824 (http://bugs.debian.org/721824)
Signed-off-by: Martin Zobel-Helas <zobel@debian.org>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Mon, 16 Sep 2013 11:06:31 +0000 (11:06 +0000)]
Add a default to file-driver when unspecified over RAPI
The file-driver value, used by file-based instances, had a default value when
an instance was being created over the CLI, but not when the instance was
created through the RAPI.
This patch introduces a default value for the remote API and, while doing so,
also centralizes in a single place the definition of such a value, for both the
interfaces, in order to remove the possibility for them to be out of sync.
Fixes Issue 571.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 13 Sep 2013 09:27:51 +0000 (09:27 +0000)]
Remove typo from RAPI documentation
"be used instead." was repeated twice.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Thu, 12 Sep 2013 09:38:24 +0000 (11:38 +0200)]
Describe the files in doc/users in NEWS
While only a small feature, the files in doc/users can influence
the way ganeti is packaged. Hence it should be mentioned in the
news file.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Thu, 12 Sep 2013 09:08:34 +0000 (11:08 +0200)]
Update the upgrade procedure
Now that users-setup asks for confirmation, explain in the
procedure how asking for this confirmation can be skipped.
This skipping is particularly important for users following
the recommendation of using the distributed shell (dsh).
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Wed, 11 Sep 2013 09:00:15 +0000 (11:00 +0200)]
Make tools/users-setup explain its actions first
Before doing any changes, make tools/users-setup explain its
actions first, and ask the user for confirmation. If the first
argument is --yes-do-it, this step will be skipped.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Wed, 11 Sep 2013 08:27:23 +0000 (10:27 +0200)]
Generate tools/users-setup from descriptions
Now that we have a machine readable description of the users
to be added to the system, use it to generate the tools/users-setup
script, so that we again have only one authoritative source of
the user and group requirements. This also has the advantage of
of avoiding duplicate additions and attemps add a user root.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Tue, 10 Sep 2013 16:00:23 +0000 (18:00 +0200)]
Provide ganeti user and group data in easy-to-parse form
Upon build time, also generate, in the directory doc/users, files
containing the groups, the users with their primary group, and the
additional groupmemberships to be added. In this way, packages can use
their own way of adding users to the system, instead of telling the
adiministrator to run tools/users-setup.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Apollon Oikonomopoulos [Sun, 1 Sep 2013 20:37:08 +0000 (23:37 +0300)]
Remove dsahostkeypub during config downgrade
Remove the newly-added DSA host public key field from the configuration file
when downgrading to 2.7, if present. Otherwise masterd will refuse to start.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Apollon Oikonomopoulos [Sun, 1 Sep 2013 20:36:29 +0000 (23:36 +0300)]
Mark the DSA host pubkey as optional
Commit a9542a4 introduced support for DSA SSH keys. However, the dsahostkeypub
field added to the config is not marked as optional in the Haskell components.
As a result, luxid thinks the config file is corrupt and refuses to start. We
fix this by marking the dsahostkeypub as an optionalField.
This fixes issue 560.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Leon Handreke [Wed, 28 Aug 2013 15:10:49 +0000 (16:10 +0100)]
Fix documentation for gnt-node evacuate -p option
Update the documentation to remove the claim that the --primary-only
option results in data copies while in fact it only fails over/migrates
the all primary instances.
Signed-off-by: Leon Handreke <lhandreke@google.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Tue, 27 Aug 2013 07:59:14 +0000 (09:59 +0200)]
NEWS update and version bump for 2.8 rc2
Latest modifications and fixes added to the NEWS file.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Thu, 22 Aug 2013 08:53:07 +0000 (08:53 +0000)]
Add unit test for GetLinuxNodeInfo
The function was not unit tested previously.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 22 Aug 2013 08:31:45 +0000 (10:31 +0200)]
Prepare GetLinuxNodeInfo for testing
The names of the input files are not hardcoded anymore, but they are now default
parameters.
No changes for the callers, but it's now possible to test the function more
easily.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Wed, 21 Aug 2013 14:17:38 +0000 (14:17 +0000)]
Make the DRBD collector more failure-resilient
If information about instances is not available, just log the error and
continue without it.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Wed, 21 Aug 2013 14:15:30 +0000 (14:15 +0000)]
Add function to unwrap Results logging failures
Add logWarningIfBad, a utility function similar to exitIfBad, that logs a
warning and returns a default value instead of just crashing the program if
the unpacked value is Bad.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Thomas Thrainer [Tue, 20 Aug 2013 10:37:08 +0000 (12:37 +0200)]
Allow instance mods if only osparams are given
osparams are now recognized as changes, so changing only those without
other changes works too now.
(cherry picked from commit
5eae613c2e1e65101c5d5f7d2e8ffd7cc6edc7d5)
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Apollon Oikonomopoulos [Fri, 16 Aug 2013 11:58:03 +0000 (14:58 +0300)]
Fix harep manpage title
The harep manpage title underline was one character short, leading in
pandoc producing an invalid manpage header.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Tue, 13 Aug 2013 07:50:42 +0000 (09:50 +0200)]
Use FQDN to check master node status
The master node name in SS conf is stored as FQDN, so also use the FQDN
on each node to check if it is the master node.
This fixes issue 551.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Thomas Thrainer [Wed, 7 Aug 2013 09:43:44 +0000 (11:43 +0200)]
Merge branch 'stable-2.7' into stable-2.8
* stable-2.7
Fix documentation of gnt-instance batch-create
Support multi instance allocs without iallocator
Document --no-conflicts-check for gnt-network
Check disk template in right dict when copying
ganeti.backend_unittest: chmod restricted cmd dir
Fix formatting of tuple in error message
Fix 'prcre' typo in INSTALL
Format gnt-network info group output
Add 2.7.2 NEWS entry
Conflicts:
INSTALL
(trivial)
NEWS
(added entry to unreleased 2.8 section with remark that it was
merged from 2.7)
lib/cmdlib.py
(followed cmdlib split)
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Thomas Thrainer [Mon, 5 Aug 2013 09:06:13 +0000 (11:06 +0200)]
Fix batch creation of instances
During batch creation of instances the 'reason' field in opcodes is set
to None (but the field is present). This caused problems when adding a
reasons to the reason trail.
Setting the default value for the 'reason' field to the empty list fixes
this issue.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 5 Aug 2013 10:50:37 +0000 (12:50 +0200)]
Fix documentation of gnt-instance batch-create
The documentation of gnt-instance batch-create was outdated and
contained invalid examples. This patch corrects the man page and
includes working example inputs.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 5 Aug 2013 10:11:21 +0000 (12:11 +0200)]
Support multi instance allocs without iallocator
If all instances in the multi allocation request have already their
primary and secondary node set, there is no need for an iallocator. Thus
don't require it in this case and omit the call to it all together.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Tue, 6 Aug 2013 15:10:15 +0000 (17:10 +0200)]
Support DSA SSH keys in bootstrap
As outlined in issue 338, Ganeti failed to initialize a cluster if no
RSA SSH key is present on the master node. This patch extends Ganetis
support to DSA keys, so clusters with only DSA keys are possible now.
This fixes issue 338.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 6 Aug 2013 10:54:15 +0000 (12:54 +0200)]
Include VCS version in `gnt-cluster version`
Also print the VCS version in the output of `gnt-cluster version`. This
makes the VCS version also available over RAPI, etc.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 6 Aug 2013 08:09:10 +0000 (10:09 +0200)]
Document 'viridian' hypervisor parameter
List the 'viridian' hypervisor parameter (valid for Xen HVM) in the
gnt-instance manpage.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 6 Aug 2013 08:04:58 +0000 (10:04 +0200)]
Support 'viridian' parameter in Xen HVM
This parameter is required to prevent bluescreens in Windows instances.
This fixes issue 233.
Signed-off-by: Heiko Baumann <heibau@googlemail.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Mon, 5 Aug 2013 07:46:30 +0000 (09:46 +0200)]
Document --no-conflicts-check for gnt-network
gnt-network add and connect do support the --no-conflicts-check option.
This is now also documented in the man pages.
This fixes issue 526.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Wed, 31 Jul 2013 13:21:28 +0000 (13:21 +0000)]
Version bump for 2.8.0 rc1
Update NEWS file and version number.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>