ganeti-local
12 years agoMerge branch 'stable-2.6'
Iustin Pop [Fri, 13 Jul 2012 14:39:41 +0000 (16:39 +0200)]
Merge branch 'stable-2.6'

* stable-2.6: (72 commits)
  Make Ganeti 2.6.0 rc3 release
  Allow reinstall even when secondaries are offline
  Prepare NEWS file for Ganeti 2.6.0 rc3
  QA updated to test instance removing when sec. is offline
  Ignore offline node errors when removing disks
  Allow instance disc activation with offline secondaries
  RAPI regression beparams/memory fix
  Fix redistribution of files w.r.t. offline nodes
  Fix cluster verify error on master-ip-setup script
  Add a Makefile rule to test unclean git status
  Add test helpers to .gitignore
  Fix a typo in NEWS
  Release Ganeti 2.6.0rc2
  Prepare NEWS file for 2.6.0 rc2
  Update time on Haskell binaries after build
  hcheck: add two simple type aliases for readability
  hcheck: rework output mode
  hcheck: reword and fix typo in instance/offline msg
  Add hlint warning for wrong use of 'length'
  Remove can_rebalance functionality from hcheck
  ...

Conflicts:
        htools/Ganeti/HTools/QC.hs: due to the cleanup of missing type
        signatures, and the fact that in master two test functions had
        a changed argument list, trivial to fix

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoMake Ganeti 2.6.0 rc3 release v2.6.0rc3
René Nussbaumer [Fri, 13 Jul 2012 11:46:34 +0000 (13:46 +0200)]
Make Ganeti 2.6.0 rc3 release

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoAllow reinstall even when secondaries are offline
René Nussbaumer [Wed, 11 Jul 2012 12:29:06 +0000 (14:29 +0200)]
Allow reinstall even when secondaries are offline

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoPrepare NEWS file for Ganeti 2.6.0 rc3
René Nussbaumer [Wed, 11 Jul 2012 11:38:34 +0000 (13:38 +0200)]
Prepare NEWS file for Ganeti 2.6.0 rc3

Update NEWS regarding rc3 fixes and document changes in behaviour.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoQA updated to test instance removing when sec. is offline
Agata Murawska [Mon, 9 Jul 2012 10:49:52 +0000 (12:49 +0200)]
QA updated to test instance removing when sec. is offline

Added test checking that it is possible to remove an instance with drbd
disk when non-primary node is offline.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoIgnore offline node errors when removing disks
Agata Murawska [Mon, 9 Jul 2012 09:00:53 +0000 (11:00 +0200)]
Ignore offline node errors when removing disks

When we delete DRBD disks from some instance, we do not want to get
errors due to nodes other than that instance's primary being offline.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoAllow instance disc activation with offline secondaries
Iustin Pop [Fri, 6 Jul 2012 13:59:19 +0000 (15:59 +0200)]
Allow instance disc activation with offline secondaries

Currently, this is not allowed, so one can't run a replace-disks; this
breaks any non-invasive method of recovering the redundancy of the
instance if its disks are already stopped (but it still works if the
disks on the primary are active). So let's fix this inconsistency.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoReplace a few explicit case expressions
Iustin Pop [Fri, 6 Jul 2012 13:43:10 +0000 (15:43 +0200)]
Replace a few explicit case expressions

Since we're just talking about converting Maybe into another monad, we
can do that via the maybe function, instead of explicit casing.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoFix Haskell coverage results
Iustin Pop [Fri, 6 Jul 2012 12:46:46 +0000 (14:46 +0200)]
Fix Haskell coverage results

There are two current issues with the coverage values:

- we don't import all modules, thus leading to incomplete
  coverage results (too optimistic);
