Statistics
| Branch: | Tag: | Revision:

root / scripts @ a5728081

# Date Author Comment
a5728081 02/10/2009 05:06 pm Guido Trotter

Instance parameters: force typing

We want all the hv/be parameters to have a known type, rather than a
random mix of empty string, boolean values, and None, so we declare the
type of each variable and we enforce/convert it.

- Add some new constants for enforceable value types...

c9d443ea 02/10/2009 04:47 pm Iustin Pop

Implement modification of the drained flag

This patch adds LU and cli-level support for modification of the node
drained flag. It is similar to the offline changes.

Reviewed-by: imsnah

0b2454b9 02/10/2009 04:45 pm Iustin Pop

Allow query of the drained node attribute

This patch exports the drained attribute:
- LUQueryNodes accepts now the drained field
- RAPI exports it for node objects
- gnt-node info shows it now (along newly-added master_candidate and
offline flags)...

024e157f 02/09/2009 04:04 pm Iustin Pop

Add a new instance query flag ‘disk_usage’

This patch adds a new instance query flag called disk_usage that
retrieves the overall space used by an instance on each of its nodes.
This can be used when balancing the cluster or checking N+1 status.

The flag is also exported in RAPI. Note the flag is currently broken for...

0105bad3 02/09/2009 12:41 pm Iustin Pop

Export the cpu nodes and sockets from Xen

This is a hand-picked forward patch of commit 1755 on the 1.2 branch
(hand-picked since the trees diverged too much since then):

The patch changed the xen hypervisor to compute the number of cpu
sockets/nodes and enables the command line and the RAPI to show this...
2e7b8369 02/05/2009 12:45 pm Iustin Pop

Fix some issues for lockless queries

This patch converts some more jobs with only queries into cheaper luxi
queries (no job created), and fixes some fallout from the lockless
queries changes.

Reviewed-by: ultrotter

bc8e4a1a 02/04/2009 05:11 pm Iustin Pop

Enable lockless node queries

Similar to the instance list, this patch enables lockless node queris.
“gnt-node list” accepts now the “--sync” flag which enables locking, the
default is lockless.

Reviewed-by: imsnah

81a49123 02/04/2009 12:31 pm Iustin Pop

ssconf: add some more keys and some fixes

This patch adds the online node list and instance list to the ssconf
keys. In order to do distribute correctly the instance list, we need to
update the cluster serial number on instance additions and removals.

The patch also changes the permissions on the ssconf files to be 0444:...

ec79568d 02/04/2009 12:30 pm Iustin Pop

Implement lockless query operations

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:...

c4ed32cb 02/03/2009 04:45 pm Iustin Pop

Allow gnt-node evacuate to use an iallocator

This is a partial implementation of fully automated node evacuation:
we allow passing an iallocator and all instance replace-disks will be
execute via that iallocator.

The individual OpReplaceDisks opcodes are submitted in a single job,...

40ef0ed6 02/03/2009 04:45 pm Iustin Pop

Add gnt-node migrate

This is a (modified) forward-port of commit 1190 on the 1.2 branch:

This is the same as gnt-node failover, and is also a cut&paste of its
code (almost). It will be really really useful to quickly empty a
healthy node. I can be persuaded to merge MigrateNode and FailoverNode...
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...

e9d622bc 02/01/2009 11:48 am Guido Trotter

gnt-instance: support no_PARAMETER value

Since parameters get set to False if a no_ is prefixed don't try to
interpret those boolean values, and pass them unchanged.

Reviewed-by: iustinp

5ffaa51d 01/29/2009 05:09 pm Iustin Pop

gnt-instance list: accept input names

Currently gnt-instance list will refuse to take arguments, and always
return the full list of instances. This patch allows it to pass names to
LUQueryInstances, so that we restrict the input to a given set of
instances....

a76f0c4a 01/29/2009 05:08 pm Iustin Pop

Check that instance exists before confirm. queries

Currently we ask the user for confirmation, and only after (try to)
remove, failover or migrate the instance. This doesn't work nicely if
the instance doesn't exist, so we make a query for the instance before...

479636a3 01/27/2009 05:41 pm Iustin Pop

Rework the multi-instance gnt commands

This patch changes the multi-instance gnt-* commands (gnt-instance
start/stop, gnt-node evacuate/failover) such that the individual
operations are submitted in parallel, ideally improving the speed of the
execution....

