History | View | Annotate | Download (10.8 kB)
Add a luxi call for multi-job submit
As a workaround for the job submit timeouts that we have, this patchadds a new luxi call for multi-job submit; the advantage is that all thejobs are added in the queue and only after the workers can startprocessing them....
Fix pylint warnings
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix problem with EAGAIN on socket connection in clients
If a user used ^Z to stop the program, poll() in socket.recv would returnEAGAIN due to SIGSTOP. This patch changes luxi.Transport.Recv to ignore EAGAIN.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Fix some typos
Add one new luxi query: cluster info
This is the last query that RAPI executes via opcodes and is purelystatic (config values only). As such, we can convert it safely to aquery instead of job.
Reviewed-by: imsnah
Implement lockless query operations
This patch adds the framework for, and enables lockless OpQueryInstances. Thismeans that instances will be shown in ERROR_up or ERROR_down state, even thoughthis is not an error (but just an in-progress job).
The framework is implemented as follows:...
luxi: close and reopen the socket on errors
This is less of an actual issue for regular gnt-* clients, but it'seasily reproducible with burnin and possible with RAPI (depending on howthe program uses luxi.Client(s)).
In case of burnin, if we interrupt the client (^C) while it polls the...
Fix a typo in luxi's docstring
Reviewed-by: iustinp
Prevent RPC timeout on auto-archiving jobs
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 userwill see how many jobs are left unchecked....
Add an interface for the drain flag changes/query
This adds the set/reset in the jqueue and luxi modules, and a way toquery it in OpQueryConfigValues, and also the comand line interface forit:$ gnt-cluster queue infoThe drain flag is unset$ gnt-cluster queue drain...
Implement transport of ganeti errors across luxi
This patch adds a generic method to identify the ganeti error given itsclass name, and implements this across the luxi protocol.
Implement job auto-archiving
This patch adds a new luxi call that implements auto-archiving of jobsolder than a certain age (or -1 for all completed jobs), and the gnt-jobcommand that makes use of this (with 'all' for -1).
Add new query to get cluster config values
This can be used to retrieve certain cluster config values fromwithin clients.
OpDumpClusterConfig was not used anywhere, hence I'm just reusingit. The way ConfigWriter.DumpConfig returned the configurationwas not thread-safe, anyway (no deepcopy)....
Make WaitForJobChanges deal with long jobs
This patch alters the WaitForJobChanges luxi-RPC call to have aconfigurable timeout, so that the call behaves nicely with long jobsthat have no update.
We do this by adding a timeout parameter in the RPC call, and returning...
Fix error message when masterd is not listening
Reported by Iustin.
Make sure that client programs get all messages
This is a large patch, but I can't figure out how to split it withoutbreaking stuff. The old way of getting messages by always getting thelast one didn't bring all messages to the client if they were added...
Add RPC call to wait for job changes
This way clients can react faster to status or message changes anddon't have to poll anymore.
Reviewed-by: ultrotter
Add query function for exports
Implement query for nodes
Implement query for instances
Queries don't create jobs and are more efficient. Log messagesare not yet stored anywhere.
Fix pylint-detected issues
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)...
Remove old job queue code
Change masterd/client RPC protocol
- Introduce abstraction class on client side- Use constants for method names- Adopt legacy function SubmitOpCode to use it
Make luxi RPC more flexible
- Use constants for dict entries- Handle exceptions on server side- Rename client function to CallMethod to match server side naming
luxi: Use serializer module instead of simplejson
Implement handling of luxi errors in cli.py
Currently the generic handling of ganeti errors in cli.py (GenericMainand FormatError) only handles the core ganeti errors, and not the clientprotocol errors (which live in a separate hierarchy).
This patch adds handling of luxi errors too, and also adds another luxi...
Change client protocol to raise exception on failures
Currently the luxi.client.SubmitJob and Query methods return the unserializedresult without processing it at all. This patch changes this by adding a'RequestException' error that is raised if the query itself or the...
Move some checks from cli.py to luxi.py
The idea of cli.py and luxi.py is that all protocol checks should be inluxi, and cli.py should just offer some helpful shortcuts for thecommand line scripts.
This patch removes the result checks from cli and adds some other checks...
Add submit function to lib/cli.py
This patch adds function that submit jobs or queries over the unix socketinterface to lib/cli.py. The will be used by the scripts instead of theSubmitOpCode function.
Initial implementation of the client unix socket
This patch adds an initial implementation of the client-side of the unixsocket interface. The code is not yet used by other parts of ganeti.