Statistics
| Branch: | Tag: | Revision:

root / scripts / gnt-job @ af1a81d1

History | View | Annotate | Download (11.1 kB)

# Date Author Comment
a4ebd726 08/23/2010 06:26 pm Michael Hanselmann

Use one function to parse “--fields” option values

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

049088b2 08/23/2010 05:57 pm Michael Hanselmann

Finalize removal of “lock_status” job field

When removing the field in commit 9bdab62198, I forgot to remove some parts.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

aa9f8167 07/30/2010 04:43 am Iustin Pop

Fix a few job archival issues

This patch fixes two issues with job archival. First, the
LoadJobFromDisk can return 'None' for no-such-job, and we shouldn't add
None to the job list; we can't anyway, as this raises an exception:

node1# gnt-job archive foo...
8a7f1c61 07/12/2010 05:27 pm Michael Hanselmann

Add function to format all job log messages

Just calling utils.SafeEncode on the log message failed when it
wasn't of the type ELOG_MESSAGE and not a string. Now non-message
log entries are formatted using repr().

Signed-off-by: Michael Hanselmann <>...

706c353c 06/22/2010 04:26 pm Iustin Pop

Merge branch 'devel-2.1'

  • devel-2.1:
    Add "adopt" to the allowed disk parameters
    Improve pylintrc for pylint 0.21+
    Fix warnings with Python 2.6
    Fix a small bug introduced in cf26a87a
    Fix the type of 'valid' attribute in LUDiagnoseOS

Signed-off-by: Iustin Pop <>...

c04bc777 06/22/2010 02:17 pm Iustin Pop

Fix warnings with Python 2.6

'format' is a new built-in function, and 'bytes' is a new builtin type.
We rename this to make pylint happy (and remove potential bugs).

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

94182b63 06/08/2010 10:35 pm Iustin Pop

gnt-job auto-completion: suggest "all" too

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

b9b5abcb 06/01/2010 11:47 am Iustin Pop

Add a new opcode timestamp field

Since the current start_timestamp opcode attribute refers to the inital
start time, before locks are acquired, it's not useful to determine the
actual execution order of two opcodes/jobs competing for the same lock.

This patch adds a new field, exec_timestamp, that is updated when the...

2d54e29c 01/04/2010 11:17 am Iustin Pop

Further pylint disables, mostly for Unused args

Many of our functions have to follow a given API, and thus we have to
keep a given signature, but pylint doesn't understand this. Therefore,
we silence this warning.

The patch does a few other cleanups.

Signed-off-by: Iustin Pop <>...

f4ad2ef0 01/04/2010 11:15 am Iustin Pop

Remove more unused variables

This removes unused variables in the rest of the code (outside lib/).

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

7260cfbe 01/04/2010 11:15 am Iustin Pop

Add targeted pylint disables

This patch should have only:

- pylint disables
- docstring changes
- whitespace changes

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

1f864b60 11/25/2009 04:30 pm Iustin Pop

Remove quotes from CommaJoin and convert to it

This patch removes the quotes from CommaJoin and converts most of the
callers (that I could find) to it. Since CommaJoin does str(i) for i in
param, we can remove these, thus simplifying slightly a few calls....

6ea815cf 09/18/2009 01:53 pm Iustin Pop

Change indentation style in commands definitions

Currently, the indentation level for a command's definition depends on
the command name length, and this makes the commands dict unpleasant to
the eye. This patch changes it so that a new line begins right after the...

064c21f8 09/18/2009 01:53 pm Iustin Pop

Remove explicit DEBUG_OPT and add it by default

Since >90% of the commands take the “--debug” option, and all should
actually take it (the gnt-job command is currently missing it), it makes
sense to simply remove this and add it by default in cli.py.

Signed-off-by: Iustin Pop <>...

1d2dcdfd 09/15/2009 02:19 pm Michael Hanselmann

Export new lock_status field to gnt-job

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

