- Dec 05, 2012
-
-
Michael Hanselmann authored
epydoc allows overriding configuration values via environment variables. While this might be useful in certain use cases, but as no prefix whatsoever is used, conflicts are easily created. Some people have the environment variable “NAME” set, effectively overriding the project name set in epydoc.conf. A bug in epydoc causes an error if non-ASCII characters, such as German umlauts, are used in NAME. $ NAME=Täscht make py-apidoc […] UNEXPECTED ERROR: 'ascii' codec can't decode byte 0xc3 in position 73: ordinal not in range(128) $ parse=false make py-apidoc […] epydoc: error: Invalid option combination: --parse-only and --introspect-only. This patch changes the call in Makefile to reset the environment given to epydoc save for PATH and PYTHONPATH. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Dec 04, 2012
-
-
Guido Trotter authored
This module implements some algorithms on Data.Graph data structures. At the moment its main functionality is an LF-color implementation (greedy coloring in descending order of degree). There are also a few extra functions to calculate the degree order, and convert the node to color mapping to color to nodes. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Just some cleanup: - don't run hlint over hpc-htools, since it's just a symlink to htools.hs (so we'd get duplicate warnings) - build rpc-test in make really-all, via HS_ALL_PROGS variable Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Since hlint doesn't check style issues but rather code only issues, let's add a simple Makefile check for too-long lines, and fix the single bad case we have currently. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Indentation within rules is fixed to always be 2 spaces (as opposed to mixed tabs/2 spaces/4 spaces). Additionally, the check-dirs rule, which was more complex than necessary, has been simplified: moved auto4mte.cache to DIRCHECK_EXCLUDE, and simplify the find call and the exit condition (no need for if test …; then exit 0; else exit 1; fi). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Dec 03, 2012
-
-
Michele Tartara authored
Instead of having two different lists of directories, now there is only one. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Add the design document for opportunistic locking. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
The serialization itself is done by Text.JSON, so the tests deal with checking that Text.JSON objects are created correctly from the DRBD parser data structures. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 30, 2012
-
-
Iustin Pop authored
It turns out that in newer GHC versions, the suffix shouldn't be prefixed with a dot; otherwise name mangling is broken. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Nov 29, 2012
-
-
Michele Tartara authored
The hpc tool, on squeeze, does not handle utf8 encoded files correctly. The Attoparsec test is just needed to verify whether the parser handles uft8 correctly, so the solution is to exclude it from coverage checks. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Nov 28, 2012
-
-
Michael Hanselmann authored
Until now ssconf would limit the amount read from files to 128 KiB and silently ignored files larger than that. With this patch a check is added by using fstat(2) on the file descriptor while it's being read. There were no tests file ssconf at all, so some are added. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Nov 21, 2012
-
-
Michael Hanselmann authored
It is no longer “--enable-remote-commands”, but rather “--enable-restricted-commands”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 20, 2012
-
-
Apollon Oikonomopoulos authored
Signed-off-by:
Apollon Oikonomopoulos <apollon@noc.grnet.gr> Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michele Tartara authored
This adds tests that existing test files can be parsed by the Haskell parser as well, plus one new test file. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michele Tartara authored
A new directory for haskell modules about block devices has been created The parser is divided in two modules: * one exports the data types describing the DRBD status * one exports the parser itself Signed-off-by:
Michele Tartara <mtartara@google.com> [iustin@google.com: indentation/alignment fixes] Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Due to TemplateHaskell stage restrictions, we can't define parameters in the same module as we're using them for TH, so we have to define all module parameters in a separate module. This patch therefore splits OpCodes.hs in two, adding that module and moves most code there (types, parameters, etc.). The remaining parts in OpCodes.hs, the actual opcode definitions, now use more parameters instead of direct field definitions (more will come later) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Adeodato Simo <dato@google.com>
-
Iustin Pop authored
There are already three cases where we copied type definitions between the htools-specific types into the main ganeti code. Let's stop doing this
☺️ and create a common types module that holds these. Note that there already exists BasicTypes.hs, but that refers to very low-level types, and can't use TH derivation itself. A side effect of this unification is that there is a small conflict between AdminStatus/AdminOffline and InstanceStatus/AdminOffline. As such, I renamed AdminOffline and AdminDown to StatusOffline/StatusDown in the InstanceStatus type. The patch also moves the tests related to these types to a new test module. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Adeodato Simo <dato@google.com>
-
- Nov 19, 2012
-
-
Michael Hanselmann authored
- Remote unnecessary quote characters - Change some uses of “test "$foo"” to “test -n "$foo"” - Merge “if/else/if” into “if/elif” - Wrap lines longer than 80 characters and add a test to “make check” Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michele Tartara authored
Some versions of hlint crash on the Attoparsec test file because they are not able to correctly handle unicode characters if the proper encoding (--utf8) is not specified. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Nov 16, 2012
-
-
Michael Hanselmann authored
More design details will be added regarding setting up the node daemon, so this is more about adding a node than just setting up SSH. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
As per design document (doc/design-remote-commands.rst), a number of rather strict tests is applied to any incoming request, a delay is inserted upon errors and returned error messages are very generic (unless it's the actual command that failed). There are unit tests for all of the newly added code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
By default remote commands are disabled and need to be explicitely enabled at build time. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 15, 2012
-
-
Guido Trotter authored
This allows offlining nodes that don't respond if they are part of a linux-HA cluster. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
This allows controlling the cluster master role if the nodes are part of a linux-HA cluster. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 13, 2012
-
-
Michael Hanselmann authored
Unlike existing tests, this actually tests RAPI at the interface with the HTTP server. This way authentification can also be tested. A test for “/2/query/…” is included as it's a bit special. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Iustin Pop authored
Some GHC flags are very useful, but only appear in more recent GHC versions. To support the use of such flags while still supporting older compilers, let's add conditional checks and enabling based on the results. Currently only `-fwarn-incomplete-uni-patterns` is enabled, which detects refutable patterns in lambda expressions and pattern bindings (e.g. "let (Just x) = y"); such constructs are bad as they can lead to runtime exceptions. Additionally, fix an existing such bad construct in a test case; we workaround it by using error, since that should never fail. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
Attoparsec is known to have had issues with parsing non-ASCII strings. This test makes sure that parsing of Unicode characters works fine. Signed-off-by:
Michele Tartara <mtartara@google.com> [iustin: small doc string fixes] Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
"make regen-vcs-version" is run at every ./devel/upload time, in order to have reasonably up-to-date information in the uploaded scripts/binaries. However, this means it currently triggers recompilation of (at least) Ganeti/Version.hs, and sometimes more than that. Since we only care about the contents of the file and not the timestamp, let's change the make rule so that it only updates the file if there are actually changes in the content, as checked by "cmp". This results in a much faster ./devel/upload, especially for small changes in the (non-Haskell) code, or when the code has already been compiled. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 08, 2012
-
-
Iustin Pop authored
This should be the last module rename, promise! We rename this to conform to the other hierarchies (e.g. Query), and to not have both Confd.hs and Confd/*.hs. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Nov 07, 2012
-
-
Iustin Pop authored
We had twice in the past days questions about devel/upload being "broken", since bash re-reads shell scripts during their run and this file can get regenerated due to Makefile changes. Since we only need this to be dynamically built for 3 variables, let's make the file static and read those three variables when it is run, instead of when it is built, which allows us to re-read the "latest version" of these vars as well. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 06, 2012
-
-
Guido Trotter authored
- Rename xm-console-wrapper to xen-console-wrapper - Pass the xen command to use as a parameter Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 26, 2012
-
-
Michael Hanselmann authored
It has been superseeded by “prepare-node-join”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Five modules under the HTools/ directories are backend implementations, so let's move them to a separate directory, to more clearly show the hierarchy. I wanted to do this for a while, but merging between branches is always an issue, so let's do it know since we have an opportunity. This patch contains the actual renames, the required changed module names, imports, etc., but no other changes. 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>
-
- Oct 25, 2012
-
-
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>
-
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
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>
-
- 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
-
-
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>
-