- Sep 03, 2012
-
-
Iustin Pop authored
To help developing Ganeti on newer distributions, let's try to fix pylint warnings/errors. I'm using pylint from current Debian wheezy: pylint 0.25.1, astng 0.23.1, common 0.58.0, and we have 3 things that needs fixing. First, a really wide "except", with the silencing in the wrong place. I'm not sure why this doesn't have "except Exception", so let's add it. However, pylint still complains about "Catching too general exception", even though we do want to catch both system and our exception, so let's add a silence for W0703. It's true that we shouldn't catch KeyboardInterrupt and friends, but that should be cleaned up on the master branch. Second, pylint complains about "redefining name builtin tuple", because we do some pattern matching in the except blocks in netutils. This seems to be a false positive, but let's clean the code around this. And finally, type inference again goes bad, so let's silence E1103 with its "boolean doesn't have 'get' method". After this, I can run "make lint", and by extension "make commit-check" on Debian Wheezy, yay! We might be able to bump our required pylint versions to something not ancient… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Pylint version: pylint 0.25.1, astng 0.23.1, common 0.58.0 crashes when passing the fully-qualified decorator name with: File "/usr/lib/pymodules/python2.7/pylint/checkers/base.py", line 161, in visit_function if not redefined_by_decorator(node): File "/usr/lib/pymodules/python2.7/pylint/checkers/base.py", line 116, in redefined_by_decorator decorator.expr.name == node.name): AttributeError: 'Getattr' object has no attribute 'name' I found out that simply using a shortened name will 'fix' this issue, so let's do this to allow running newer pylint versions. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 27, 2012
-
-
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 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 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
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@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
-
-
Iustin Pop authored
* commit 'v2.5.2': 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 Conflicts: NEWS (trivial, merged the entries) configure.ac (trivial, kept ours) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Jul 24, 2012
-
-
Iustin Pop authored
*FileID is interpreted as a start-of-bold, without corresponding end marker. Sorry for not catching it in the first place. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
Iustin Pop authored
This is a trivial release, with just bug fixes, so a small change log. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This generalises commit 4304964a to cdroms too, since they have somewhat the same logic. We just abstract the needs_boot_flag into a separate variable, and then reuse it in the cdrom section. Note that the logic of what 'if=' type to pass to KVM was very convoluted, and (I think) incorrect; I went and cleaned it to be more consistent. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This addresses issue 230: passing two methods of booting to KVM can, depending on the KVM version, confuse it. Note that commit 4304964a introduced a partial fix for this (but only for disks, and keyed on KVM versions). However, it didn't fix cdrom booting, which still fails with the same error, so let's fix it more generically; we still leave the per-disk check since that is about -boot c versus -drive …,boot=on rather than two boot methods. Patch is based on the one submitted by Vladimir Mencl, many thanks! Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 23, 2012
-
-
Iustin Pop authored
Currently, the order of commands in the bash completion file is random, because the sub-commands are not sorted. This makes it harder to investigate the differences in packaged Ganeti or in installed Ganeti, since chunks in this file will have a random order. To fix this, we sort the subcommands based on the first subcommand in a given group ('first' also in sorted order); this results in a stable contents of file, as tested by building it many times and checking for differences. The patch also does a few other minor changes to the file (e.g. updating copyright years, etc.). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 19, 2012
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Another release candidate is coming. Signed-off-by:
René Nussbaumer <rn@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>
-
René Nussbaumer authored
On node groups we don't have the std field. However, the InstancePolicy object always verifies that the std value is within a given range. As we fill it up with defaults if not set (as it happens to be on node groups) and the min value is higher than the default std value (taken from constants.py) we fail. We overcome this situation by simply let the function know if we want to verify the std value at all. If we don't want to verify std, we just set it to a compliant value (min_v) and continue. We also slightly adapt the error message provided, as we don't have std values on groups. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Sorry, I forgot that with GenerateTable this needs to be handled manually. Fixed now and tested in both ways. (But to be honest, this should be abstracted in GenerateTable, instead of the 'if' test in all its callers.) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This will be run only if 'haskell-confd' QA configuration has been enabled. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This uses confd to query the DRBD minors, which is very special; no other command currently does so. Since the backend is only implemented in the Haskell version of confd, we have checks that 1) confd is enable, and 2) hs confd is also enabled. If by mistake people do manage to query Python confd, the error message will be clean: Query gave non-ok status '2': not implemented So nothing breaks in an "ugly" way. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This can be queried remotely since it's a pure configuration query. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This is not implemented currently. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This fixes an old FIXME. Since we now how actual DRBD configuration data, we can finally compute the instance's secondary nodes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This is a complex field, so we have to do a lot of manual work for now. The complexity arises from the fact that the contents of the field, and the way to parse it, depends on the disk type field, so we don't have a single, static way of parsing it. Hence we needed the extensions to the Template Haskell code. Since we now can both load and save the disk type, we can remove the in-memory (duplicate) disk type from the disk objects, relying only on the logical ID to hold the type information. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
It seems this was not updated since the move to static minors… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
Currently, we only allow field-by-field de-serialisation. Since we have cases where information about how to un-serialise a field is split across two JSON fields (e.g. disk type and disk logical_id, hypervisor and hvparams, etc.), we need to pass the entire object to custom read functions. Furthermore, since we will have to generate two actual fields from the single in-memory field, we need to extend the custom save function so that they can generate additional fields beyond the "main" field value they currently generate. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
Instead of passing an expression (which cannot come from the current module), we pass a name, which is allowed to reference functions from the module we're in. Since we currently don't have custom fields, we don't need to modify any callers. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This uses the recently-moved functions to implement partial lookup of names on getNode and getInstance, similar to the Python codebase. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
Currently, the LookupResult, MatchPriority and related functions are locate in Loader.hs, since (so far) only hbal needs them in the selection of instances. However, with the new functionality on confd side, we need these functions there too, but we don't want to import Loader.hs (which pulls in lots of balancing-related code). So we move all these function to BasicTypes.hs, since that module is a leaf one, with no other dependencies. Unittests are slightly adjusted (but they are still tested under the 'Loader' group). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This is not used, as we need a more complex serialisation, which is done in the saveObjectField function. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Jul 18, 2012
-
-
Iustin Pop authored
Commit cce46164 fixed upgrading from other 2.6 versions, but accidentally broke upgrading from 2.5 (disk.params was left as None, which breaks FillDict). The simplest way to handle params is to always set them to an empty dict (disregarding what they currently contain). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
René Nussbaumer authored
While looking at the testability of this piece of code, I found another consistency problem. We have two if branches instead of one, with elif's. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
This inconsistency was found during rebalancing. Hbal failed because, Ganeti couldn't load the opcode. After digging through the cause, an inconsistency with the "args" field in the LUXI protocol was triggered by the TemplateHaskell side where it's done uniformed. For SubmitJob and SubmitManyJobs we treat args as one argument, containing the job definition. In every other LUXI call args is actually a list of arguments. This patch fixes this consistency. This change is NOT backwards compatible. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-