- Oct 17, 2012
-
-
Iustin Pop authored
Currently, our error monad—Result—has a plain string error type. This is not good, as we don't have structured errors, we can't pass back proper error information to Python code, etc. To solve this, we generalise this type as 'GenericResult a', and make Result an alias to 'GenericResult String' for compatibility with the old code. New error hierarchies will be introduced as different types. Furthermore, we generalise our helper functions too, so that they can work on any 'GeneralInstance a' type, not only Result. There are two small drawbacks to this generalisation. First, a Monad instance requires (at least for the way we use it) a 'fail :: String -> m a' instance, so we need to be able to build an 'a' value from a string; therefore, we can implement the Monad instance only for a newly-introduced typeclass, 'FromString', which requires the needed conversion function. Second, due to the fact that 'String' is a type alias (for [Char]) instead of an actual type, we need to enable the FlexibleInstances language pragma; as far as I know, this has no significant drawbacks. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Dato Simó authored
* devel-2.6: htools-excl.test: add test case for exclusion tags in hbal Instance.hs: rename 'tags' to 'exclTags', provide 'allTags' Group.hs: add 'allTags'; adjust loaders and test data for it Add hbal-excl-tags.data to Makefile.am, missed in 0397694e Conflicts: Makefile.am: hbal-excl-tags.data moved under htest/ htools/Ganeti/HTools/Luxi.hs: types from Qlang are now used htools/Ganeti/HTools/QC.hs: defGroup definition now in TestHTools.hs lib/cmdlib.py: IAllocator class now in iallocator.py test/htools-excl.test: moved under htest/ Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dato Simó authored
Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Dato Simó authored
This commit adds a Group.allTags field to store the tags of node groups, and teaches each loader backend in HTools to populate it (additionally, the IAllocator class in lib/cmdlib.py now includes tags for groups too). Test data is updated to include an empty set of tags for node groups in all affected test cases. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dato Simó authored
The mergeData function in Loader.hs included a step to filter an instance's tags to include only the exclusion tags (as specified via the commandline, or cluster-level tags). Later on, code in Node.hs assumed Instance.tags to contain only tags to be used for exclusion. Because in the future we will need to access the full list of an instance's tags (and not only exclusion tags), this commits deprecates the 'tags' field, and introduces Instance.exclTags and Instance.allTags. Instance.allTags is now populated from the different backends (Text, Luxi, Rapi, etc.), and Instance.exclTags is only populated from Loader.mergeData, as was done previously. This means that loading tags from e.g. Text or Simu and assuming that they'll be used as exclusion tags without going through Loader.hs will no longer work; but this was already the case with other fields, and 'mergeData' or 'loadExternalData' continue to be the only entry points to get a consistent view of the cluster. (Additionally, there were no tests that made this assumption that I could find.) Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dato Simó authored
In preparation for future modifications in the exclusion tags field, add a test that verifies that exclusion tags are being honored: in a test cluster with two instances of the same exclusion group in each node, hbal should shuffle instances around to improve the score. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Sorry, I didn't see this before pushing 5a7cb9d3… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Adeodato Simo <dato@google.com>
-
Iustin Pop authored
This takes care of a FIXME; 2.6 already uses the new method, so we're good during upgrades. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Per a conversation on ganeti@googlegroups.com: - gnt-os diagnose ; gnt-os list take in consideration blank lines in /etc/ganeti/instance-image/variants.list that could be confusing. Let's fix this and also let's ignore comment lines. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
New parameters, “--pending”, “--queued” and “--waiting”, are added to select all jobs in the respective state. If one of those options is used and “--force” is not given, the user is asked to confirm the operation. Unit tests are included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Mention that the file is something new and should be written by cfgupgrade. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 16, 2012
-
-
Michael Hanselmann authored
There is no need for the “_IsUniqueSequence” function anymore, it can easily be replaced by utils.FindDuplicates. Also, pass the message as a keyword parameter and use the more commonly used assert* functions. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This is a first design for executing commands via RPC. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This document should be kept up-to-date. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This constant contains the job status' “queued”, “waiting” and “cancelled”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
* devel-2.6: ensure-dirs: Fix permissions on master socket Update security document for version 2.6 Update NEWS and bump version to 2.6.1 Text.hs: update field lists in parseData comments Conflicts: NEWS: Trivial lib/tools/ensure_dirs.py: constant moved to pathutils Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
A socket shouldn't have its executable bit set. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Quite some things were out of date. Some formatting was also updated. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This only supports test delay for now, is not built by default (only on demand), and is also not installed anywhere. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Also add some more haddock structure to the module. The RPC call itself is rather trivial. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently only the libraries are added, but not the actual main binary (usually short) code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
The goal is to remove the dependency on Paramiko. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
By accident, we sent the node object as call data in this rpc call, instead the version request (i.e. nothing). This is due to the fact that the 'call' data comes second, not first in the function argument. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Oct 15, 2012
-
-
Iustin Pop authored
Before we reorganised the source tree, the 'Result' type was exported from HTools/Types.hs. This changed during the reorg, but at that time we didn't change the exports; instead, we kept re-exporting it from the old module for compatibility. In light of future changes to the Result type, let's stop this re-export and cleanup the imports of the other modules. One test is slightly rewritten with explicit types declaration (part of the values already needed one, let's make it explicit). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
* stable-2.6: Update NEWS and bump version to 2.6.1 Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Oct 12, 2012
-
-
Bernardo Dal Seno authored
This is a small bug-fix only release. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Also fix one small mistake in the docstring for QuitGanetiException. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
I only ran “make check” and forgot about “distcheck”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This way a missing design document is detected. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
- Move design document for batch instance creation into it - Sort list of hidden files in index.rst Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 11, 2012
-
-
Bernardo Dal Seno authored
The test can now be enabled/disabled with the "group-rwops" flag. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Before, it could happen that the master node was chosen to be set offline in the "instance-remove-drbd-offline" test. Also changed a finally clause to make sure that an exception while making the node online doesn't break undoing other things. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
By default some QA tests use iallocators. It is now possible to disable iallocators in QA, so that QA doesn't force having iallocators set up. The affected tests have now alternatives pathways. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Sébastien Bocahu authored
This patch adds support for Xen's CPU scheduler 'cpu_cap' and 'cpu_weight' parameters. Ganeti default values (cap: 0=unlimited, weight: 256) are Xen defaults. cpu_cap is not validated correctly because of actual Ganeti limitation on checks. I'd need check methods to get beparams or vcpus to get moved to hvparams. Signed-off-by:
Sébastien Bocahu <sebastien.bocahu@nuxit.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Dato Simó authored
The comments in parseData had become out of date with the implementations of load{Group,Node,Inst}. This commit updates the field list in comments to match the implementations. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
These will be needed for the serialisation of errors. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
The check for file consistency didn't properly handle virtual paths in case of a virtual cluster. This didn't cause any breakage as in a standard virtual cluster setup with only one node all files are visible for every node. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
While grepping for htools imports in the non-htools subdirectory, I saw that our haddock prologue and title are very very old and refer to the old htools-only state. Let's cleanup a bit… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch removes the last HTools module imports from non-htools code (the HTools.Types module), but it requires an associated cleanup: using luxi-specific constants for luxi timeouts (the only effect is that one timeout decreases from 15 to 10, the default value in the python code), and moving of the (now) RAPI specific constants to RAPI.hs (which allows simplifying their type/usage). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch cleans up duplicate code in Test.Ganeti.Query.Filter and then adds a test for names consistency with Python's code behaviour (stable ordering for simple filters and otherwise niceSort'ed ordering). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-