- we use hpc in its default mode (intersection), which means that even
  modules which do have coverage results but are not used in all
  binaries we test will be dropped from the results; thanks to Agata,
  passing --union to hpc is enough to have better results (don't
  remember why this wasn't there in the first place…)

After adding more modules to the import list and fixing the combining
mode, we now have a complete list of modules in coverage results, many
with zero coverage, so our overall coverage has dropped to about 60%.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

12 years agoAlso compute Haskell tags in "make tags"
Iustin Pop [Fri, 6 Jul 2012 10:47:39 +0000 (12:47 +0200)]
Also compute Haskell tags in "make tags"

Note however that this won't work correctly with older compilers, due
to ghc issue #4256; however, it's a handy way to build complete a TAGS
file for Emacs.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

12 years agoCleanup the QC.hs file w.r.t. compiler options
Iustin Pop [Fri, 6 Jul 2012 10:20:04 +0000 (12:20 +0200)]
Cleanup the QC.hs file w.r.t. compiler options

Currently, we build the Haskell unittests with custom GHC flags,
because we (I) were quite lazy when initially writing the
unittests. This is not a problem for the tests themselves, but it
creates problem when (for example) one would want to pass all
$(HS_LIB_SRCS) to the compilers; this is not doable unless we
"degrade" the flags used for all modules, instead of just for QC.hs.

So we do two things to fix this:

- first, we go and add type declaration to all functions that were
  missing them (in QC), and fix the couple of cases of monomorphism
  restrictions; this gets us rid of -fno-warn-missing-signature and
  -fno-warn-monomorphism-restriction
- then, we move the actually important remaining options
  (-fno-warn-orphans and -fno-warn-unused-imports; see the explanation
  for the latter in the newly added FIXME) to a compiler pragma in the
  file, so that when building the unittests only this file is using
  the extra options

And finally we can then drop the other unused options
(-fno-warn-missing-methods anmd -Wwarn), leaving htools/test use
simply -fhpc. This is more in-line with the other files, and thus we
can handle all of HS_LIB_SRCS the same.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoRAPI regression beparams/memory fix
René Nussbaumer [Fri, 6 Jul 2012 09:35:24 +0000 (11:35 +0200)]
RAPI regression beparams/memory fix

For compatibility with the old Ganeti version, we want to keep the
beparams/memory field around for another release. This patch fixes this
regression.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoInstallation instructions update
Agata Murawska [Tue, 3 Jul 2012 13:06:57 +0000 (15:06 +0200)]
Installation instructions update

This patch aims at improving documentation for installing ganeti - both for users and developers.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoFix Query2.hs to compile without warnings
Iustin Pop [Thu, 5 Jul 2012 16:30:20 +0000 (18:30 +0200)]
Fix Query2.hs to compile without warnings

Since this is not yet used by any targets, we didn't detect yet the
compilation warnings. Just trivial exports/imports cleanup.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

12 years agoEnsure that --wait-for-sync is used in QA
Iustin Pop [Thu, 5 Jul 2012 13:28:47 +0000 (15:28 +0200)]
Ensure that --wait-for-sync is used in QA

We don't have a specific test for activate disks, so let's add it in
the cases where we run (incidentally) activate-disks.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoAdd --wait-for-sync in gnt-instance
Iustin Pop [Thu, 5 Jul 2012 13:27:02 +0000 (15:27 +0200)]
Add --wait-for-sync in gnt-instance

Note that this needs (like for the opcode) a new option, with the
default reverted (False instead of True).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years ago9Add wait_for_sync flag to OpInstanceActivateDisks
Iustin Pop [Thu, 5 Jul 2012 13:19:38 +0000 (15:19 +0200)]
9Add wait_for_sync flag to OpInstanceActivateDisks

This can be used to ensure that after activate-disks has returned, the
instance's storage is consistent; currently there's no programmatic
way to do this.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agohbal: return exit status 0 in case of early exit
Iustin Pop [Thu, 5 Jul 2012 12:44:05 +0000 (14:44 +0200)]
hbal: return exit status 0 in case of early exit

This derives from an internal bug, but the story is consistent across
both internal and external usage of hbal.

Basically right now, hbal returns exit code 1 if requested to exit
early, even if all jobs are successful. This is counter-intuitive due
to two reasons:

- hbal did what it was requested (exit early), so it shouldn't return error
- there were no job failures, so there's nothing to "cleanup" or
  investigate on the Ganeti cluster, so again it shouldn't return
  error

Therefore the new behaviour is as follows:

- for cases where all jobs were successful, even if terminated early
  via SIGINT or via --limit, we exit with code 0
- for cases where jobs have failed or there were other errors in
  running hbal, the exit code is 1
- for cases were hbal is requested an immediate termination (SIGTERM),
  exit code is 2, denoting "unknown whether the Ganeti cluster is
  consistent or not"

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoFix DRBD resize code
Iustin Pop [Thu, 5 Jul 2012 10:08:44 +0000 (12:08 +0200)]
Fix DRBD resize code

There are two bugs in the current resize code, affecting mostly DRBD.

First, due to bugs in old DRBD versions (pre 8.0.14), the code currently
calls `drbdsetup resize' on both the primary or secondary. However,
this is actually wrong per current DRBD (from drbdsetup(8)):

     resize
       This causes DRBD to reexamine the size of the device's backing
       storage device. To actually do online growing you need to
       extend the backing storages on both devices and call the resize
       command on one of your nodes.

So calling it just on the primary node should be enough. However, we
can't simply remove the calls to the secondary nodes, since that would
break the growth of the underlying storage (LVM) on the
secondary. Which leads to the second existing bug: we call resize on
each node, even before finish the growth of the underlying
storage. This can leads to all kind of issues if DRDB is not well
behaved.

So to fix both these bugs, we have to extend the current RPC call with
another parameter, which denotes whether to extend the actual backing
storage or just the "logical" one (DRBD being the only one; MD would
be another, if implemented). This allows us to do the growth in two
steps, first the backing store on all nodes, then the logical storage
on just the primary node.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoFix redistribution of files w.r.t. offline nodes
Iustin Pop [Wed, 4 Jul 2012 15:41:01 +0000 (17:41 +0200)]
Fix redistribution of files w.r.t. offline nodes

Currently, _RedistributeAncillaryFiles computes two lists: the list of
online nodes (for all files redistribution), and the list of
vm_capable nodes, for hypervisor-specific files. However, the
vm_capable list includes offline nodes too, leading to warning
messages:

  WARNING: Copy of file /etc/xen/xend-config.sxp to node node13.example.com failed: Node is marked offline

We fix this by trivially intersecting the vm_capable list with the
online one.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoFix cluster verify error on master-ip-setup script
René Nussbaumer [Wed, 4 Jul 2012 11:08:40 +0000 (13:08 +0200)]
Fix cluster verify error on master-ip-setup script

This error does not show up until we exceed the pool of master
candidates and have nodes which are not master candidates.

The background is that we check for master-ip-setup script on master
candidates and expect them not to be on the other nodes. However, we
distribute a default master-ip-script which break this assumption.
Furthermore, there's no reason why the file should just exists on the
master candidates.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoAdd a Makefile rule to test unclean git status
Iustin Pop [Sat, 30 Jun 2012 01:25:45 +0000 (18:25 -0700)]
Add a Makefile rule to test unclean git status

This is trivial, but can be used easily from automated builds to check
that the git tree is clean: files are not modified and untracked files
are not present.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>

12 years agoAdd test helpers to .gitignore
Iustin Pop [Sat, 30 Jun 2012 01:17:42 +0000 (18:17 -0700)]
Add test helpers to .gitignore

Commit 3096524e enabled building of test helpers, but forgot to add
them to .gitignore, resulting in "unclean" git status output.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>

12 years agoFix a typo in NEWS
René Nussbaumer [Tue, 3 Jul 2012 11:55:33 +0000 (13:55 +0200)]
Fix a typo in NEWS

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>

12 years agoRelease Ganeti 2.6.0rc2 v2.6.0rc2
René Nussbaumer [Tue, 3 Jul 2012 08:26:03 +0000 (10:26 +0200)]
Release Ganeti 2.6.0rc2

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoPrepare NEWS file for 2.6.0 rc2
René Nussbaumer [Thu, 28 Jun 2012 14:31:42 +0000 (16:31 +0200)]
Prepare NEWS file for 2.6.0 rc2

We are about to release another version of Ganeti 2.6, so we prepare the
NEWS file with the changes from rc1 to rc2.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoUpdate time on Haskell binaries after build
Iustin Pop [Thu, 28 Jun 2012 23:00:03 +0000 (16:00 -0700)]
Update time on Haskell binaries after build

This patch works around an issue in our build system. Since we don't
use cabal or 'ghc -M', we don't track actual dependencies in our
Makefile; this in turn means that editing a file that only is used in
the main 'htools' binary will keep triggering 'ghc --make' for the
hconfd binary; and this actually takes a bit of time to look at all
the dependencies.

So to work around this, we add a touch after each ghc --make, such
that we trigger the unneeded build at most once.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agohcheck: add two simple type aliases for readability
Iustin Pop [Thu, 28 Jun 2012 22:54:36 +0000 (15:54 -0700)]
hcheck: add two simple type aliases for readability

The same types are reused a couple of times, so let's add a couple of
type aliases for easier change later and readability.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agohcheck: rework output mode
Iustin Pop [Thu, 28 Jun 2012 22:48:47 +0000 (15:48 -0700)]
hcheck: rework output mode

Looking at the output of hcheck, in human readable mode, it looks like
it always starts with a blank line. This is not nice, so I wanted to
redo this to start cleanly.

However, looking at the code, I realised that we need some internal
cleanup; 'perGroupChecks' was doing both pure computation (computing
the score/stats) and I/O work (printing the stats), which is ugly, so
I split that in two; this allows perGroupChecks to be simpler, and we
can therefore first compute the group stats, and start the output with
the mode in which we run.

So right now, hcheck will first output whether we need to run a
rebalance, or if no-simulation is selected, etc., and only then
display the actual stats, making the output a bit more consistent.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agohcheck: reword and fix typo in instance/offline msg
Iustin Pop [Thu, 28 Jun 2012 22:44:45 +0000 (15:44 -0700)]
hcheck: reword and fix typo in instance/offline msg

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoAdd hlint warning for wrong use of 'length'
Iustin Pop [Thu, 28 Jun 2012 22:20:05 +0000 (15:20 -0700)]
Add hlint warning for wrong use of 'length'

While removing split instances check from hcheck, I saw a wrong use of
'length': this should only be used when one needs the actual length of
the list, and not when one wants to check whether the list is empty or
not (in that case, 'null' should be used).

To prevent this in the future, let's add a hlint hint for it, and fix
the warning it generates in hbal.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoRemove can_rebalance functionality from hcheck
Iustin Pop [Thu, 28 Jun 2012 22:15:46 +0000 (15:15 -0700)]
Remove can_rebalance functionality from hcheck

Since hbal can now run rebalances even in the presence of split
instances, we can remove this check and always run the rebalance.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoFix building of hcheck man page
Iustin Pop [Thu, 28 Jun 2012 22:10:59 +0000 (15:10 -0700)]
Fix building of hcheck man page

The code used a space, not a tab, in Makefile.am, which means it
actually broke the variable declaring the man pages.

Furthermore, we add some blank lines in the man page, otherwise the
paragraphs will be run-in together.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoFix tiny typo in htools.rst
Iustin Pop [Thu, 28 Jun 2012 21:51:23 +0000 (14:51 -0700)]
Fix tiny typo in htools.rst

Backtracking through git blame, it turns out than commit 49148d15
changed "\fB20,102400,16384,4\fR" into "**B20,102400,16384,4**". But
of course that's a mistake, since the markup was \fB, not just \f.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoFixed spaces/indentation according to guide lines
Bernardo Dal Seno [Fri, 29 Jun 2012 14:22:03 +0000 (16:22 +0200)]
Fixed spaces/indentation according to guide lines

Problem introduced by commit 87f0aa4896ac4dfacc9d20bc55b0855282b4d1d4.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

12 years agoFix small bug with a space in the hv_xen module's line
Jack [Fri, 29 Jun 2012 09:26:26 +0000 (13:26 +0400)]
Fix small bug with a space in the hv_xen module's line

Remove a useless space at the end of the line in a config file.

Signed-off-by: Jack Sitnikov <sitnikove@gmail.com>
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>

12 years agoAllow param `modify' during gnt-instance modify
Constantinos Venetsanopoulos [Wed, 27 Jun 2012 15:27:28 +0000 (18:27 +0300)]
Allow param `modify' during gnt-instance modify

With the new gnt-instance modify syntax for addition and removal of
disks/NICs on arbitrary indexes, we hit an assertion if the user
passes `modify' as one of the disk's parameters. E.g::

 gnt-instance modify --disk 2:modify,size=3G instance1
 gnt-instance modify --disk 3:add,size=1G,modify instance2

This patch fixes the bug, by allowing `modify' to be passed as a
parameter (as happens with `add' and `remove'), as long as it is
not done alongside `add' or `remove'. If so, it is treated in the
same way as if none of modify/add/remove is passed --> modify.

Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoAdd PCI passthrough for hvm xen
Jack [Thu, 28 Jun 2012 16:39:17 +0000 (20:39 +0400)]
Add PCI passthrough for hvm xen

