An error occurred fetching the project authors.
- Oct 26, 2012
-
-
Iustin Pop authored
Sorry! Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Thanks Dato for catching this. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Testing with a newer hlint found a few minor issues; but all are real, valid recommendations: - don't use "if cond then f x else f y", but "f (if cond then x else y)" - "if a then b else True" is equivalent to the simpler "not a || b" - and as usual, one more ignore to our "testing basic properties" module Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This is very THH specific, and applies to all serialisations generated by THH, so I'm adding it in its own module. Probably we should add some more generic tests, but in general THH code is tested by the various definitions; this new field type however is not (yet), so this is why I want this specific unittest. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This follows a conversation we had for how to deal with optional-but-required fields in JSON serialisations: fields which are optional (can be either a given type or 'null'), but where the 'null' value is required. There are just a few of these in the Python code, but we should support them nevertheless. The patch changes the 'isOptional' attribute from boolean to a custom ADT, three-typed. This allows us to keep the same path on load (which deals with both cases), but use a custom save path where we explicitly save the 'null' value. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Oct 25, 2012
-
-
Dato Simó authored
Change {exp,act}Code to {exp,act}Ver, which gives a better idea that the integer fields represent version numbers. Also: - errors.py: update OpPrereqError's docstring to note that an error code is always expected as the second argument (it was previously optional). Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Note that this commit has no Makefile.am changes, as the files were not actually used. So it's better to actually remove them. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Dato Simó authored
The isOptional function is no longer used after a1505857 (“Convert opcode TH code to the use of Field type”). Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michele Tartara authored
Fix a verb tense and add a missing verb. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Adeodato Simo <dato@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Michael Hanselmann authored
An earlier version of this patch series verified all paths in cmdlib in the master daemon. With this change all that verification code is moved to bdev to run inside the node daemon. The checks are much stricter now--it is no longer possible to use forbidden paths (e.g. /bin) to manipulate file storage devices (once these checks are being used). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
A new function will be added to change a job's priority. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
If the option is used elsewhere, the numeric value is directly available. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Somehow this was missed in commit 0422250e. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
It is not actually used. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This options file for ghci preseeds the correct include paths, so that interactive sessions don't need to always pass these args. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch converts all the call paths from 'Result' (which contains just string errors) to 'ErrorResult', which holds GanetiException-encoded errors. We can now return proper OpPrereq/OpExec errors to the clients of the luxi/query socket. The patch touches many files as we had to convert the entire call chains in a single round. But it should be pretty straightforward otherwise: - change 'Result' into 'ErrorResult' - add error annotations: change "Bad msg" into "Bad (XXXEror msg)" - add a helper function for confd, where we don't send to client formatted exceptions, to convert back from ErrorResult into Result - change tests similarly, where needed Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
In Python, formatError also returns the exit code, but I find that splitting them leads to clearer code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
As described in the module doc string, while writing this it dawned upon me that we're mixing all errors together into a single hierarchy (well, type on the Haskell side), which is not good. Some errors are used purely within noded, some in the CLI frontends, etc. so these should not be the same type; frontend functions should only be able to raise frontend errors, not backend ones. As to this patch itself, I've used again Template Haskell to generate both the data type and the serialisation functions, as the initial version, hand-written, seemed too prone to errors due to string matching. A small unittest for checking serialisation consistency is also added. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
These are almost generic, so let's change the signatures a bit a make them fully so. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Adeodato Simo <dato@google.com>
-
Iustin Pop authored
This 'simple' way of defining objects will be used also for errors, so let's make it less Luxi-specific. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
The 'dumb-allocator' has been removed almost two years ago (commit 6f547f96, “Remove dumb-allocator”), let's remove this special casing for it from devel/upload. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
While running with a wrong --prefix/--sysconfdir, I saw that devel/upload actually uses a hardcoded path for the init script, even though it installs it in the correct place. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Oct 24, 2012
-
-
Guido Trotter authored
This documents the status (or wanted status) of some example ocf modules I've written for Ganeti. They are far from perfect, but they should be shipped as a starting point for other people who want to run this to improve on. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 23, 2012
-
-
Iustin Pop authored
To people not used to it, it was completely non-obvious why "./devel/upload" didn't do anything. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, when we have an assertion error raised from cmdlib, it looks like this: [cluster] root@node4:~# gnt-instance grow-disk instance1 0 1G Failure: command execution error: This is very very confusing. This patch adds a bit of traceback formatting to improve this as follows: [cluster] root@node4:~# gnt-instance grow-disk instance1 0 1G Failure: command execution error: Internal assertion error: please report this as a bug. Error message: ''; location: File "/usr/lib/python2.6/dist-packages/ganeti/cmdlib.py", line 11954, in CheckPrereq assert False This is not perfect, but at least it shows better what the problem is. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Pep8 didn't agree with the indentation. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
This is a new tool as per the design document “design-ssh-setup”. It receives a JSON data structure on its standard input and configures the SSH daemon and root's SSH keys accordingly. Unit tests are included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This patch changes “ssh.GetUserFiles” to support two different kinds of SSH keys, RSA and DSA. Before it would always use DSA. Newly written unit tests are included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michele Tartara authored
Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 22, 2012
-
-
Michael Hanselmann authored
- Debian Squeeze and up have a package named “python-coverage”, but it doesn't use the same binary name as upstream (“coverage”). - Said package includes a patch to use symlinks instead of file copies for jQuery. If files from previous runs are around, an exception is raised. This is fixed by removing all regular files and symlinks before generating a report. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This is just a bit of cleanup. The (.&&.) operator is internally just: a .&& b = conjoin [a, b] so let's replace 'a .&&. b .&&. c .&&. d' directly with 'conjoin [a, b, c, d]'. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
After seeing how nice HUnit formats the error message on failed 'assertEqual', I think we can do better with ==?. Currently it says (on one line): "Expected equality, but 1 /= 2". This patch changes the code to format it similar to HUnit: Expected equality, but got mismatch expected: 1 but got: 2 (on three lines). This makes it more clear what is the expected and what is the wrong value. A few tests have been modified to ensure that the expected value is the second argument to ==?. This is different than HUnit, but makes more sense in the operator version (I think). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This is used when one wants to build all binaries, including those that are used only for testing. A handy shortcut to make sure all binaries can be built. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Helga Velroyen authored
This includes: * The operator (/=?), which checks for inequality and prints an error message if it encounters equality. (Basically the negation of the (==?) operator). * Application of this operator in the test property prop_addPri_NoN1Fail. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
This patch includes: * The 'failN1' flag is now only set if there is strictly less memory available than required for failover. * Unit tests for that. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
Small simplifications of other unit tests using the (==?) operator when possible, and typo fixes. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-