- Jul 07, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
If a user used ^Z to stop the program, poll() in socket.recv would return EAGAIN due to SIGSTOP. This patch changes luxi.Transport.Recv to ignore EAGAIN. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Feb 04, 2009
-
-
Iustin Pop authored
This is the last query that RAPI executes via opcodes and is purely static (config values only). As such, we can convert it safely to a query instead of job. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds the framework for, and enables lockless OpQueryInstances. This means that instances will be shown in ERROR_up or ERROR_down state, even though this is not an error (but just an in-progress job). The framework is implemented as follows: - the OpQueryInstances, OpQueryNodes and OpQueryExports opcodes take an additional “use_locking” flag which will denote whether to lock or not; this patch only implements this for LUQueryInstances - the luxi query functions take an additional argument use_locking which is passed to the master daemon, and then passed to the above opcodes - cli.py export a new SYNC_OPT command line options which implement setting this flag to true - except for gnt-instance list, which uses this option, and for name-only queries (e.g. QueryNodes(fields=["names"])), all other callers are setting this flag to True - RAPI also sets the flag to True The patch was tested with a continuous (0.2s sleep in-between) gnt-instance list during a burnin, and no problems were observed. Reviewed-by: ultrotter
-
- Jan 22, 2009
-
-
Iustin Pop authored
This is less of an actual issue for regular gnt-* clients, but it's easily reproducible with burnin and possible with RAPI (depending on how the program uses luxi.Client(s)). In case of burnin, if we interrupt the client (^C) while it polls the job, it will abort and raise an error. After that, burnin issues a remove instance job, and at this point, we send the submit job (remove) call but the first thing we read from the socket will be the response to the previous poll job request, since that was queued already from the master. To solve this, whenever we detect an error in Transport.Call(), we close that transport and re-create a new one, to start anew. The other alternative would be to introduce a sequence to the protocol, but this is something that would be design-level change and it's not recommended at this stage. Reviewed-by: imsnah
-
- Jan 20, 2009
-
-
Guido Trotter authored
Reviewed-by: iustinp
-
- Dec 18, 2008
-
-
Michael Hanselmann authored
With a large job queue, auto-archiving jobs can take a very long time, causing timeouts on the luxi RPC layer. With this change, auto- archive returns after half of the RPC timeout has passed. The user will see how many jobs are left unchecked. Reviewed-by: ultrotter
-
- Oct 16, 2008
-
-
Iustin Pop authored
This adds the set/reset in the jqueue and luxi modules, and a way to query it in OpQueryConfigValues, and also the comand line interface for it: $ gnt-cluster queue info The drain flag is unset $ gnt-cluster queue drain $ gnt-cluster queue info The drain flag is set $ gnt-cluster queue undrain $ gnt-cluster queue info The drain flag is unset The choice of making the setting via luxi and not an opcode is that opcodes can't be executed when drained, but we don't query via luxi since in the future it might become a cluster property as opposed to a node one. Reviewed-by: imsnah
-
- Oct 15, 2008
-
-
Iustin Pop authored
This patch adds a generic method to identify the ganeti error given its class name, and implements this across the luxi protocol. Reviewed-by: imsnah
-
- Oct 06, 2008
-
-
Iustin Pop authored
This patch adds a new luxi call that implements auto-archiving of jobs older than a certain age (or -1 for all completed jobs), and the gnt-job command that makes use of this (with 'all' for -1). Reviewed-by: imsnah
-
- Oct 01, 2008
-
-
Michael Hanselmann authored
This can be used to retrieve certain cluster config values from within clients. OpDumpClusterConfig was not used anywhere, hence I'm just reusing it. The way ConfigWriter.DumpConfig returned the configuration was not thread-safe, anyway (no deepcopy). Reviewed-by: iustinp
-
- Aug 29, 2008
-
-
Iustin Pop authored
This patch alters the WaitForJobChanges luxi-RPC call to have a configurable timeout, so that the call behaves nicely with long jobs that have no update. We do this by adding a timeout parameter in the RPC call, and returning a special constant when the timeout is reached without an update. The luxi client will repeatedly call the WaitForJobChanges until it gets a real change. The timeout is hardcoded as half the RWTO value. The patch also removes an unused variable (new_state) from the WaitForJobChanges method. Reviewed-by: imsnah,ultrotter
-
- Aug 28, 2008
-
-
Michael Hanselmann authored
Reported by Iustin. Reviewed-by: iustinp
-
- Aug 27, 2008
-
-
Michael Hanselmann authored
This is a large patch, but I can't figure out how to split it without breaking stuff. The old way of getting messages by always getting the last one didn't bring all messages to the client if they were added too fast, thereby making commands like “gnt-cluster verify” less than useful. These changes now introduce some sort a serial number per log entry to keep track what message a client already received. They also remove the log lock per opcode to make reading log entries thread safe. Reviewed-by: ultrotter
-
- Aug 11, 2008
-
-
Michael Hanselmann authored
This way clients can react faster to status or message changes and don't have to poll anymore. Reviewed-by: ultrotter
-
- Aug 08, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
- Aug 06, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Queries don't create jobs and are more efficient. Log messages are not yet stored anywhere. Reviewed-by: iustinp
-
- Jul 30, 2008
-
-
Iustin Pop authored
This is mostly: - whitespace fix (space at EOL in some files, not all, broken indentation, etc) - variable names overriding others (one is a real bug in there) - too-long-lines - cleanup of most unused imports (not all) Reviewed-by: ultrotter
-
- Jul 09, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
- Introduce abstraction class on client side - Use constants for method names - Adopt legacy function SubmitOpCode to use it Reviewed-by: iustinp
-
Michael Hanselmann authored
- Use constants for dict entries - Handle exceptions on server side - Rename client function to CallMethod to match server side naming Reviewed-by: iustinp
-
- Jul 08, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
- Jun 21, 2008
-
-
Iustin Pop authored
Currently the generic handling of ganeti errors in cli.py (GenericMain and FormatError) only handles the core ganeti errors, and not the client protocol errors (which live in a separate hierarchy). This patch adds handling of luxi errors too, and also adds another luxi error for the case when the master is not running. This gives us a nice: gnta1:~# gnt-node list Cannot communicate with the master daemon. Is it running and listening on '/var/run/ganeti-master.sock'? error message instead of a traceback. Reviewed-by: amishchenko
-
- Apr 10, 2008
-
-
Iustin Pop authored
Currently the luxi.client.SubmitJob and Query methods return the unserialized result without processing it at all. This patch changes this by adding a 'RequestException' error that is raised if the query itself or the submission of the job failed, and (if not) returning only the 'result' field from the message. The patch also does processing on the result of a query if we queried for jobs, as the 'op_list' field in the result has serialized opcodes and we need the de-serialized. Reviewed-by: ultrotter
-
- Apr 07, 2008
-
-
Iustin Pop authored
The idea of cli.py and luxi.py is that all protocol checks should be in luxi, and cli.py should just offer some helpful shortcuts for the command line scripts. This patch removes the result checks from cli and adds some other checks to luxi. It does no longer check the success/failure since it's not yet clear how that should be handled - probably exceptions. Reviewed-by: ultrotter
-
- Apr 01, 2008
-
-
Iustin Pop authored
This patch adds function that submit jobs or queries over the unix socket interface to lib/cli.py. The will be used by the scripts instead of the SubmitOpCode function. Reviewed-by: ultrotter
-
Iustin Pop authored
This patch adds an initial implementation of the client-side of the unix socket interface. The code is not yet used by other parts of ganeti. Reviewed-by: imsnah
-