This hv parameter allows passing PCI devices to virtual machines.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

12 years agoCorrect a wrong --help option for --simulate
Iustin Pop [Thu, 28 Jun 2012 04:56:11 +0000 (21:56 -0700)]
Correct a wrong --help option for --simulate

This was not update when the alloc policy was added to the parameter.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoAdd a shell test for hbal and split instances
Iustin Pop [Thu, 28 Jun 2012 04:46:13 +0000 (21:46 -0700)]
Add a shell test for hbal and split instances

This is not perfect, as we only test that hbal completes successfully
and that it show a score improvement, but it's better than nothing.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agohbal: relax restrictions on split instances
Iustin Pop [Thu, 28 Jun 2012 00:51:51 +0000 (17:51 -0700)]
hbal: relax restrictions on split instances

The recent patch series on hcheck made me realise how much pain we
have due to hbal not being able to work (at all) with split instances.

This is sub-optimal; ideally, hbal would degrade its behaviour, but
not completely refuse to work. This patch does this, by marking any
split instances as not movable (since such instances most likely mean
that some manual intervention is done on then), but otherwise
proceeding with the rebalance of the selected node group.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoAdd newline at the end of shelltest files
Agata Murawska [Thu, 28 Jun 2012 09:08:43 +0000 (11:08 +0200)]
Add newline at the end of shelltest files

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoAdd forgotten unittest changes for instance_os_add
René Nussbaumer [Thu, 28 Jun 2012 08:24:06 +0000 (10:24 +0200)]
Add forgotten unittest changes for instance_os_add

