- 17 Dec, 2013 13 commits
-
-
Santi Raffa authored
Add Gluster to Ganeti by essentially cloning the shared file behaviour everywhere in the code base. Signed-off-by:
Santi Raffa <rsanti@google.com> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Santi Raffa authored
This method accepts a port number and checks that it is in fact valid. Signed-off-by:
Santi Raffa <rsanti@google.com> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Santi Raffa authored
This will allow code reuse for Gluster through composition, rather than inheritance. Signed-off-by:
Santi Raffa <rsanti@google.com> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Santi Raffa authored
Move the FileStorage class in its own file, together with its helper functions. Signed-off-by:
Santi Raffa <rsanti@google.com> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Santi Raffa authored
PathJoin fails with an unclear message if only one argument is passed to it. Calling PathJoin("/foo") causes this exception: Error: path joining resulted in different prefix (/foo != /foo) However, /foo and /foo obviously share prefixes: what this function really checks is that the resulting path should be inside the first argument and, in that sense, /foo is not a "real" prefix of /foo. Given that PathJoin already asserts that it received any arguments at all, this commit discards the assertion for an error to be raised if 0 or 1 arguments are received. The semantics don't change, but the error message is clearer. Signed-off-by:
Santi Raffa <rsanti@google.com> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Santi Raffa authored
A large part of the complexity in this function is due to the need to translate from "template-specific" parameter names to "template-agnostic" parameter names. This logic is complex and having complex code for complex logic is okay. However, for all other cases, the additional complexity is not needed. Additionally this function would do the wrong thing silently for new, unhandled disk templates by just not changing the resulting paramters. This commit replaces the ad-hoc logic with a more generally useful logic while leaving the DRBD code carefully alone. Signed-off-by:
Santi Raffa <rsanti@google.com> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Santi Raffa authored
This rather important dictionary from constants to classes was hiding between function definitions. The dict cannot go to the top of the file as the classes haven't been defined there yet, so it's been pushed to the bottom of the file. For bonus points, the dict gets an epydoc docstring and a comment, too. Signed-off-by:
Santi Raffa <rsanti@google.com> Signed-off-by:
Thomas Thrainer <thomasth@google.com> Reviewed-by:
Thomas Thrainer <thomasth@google.com>
-
Santi Raffa authored
Ganeti checks for orphan volume by making sure that it knows about all volumes on disk; any additional orphan volume, even if created by the administrator, causes a failure in gnt-cluster verify. Given that hail and hbal already account and warn for missing space, this is unnecessarily strict. This commit demotes this error to a warning. This commit also updates the part of QA about orphan and reserved logical volumes to match, adapting the QA infrastructure slightly. Fixes Issue 314. Signed-off-by:
Santi Raffa <rsanti@google.com> Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Klaus Aehlig authored
As luxid now understands all the requests used by the command-line tools, switch the default luxi socket for those to be the socket of luxid. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Klaus Aehlig authored
Support the query for the fields available for instances. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
...to be consistent with the python implementation. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
In commit 32933325 this was only done for the Haskell side; do so for python as well, to have both views consistent. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
When asked for all fields, we promise to return the list of fields sorted according to niceSort. Keep this promise. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
- 16 Dec, 2013 2 commits
-
-
Klaus Aehlig authored
Luxid is more strict with closing the connection after receiving a syntactically incorrect request, gnt-debug cannot use the same client for several successive tests verifying that a syntactically incorrect request is recognized as such. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
As the calling of watchFile and the evaluation of the initial getFStatSafe takes non-zero time, the file could have changed before inotify was set up properly. Solve this problem by an additional check for the watched value to have changed immediately after setup of inotify. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
- 13 Dec, 2013 13 commits
-
-
Petr Pudlak authored
Currently they are generated only as Strings. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Jose A. Lopes <jabolopes@google.com>
-
Petr Pudlak authored
This greatly enhances code readability. Also fix monadic types "Q ExpQ" [which is "Q (Q Exp)"] to "Q Exp". Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Jose A. Lopes <jabolopes@google.com>
-
Petr Pudlak authored
It's the same trick ShowS uses. We add a type class function for showing a list to PyValue and then just use it in the instance for `[a]`. This way we have the proper String instance without any overlapping/incoherent instances. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Jose A. Lopes <jabolopes@google.com>
-
Petr Pudlak authored
Now the file contains the type class declaration as well. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Jose A. Lopes <jabolopes@google.com>
-
Petr Pudlak authored
This puts all PyValue code into one module, getting rid of orphan instances. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Jose A. Lopes <jabolopes@google.com>
-
Klaus Aehlig authored
The time in SetWatcherPause is optional (with Nothing meaning that the pause should be canceled), but the serialization is not that of a Maybe Double; instead Just values serialize as they are and Nothing serializes to null. Fortunately, we already have a field modifier for this. So use it. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Klaus Aehlig authored
Make luxid handle the QueryConfigValues call providing certain simple status information about the cluster. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
Add a predicate, in IO, to test whether the watcher is paused. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
Extend Path.hs to also provide the path to the file indicating whether watcher is paused. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
Make luxid handle SetWatcherPause correctly. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
With luxid taking over responsibility for handling watcher-pause requests, it needs to know about this RPC. So have it available in Haskell as well. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
A JSON null value is used to indicate that the pause should be canceled. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
The instantiation of RPC requires a bidirectional functional dependency between call type and return type. Hence we cannot use Unit everywhere. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
- 12 Dec, 2013 2 commits
-
-
Michele Tartara authored
Change the IP of the instance to make it correspond to the one used in the example. The .253 is chosen so that, if needed, in the future the network can be changed from a /24 to a /28. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michele Tartara authored
Add the document describing a new design for the OS installation process for new instances. Signed-off-by:
Michele Tartara <mtartara@google.com> Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- 11 Dec, 2013 10 commits
-
-
Petr Pudlak authored
No code is changed in this patch (except imports and qualifiers), only moved. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
... to be usable for WConfd as well. A daemon handler is encapsulated into `Handler` data type, which is then passed to a generic `listener`. The changes are done in Luxi.hs so that the differences are visible and will be moved into UDSServer.hs later. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
This allows to use logging with the ReaderT monad transformer. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
This separates logging from IO, allowing to create unit tests in future for functions that use it. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
Using MonadError is more correct than just "fail" on an arbitrary monad, and more scalable when using monad type classes or monad stacks. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
This allows it to be used with MonadError. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
.. and ResultT. While at it, generalize also the MonadPlus instance of GenericResult and add some Functor/Applicative instances. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
Return the method (as any instance of JSON) and the arguments of a call. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
This simplifies code for closing such a socket. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
Instead of passing a bare server socket around, we pass it encapsulated in a data type together with parameters such as read/write timeouts. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-