7312b33d 01/23/2009 03:33 pm Iustin Pop

Sort the instance names in batcher

In case we submit multiple instances via batcher, it's nicer to have the
sorted nicely.

Reviewed-by: imsnah

9939547b 01/23/2009 03:33 pm Iustin Pop

Fix batcher for 2.0-style disks and nics

This patch fixes the gnt-instance batch-create command, and in doing so
also slightly changes two other functions:
- we change utils.ParseUnit so that it accepts integer values also
(both ParseUnit(5) and ParseUnit("5") return the same value)...

1325da74 01/23/2009 02:36 pm Iustin Pop

Make iallocator work with offline nodes

This patch changes the iallocator framework to work with and properly
export to plugins offline nodes. It does this by only exporting the
static configuration data for those nodes, and not attempting to parse
the runtime data....

8901997e 01/23/2009 11:13 am Iustin Pop

A couple of small fixes to iallocator

This removes some constraints:
- only two disks supported, this is no longer true as the underlying
functions can now compute size for a variable number of disks
- error when the hypervisor was not being passed...

2f907a8c 01/20/2009 04:20 pm Iustin Pop

Fix a couple of epydoc warnings

Reviewed-by: ultrotter

c5e489f7 01/19/2009 04:35 pm Iustin Pop

Move the default MAC prefix to the constants file

Instead of having the default live in the gnt-cluster script, we move it
to the constants file. The patch also fixes a typo on constants.py.

Reviewed-by: ultrotter

53c776b5 01/13/2009 05:21 pm Iustin Pop

Forward port the live migration from 1.2 branch

This is forward port via copy (and not individual patches cherry-pick)
of the latest code on the 1.2 branch related to the migration.

The changes compared to 1.2 are the fact that we don't need the
IdentifyDisks step anymore (the drbd rpc calls are independent now), and...

4040a784 01/12/2009 06:06 pm Iustin Pop

Skip offline nodes in gnt-cluster commands

This patch makes gnt-cluster copyfile and command skip the offline
nodes.

Reviwed-by: ultrotter, imsnah

19708787 01/12/2009 02:42 pm Iustin Pop

Heavy redo of gnt-instance info output

In 2.0, we have more parameters in drbd's logical_id, and passing the
results over json makes them unicode which looks worse with the default
formatting. As such, a redo of the output is needed.

This patch:
- adds a separate function to format the logical_id of devices...

afee0879 01/12/2009 11:14 am Iustin Pop

Introduce a very simple LU to force config updates

This LU can be used to force a push of the config in case it's needed,
for example after an upgrade to update the ssconf_release_version file.

Reviewed-by: imsnah

7e9366f7 01/09/2009 02:22 pm Iustin Pop

Cleanup replace-disks modes and options