The previous patch which fixed disk parameters didn't adapt the
unittests so it lead to failing QA.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoAnnotate disk params on instance_os_add
René Nussbaumer [Wed, 27 Jun 2012 12:29:10 +0000 (14:29 +0200)]
Annotate disk params on instance_os_add

We call _OpenRealBD during the process and this needs disk parameters to
work. This was reported by Constantinos.

The fix is very ugly though.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoFix a few style issue in hcheck
Iustin Pop [Wed, 27 Jun 2012 19:24:15 +0000 (12:24 -0700)]
Fix a few style issue in hcheck

This fixes a couple of issue I've seen while fixing the List import:

- removes over-use of printf with putStr/show
- wraps some lines
- removes superfluous parentheses in constructs like 'IO (a)'
- makes sure that in type signatures, the '->' are placed at the
  beginning, not end of the line

We probably need to update the style guide for some of these…

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

12 years agoFix old-style import
Iustin Pop [Wed, 27 Jun 2012 19:12:38 +0000 (12:12 -0700)]
Fix old-style import

Commit 1213f9d6 (re)added an old-style import, which fails with recent
compilers.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

12 years agoStyle fix in hcheck
Agata Murawska [Tue, 26 Jun 2012 08:21:47 +0000 (10:21 +0200)]
Style fix in hcheck

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoStyle fixes in shelltests
Agata Murawska [Mon, 25 Jun 2012 15:00:56 +0000 (17:00 +0200)]
Style fixes in shelltests

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoSimplify stats printing
Agata Murawska [Tue, 26 Jun 2012 09:26:00 +0000 (11:26 +0200)]
Simplify stats printing

