- Apr 28, 2008
-
-
Iustin Pop authored
This patch converts the cli.py SubmitOpCode method to use the unix protocol and thus execute the opcodes via the master. The patch allows a partial burnin to work with the master. Currently the query opcodes, since they are executed via the SubmitOpCode, are executed inside a job too, which is suboptimal, but they work fine. The cmd lock has been removed from the master, but the cli.py still takes the lock. This is ok for this in-progress patch (since the master still has only one executor thread). This will be fixed in a future patch. Reviewed-by: ultrotter
-
Manuel Franceschini authored
bdev.FileStorage does not have major or minor fields, so gnt-instance info for file backed instances fails with a TypeError. This patch adds checks to prevent that and print 'N/A' instead. Reviewed-by: imsnah
-
Manuel Franceschini authored
This patch changes the code executed when testing the signal handling of RunCmd. Since sh does not always point to bash (e.g. on Ubuntu, where it points to /bin/dash) this test might fail due to the returned exit code is different so the received signal is not correctly detected. Additionally fix the docstring of testSignal. Reviewed-by: iustinp
-
Iustin Pop authored
Currently the iallocator execution takes place in the master, which is a violation of the current architecture, and will create problems with a threaded master daemon. This patch moves the execution to the backend, similar to the hooks runner, by: - introducing a new class that handles the execution in the backend (and could be used also for listing the allocators, etc.) - introducing a new rpc call - replacing the actual execution in IAllocator.Run() with a rpc call This passes burnin with the dumb allocator Reviewed-by: imsnah
-
Iustin Pop authored
The commit "IAllocator: some more info exported" broke the instance list generation due to a wrong index variable. This patch fixes that. Reviewed-by: ultrotter
-
- Apr 25, 2008
-
-
Michael Hanselmann authored
Add parameters to not check the path for absoluteness, implement a dry run mode and automatically create a backup if requested. This will be used by the cfgupgrade utility. Reviewed-by: schreiberal
-
Iustin Pop authored
This patch adds the following information to the exported info: - hypervisor type (in the main dict) - total memory used by primary instances (in each node dict) (can be computed from the node+instance dicts, but it's cheap to compute from Ganeti) (this is not live data, just from the config) - total memory used by primary instances marked to be up, similar to the above Reviewed-by: imsnah
-
Iustin Pop authored
Currently we try to convert the values returned by call_node_info to ints, and if all succeed, we actually do the conversion. Simplify this by doing it in one step. The patch also adds exporting of node memory as 'reserved_memory'. Reviewed-by: imsnah
-
Iustin Pop authored
This patch extends the config objects with the slots to handle more HVM configuration items. Author: schreiberal Reviewed-by: iustinp,imsnah
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Iustin Pop authored
Reviewed-by: imsnah
-
- Apr 24, 2008
-
-
Manuel Franceschini authored
This patch initializes nic_count and disk_count with 0. This prevents some reference errors if the snap_disks block device list is empty. Reviewed-by: ultrotter
-
Iustin Pop authored
This small patch fixes: - wrong indentation in two places - use of 'os' variable that hides global scope os module Reviewed-by: imsnah
-
Iustin Pop authored
This patch implements secondary replace via the iallocator. The new opcode parameter 'iallocator' behaves like this: if passed, it will always compute and assign a new secondary, behaving in effect as if the secondary node has been passed. It conflicts with actually giving the secondary too. [Note: not tested with remote_raid1, but the code should behave the same, we only touch CheckPrereq and we assign a node.] The patch also adds burnin support for the replace secondary operation; with this in place, burnin can fully work with auto-assigned nodes. Reviewed-by: ultrotter
-
Iustin Pop authored
This simple patch adds memory size for the burnin instances, which helps testing allocator algorithm response based on the available node memory and instance memory size values. Reviewed-by: ultrotter
-
Iustin Pop authored
The patch which generalized the IAllocator was half-true: it actually put the selection of the node inside the IAllocator, so callers were not able to specify replace primary node. This patch does: - split the arguments to the constructor in three sets: mode and name are always passed, and then we differentiate between allocation parameters and relocation ones - add a new relocate_from option to the IAllocator constructor which is a list of nodes we want to move the instance off - rename the 'nodes' argument in the request object to 'relocate_from' since this is clearer and is not confused with the result field also called 'nodes' Reviewed-by: ultrotter
-
- Apr 23, 2008
-
-
Manuel Franceschini authored
This patch adds the two attributes file_storage_dir and file_driver to the CreateInstance opcode in the ImportExport method, since otherwise it will fail with the file storage patches. Reviewed-by: iustinp
-
Guido Trotter authored
When the allocator or a non-mirrored template are used the message shown by burnin at instance creation time was wrong. Fixing it. Reviewed-by: iustinp
-
Guido Trotter authored
Make burnin remove exports after importing the instance back. Reviewed-by: iustinp
-
Guido Trotter authored
This patch also fixes the LUExportInstance Prereq docstring. Reviewed-by: iustinp
-
Manuel Franceschini authored
This patch adds the possibility to execute instance renaming when doing a cluster burnin. The optional parameter --rename takes one 'spare' instance name. Given this option it renames all given instances to the spare one and back to their original name. Reviewed-by: iustinp
-
Iustin Pop authored
Currently the replace_secondary mode is too restrictive. This patch changes this to a general 'relocate' mode where the node(s) to be changed are specified via a new key in the request dict ('nodes') so that we can change any of the instance's nodes. Note that for the relocate mode, len(nodes) == required_nodes, so the required nodes field is redundant, but it is provided for consistency with the allocate mode. Reviewed-by: ultrotter
-
Iustin Pop authored
This patch allows the dumb allocator to perform the replace secondary request type. This is done simply by not allowing the current instances nodes as a valid selection, and using the existing instance data instead of the request (which doesn't have the instance info when doing the replace_secondary). Reviewed-by: ultrotter
-
Iustin Pop authored
This patch adds the 'required_nodes' field in the request dict for the iallocator. This means that the handmade-checks in the create instance can be simplified, and that the dumb allocator can be made simple. Therefore the patch also modifies it. The patch also sends the disk_space_total to the script in realocate mode and a small fix for showing errors (include stderr too). Reviewed-by: ultrotter
-
Iustin Pop authored
This patch adds iallocator support to burnin, currently only in instance creation. This means that, depending on the external algorithm, not all nodes might get instances. The patch also restricts node selection and iallocator options together. Reviewed-by: ultrotter
-
Iustin Pop authored
This patch moves all the iallocator function into a separate class that is then somewhat easier to use. It doesn't bring any new functionality. The patch also changes the way the iallocator is called - the OpTestAllocator opcode is no longer needed, and all its parameters should be passed directly to the IAllocator constructor. Reviewed-by: ultrotter
-
- Apr 22, 2008
-
-
Alexander Schreiber authored
Reviewed-by: ultrotter
-
- Apr 21, 2008
-
-
Iustin Pop authored
This patch makes the _SetInstanceStatus only change the status of the instance (in the config file) if it's not already in the desired state. This skips the increase of the config serial no without actual data changes. Reviewed-by: ultrotter
-
Iustin Pop authored
This patch creates a new method ConfigWriter._SetInstanceStatus that consists of the common code between MarkInstanceUp and MarkInstanceDown. These two methods become wrappers over the _SetInstanceStatus. Reviewed-by: ultrotter
-
Iustin Pop authored
This simple patch adds a new module that holds the simplejson functions for serialization/deserialization. This reduces the amount of redundant code. The patch also adds some normalizations to the json output: - the output text will always have an EOL as last char - extra spaces before EOL are removed Reviewed-by: ultrotter
-
- Apr 16, 2008
-
-
Michael Hanselmann authored
This allows us to readd a node after it failed and required a reinstallation or replacement. Reviewed-by: iustinp
-
Iustin Pop authored
Reviewed-by: amishchenko
-
Iustin Pop authored
This (final) patch allows the instance's nodes to be selected automatically based on the passed allocator algorithm. The patch changes the pnode opcode parameter from required to optional, now either the pnode or the iallocator must be passed. A possible improvement could be to organize all the _IAllocator functions into a separate class, but that can come later and the current version is functionally ok. Reviewed-by: ultrotter
-
Iustin Pop authored
This patch reorders the checks in the instance create prereq so that all checks and normalisations that are not node-dependent are done before the node dependent checks. This is done so that, after the instance-related opcode parameters are checked and fixed, we can run the allocator and compute the primary (and any secondary) nodes, and only then proceed with node-related checks. Reviewed-by: ultrotter
-
Iustin Pop authored
This patch adds the paths for searching for instance allocators and makes the LUTestAllocator code run the allocator and return the results if the direction specified is 'out'. 'out' means that the opcode will return the result of the allocator run, instead of the allocator input file ('in'). The patch unifies all names to refer to 'iallocator' instead of plain allocator. The patch also adds an example allocator that can be used for testing this new functionality. Reviewed-by: ultrotter
-
Iustin Pop authored
In preparation for the introduction of automatic instance allocator, this patch adds an allocator simulation opcode, that based on the input parameters, will return either the input message to the allocator (implemented) or the result of the allocator run (not yet implemented). This allows algorithm tests against simulated allocations and the current cluster state. The patch adds the following: - a function that generates the generic cluster information for the allocator - a function that generates the 'new instance' information - a function that generates the 'replace_secondary' information These three functions will be used by the allocator framework later to generate the actual information for the external algorithms. Currently we just return the json-serialized text. Reviewed-by: imsnah
-
- Apr 15, 2008
-
-
Guido Trotter authored
Reviewed-by: iustinp
-
Manuel Franceschini authored
Reviewed-by: iustinp
-
Manuel Franceschini authored
This patch does two things: - adjusts burnin to work with the file storage backend patches - adds the possibilty to do a burnin for file based instances Reviewed-by: iustinp
-
Iustin Pop authored
This is currently hard-coded for the two drive case and will need to be reworked for multi-disk support. The patch is needed to support passing the total required size to the iallocator interface. Reviewed-by: ultrotter
-