- Aug 28, 2012
-
-
Agata Murawska authored
instance_list call takes a list of hypervisors and returns a list of running instances. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
all_instances_info call takes a list of hypervisors and returns a list of (name, memory, state, vcpus, time) - one element for each instance. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Prepare and execute RPC call, prepare result for the call. These procedures are generic in the sense that they only require the Call and Result types to be connected. We use curl library for sending http requests for RPC; as the library's usage can be disabled, we need to use CPP preprocessor macros for some parts of the code. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
We introduce typeclasses for RPC call and result and create a typeclass that binds the two together. For that we need to use MultiParamTypeClasses and FunctionalDependencies language pragmas, which allow us to ensure that RPC result type can be deduced based on the RPC call type. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Very simple Hypervisor object, that we want to pass in some of RPC calls is added. We also export AdminState data type, as it is used in one of the calls that will be implemented in this patch series. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
As timeout constants will now be used also on Haskell side, they have been moved from rpc_defs and rpc to constants. The same is true for connection timeout for connecting to nodes. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 27, 2012
-
-
Iustin Pop authored
* devel-2.6: Make stable-2.6 compatible with newer pep8 Fix computation of disk sizes in _ComputeDiskSize Add verification of RPC results in _WipeDisks Add test for checking that all gnt-* subcommands run OK Fix double use of PRIORITY_OPT in gnt-node migrate Add new Makefile target to rebuild the whole dist rapi client: accept arbitrary shutdown arguments Handle offline nodes for "instance down" checks Add missing rst files to Makefile.am Release version 2.6.0 (final) Fix 'explicitely' common typo Fix issue in LUClusterVerifyGroup with multi-group clusters Add QA test for node group modification of ndparams Fix node group modification of node parameters Fix RST formatting in NEWS file Update NEWS and bump version for release 2.5.2 Fix boot=on flag for CDROMs KVM: only pass boot flag once Ensure a stable content of the bash completion file Conflicts (all trivial): Makefile.am (design drafts on both sides, pep8 changes) autotools/build-bash-completion (copyright years) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
* stable-2.6: Make stable-2.6 compatible with newer pep8 Fix computation of disk sizes in _ComputeDiskSize Add verification of RPC results in _WipeDisks Add test for checking that all gnt-* subcommands run OK Fix double use of PRIORITY_OPT in gnt-node migrate Add new Makefile target to rebuild the whole dist Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This is done so that all current branches can run with newer pep8; note that instead of fixing the problems (like I did on master), I've just silenced more. These should *not* be merged onto master! Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Aug 24, 2012
-
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 23, 2012
-
-
Iustin Pop authored
Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's: - bump version in the docs - silence some new checks that are wrong due to our indent=2 instead of 4 - fix lots of errors in the code where the indentation was wrong by 1 or 2 spaces - fix a few cases of == True, False, None and replace with 'is' - re-indent some cases where the code is OK, but pep8 complains Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Since this is an inheritable parameter, having it as a MABYE_STRING creates only problems (per our derivation rules). We change it to STRING, with the default "", meaning no program. Note that most of the code already accepts this as valid for "no program", and some comments even say that this is the expected value. We have some other parameters like this, I'll have to investigate whether they need to be changed too. But right now I need this for the hconfd changes (it's a prerequisite for them, I forgot to send it in that patch series). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Aug 22, 2012
-
-
Constantinos Venetsanopoulos authored
Currently, hail fails with FailDisk when trying to add an instance of type: 'file', 'sharedfile' and 'rbd'. This is due to a "0" or None value in the corresponding dict inside _ComputeDiskSize, which results in a "O" or non Int value of the exported 'disk_space_total' parameter. This in turn makes hail fail, when trying to process the value: - with "Unable to read Int" if value is None (file) - with FailDisk if value is 0 (sharedfile, rbd) The latter happens because the 0 value doesn't match the instance's IPolicy, since it is lower than the minimum disk size. The second problem still exists when using adoption with 'plain' and 'blockdev' template and will be addressed in another commit. Signed-off-by:
Constantinos Venetsanopoulos <cven@grnet.gr> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 15, 2012
-
-
Iustin Pop authored
Due to an oversight, the pause/resume sync RPC calls in _WipeDisks lack the verification of the overall RPC status, and directly iterate over the payload. The code actually doing the wipe does verify correctly the results. This can result in jobs failing with a hard to diagnose: OpExecError ['NoneType' object is not iterable] instead of proper "RPC failed" message. This patch adds a hard check on the pause call, but for the resume call it just logs a warning if the RPC failed; the rationale being that if we can't contact the node for pausing the sync, it's likely wiping will fail too, but after the wipe has been done, we can continue. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Aug 14, 2012
-
-
René Nussbaumer authored
This is the design doc for the bulk instance creation. You can more details in the doc itself. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Aug 13, 2012
-
-
Iustin Pop authored
This is a trivial code change, but it allows us to finally test the send-receive code on both client and server sides via a simple in-process server. The unittest works, but it won't handle timeouts very nicely; it will wait until the actual Luxi timeout expires, instead of using much shorter timeouts as we could in the same process. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
I'm doing this change for future performance optimisations. Currently we use the Luxi interface just as a client, so not in the hot path, but when we'll use this as a server interface, we're interested to both reduce the space and time consumption of the interface. We have to simultaneous changes here: - switch from using socket-related function (sendto, recv, etc.) to handle-based functions, since the standard network library doesn't work with sockets - switch from using Strings for the internal buffer to strict ByteStrings; the only downside is that we now have the issue of decoding/encoding from binary to UTF-8 strings, a fact which brings its own issues into the mix (we have to check for failed decodings, etc.); but this is similar to what we'll have to handle on the Python side when moving to Python 3.x Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Aug 10, 2012
-
-
Iustin Pop authored
This is a bit of a shell munging trickery, but works for now. Making it more generic can be done later. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This breaks the command, as optparse considers that an error. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Aug 09, 2012
-
-
René Nussbaumer authored
Due to the fact how the automake system works it doesn't rebuild already prebuild files in distcheck. This lead to a bug, where a rebuild of the documentation was failing because we missed the fact that the files were missing from the archive. By adding distrebuildcheck we workaround that issue by running a maintainer-clean which also removes prebuild files. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 08, 2012
-
-
Guido Trotter authored
The "ignore_offline_nodes" parameter is unsupported. Rather than explicitely adding it, just pass all keyword arguments in the body of the query, and rapi on the other side will do the right thing. Supports for old arguments that were passed via the query is unchanged. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
When offlining an instance because its primary node is down, we must be able to cope with the situation. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 07, 2012
-
-
Iustin Pop authored
This has been a long-standing cleanup item, which we've always refrained from doing due to the high estimated effort needed. In reality, it turned out that after some infrastructure improvements (the previous patches), the actual job queue-related changes are quite small. We will need to update the NEWS file later, but so far the RAPI documentation doesn't mention that the job ID is a string (it only says it is "a number"), so it doesn't look like it needs update. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Currently, all the CLI helpers in qlang.py and cli.py assume that all namefields are string, which leads to various breakage in case the're actually not. To improve the flexibility of the helpers, we add a bit of infrastructure for accepting so called "numeric" namefields; this is a bit of a hack, as a proper fix would actually add QFT_* support to the helpers, and case for example the regex/globbing on QFT_TEXT, etc. But that's left for (eventual) later improvement. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This patch removes/abstracts some hardcoded values in the jqueue unittests. Currently we have a per-resource type name field, but the name field values are hardcoded at the call sites, instead of being abstracted into separate variables. This will become a problem later, so let's just introduce some new vars holding these; modifying the tests later will be therefore easier. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
It wasn't clear for which tests we were ignoring the errors. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Aug 02, 2012
-
-
Iustin Pop authored
A while back, we did cleanup the code and ensured (manually) that use of OpPrereqError includes an errors.ECODE_* field as second argument. Since we cannot automate the check for this, it turns out that more and more such usage has crept over the years, including in the master code (the use on the CLI side is not as important). Note that this also uncovered a few errors in ovf.py where the errors messages were wrongly constructed. Still looking for a way to automate this check… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 31, 2012
-
-
Iustin Pop authored
Both the job id and submit job result parsing are abstracted into separate functions, so that later changes are more localised. Also, this makes submitManyJobs itself easier to read. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This will be used for easier change later. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 27, 2012
-
-
Iustin Pop authored
Phew, it wasn't easy, but… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Iustin Pop authored
It seems that 'explicitely' is wrong, and that the right form is 'explicitly'. This is just fixing the typo plus adjusting affected paragraphs. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 26, 2012
-
-
Iustin Pop authored
In case LUClusterVerifyGroup is run on a group which doesn't contain the master node, the following could happen: - master node is selected due to the explicit check - if the order of nodes in the 'absent_nodes' list is such that the master node is the first in it, then we'll select (again) the master node - passing duplicate nodes to RPC calls will break due to RPC internals; this should be fixed separately, but in the meantime we just refrain from passing such duplicates This patch should not change the semantics of the code, since it wasn't guaranteed even before that we find a vm_capable node. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Iustin Pop authored
Additionally, we run hbal if the htools tests are enabled (new key). Note that hbal will directly exit, since there are no instances, but at least it will load and parse the group details. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Commit 904b3bfe tried to fix the deletion of custom ndparams from group, but instead broke both modification and deletion: because we run ForceDictType on self.op.ndparams instead of the updated new_ndparams, we can neither delete nor set properly spindle_count (since it won't be coerced to int). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 25, 2012
-
-
Bernardo Dal Seno authored
QA for recreate-disks called it twice with a list of node; the first call now uses an allocator. Signed-off-by:
Adam Ingrassia <api@google.com> Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Adam Ingrassia authored
The recreate-disks command no longer requires an explicit list of nodes. Signed-off-by:
Adam Ingrassia <api@google.com> Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Bernardo Dal Seno authored
This affects only the backend. Signed-off-by:
Adam Ingrassia <api@google.com> Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Adam Ingrassia authored
Ideally this should have used relocation mode, but to due lacking of support in current allocators, allocation mode has been used instead. Signed-off-by:
Adam Ingrassia <api@google.com> Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Adam Ingrassia authored
_CheckInstanceNodeGroups behaves in the old way with the default value of the new parameter. Signed-off-by:
Adam Ingrassia <api@google.com> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-