In 1.2, due to the md+drbd7 legacy, we had a complex choice of replace
modes, and the new drbd8 modes where forced into this syntax, with some
complicated rules of transition from one mode to another (if REPLACE_ALL...

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

3a5ba66a 12/08/2008 01:46 pm Iustin Pop

gnt-node modify: add the offline attribute

This patch changes gnt-node modify and the associated opcode/lu to allow
modification of the node offline attribute.

Setting a node into offline mode automatically demotes it from the
master role.

Reviewed-by: ultrotter

9ddb5e45 12/05/2008 04:53 am Iustin Pop

node list: add the offline field

Reviewed-by: ultrotter

ce735215 12/03/2008 01:12 pm Guido Trotter

gnt-cluster init, handle candidate_pool_size

- Add a new command line option, defaulting to the constant value
- Pass the value to bootstrap.InitCluster
- Use it to init the new Cluster object

Reviewed-by: imsnah

cc3bcec8 12/03/2008 12:28 pm Guido Trotter

Extract the ListNodes headers and use them in help

Currently we have to update both the ListNodes headers and the online
help for the full field list. This patch uses the headers keys for the
help, thus removing duplicating places to update, and adding hope that...

8f348e36 12/02/2008 12:54 pm Guido Trotter

cluster init: don't discard the hypervisor

On cluster init if the user specifies a default hypervisor (with -t)
which is not in the default list of enabled hypervisors (currently just
xen-pvm) without explicitely specifying the list we silently override
the choice....

467ae11e 12/02/2008 12:25 pm Guido Trotter

SetInstanceParams: handle default/none values

If the hv/be parameter lowercase value is set to "default" we'll pass
constants.VALUE_DEFAULT, if it's set to "none" we'll pass
constants.VALUE_NONE.

Reviewed-by: imsnah

021f5d6f 12/02/2008 12:19 pm Guido Trotter

Update gnt-backup online help

--src-node and --src-dir are not mandatory anymore

Reviewed-by: iustinp

4b7735f9 12/02/2008 07:06 am Iustin Pop

Add cluster candidate pool size parameter

This patch adds a new cluster paramater "candidate_pool_size" which
tracks the desired size of the list of nodes with the master_candidate
flag set.

Reviewed-by: imsnah

b31c8676 12/02/2008 07:05 am Iustin Pop

Add a gnt-node modify operation

This patch adds the OpCode, LogicalUnit and gnt-node command for
modifying node parameters, more specifically the master candidate flag
for a node.

Reviewed-by: imsnah

0e67cdbe 12/02/2008 07:04 am Iustin Pop

Add master/master_candidate fields to node list

This patch adds listing of the master_candidate field (as Y/N) and of
the master role (again Y/N) for nodes.

Reviewed-by: imsnah

dfecf310 12/01/2008 10:52 pm Michael Hanselmann

gnt-instance add: Remove "--os-size" and "--swap-size"

They're not used anymore.

Reviewed-by: ultrotter

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

87622829 11/27/2008 12:38 pm Iustin Pop

Improve the node add operation

Currently, the node add operation uses a job to query the node name and
the bootstrap function directly reads the config file for the cluster
name.

This patch changes to that both the cluster name and the verification of
the node is done via queries to the master....

50a707fa 11/27/2008 05:13 am Iustin Pop

instance import: adapt to multi-disk/nic world

This is mostly a copy from gnt-instance add; import works, but it's not
optimal - device count/parametrs should be able to be reused.

Reviewed-by: ultrotter

e0e31530 11/27/2008 05:12 am Iustin Pop

Allow network-less instances

Currently there's no way to specify no NICs for an instance, even though
this is a supported configuration.

The patch adds a --no-nics option to gnt-instance add.

Reviewed-by: amishchenko

9d5ba39a 11/27/2008 05:12 am Iustin Pop

Fix gnt-job submit

The submit function was using a very old API. This patch brings it up to
date.

Reviewed-by: imsnah

112050d9 11/27/2008 05:12 am Iustin Pop

Fix instance creation

This patch fixes the diskless and drbd/file based instances. Sorry :(

Reviewed-by: ultrotter

24991749 11/25/2008 02:57 pm Iustin Pop

Implement support for multi devices changes

This big patch adds support for:
- changing NIC/disks in the multi-device model
- adding/removing NICs
- adding/removing disks

The patch is big and not very nice; the error checking paths are not
very clear....

b6fdf8b8 11/25/2008 02:50 pm Iustin Pop

Show disk access mode in gnt-instance info

The mode parameter needs to be exported and shown in the info output.

Reviewed-by: imsnah

d2acfe27 11/25/2008 02:50 pm Iustin Pop

Slighly improve multi-nic in gnt-instance info

Previously we had only one nic, so the NIC information was all on one
line. This patch changes it to:

- NICs:
- nic/0: MAC: aa:00:00:e8:b2:ef, IP: None, bridge: None
- nic/1: MAC: aa:00:00:53:ca:92, IP: None, bridge: xen-br0...
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...

23b8c8d6 11/23/2008 05:34 pm Iustin Pop

Improvements to CLI output

This patch adds nicer formatting for some gnt-instance list operations.

Reviewed-by: ultrotter

00430f8e 11/21/2008 05:36 pm Iustin Pop

Make cli.py use FieldSet for matching fields

This changes cli.py to FieldSet usage so that gnt-instance list will
format nicely the disk.size/*, and the count of disks/nics.

Reviewed-by: ultrotter

ad24e046 11/21/2008 05:34 pm Iustin Pop

Change GrowDisk to work with multi-disk

This patch changes the instance.FindDisk method to take index arguments
(instead of iv_names), and changes GrowDisk and list instances
accordingly.

Reviewed-by: ultrotter

4331f6cd 11/21/2008 12:45 pm Michael Hanselmann

Reuse HTTP client pool for RPC

ganeti-masterd: Add initialization and shutdown of RPC pool. It needs
to be shutdown before forking.

ganeti.cli: Add decorator function to initialize and shutdown RPC pool.

ganeti.rpc: Add functions to initialize and shutdown RPC pool. Throw...

54155f52 11/20/2008 08:22 am Iustin Pop

Convert replace-disks (same nodes) to multi-disk

This patch changes the drbd8 replace disk only (no secondary change) to
work in with multi-disk. This mode of replaces works correctly with
replacing only a subset of disks.

Reviewed-by: imsnah

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...

00dd8326 11/07/2008 01:32 pm Alexander Schreiber

Fix gnt-cluster init without cluster parameters

Reviewed-by: imsnah

6099bfcf 10/28/2008 01:20 am Iustin Pop

Documentation updates for gnt-debug and gnt-os

Reviewed-by: imsnah

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

Documentation updates for gnt-job

Reviewed-by: imsnah

48de3413 10/28/2008 01:19 am Iustin Pop

Documentation updates for gnt-backup

Reviewed-by: imsnah

d70b3058 10/28/2008 01:19 am Iustin Pop

Change exit code of gnt-backup list

Currently gnt-backup list exits with the same error code even if can't
contact som nodes for backup information.

The patch changes it to return 1 instead in this case.

Reviewed-by: imsnah

ebf366ee 10/28/2008 01:18 am Iustin Pop

Documentation updates for gnt-node

The patch also adds a 'return 0' to a function that was missing it.

Reviewed-by: imsnah

469ee405 10/28/2008 01:18 am Iustin Pop

Documentation updates for gnt-cluster

Reviewed-by: imsnah

7232c04c 10/28/2008 01:18 am Iustin Pop

Documentation updates for gnt-instance

Reviewed-by: imsnah

1f9611b1 10/23/2008 06:01 pm Alexander Schreiber

Fix use of ToStderr in gnt-cluster

Reviewed-by: imsnah

66348f29 10/23/2008 02:58 pm Alexander Schreiber

convert remaining print statements to ToStderr in gnt-cluster

Reviewed-by: imsnah

02691904 10/20/2008 07:38 pm Alexander Schreiber

Set default hypervisor at cluster init

During cluster init, set the default hypervisor to be used for instances.
Ensure that the default hypervisor belongs to the set enabled hypervisors
for this cluster. Also fix a small bug with setting the default enabled...

3c8886a9 10/20/2008 04:43 pm Guido Trotter

Add mac option to gnt-backup import

Before 'auto' was the only allowed possibility

Forward-port-of: r1885, Reviewed-by: iustinp

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

61be6ba4 10/20/2008 03:16 pm Iustin Pop

Fix gnt-instance modify with beparams

The gnt-instance modify didn't work correctly w.r.t the be parameters.
There was also a typo in the corresponding LU.

Reviewed-by: imsnah

4342e89b 10/20/2008 01:47 pm Alexander Schreiber

Remove --hypervisor-type from gnt-cluster.

We no longer use a single, cluster-wide hypervisor, but configure the
actual to be used hypervisor on the instance level.

Reviewed-by: imsnah

ea3a925f 10/19/2008 01:27 am Alexander Schreiber

Fix gnt-cluster init to set cluster defaults.

Reviewed-by: iustinp

779c15bb 10/16/2008 11:39 pm Iustin Pop

Enable gnt-cluster modify to hv/beparams

This patch enables the cluster modify to change:
- enabled hypervisor list
- hvparams (per hypervisor)
- beparams (only the default group)

Syntax:
gnt-cluster modify -B vcpus=3 -H xen-pvm:no_initrd_path

Validation for parameters is somewhat missing - the individual...

469f88e1 10/16/2008 07:26 pm Iustin Pop

Show the cluster parametrs in gnt-cluster info

This is just a raw update without any special formatting.

Reviewed-by: imsnah

3ccafd0e 10/16/2008 11:37 am Iustin Pop

Add an interface for the drain flag changes/query

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...

0d0e9090 10/15/2008 04:38 pm René Nussbaumer

Adding batch-create to gnt-instance

This change is part of the integration of tools/batcher from
Ganeti 1.2 into Ganeti 2.0 core code. It has a compatible
submission interface to the version from 1.2 with these differences:

  • it's integrated into Ganeti directly: gnt-instance batch-create...
b03efa30 10/14/2008 07:34 pm Guido Trotter

gnt-backup: update for cluster parameters

- add backend and hypervisor parameters
- fix beparams validation/passing
- pass hypervisor and hvparams
- remove deprecated flags

Reviewed-by: iustinp

7399cd55 10/14/2008 07:33 pm Guido Trotter

gnt-instance fix ValidateBeParams call

ValidateBeParams does not return, but its return value is assigned to a
variable which is never used. Avoid this assignment.

Reviewed-by: iustinp

7ac1fc45 10/14/2008 07:33 pm Guido Trotter

gnt-instance remove deprecated flags

kernel, initrd, hvm_boot_order and vnc_bind_address are now hypervisor
parameters and should not have their own flag. Moreover querying of
vnc_bind_address should of course pass through the hv/ namespace.

Reviewed-by: iustinp

6605411d 10/14/2008 07:23 pm Iustin Pop

grow-disk: wait until resync is completed

The patch adds a new ‘--no-wait-for-sync’ parameter to grow-disk similar
to the one in instance add, and changes the default to wait.

This is cleaner as at the moment when the command returns, we either
have a fully synced disk or there is an error....

c0f2b229 10/14/2008 05:42 pm Iustin Pop

Some fixes related to auto_balance

Change the constant name to match the value (autobalance ->
auto_balance).

Also add the auto_balance header so that gnt-instance can list it.

Reviewed-by: ultrotter

338e51e8 10/14/2008 02:29 pm Iustin Pop

Change over to beparams

This big patch changes the master code to use the beparams. Errors might
have crept in, but it passes a small burnin.

Reviewed-by: ultrotter

57821cac 10/14/2008 01:21 pm Iustin Pop

Allow instance info to only query the config file

This patch adds a new '-s' parameter to ‘gnt-instance info’ that makes
it return only 'static' information. This is much faster, especially for
drbd instances.

This is a forward-port of rev 1570 on the ganeti-1.2 branch, resending...

24838135 10/14/2008 01:21 pm Iustin Pop

Convert gnt-instance info to the hvparams model

Some informations are not printed nicely (e.g. “virtual CDROM: False”),
but this is the first step.

Reviewed-by: imsnah

74409b12 10/14/2008 01:20 pm Iustin Pop

Change gnt-instance modify to the hvparams model

Reviewed-by: imsnah

5018a335 10/14/2008 01:20 pm Iustin Pop

Change gnt-instance list to the hvparams model

This is just a change of the various hvm_ and pvm parameters to the hv
model. Parameters are queried via hv/$name or via the whole dict as
returned by hvparams.

Reviewed-by: ultrotter,imsnah

6785674e 10/14/2008 01:20 pm Iustin Pop

Switch instance hypervisor parameters to hvparams

This big patch changes instance create to the new hvparams structure.
Old parameters are removed, so old jobs or old instances file will break
current clusters.

Reviewed-by: ultrotter

e49099a4 10/08/2008 08:31 pm Alexander Schreiber

Update scripts and qa config for changed hypervisor names.

Reviewed-by: ultrotter

e69d05fd 10/08/2008 01:36 pm Iustin Pop

Move the hypervisor attribute to the instances

This (big) patch moves the hypervisor type from the cluster to the
instance level; the cluster attribute remains as the default hypervisor,
and will be renamed accordingly in a next patch. The cluster also gains...

bf2fd71e 10/07/2008 04:16 pm Alexander Schreiber

Change default instance reboot type to hard.

Merged r1777 from branches/ganeti/ganeti-1.2

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

56bece1f 10/06/2008 02:48 pm Iustin Pop

Change SshRunner usage

Currently the SshRunner uses a SimpleConfigReader instance, however this
is not best. We change it to use the cluster name directly (and its
constructor now takes this as parameter, instead of SCR), and its
callers are change to pass the name directly....

e00ea635 10/01/2008 08:35 pm Michael Hanselmann

Convert gnt-cluster

Replace ssconf with configuration.

Reviewed-by: iustinp

7688d0d3 10/01/2008 08:35 pm Michael Hanselmann

Convert ssh.py

Get rid of ssconf and convert to configuration instead.

Reviewed-by: iustinp

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