PrintGroupStats and printClusterStats had very similar code
structure. This patch abstracts those two into printStats, making it
a little more generic. Also, printStats has its arguments documented
as requested in previous patch series.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoCleaner simulation of rebalance
Agata Murawska [Tue, 26 Jun 2012 12:39:36 +0000 (14:39 +0200)]
Cleaner simulation of rebalance

This replaces the 'if .. then .. else ..' with a large block of code in
'else' branch by separating this code into a separate function.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoSmall reordering and renaming in hcheck
Agata Murawska [Tue, 26 Jun 2012 09:21:17 +0000 (11:21 +0200)]
Small reordering and renaming in hcheck

Reordered functions and shortened one function name.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoMove 'need rebalance' check from cluster check
Agata Murawska [Tue, 26 Jun 2012 09:16:10 +0000 (11:16 +0200)]
Move 'need rebalance' check from cluster check

As suggested by Rene, we should keep the check separate from printing.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoAlways print all variables in machine readable version
Agata Murawska [Tue, 26 Jun 2012 09:10:55 +0000 (11:10 +0200)]
Always print all variables in machine readable version

As discussed in cover letter of patch series introducing hcheck, in
machine readable version we should always print values of all variables.
When hbal simulation was not run, FINAL values are equal to INIT values.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoPrint idx <-> uuid mappings in machine readable mode
Agata Murawska [Tue, 26 Jun 2012 15:14:07 +0000 (17:14 +0200)]
Print idx <-> uuid mappings in machine readable mode

As per Iustin Pop's suggestion, we are printing group mappings
from group idx (known only to htools) to group uuid, which identifies
the group uniquely. This is required because group uuid and name
may contain characters such as '-' which are not valid parts of
bash variable name.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoHuman readable group name improved
Agata Murawska [Tue, 26 Jun 2012 15:13:32 +0000 (17:13 +0200)]
Human readable group name improved

Instead of printing group id in human readable version of hcheck,
we now print group name.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoPrint info about ability to rebalance
Agata Murawska [Tue, 26 Jun 2012 08:28:24 +0000 (10:28 +0200)]
Print info about ability to rebalance

As suggested during offline discussion, this patch adds a new bash
variable and description field in hcheck, which informs if the
rebalance was possible. This is to determine if there are split
instances on the cluster, in which case rebalance is impossible.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoImprove readability for hcheck-related changes
Agata Murawska [Tue, 26 Jun 2012 08:14:53 +0000 (10:14 +0200)]
Improve readability for hcheck-related changes

As suggested by Rene, I added comments to types for printKeys
and printFinal. Also, realigned some lines in Hspace.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoFixed doclint warning
Bernardo Dal Seno [Tue, 26 Jun 2012 16:39:05 +0000 (18:39 +0200)]
Fixed doclint warning

