- Apr 30, 2013
-
-
Iustin Pop authored
Since we use the primitive string type for group UUIDs, the group fields have a bug where we pass the group name as filter for node tests, whereas the nodes themselves use the group UUID. This results in zero node count, empty node list, and no instances being reported as assigned to groups. The patch fixes this and adds a test for the node count. It does some test generation improvement, and also cleans up whitespace issues in Test/G/Q/Query.hs (the functions case_queryNode_allfields, prop_queryGroup_noUnknown and case_queryGroup_allfields are unchanged but simply have indentation fixed). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Cherry-pick of e7124835, fixes issue 436 Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Conflicts: test/hs/Test/Ganeti/Objects.hs test/hs/Test/Ganeti/Query/Query.hs
-
- Apr 17, 2013
-
-
Guido Trotter authored
We need to do this, so that backend.py doesn't need to import mcpu, and thus indirectly cmdlib. This reduces the size of the node daemon by about half, which is very important as it is pinned in memory. This solves Issue 419. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Apr 11, 2013
-
-
Klaus Aehlig authored
We test on two minimal examples, a positive and a negative one, where the possibility to allocate a node depends on whether the disk policy is checked on a per-disk level or on the total amount of disk space requested. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Klaus Aehlig authored
In that way, tools building on Instance will benefit from the corrected verification semantics of the instance policy on disk space. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 08, 2013
-
-
Michele Tartara authored
In case of problems while reading the job list from disk (such as permission errors) confd would silently fail, writing a warning on the log file but sending an empty list and no error message to the client. Also, tests have been updated in accordance to the new interface of the modified functions. This commit fixes this problem [Issue 405]. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 05, 2013
-
-
Michele Tartara authored
A group name was erroneusly inserted in the list of user names. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 11, 2013
-
-
Bernardo Dal Seno authored
Tests for: objects.InstancePolicy.CheckParameterSyntax() objects.InstancePolicy.CheckDiskTemplates() objects.InstancePolicy.CheckISpecSyntax() Instance policies with an empty disk-template list now are reported. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
IPOLICY_DEFAULTS is now a legal policy (the disk-templates entry was a set instead of a list, before). Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Unknown elements were silently removed on startup. This means that a software upgrade could result in lost configuration information if cfgupgrade wasn't run promptly. Added unit test for Cluster.UpgradeConfig() to cover this case. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Policy violations of back-end parameters that used the cluster default value were not reported in cluster-verify. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Not 100% coverage, though. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Instance disk template is checked against the policy, and diskless instances aren't checked for the number of disks. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 05, 2013
-
-
Iustin Pop authored
This patch does multiple enhancements to the way we build the Haddock docs, motivated by the fact that if we don't run Haddock over test files as well, bad formatting can be submitted and will accumulate over time (without any checks). The patch does: - replace manual built ALL_APIDOC_HS_DIRS with automatically built one (from HS_DIRS) - change Haddock so that it runs from the top directory (instead of from src/) - change HsColour target file to be built via bash parameter substitution, rather than sed (I don't know how to do it in one go, so I use 2 intermediate variables) - change 'hs-apidoc' target so that it depends on the real target file; in case no source file has been modified, running 'make hs-apidoc' twice will not result in two runs - run HsColour/Haddock under en_US.UTF-8 locale, otherwise they can't parse correctly the Unicode chars in the test files Additionally, wrong formatting (oops) in a test file has been corrected. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Mar 04, 2013
-
-
Iustin Pop authored
Two test helper files didn't have export lists (lost during the split of tests). This patch finally reintroduces them, to hopefully make the export list saner and with fewer changes for purely-internal changes. Additionally, a few missing docstrings are added as well. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
When file storage is disabled at ./configure time, we shouldn't pass opcodes containing DTFile/DTSharedFile/StorageFile to Python for validation, as they will fail. This patch implements this by simply tweaking the Arbitrary instances for DiskTemplate and StorageType (which IMHO is a nice and clean way!), and also fixing the generation of arbitrary IPolicies to use the correct 'allDiskTemplates' list (otherwise we'd loop forever trying to generate a list of all templates). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
'MakeLegacyNodeInfo' is not the best place for this, but we'd have to duplicate it if we wanted a LVM-less version, so the easiest is to add an optional parameter that allows it to accept/skip LVM-less results. It still requires at most one VG result, so its behaviour isn't changed in this respect. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Feb 18, 2013
-
-
Dimitris Aragiorgis authored
Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Feb 15, 2013
-
-
Iustin Pop authored
Back when this was introduced, I mentioned that it breaks heavily tab completion (ob<TAB> doesn't work anymore), but at that moment I didn't have a suggestion what to name it. I think outils is good and short enough, and doesn't conflict with anything else, so here it goes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Feb 12, 2013
-
-
Iustin Pop authored
The documentation still points to /etc/ganeti/remote-commands, although the code is already using restricted-command. Update the documentation and a few docstrings accordingly. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds the option to hbal, and uses it to tweak the submitted jobs. There are also two small shelltests for testing the parsing. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
The current serialisation format for submit priorities is integer-based, same as the opcode json serialisation. But for CLI level, we need to support a string-based format, so we add functions to parse and format this representation. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Stratos Psomadakis authored
Add unit tests for the RADOSBlockDevice JSON output parsing function, and modify the unit tests for the plain output parsing function to work with the new code. Signed-off-by:
Stratos Psomadakis <psomas@grnet.gr> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Helga Velroyen authored
This removes the check for conflicts from the Haskell version of the OpCode NetworkDisconnect. This alignes the Haskell code with the patch "Force conflicts check in LUNetworkDisconnect" (which is currently under review). I will submit these patches together then. This is a cherry-pick of commit 0ae4b355. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Feb 11, 2013
-
-
Dimitris Aragiorgis authored
This slot was not used by Ganeti so the same info can be provided via tags. In order not to break configuration data we add a FromDict() method in Network config object that removes the deprecated network_type (if found) and then invoke the parent's method (which does the validation). Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Cluster-verify used to check that the value of exclusive_storage is uniform within node groups. Now, it's impossible to change the flag for a single node, so that check has been removed and an equivalent one has been added in ConfigWriter.VerifyConfig(). Unit test provided. The unit test covers only the new check, not the whole VerifyConfig method. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Bernardo Dal Seno authored
There's never been support for a configuration where nodes in the same node group have different values of the exclusive_storage flag. This patch disables the possibility to change the flag for individual nodes. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Before, only some upgrades were written back to the configuration file. A little refactoring of _UpgradeConfig() has been done to write unit tests. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Feb 07, 2013
-
-
Iustin Pop authored
Since 'head' is unsafe to use in most cases, this patch removes its use from most of the code, adds a lint warning for it (and for tail as well), and adds override annotations in the few cases where it's actually OK to use it (mainly when using head over the result of functions which guarantee to return a non-empty list by documentation, not type). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Feb 05, 2013
-
-
Iustin Pop authored
This would have caught the log file problem fixed in the previous patch (9411474b), for example. Also we test user/group equivalence, name only. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Feb 04, 2013
-
-
Iustin Pop authored
This will allow easier multi-error results from hypervisors; right now, we only report the first error, which is not nice. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 23, 2013
-
-
Bernardo Dal Seno authored
_Error() didn't contain the logic for demoting errors to warnings and for marking an operation as failed. Now _ErrorIf() is just a minimal wrapper for _Error(). Unit tests included. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 22, 2013
-
-
Michael Hanselmann authored
This patch moves the functions “_ReadTestData” and “_TestDataFilename” to module level. They do not depend on a class instance at all. Some cases of “utils.ReadFile(self._TestDataFilename(…))” are also corrected. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Add a unit test for the trivial “_GetBlockDevSymlinkPath” function in backend (small changes in the function were required). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Jan 18, 2013
-
-
Michael Hanselmann authored
Add a unittest for a function formatting CPU pinning information for Xen's configuration. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Yiannis Tsiouris authored
This adds two functions in Utils.hs: 'wrap' and 'trim' along with some simple tests. 'wrap' is used in Common.hs for wrapping command descriptions to a fixed line length, e.g. useful for the "--help" option. Signed-off-by:
Yiannis Tsiouris <gtsiour@softlab.ntua.gr> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 16, 2013
-
-
Bernardo Dal Seno authored
utils.LvmExclusiveCheckNodePvs() now returns the size of the smallest and biggest PVs of a node. They will be used for cross-node consistency checks. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
When new a new disk template is added, burnin should be updated. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 15, 2013
-
-
Iustin Pop authored
Since now niceSort is more consistently behaved, we don't have the special casing. This should have been removed in commit a7f0953a, but I didn't realise it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Dato Simó authored
Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
This fixes a bug that corrups the config when one adds a network to a node group. I wil soon extend QA by some commands that would have detected this. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-