a8005e17 08/24/2009 04:52 pm Michael Hanselmann

Change scripts to use new argument definitions

This can be used to generate the bash completion script automatically.
In the future it may allow for better command line validation as well.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

e7d6946c 08/03/2009 12:22 pm Michael Hanselmann

Add “gnt-job watch” command

This command can be used to follow the output of a job. It's useful
together with the --submit parameter for other commands.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

dcbd6288 05/18/2009 07:39 pm Guido Trotter

Fix gnt-job list argument handling

Currently QueryJob returns "None" when a wrong job ID is passed.
Handle this in gnt-job list, by printing an error for each wrong job,
and still giving output for all the jobs which actually do exist.

Signed-off-by: Guido Trotter <>...

f1de3563 02/12/2009 07:04 pm Iustin Pop

Some command line scripts fixes

This patch changes the gnt-node and gnt-job list commands to accept
argument and list only the selected items, which is useful when having
many nodes or jobs.

It also removes the “--units” option from gnt-job list as we don't...

26f15862 02/03/2009 04:45 pm Iustin Pop

An attempt at fixing some encoding issues

This patch unifies the hardcoded re-encoding attempts into a single
function in utils.py. This function is used to take either an unicode or
str object and convert it to a ASCII-only str object which can be safely...

f8ad5591 12/18/2008 06:38 pm Michael Hanselmann

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 user
will see how many jobs are left unchecked....

c41eea6e 12/11/2008 07:13 pm Iustin Pop

Fix epydoc format warnings

This patch should fix all outstanding epydoc parsing errors; as such, we
switch epydoc into verbose mode so that any new errors will be visible.

Reviewed-by: imsnah

b28a3e8b 11/28/2008 12:28 pm Michael Hanselmann

gnt-job: Print message from CancelJob to standard output

Reviewed-by: iustinp

fbf0262f 11/28/2008 12:28 pm Michael Hanselmann

jqueue: Allow jobs waiting for locks to be canceled

- Add new "canceling" status
- Notify clients when job is canceled
- Give a return value from CancelJob
- Handle it in the client library

Reviewed-by: iustinp

9fbfbb7b 11/23/2008 05:34 pm Iustin Pop

Enable auto-unit formatting in script output

This patch enables by default the old 'human-readable' option, but in a
slightly different model.

The option is now called "units" and takes either:
- 'h' for automatic formatting
- 'm', 'g' or 't' for mebi/gibi/tebibytes...

08db7c5c 11/20/2008 08:22 am Iustin Pop

Initial multi-disk/multi-nic support

This patch adds support for mult-disk/multi-nic in:
- instance add
- burnin

The start/stop/failover/cluster verify work as expected. Replace disk
and grow disk are TODO.

There's also a change gnt-job to allow dictionaries to be listed in...

917b4e56 10/28/2008 01:19 am Iustin Pop

Documentation updates for gnt-job

Reviewed-by: imsnah

2f79bd34 10/20/2008 03:33 pm Iustin Pop

Fix some pylint-detected issues on the scripts

Some names were wrong, and similar stuff detected by pylint.
gnt-debug.GenericOpCode is still broken.

Reviewed-by: imsnah

3a24c527 10/20/2008 03:33 pm Iustin Pop

Convert the gnt scripts to ToStdout/err

Currently the gnt-* scripts are using a mix of print, logger.ToStd* and
sys.stderr.write. We convert them all to using cli.ToStdout/err. This
way, we can easily change the implementation for all at once.

Reviewed-by: imsnah

e92376d7 10/07/2008 11:03 am Iustin Pop

Implement job 'waiting' status

Background: when we have multiple jobs in the queue (more than just a
few), many of the jobs (up to the number of threads) will be in state
'running', although many of them could be actually blocked, waiting for
some locks. This is not good, as one cannot easily see what is...

07cd723a 10/06/2008 07:42 pm Iustin Pop

Implement job auto-archiving

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

b27b39b0 09/30/2008 03:22 pm Iustin Pop

