- 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>
-
- Jul 23, 2012
-
-
Iustin Pop authored
This is just begging to be converted to a standard replace_vars_sed rule, instead of custom sed calls. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
A rule of type "a/%: a/%.in" will also match "a/b/%: a/b/%.in", so no need for the explicit examples/hooks rule. As for the man rules, they are identical and thus can be collapsed. We still have the problem that globally, not all our %.in to % transformations are identical; this is suboptimal and should be cleaned sometime… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Generic rules like: %: %.in have the downside that the source (%.in) itself matches the target (via %.in: %.in.in). This leads to things like: Looking for a rule with intermediate file `doc/examples/hooks/ipsec.in.in'. Trying pattern rule with stem `ipsec.in.in'. Trying implicit prerequisite `doc/examples/hooks/ipsec.in.in.in'. Trying pattern rule with stem `ipsec.in.in'. Trying implicit prerequisite `doc/examples/hooks/ipsec.in.in.in'. Looking for a rule with intermediate file `doc/examples/hooks/ipsec.in.in.in'. Rejecting impossible implicit prerequisite `doc/examples/hooks/ipsec.in.in'. To fix this, we need to tell make that such rules are terminating, so that it doesn't recurse into them. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
GNU Make contains some (ancient) implicit rules, that try to _automatically_ extract source files from RCS/SCCS version control systems. This is unneeded, and it pollutes the make -d output significantly: after removing these rules (by defining empty targets for their patterns), make -d line count goes from 5.3K to 3.3K. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Commit dc7d2c49 introduced the use of BUILT_SOURCES to work around missing dependencies. However, on closer reading of the gmake manual, BUILT_SOURCES is mainly used in cases where the dependencies are not know before the build starts (e.g. with auto-generated C header files). Additionally, there are a number of drawbacks to BUILT_SOURCES, which we already had to work around (e.g. in commit eb732fb5). Since we know all our dependencies statically, there's no need to use this special variable. Let's rename it to GENERATED_FILES, which doesn't have a special meaning to make, and add a few missing dependencies (one of which was already broken by make -j on a clean tree). After this change, running make in a fully built tree is finally "clean": $ make make: Nothing to be done for `all'. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, if one runs 'make' in an already fully-built tree, this is the result: cd . && test -h "ganeti" || { rm -f ganeti && ln -s lib ganeti; } make all-am make[1]: Entering directory `/tmp/test' cd . && test -h "ganeti" || { rm -f ganeti && ln -s lib ganeti; } make[1]: Leaving directory `/tmp/test' This is because commit dc7d2c49 added 'ganeti' (which is a PHONY target) to BUILT_SOURCES, and since that is a dependency of other, real targets, it means the ganeti target is always remade. To fix this, we keep ganeti as a PHONY target, but we remove it from the 'built_base_sources' target, and instead we only remake it manually in the stamp-directories target. A make run now is just: make all-am make[1]: Entering directory `/tmp/test' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/tmp/test' Note that we can't get rid of the all-am since we use BUILT_SOURCES. We also remove the comment of BUILT_SOURCES since it no longer depends on PHONY targets. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Commit c964d962 changed the way we create directories, by two things: - unifying all dependencies and ad-hoc directory creation into a single target (all_dirfiles) - changing how directories are created from a stamp file to .dir files in each directory The first item is a very good one, but the second item is debatable: there's no per-se advantage of .dir files versus a single one, top-level, since both the .dir file and stamp-directories creation are depending on Makefile, which is the only one which can introduce new directories. On the other hand, moving back from .dir files to stamp-directories has an advantage: "make -d | wc -l" does from ~8.7K lines to ~5.3K lines, because we eliminate the many .dir files and their multiple implicit and explicit dependencies (the %/.dir files fall under multiple patterns). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Seen while debugging make rules. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 20, 2012
-
-
Iustin Pop authored
Reading the automake documentation, it seems that explicit calls to $(MAKE) need $(AM_MAKEFLAGS) passed, so let's do that. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This removes "pass" from a few definitions, making all errors consistent. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Nikita Staroverov authored
This adds supports for the (non-validated) cpu parameter to KVM. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 19, 2012
-
-
Johan Euphrosine authored
Fixes: http://code.google.com/p/ganeti/issues/detail?id=251 Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
* stable-2.6: (21 commits) Release Ganeti 2.6.0 rc4 Prepare NEWS for Ganeti 2.6.0rc4 Add some rudimentary node group ipolicy checks Fix setting ipolicy on node groups Fix --no-headers for the new list-drbd command Add a simple QA test for gnt-node list-drbd Add a new gnt-node command list-drbd Implement a node to drbd minors query function Add a new unused confd query Add support for computing instance all/secondary nodes Add disk logical ID support in Objects.hs Fix a docstring in bdev's DRBD8 class Extend the Template Haskell loadFn model Change how customFields are built Implement lookup of partial names in Config.hs Reorganise the lookup functions Remove an unused function Ensure that disk.params is always defined (and a dict) Another small consistency fix with if branches Fix inconsistency in the LUXI protocol w.r.t. args ... Conflicts: htools/Ganeti/HTools/QC.hs (imports changes, trivial) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
By a strange accident, this file seems to be tabified, instead of our own 2-space rule. Re-indent it and also break one long line. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
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>
-
Simon Deziel authored
Setting a high prefix discourages the bridge from adopting the tap's MAC. Xen is not affected by this since the MAC is forced to "fe:ff:ff:ff:ff:ff". This addresses issue #217. Signed-off-by:
Iustin Pop <iustin@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>
-