Two blank lines are needed between functions.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoAnnotate disks upon blockdev_shutdown
René Nussbaumer [Tue, 26 Jun 2012 12:28:17 +0000 (14:28 +0200)]
Annotate disks upon blockdev_shutdown

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoAnnotate disks on blockdev_remove
René Nussbaumer [Tue, 26 Jun 2012 12:11:52 +0000 (14:11 +0200)]
Annotate disks on blockdev_remove

This annotates the disks for the blockdev_remove where it is
appropriate. It leaves out 2 cases were we can't reliably annotate disk
parameters due to lack of knowledge what we should annotate. Those cases
affects only lvs used for drbd, so it doesn't affect the bug reported by
Constantinos.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoAnnotate disk params on blockdev_getmirrorstatus_multi
René Nussbaumer [Tue, 26 Jun 2012 11:32:41 +0000 (13:32 +0200)]
Annotate disk params on blockdev_getmirrorstatus_multi

This is also related to the bug reported by Constantinos,
as we've only one getmirrorstatus_multi call in whole cmdlib, we just
annotate them while we are building the disk list.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoAnnotate disk parameters on blockdev_getmirrorstatus
René Nussbaumer [Tue, 26 Jun 2012 11:24:50 +0000 (13:24 +0200)]
Annotate disk parameters on blockdev_getmirrorstatus

Not annotating them works for DRBD but not for RBD as reported by
Constantinos.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoQA: Added test for gnt-instance recreate-disks
Bernardo Dal Seno [Wed, 28 Mar 2012 01:09:36 +0000 (03:09 +0200)]
QA: Added test for gnt-instance recreate-disks

The test is disabled by default, as it takes a long time.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoQA function do destroy disks
Bernardo Dal Seno [Fri, 15 Jun 2012 17:39:29 +0000 (19:39 +0200)]
QA function do destroy disks

This is useful to simulate HW problems during QA.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoFix for man entry for htools - added hinfo
Agata Murawska [Fri, 15 Jun 2012 14:38:38 +0000 (16:38 +0200)]
Fix for man entry for htools - added hinfo

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoFixes in man page for hinfo
Agata Murawska [Thu, 14 Jun 2012 15:31:19 +0000 (17:31 +0200)]
Fixes in man page for hinfo

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years ago Update to the install file - hinotify dependency
Agata Murawska [Thu, 14 Jun 2012 15:24:22 +0000 (17:24 +0200)]
 Update to the install file - hinotify dependency

Hinotify was not marked as a dependency for hconfd.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoRelease Ganeti 2.6.0rc1 v2.6.0rc1
René Nussbaumer [Mon, 25 Jun 2012 13:40:41 +0000 (15:40 +0200)]
Release Ganeti 2.6.0rc1

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoAdd summary field to OpNodeModifyStorage
Iustin Pop [Mon, 25 Jun 2012 11:14:17 +0000 (13:14 +0200)]
Add summary field to OpNodeModifyStorage

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoShelltestrunner tests for hcheck
Agata Murawska [Thu, 21 Jun 2012 10:31:24 +0000 (12:31 +0200)]
Shelltestrunner tests for hcheck

Simple tests for hcheck using shelltestrunner. Among other, we check
that we can run hcheck on multi-group cluster.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoMachine readable hcheck functionality
Agata Murawska [Thu, 21 Jun 2012 12:11:02 +0000 (14:11 +0200)]
Machine readable hcheck functionality

Machine readable output for hcheck.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoHuman readable hcheck functionality
Agata Murawska [Thu, 21 Jun 2012 13:09:27 +0000 (15:09 +0200)]
Human readable hcheck functionality

Full hcheck functionality is implemented in this patch. Hcheck runs
per-group checks, provides summary for the entire cluster and simulates
rebalance if required, the printing the modified metrics.
In this patch, only the human-readable output is available.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoAllowing rebalance to run silently
Agata Murawska [Wed, 20 Jun 2012 15:00:57 +0000 (17:00 +0200)]
Allowing rebalance to run silently

Part of hcheck's simulation required us to silently run hbal. For that
purpose we expose iterateDepth and allow it to run silently.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoGeneralize functions used by both hspace and hcheck
Agata Murawska [Thu, 21 Jun 2012 12:30:10 +0000 (14:30 +0200)]
Generalize functions used by both hspace and hcheck

As hspace and hcheck both use machine readable options, they require
similar functions - which are now generalized and moved to CLI and
Utils.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoInitial commit for introducting hcheck tool
Agata Murawska [Thu, 14 Jun 2012 15:38:33 +0000 (17:38 +0200)]
Initial commit for introducting hcheck tool

