- May 21, 2013
-
-
Helga Velroyen authored
This replaces the field 'vg_names' in the RPC call of 'node info' by 'storage_units'. A storage unit is a tuple <storage_type,key> and a generalization of a vg_name. The list of vg names is replaced by a list of storage units. The modified RPC call will be used to report storage space for more than just lvm volume groups. What the 'key' is depends on the storage type. For storage type lvm-vg, the key is the volume group name. To keep backward compatibility, all functions that use the old vg_names, convert them to a list where every volume group is mapped to a tuple [('lvm-vg',volume_group)] before making the call. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- May 17, 2013
-
-
Thomas Thrainer authored
All functions/classes which are used outside of their defining module (with tests as an exception) no longer have a leading underscore. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
Split instance.py further by extracting instance querying related logical units and functions to instance_query.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
Split instance.py further by extracting instance operations (start/stop/reboot/etc.) related logical units and functions to instance_operation.py. The extracted operations have in common that they affect the operating system in a running instance directly. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
Split instance.py further by extracting migration related logical units and functions to instance_migration.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
Split instance.py further by extracting storage related logical units and functions to instance_storage.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
cmdlib/__init__.py now simply defines the interface of the cmdlib module by importing all classes which should be visible to clients. Also don't ignore C0302 (Too many lines in module) any more. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
All remaining classes in __init__.py are extracted to misc.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
All LUOs* classes are extracted to operating_system.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
All LUQuery* classes are extracted to query.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
All LUBackup* classes are extracted to backup.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
All LUInstance* classes are extracted to instance.py. Common functions are moved to common.py if used by non-instance logical units as well. Additionally, helper functions which are only used by LUBackup* and LUInstance* are moved to instance_utils.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
All LUNode* classes are extracted to node.py. Common functions are moved to common.py if used by non-node logical units as well. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
All LUGroup* classes are moved to group.py. Common functions are extracted to common.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
All LUCluster* classes are extracted to cluster.py. Shared functions are extracted to common.py, helper functions only used by LUCluster* are extracted to cluster.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
LUTest* are moved to test.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
LUNetwork* and associated helper functions are extracted to network.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
LUTags* and their base class, TagsLU, are extracted to tags.py. An additional shared function, _ShareAll, is extracted to common.py for shared usage. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Thomas Thrainer authored
Base classes holding common functionality is extracted into base.py. Utility functions used by both base classes and subclasses is moved to common.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- May 15, 2013
-
-
Helga Velroyen authored
This simplifies my previous commit (820bade9) by using os.statvfs instead of parsing the output of 'df'. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- May 14, 2013
-
-
Helga Velroyen authored
This adds functionality to retrieve disk space information for file storage. It calls the 'df' tool and parses its output to extract the total and free amount of disk space on the disk where the given path is located. The code is not integrated yet, but thoroughly unit-tested. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Bernardo dal Seno <bdalseno@google.com>
-
Michele Tartara authored
Also, properly set the date of the last modification. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
The monitoring daemon should always be alive, therefore it's added to the watcher. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
Add the monitoring daemon to the command starting the node daemon, given that they both have to be started on all nodes. Note that daemon-util only supports starting one daemon at the time, so the actual command has to be composed as a sequence of two different daemon-util invocations. Also, the monitoring daemon invocation is conditional, depending on whether it was enabled at configure time. Signed-off-by:
Michele Tartara <mtartara@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>
-
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>
-
Helga Velroyen authored
Moving 'container.py' to the storage directory. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Helga Velroyen authored
Renaming the 'block' directory to 'storage', because I plan to place code there that is related to file storage and leaving it named 'block' would be misleading. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Helga Velroyen authored
Renaming 'storage.py' to 'container.py'. It will be moved into the new 'storage' directory, which will come in later patches to avoid clashes of notation. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
- May 13, 2013
-
-
Guido Trotter authored
cmdlib.py has grown *really* too much. Move it into its own package to allow splitting it further. Signed-off-by:
Guido Trotter <ultrotter@google.com> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
- May 09, 2013
-
-
Bernardo Dal Seno authored
The order of evaluation of the conditions is changed, so it's easier to add more (foreseen) checks for exclusive_storage. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Bernardo Dal Seno authored
Prereq checks relative disks are grouped together and moved in a separate method. This reduces the clutter in CheckPrereq(). Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
- May 07, 2013
-
-
Thomas Thrainer authored
In DRBD 8.4, Ganeti does no longer use indexed external meta data but flexible external metadata. Therefore, there is no longer a meta data index in the output of `drbdsetup show`. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- May 06, 2013
-
-
Thomas Thrainer authored
This check is performed during gnt-cluster verify and outputs warnings if at least two different DRBD versions are found within a node group. In such a case, all nodes with their installed DRBD version are displayed. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Thomas Thrainer authored
All functionality specific to a single DRBD8 devide is now in DRBD8Dev, whereas functionality which is valid for the whole DRBD "installation" on a device is collected in DRBD8. This makes it possible to remove a couple of FIXME's and clarifies the code in some areas. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Thomas Thrainer authored
Right now the DRBD8 class has multiple responsibilities: a) it reprensents a device which can be set up, grown, etc. and b) it represents the whole DRBD system on a node which has a usermode helper, which knows how to shut down _all_ devices, etc. Therefore, the DRBD8Dev class will only be responsible for a device, whereas the soon to be extraced DRBD8 class is responsible for the DRBD system. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-