- 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 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
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 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>
-
- May 15, 2013
-
-
Helga Velroyen authored
This patch introduces a test to check the compatibility of the Haskell and the Python representation of instances. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Helga Velroyen authored
This patch introduces and enhances generators for instances: - 'genInstWithNets' is split into the generation of an arbitrary instance and enhancing an instance with nets - 'genInst' calls 'genInstWithNets' with an empty set of initial networks to provide a reasonable default - the Arbitrary instance of 'Instance' uses now 'genDisks' to create instances with a reasonable set of disks Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Helga Velroyen authored
The Arbitrary instance of the 'Instance' object is written using the <*> syntax. Since it often uses the 'arbitrary' generator for the instance's fields it is hard to figure out which 'arbitrary' fills which instance field. This patch annotates all fields with their name to make maintenance of this code easier. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Helga Velroyen authored
This patch adds generators for Disk instances to the Haskell test code. It uses somewhat more reasonable generators to fill the fields instead of just arbitrary values. 'genDiskWithChildren' is a generator that generates a disk with a specified number of disk children. To avoid shooting ourselves in the foot we do not generate further (grand) child disks for the child disks. 'genDisk' calls 'genDiskWithChildren' by requesting three children as a resonable default. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
- May 03, 2013
-
-
Bernardo Dal Seno authored
The way disk templates were displayed in instance policies became confusing since the introduction of the enabled_disk_templates cluster parameter. Fix issue 440. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
This makes sure that issue 401 doesn't come back. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Apr 30, 2013
-
-
Michele Tartara authored
The haskell type definition of opcodes should remain aligned with the python one. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
Since we use the primitive string type for group UUIDs, the group fields have a bug where we pass the group name as filter for node tests, whereas the nodes themselves use the group UUID. This results in zero node count, empty node list, and no instances being reported as assigned to groups. The patch fixes this and adds a test for the node count. It does some test generation improvement, and also cleans up whitespace issues in Test/G/Q/Query.hs (the functions case_queryNode_allfields, prop_queryGroup_noUnknown and case_queryGroup_allfields are unchanged but simply have indentation fixed). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Cherry-pick of e7124835, fixes issue 436 Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Conflicts: test/hs/Test/Ganeti/Objects.hs test/hs/Test/Ganeti/Query/Query.hs
-
- Apr 29, 2013
-
-
Bernardo Dal Seno authored
Both tiered and standard allocations are tested, with a single and a double min/max instance specification. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
We try to parse the string obtained by formatting a policy, and see if we get the same policy. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
Command line options accept multiple min/max specifications in instance policies. The output of show-ispecs-cmd is updated accordingly. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
Now instance policies can contain more than one min/max specs. This is the main element of the "Constrained instance sizes" section in the "Partitioned Ganeti" design doc. This is a big patch, but changing the type of a configuration item requires to change all the code that handles it. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
This is needed to be able to validate the std spec against multiple min/max spec pairs (appearing in next patches). Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Apr 24, 2013
-
-
Michele Tartara authored
Opcode-specific implementation of the reason trail for the instance startup operation. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
Opcode-specific implementation of the reason trail for the instance shutdown operation. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Test upgrade and downgrade from a realistic 2.7 configuration. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
This makes easier to test real configurations. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
Command line options are brought in line with the specs change of previous patch. Old options are still allowed in gnt-cluster init, where the semantic will remain non-ambiguous even after introducing multiple specs. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
Specs used to specify limits in instance policies are always complete, even at group level (only the whole limit set can be overridden). This is in preparation for introducing multiple limits. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
This makes the code more modular, in preparation for the following patches. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
The output of this command can be used to create an exact copy of the current instance policy specs. The command could be expanded to print all the options used to create a group or the cluster. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
These options allow to specify whole instance policy specs. This is needed for the upcoming changes that tend to threat specs as monolithic objects. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
This will be used for the new instance specs options. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Bernardo Dal Seno authored
Previously the string value was being corrupted. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Apr 22, 2013
-
-
Klaus Aehlig authored
In a simulated cluster as created by the simulation backend to the htools, make the first node of the first node group the master node. In this way, hools (like hroller) that require a master node can also be used on simulated clusters, e.g., for testing. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Klaus Aehlig authored
Add a unit test for hroller in a situation where the order is completely determined. There are 3 nodes where node 2 has, for each of the other nodes, an instanced shared with it. So node 2 has to be a reboot group of its own. There are no more instances, hence, my minimality, the other two nodes have to form a single group. Node 1 is the master, and hence has to be rebooted last; this determines the order. Also add a unit test verifying that hroller rejects configurations with multiple master nodes, even if the option --force is given. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
This commits allows ganeti to correctly forward the reason trail information regarding instance reboot. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
Remove the useless parts of the old, partial, implementation of the support for tracking the reason of instances state change, before implementing the new reason trail support, as per the design document. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Apr 19, 2013
-
-
Klaus Aehlig authored
As people rely on the master node being the last node of the last group, make hroller fail, if no master node could be found in the cluster. This happens, e.g., if a backend format is used that does not contain information about the master node. The error can be turned into a warning by using the --force option. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 17, 2013
-
-
Christos Stavrakakis authored
Modify existing tests to use the name option for instance disks. The configuration options 'disk' and 'disk-growth' are merged into a single 'disks' option, which is a list of dictionaries with 'size', 'growth' and 'name' items. Also, add 'instance-device-names' QA test, which tests addition, renaming and removal of named devices. Signed-off-by:
Christos Stavrakakis <cstavr@grnet.gr> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Christos Stavrakakis authored
This commits adds name to NIC and Disk modification definition. Signed-off-by:
Chris Stavrakakis <cstavr@grnet.gr> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Christos Stavrakakis authored
Add name and uuid fields to Disk and nic Haskell objects. Also, since they now have an UUID, make them instances of UuidObject. Signed-off-by:
Christor Stavrakakis <cstavr@grnet.gr> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Christos Stavrakakis authored
Extend the CheckArguments phase of LUInstanceCreate and CheckPrereq phase of LUInstanceSetParams to also check if the name parameters of disks and NICs are unique and valid. Signed-off-by:
Christos Stavrakakis <cstavr@grnet.gr> Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Helga Velroyen <helgav@google.com>
-