Introduce infrastructure required to add Hcheck and build it
successfuly.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoNEWS: Improve formatting, wording
Michael Hanselmann [Fri, 22 Jun 2012 15:03:41 +0000 (17:03 +0200)]
NEWS: Improve formatting, wording

Clarify some things, use ```` where appropriate.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoPrepare the update of the NEWS file
René Nussbaumer [Fri, 22 Jun 2012 08:56:28 +0000 (10:56 +0200)]
Prepare the update of the NEWS file

This updates the NEWS file for the upcoming rc1 release.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoExtend burnin to do NIC changes
Iustin Pop [Tue, 19 Jun 2012 17:06:28 +0000 (19:06 +0200)]
Extend burnin to do NIC changes

This would have caught our previous issue, since QA otherwise doesn't
do add, remove or changes of NICs.

Signed-off-by: Iustin Pop <iustin@google.com>
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoFix bug in instance net changes
Iustin Pop [Tue, 19 Jun 2012 17:06:27 +0000 (19:06 +0200)]
Fix bug in instance net changes

_PrepareNicModification returns the invalid type, which triggers an
assert resulting in a mysterious error:

Failure: command execution error:

Without any explanation. We fix this by removing the return value from
_PrepareNicModification, and instead returning the expected type
(since it differs per create/modification) from the (existing)
wrappers for this function. We don't need to return actual changes
from this function as _ApplyNicMods is the function that
computes/returns the formatted changes.

Signed-off-by: Iustin Pop <iustin@google.com>
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoUpdate the hooks documentation
René Nussbaumer [Tue, 19 Jun 2012 14:24:21 +0000 (16:24 +0200)]
Update the hooks documentation

Also provide some extended unittests to catch those cases.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>

12 years agoQA: Fix modification of HV parameters via RAPI
Michael Hanselmann [Tue, 19 Jun 2012 14:51:54 +0000 (16:51 +0200)]
QA: Fix modification of HV parameters via RAPI

This is basically another case of commit d488adb.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoAllow single-homed <-> multi-homed transitions
Guido Trotter [Sat, 16 Jun 2012 08:07:00 +0000 (09:07 +0100)]
Allow single-homed <-> multi-homed transitions

To change the cluster from single homed to multi homed or vice versa one
must target the master node first, and pass the --force option. All
other nodes then will work as long as they are reachable by the master.

Note that this will also prevent a node to be set to single-homed if the
master is multi-homed, which wasn't disallowed before, and warn if a
single-homed <-> multi-homed transition happens.

Also note that it's still theoretically possible to flip a cluster
inadvertently by changing the master node this way, and then doing a
master failover before fixing the other nodes.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agobdev: Fix DRBD error reporting for syncer rate
Michael Hanselmann [Tue, 19 Jun 2012 10:42:55 +0000 (12:42 +0200)]
bdev: Fix DRBD error reporting for syncer rate

The function is supposed to return a list, not a string. Without this
patch the error message ends up as “C, a, n, ', t,  , c, h, a, n, g, e,
…”.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoFix corner case in quick-check generated tests
Iustin Pop [Mon, 18 Jun 2012 15:51:53 +0000 (17:51 +0200)]
Fix corner case in quick-check generated tests

Thanks to Agata Murawska, a random seed that generates bad test cases
was found ("seed was 1768143307 2118231514, test size 74"). This is
due to the fact that some nodes were generated with tMem=0, fMem=0,
which means that pMem was NaN and thus the node was not comparing
equal to itself.

Worked around by limiting the test case generation to nodes with
positive values; a better fix would be to compare nodes differently
(subset of properties or ignore NaN values).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoChange default for DRBD barriers
Michael Hanselmann [Tue, 19 Jun 2012 08:05:03 +0000 (10:05 +0200)]
Change default for DRBD barriers

Commit 8a69b3a8 changed the DRBD barriers disabled by default if
“--disable-drbd-barriers” is used to “bfd”, where “d” stands for
disk-drain. DRBD's upstream updated their documentation[1] to
say disk drains should always be used.

[1] http://git.drbd.org/?p=drbd-8.3.git;a=commit;h=f952dcfed57acf

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoFix inconsistent punctuation in rapi docs and opcodes
Iustin Pop [Fri, 15 Jun 2012 15:54:44 +0000 (17:54 +0200)]
Fix inconsistent punctuation in rapi docs and opcodes

While reviewing the RAPI docs (for commit 003306f9), I realised that
the punctuation used in RAPI is inconsistent, especially with regards
to definition lists.

