- Apr 29, 2013
-
-
Thomas Thrainer authored
Python Mock (http://www.voidspace.org.uk/python/mock/ ) is a mocking library for Python. It is included in the standard Python distribution as of Python 3.3, but has been around for quite a while. Debian unstable contains a version we require. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
As the DRBD code was extracted from bdev.py, the corresponding tests should as well be extracted into their own file. That's what this patch performs. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
In order to easily support the DRBD 8.4 command syntax, this patch extracts all command generation logic (i.e. where calls to `drbdsetup` are assembled) into a new class DRBD83CmdGenerator. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
Now the DRBD8 class actually checks which version of DRBD is running on the system and chooses the right class to parse the `drbdsetup show` output. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
Common functionality between the DRBD 8.3 and DRBD 8.4 parser has been extracted into BaseShowInfo. A test which verifies the behaviour is included, but the DRBD84ShowInfo class is not yet used within the DRBD8 class. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
Parsing the status (/proc/drbd) and `drbdsetup show` output takes quite a bit of code, which has to be augmented by even more with the DRBD 8.4 support. So extract all the related classes into their own file. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
This class parses the `drbdsetup show` output and represents it in an easily accessible format. It got extracted so that 1) the DRBD8 class can focus more on DRBD logic rather than parsing and 2) it's easier to adapt the parser to new formats. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
The current parser already supports the output of DRBD 8.4 /proc/drbd, so add tests which actually verify this behaviour. Note that the empty lines in proc_drbd84.txt are actually present in the output of DRBD 8.4, they always appear when minors are not contiguous. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
The previous patch removed a (rather implicit) test for /proc/drbd not containing a version line. This adds an explicit test for this case. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
In the new context of the DRBD8Info class, the name _JoinProcDataPerMinor doesn't fit any more. _JoinLinesPerMinor reflects more precisely what's done, and doesn't imply that the data comes from /proc/drbd. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
As the DRBD8 class got bigger due to the previous merge of BaseDRBD, now parts of it are ripped out into DRBD8Info. This new class parses /proc/drbd and exposes the information in an easily accessible way. This allowed to simplify some methods in DRBD8 and do make the tests more concise. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
BaseDRBD was probably useful when DRBD 0.7 and DRBD 8 were supported. However, there is only one subclass of BaseDRBD remaining (DRBD8), and the separation of responsibilities between those two classes was rather randomly chosen. The unification into one class also eases the introduction of DRBD 8.4 support, as the responsibilities of the class(es) will be distributed anew. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
That's what the method actually does, so there is no reason why we should use a funny but unreadable name. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Apr 26, 2013
-
-
Helga Velroyen authored
This patch makes the constant DEFAULT_ENABLED_DISK_TEMPLATES a list instead of a set, because the order of the elements actually matters as the first one is planned to be the default disk template for instance creation. Also, this constant is always used like a list and thus providing it as a set complicates the code that uses it. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Helga Velroyen authored
Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Helga Velroyen authored
Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Helga Velroyen authored
This updates the man page of 'gnt-cluster' regarding the removal of the '--no-lvm-storage'. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Helga Velroyen authored
Was accidentally introduced by commit 912737ba. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Helga Velroyen authored
This patch does three things: 1. It deprecates the option '--no-lvm-storage' of 'gnt-cluster modify' and 'gnt-cluster init'. Technically, it is not fully removed, but kept in order to warn the user that it is no longer supported and that she should use --enabled-disk-templates instead. 2. The consistency check between '--no-lvm-storage' and '--vg-name' is replaced by checks between '--enabled-disk-templates' and '--vg-name'. There are these cases: - vg name, lvm disk template enabled = ok - no vg name, lvm disk template enabled = error - vg name, no lvm enabled = warning - no vg name, no lvm enabled = ok I added quite a lot of tests for all these and the transitions from each case to another to the QA. 3. The check whether or not the volume group is available on all nodes is now done only in these cases: - the volume group name gets set and lvm is already enabled - lvm is getting enabled and the volume group was set before Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Helga Velroyen authored
This patch add a couple of utility functions dealing with storage types and disk templates. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 24, 2013
-
-
Thomas Thrainer authored
This is in preparation to introducing support for DRBD8.4. base.py had to be extracted as well in order to avoid cylic imports between bdev.py and drbd.py. It now contains the BlockDev class and utility functions needed by bdev.py and drbd.py. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Thomas Thrainer authored
That's in preparation of extracting DRBD related code from bdev.py. As bdev.py is already rather long, new features will require to split it into more manageable pieces. That's why it's moved in an own directory. Signed-off-by:
Thomas Thrainer <thomasth@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Apr 23, 2013
-
-
Michele Tartara authored
The burnin uses its own option list, different from the one of all other command line programs, and uses it as a parameter to a function that now requires the "--reason" option to be present. This commit updates the burnin option list to be compatible with the reason trail implementation. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@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>
-
Klaus Aehlig authored
Sometimes, e.g., for hroller, it is necessary to know which node is the master node. Therefore this information has to be included in the text format as well. Since we never use an offline node as master node, we can put this information can be put in the "is offline" field; as old versions only check this field for equality to "Y", using "M" to indicate the master is compatible in both directions. This also leaves room to add more roles in the future, should we need them. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Sebastian Gebhard authored
Signed-off-by:
Sebastian Gebhard <sege@fs.ei.tum.de> Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Klaus Aehlig <aehlig@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
Also, this add an infrastructure for having parameters common to all the RAPI calls. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
Some parameters can be common to all the RAPI calls: this commit adds the possibility of specifying them just once, instead of manually adding them to the classes describing each call. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
The reason trail will contain an item indicating the job_id and the index number of the current opcode inside the job queue. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
The reason trail is available for all the opcodes, and as such it is initialized as a generic option. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
The reason trail will be available for all the OpCodes, so the field that is to contain it has to be added to the OpCode base class. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
Noded functions will have to extend the reason trail specifying what operation is being executed. This commit adds a function for doing that (will be used by future commits). Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
Add a function to convert an opcode class name to a source string for the reason trail, factoring out the code in common with the existing _NameToId function. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
We are interested in storing the reason trail for operations that changed the state of instances. This commit adds a function to do this. Also, the GetInstReasonFilename() function name is prepended with an underscore because it is only used in this file. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
The timestamp is returned as an integer number of nanoseconds since the Unix epoch. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
This will be used as the type for the reason trail parameter. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
A few constants are required, describing the source reason of the opcode. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-