- May 14, 2013
-
-
Bernardo Dal Seno authored
cmdlib.LUInstanceSetParams now uses helper functions to create and wipe disks, so that when the creation of a disk fails, any leftover device is cleaned up. As a bonus, exceptions raised by _CreateBlockDev() are caught correctly. Now cmdlib._CreateDisks() is used every time there are disks to create. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
Now even recreate-disks wipes the newly-created disks, if the flag is set. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
The wrapper handles errors by logging them and cleaning up freshly-created disks. Also, the correct disk is used in the error message when an error happens in cmdlib._CreateDisks() and the resulting disk clean-up fails. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
Since 9b221ea4, _CreateBlockDev() doesn't raise OpExecError any more. Yet some code was left in place to catch it. By removing that code we have two advantages: 1. Dead code is removed. 2. If for whatever reason _CreateBlockDev() raises OpExecError, the exception is not silently dropped and we notice (so we can fix it). Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
In issue 353 Sascha Lucas reported that disks are not wiped when added through “gnt-instance modify”. This patch adds this functionality and updates the docstring for “_WipeDisks”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> (cherry picked from commit 965e0e6a) Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- May 03, 2013
-
-
Helga Velroyen authored
This fixes issue 432. If a job summary contained a non-ascii character, gnt-job list crashed badly so far. This patch fixes the crash and makes gnt-job list display unicode characters properly. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- May 02, 2013
-
-
Helga Velroyen authored
This fixes issue 432: when setting the volume group name, the presence of the volume group was checked on all nodes. This patch now restricts the check only to the vm-capable ones. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Helga Velroyen authored
Currently, when creating an instance with file storage fails, the error message is rather general. This patch adds a hint on what to do as a possible fix. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
-enable-kvm and -disable-kvm are deprecated in favor of accel=kvm passed as a machine specification. This fixes compatibility with newer qemu versions. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Guido Trotter authored
We had parameter validation when the runtime is generated, but in the middle of the function. Move up, before any parameter is accessed. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Guido Trotter authored
Newer versions of kvm (from 1.4) don't support -nographic with -daemonize. When -display exists, use -display none instead. This fixes Issue 389. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
- Apr 30, 2013
-
-
Helga Velroyen authored
This patch fixes issue 247. It empowers the user to specify explicitly the vif type of a nic configuration of a Xen HVM instance. This includes the option of setting it to '' on the commandline, causing Ganeti to leave out the 'type' parameter in the vif configuration completely. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 29, 2013
-
-
Guido Trotter authored
The current error message ends up saying something like '192.168.5.5' != 'network1', which is sort of non-intuitive (yes, of course they are different). Fix this by explaining better what the erroneous condition actually is. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
- Apr 26, 2013
-
-
Klaus Aehlig authored
Currently, if converting an instance from plain to drbd fails after renaming the original LVs, the instance is left in an inconsistent state. This commit tries to undo the renaming if a failure occurs on assembling a DRBD device, e.g., when device minor numbers are exhausted. (Issue 229) Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
- Apr 22, 2013
-
-
Michele Tartara authored
During the creation of an instance, if the creation of disks fails, some partially created disks might remain lying around. There is an already implemented cleanup procedure, but it requires the disks to be listed in the disks_created variable, which is updated after the creation of the disk itself to prevent it from removing disks already existing previously. This patch introduces a better tracking of partially created disks, so that they can be removed without risking removing already existing ones. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 18, 2013
-
-
Michele Tartara authored
The default metavg was always set to be the constant value "xenvg". This is OK for most cases, but if the cluster is initialized with a default name through the --vg-name option, the metavg should change as well. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 17, 2013
-
-
Guido Trotter authored
We need to do this, so that backend.py doesn't need to import mcpu, and thus indirectly cmdlib. This reduces the size of the node daemon by about half, which is very important as it is pinned in memory. This solves Issue 419. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Apr 16, 2013
-
-
Aaron Knister authored
LogicalVolume.Attach in bdev.py is calling "lvs" and specifying a unit of Megabytes that is then converted to an integer resulting in the value 0 for small sizes. This patch makes Ganeti use KB for the unit instead of MB. Fixes Issue 347. Signed-off-by:
Aaron Knister <aaron.knister@gmail.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Apr 11, 2013
-
-
Michele Tartara authored
Trasforming the disk of an instance from DRBD to plain did not properly update the iv_name of disks, leaving it to None. This commit modifies _ConvertDrbdToPlain to properly set the iv_name variables. An analogous fix is not required in the opposite function, _ConvertPlainToDrbd, because it uses _GenerateDiskTemplate, that already takes care of doing that. Fixes Issue 403. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 10, 2013
-
-
Helga Velroyen authored
This patch introduces an upper limit to the size of the networks that can be created. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Helga Velroyen authored
When creating a network, so far no size constraints were checked. We now limit the size of a network to a /30 or bigger, although tecnically, the ipaddr library supports even /32 networks. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
If split users are used, the queue directory could only be accessed by masterd, but also confd needs to be able to read it, e.g. when it is queried as part of "gnt-job list" This commit fixes the permissions in such a way to allow proper access rights. Fixes Issue 406. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Klaus Aehlig authored
For diskless instances it is still reasonable to sum up the disk usage of all the (zero) disks, resulting in the empty sum. This uniformity also has the advantage that iallocators (like hail) do not have to do any special considerations for diskless instances. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 03, 2013
-
-
Klaus Aehlig authored
Moving an instance is done by copying over the disks. Restrict this to disk templates that are copyable. This avoids accidental use on, e.g., the sharedfile template. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Klaus Aehlig authored
This list contains the disk templates suitable for moving an instance by copying the files. A requirement is that they're not accessed externally or shared between nodes; in particular, sharedfile is not suitable. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Klaus Aehlig authored
Now that _CreateDisks cleans up after itself in case of failure, do not clean up at call sites, as there we have to overapproximate thus potentially causing data loss. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Klaus Aehlig authored
_CreateDisk used to just throw an exception if _CreateBlockDev failed leaving the caller in the state that some disks were created, without precise knowledge which. Usually, the clean up then overapproximated by removing all disks of the instance. This can cause data loss in case the disk creation failed because of a file being already in the place where the disk is to be created. With this patch, upon failure, _CreateDisk removes the disks that were successfully created, leaving a well-defined state. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 20, 2013
-
-
Michele Tartara authored
We are not ready for this change yet. Let's push it to 2.8. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 12, 2013
-
-
Daniel Krambrock authored
This allows migrating to any node, as it is already possible for failover, when instances are externally mirrored. Signed-off-by:
Daniel Krambrock <danielk_lists@z9d.de> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
This addresses Issue 237. Mirroring no disk is a no-op. As such we can treat them like mirrored instances, since the data they need (none) will be present on all nodes. This is definitely enough to failover or migrate instances with a manual target node. Further work might be needed for support in hail. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This fixes issue 396. - Fix a wrong comment that mentions drbd8 when actually the code acts only on externally mirrored instances. - Fix a wrong assert that requires failover/migrate to acquire the NAL on externally mirrored instances: this is the case only when a iallocator is used, not if a node is manually specified. Extra qa should be added, but this can only be done if an externally mirrored instance or a diskless instance is tested. It is easier to add it on the master branch, where we have diskless instances support. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 11, 2013
-
-
Bernardo Dal Seno authored
Tests for: objects.InstancePolicy.CheckParameterSyntax() objects.InstancePolicy.CheckDiskTemplates() objects.InstancePolicy.CheckISpecSyntax() Instance policies with an empty disk-template list now are reported. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
IPOLICY_DEFAULTS is now a legal policy (the disk-templates entry was a set instead of a list, before). Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Unknown elements were silently removed on startup. This means that a software upgrade could result in lost configuration information if cfgupgrade wasn't run promptly. Added unit test for Cluster.UpgradeConfig() to cover this case. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Policy violations of back-end parameters that used the cluster default value were not reported in cluster-verify. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
"default" was not accepted as a valid input value for instance specs in group policies, due to a bug introduced in 2cc673a3 (and released with 2.6.0). Added QA for this and another similar case. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Instance disk template is checked against the policy, and diskless instances aren't checked for the number of disks. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
A fragment in LUInstanceCreate.CheckPrereq() removed in commit ba147ff8 was reintroduced in merge 8e09e801 due to a change in df28c49b. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-