Fix ‘gnt-job info’ with no arguments

I didn't realize that my zip will break when no args are passed...

Reviewed-by: imsnah

aad81f98 09/30/2008 03:13 pm Iustin Pop

Add output of job/opcode timestamps

This patch adds posibility of selection of job/opcode timestamps in
gnt-job list and info.

The code handling the possible cases (None or a valid timestamps) are
ugly though...

Reviwed-by: imsnah

3386e7a9 09/30/2008 12:36 pm Iustin Pop

Abstract the timestamp formatting into cli.py

Currently we format the timestamp inside the gnt-job info function. We
will need this more times in the future, so move it to cli.py as a
separate, exported function.

Reviewed-by: imsnah

5b23c34c 09/29/2008 06:38 pm Iustin Pop

Add opcode execution log in job info

This patch adds the job execution log in “gnt-job info” and also allows
its selection in “gnt-job list” (however here it's not very useful as
it's not easy to parse). It does this by adding a new field in the query
job call, named ‘oplog’....

191712c0 09/29/2008 04:09 pm Iustin Pop

Add a info subcommand to gnt-job

Currently, it is hard to examine a job in detail; the output of ‘gnt-job
list’ is not easy to parse.

The patch adds a ‘gnt-job info’ command that is (vaguely) similar to
‘gnt-instance info’ in that it shows in a somewhat easy to understand...

60dd1473 09/29/2008 04:09 pm Iustin Pop

Implement job summary in gnt-job list

It is not currently possibly to show a summary of the job in the output
of “gnt-job list”. The closes is listing the whole opcode(s), but that
is too verbose. Also, the default output (id, status) is not very
useful, unless one looks for (and knows about) an exact job ID....

d2b92ffc 07/28/2008 01:13 pm Michael Hanselmann

Implement “gnt-job cancel”

Reviewed-by: ultrotter

0ad64cf8 07/24/2008 06:04 pm Michael Hanselmann

Implement “gnt-job archive” to archive jobs

Reviewed-by: iustinp

5ce81b28 07/23/2008 04:30 pm Michael Hanselmann

gnt-job: Don't treat job IDs as numbers

Reviewed-by: iustinp

af30b2fd 07/11/2008 01:25 pm Michael Hanselmann

Make "gnt-job list" work again

"gnt-job list" was broken after my recent changes in the RPC
between clients and the master. This patch makes it work again.

Reviewed-by: iustinp

7a5d3bbd 07/01/2008 12:48 pm Iustin Pop

Implement “gnt-job list -o +...”

This adds the same “-o +...” functionality in gnt-job as in the node and
instance scripts.

Reviewed-by: imsnah

8d59409f 05/13/2008 05:42 pm Iustin Pop

Small style fixes

[Trunk version]

Reviwed-by: imsnah

9a033156 05/13/2008 04:04 pm Iustin Pop

Revert "CLI: remove command opts/args in "gnt-X""

This reverts commit 976.

Reviewed-by: ultrotter

57d0151e 05/13/2008 03:24 pm Iustin Pop

CLI: remove command opts/args in "gnt-X"

[Forward-port of the 1.2 branch patch]

This patch removes all the parameters and options from the output
"gnt-X" (i.e. the subcommand list for command). This is done in order to
uniformize the output, currently only some parameters are shown and they...

35049ff2 04/10/2008 06:36 pm Iustin Pop

Add per-opcode results to job processing

This patch changes the definition of a job and introduces per-opcode
results.

First, the result and status fields of a job are condensed into a single
'status' attribute. Then, we introduce an opcode status and one result...

7a1ecaed 04/04/2008 03:44 pm Iustin Pop

Add a simple gnt-job script

This patch adds a very basic gnt-job script that allows job querying.
This goes on top of the previous master daemon patches.

Currently, because of the not-changed cmd lock, you can't query the jobs
as long as a job is running - you have to rm the cmd lock and then you...