This patch changes all such lists to not have punctuation, except for
one case (the ecode descriptions, which have multiple
paragraphs). Furthermore, it fixes the few opcodes which had docs
ending with punctuation to not do so anymore.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoExport more information in RAPI group queries
Iustin Pop [Fri, 15 Jun 2012 14:23:54 +0000 (16:23 +0200)]
Export more information in RAPI group queries

Sadly we don't have a way to test that, for example, all
(G|N|I)Q_CONFIG fields are exported in RAPI, so for now we don't test
this; but we should, in the future.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoQA: Fix breakage on cluster initialization
Michael Hanselmann [Fri, 15 Jun 2012 14:00:07 +0000 (16:00 +0200)]
QA: Fix breakage on cluster initialization

The hypervisors are a list and need to be comma-separated.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoVerify the options on diskparameters
René Nussbaumer [Fri, 15 Jun 2012 12:16:50 +0000 (14:16 +0200)]
Verify the options on diskparameters

This prevents from setting for example drbd options on the plain disk
template.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoVerify user supplied dicts against defaults
René Nussbaumer [Fri, 15 Jun 2012 12:04:42 +0000 (14:04 +0200)]
Verify user supplied dicts against defaults

This verifies the user (especially in nested dicts) does not
provide a key which is not seen in the defaults dict for that dict.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoQA: Test some instance parameters depending on hypervisor
Michael Hanselmann [Fri, 15 Jun 2012 13:14:47 +0000 (15:14 +0200)]
QA: Test some instance parameters depending on hypervisor

For example, the “initrd_path” parameter is only available with xen-pvm,
whereas “boot_order” is only available with xen-hvm.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoQA: Verify hypervisors, make available through functions
Michael Hanselmann [Fri, 15 Jun 2012 13:14:57 +0000 (15:14 +0200)]
QA: Verify hypervisors, make available through functions

Some parts of QA should only be run with certain hypervisors (e.g.
testing instance HV parameters). To make that happen we always define
the cluster's hypervisors and provide a function to get the default
hypervisor.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agojstore: Add unittests
Michael Hanselmann [Thu, 14 Jun 2012 16:38:11 +0000 (18:38 +0200)]
jstore: Add unittests

Add unittests for FormatJobID, GetArchiveDirectory, ParseJobId.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoquery: Comparison of timestamps, job IDs
Michael Hanselmann [Thu, 14 Jun 2012 16:35:26 +0000 (18:35 +0200)]
query: Comparison of timestamps, job IDs

This patch adds the necessary conversions for comparing split timestamps
(such as used by jobs) and job IDs (by defining custom converters).
Unittests are included.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agojqueue: Move functions related to job ID to jstore
Michael Hanselmann [Thu, 14 Jun 2012 16:38:40 +0000 (18:38 +0200)]
jqueue: Move functions related to job ID to jstore

These don't really need to be in jqueue, and a new function will
be added to convert job IDs to an integer for queries.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

12 years agoMerge branch 'stable-2.6'
Michael Hanselmann [Fri, 15 Jun 2012 11:36:44 +0000 (13:36 +0200)]
Merge branch 'stable-2.6'

* stable-2.6:
  Fix cfgupgrade unittests
  Upgrade wrong iv_names at cfgupgrade time
  query2: Add <, >, <=, >= comparison operators
  Fix creation of plain instances with --no-wait-for-sync
  Fixed typos, formatting, etc and added a comment
  Fix daemon-util with non-root user models

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoFix cfgupgrade unittests
Iustin Pop [Fri, 15 Jun 2012 11:21:52 +0000 (13:21 +0200)]
Fix cfgupgrade unittests

Sorry, I broke the cfgupgrade unittests via 904910c4, since that
commit added the requirement for the "instances" dict in the
configuration.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoUpgrade wrong iv_names at cfgupgrade time
Iustin Pop [Thu, 14 Jun 2012 15:17:34 +0000 (17:17 +0200)]
Upgrade wrong iv_names at cfgupgrade time

Since Ganeti 2.6 does warn about disks with wrong iv_names, it would
be better to fix them when upgrading to 2.6.

Not sure if this is too brittle and whether we want to add more
safeguards on the contents of the config/instance/disks before
touching them.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoAdd query2 numeric comparison operators
Guido Trotter [Thu, 14 Jun 2012 15:19:51 +0000 (16:19 +0100)]
Add query2 numeric comparison operators

These were recently added to the python version.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

12 years agoquery2: Add <, >, <=, >= comparison operators
Michael Hanselmann [Wed, 13 Jun 2012 16:35:13 +0000 (18:35 +0200)]
query2: Add <, >, <=, >= comparison operators

These can be used, for example, to get jobs submitted after a certain
timestamp.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>