ganeti-local
11 years agoVersion bump to 2.9.0~alpha1
Michele Tartara [Wed, 19 Jun 2013 08:24:01 +0000 (08:24 +0000)]
Version bump to 2.9.0~alpha1

Bump the version number to 2.9.0~alpha1.

This also requires updating version numbers in cfgupgrade tool.

Furthermore, a data file for test representing a 2.8 configuration had the
version number set to 2.7 in order to prevent tests failing while the current
branch was artificially kept behind its actual version number. Now that alpha
versions are possible, it can be moved back to 2.8 as it was supposed to be.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoFix reference to NodeInfo.name
Thomas Thrainer [Wed, 19 Jun 2013 07:00:56 +0000 (09:00 +0200)]
Fix reference to NodeInfo.name

This fixes a bug introduced during the move from node names to node
UUIDs as indexes.

Also, a typo is corrected.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoMerge branch 'stable-2.8' into 'master'
Michele Tartara [Tue, 18 Jun 2013 14:21:20 +0000 (14:21 +0000)]
Merge branch 'stable-2.8' into 'master'

* stable-2.8
  Version bump to 2.8.0~alpha1
  Make cfgupgrade idempotent
  Update config version number when downgrading
  Add test for shrink heuristics over different resources
  Improve hspace shrinking strategy
  Convenience function for iterating while the result is Ok
  Provide witness for the sum-type structure of GenericResult
  Disable more version checks for alpha versions
  Allow alpha versions not to have an entry in the NEWS file
  Add tests for check-news
  Introduce support for alpha versions
  Improve docstring
  Fix bug in Makefile.am
  Restructure documentation index page
  Add missing parenthesis to description of --machine-readable
  Update NEWS file for 2.8
  Add a --force option to gnt-cluster modify
  Add a force option to the ClusterSetParams Opcode
  Document the monitoring daemon in the admin guide
  Factor out the API of the monitoring daemon
  Add monitoring agent info to the security document
  Export device UUIDs to hooks and OS scripts
  gnt-cluster info: only parameters for enabled hypervisors
  Support RAPI QA on an already existing cluster

Conflicts:
Makefile.am:
    Trivial, merge of lists of files.

man/gnt-cluster.rst
    One parameter added in stable-2.8, one in master

test/hs/shelltests/htools-hspace.test
    Tests added in both branches

tools/cfgupgrade
    Some upgrade steps are not required anymore, some have been removed.

  src/Ganeti/HTools/Instance.hs
    Some types changes in the Haskell code because of the patches related to
    Ganeti Dedicated.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoVersion bump to 2.8.0~alpha1
Michele Tartara [Fri, 14 Jun 2013 12:57:49 +0000 (14:57 +0200)]
Version bump to 2.8.0~alpha1

Now that alpha versions are supported, we can bump the version number
for branch stable-2.8 to 2.8.

This also requires updating the cfgupgrade tool.

Thanks to the previous patches, all the other documents can be upgraded
during the alpha lifetime, before switching to beta (that will enable
the version number checks).

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

11 years agoRevert "Storage utility functions for Haskell"
Helga Velroyen [Tue, 18 Jun 2013 07:40:12 +0000 (09:40 +0200)]
Revert "Storage utility functions for Haskell"

This reverts commit
88d27b8aa8adc2e5ced773909f1d40812c5a6ea7.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoRevert "Make NodeInfo (hs) accept arbitrary storage types"
Helga Velroyen [Tue, 18 Jun 2013 07:39:15 +0000 (09:39 +0200)]
Revert "Make NodeInfo (hs) accept arbitrary storage types"

This reverts commit
e89525a859b2e841c08fce506c0b68b97c7efe61.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoMake cfgupgrade idempotent
Michele Tartara [Tue, 18 Jun 2013 07:33:48 +0000 (07:33 +0000)]
Make cfgupgrade idempotent

One of the unit tests checks whether cfgupgrade's downgrade option is
idempotent. It is, but a version number check made it impossible to
actually downgrade multiple times.

With this change, both the current-version version number and the
target-version version number are accepted by the downgrade tool.

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

11 years agoUpdate config version number when downgrading
Michele Tartara [Tue, 18 Jun 2013 07:32:31 +0000 (07:32 +0000)]
Update config version number when downgrading

The downgrade option of the cfgupgrade tool was not changing the version
number in the configuration file of the cluster while performing the
downgrade.

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

11 years agoMake NodeInfo (hs) accept arbitrary storage types
Helga Velroyen [Fri, 14 Jun 2013 13:43:47 +0000 (15:43 +0200)]
Make NodeInfo (hs) accept arbitrary storage types

So far, the Haskell implementation of NodeInfo just
requests storage information about volume groups.
With this patch, storage info for abitrary storage
types can be requested.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoStorage utility functions for Haskell
Helga Velroyen [Thu, 13 Jun 2013 17:44:06 +0000 (19:44 +0200)]
Storage utility functions for Haskell

In order to extend the Haskell version of the NodeInfo
query, we need some utility functions to deal with
disk templates and storage types.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoRename directory 'Block' to 'Storage'
Helga Velroyen [Fri, 14 Jun 2013 15:05:19 +0000 (17:05 +0200)]
Rename directory 'Block' to 'Storage'

This patch renames the 'Block' directory to 'Storage' in
the Haskell code base. The same rename was done in the
python code base earlier this quarter. We generalize the
name, because we needed a place for general storage
utility functions and storage code for other storage
types like for example file storage.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoAdd test for shrink heuristics over different resources
Klaus Aehlig [Fri, 14 Jun 2013 12:19:01 +0000 (14:19 +0200)]
Add test for shrink heuristics over different resources

In this example, memory prevents adding more than one instance on
the first node. Yet, on the other nodes, 2 instances can be placed
each, if disks are shrunk appropriately. This, however, requires
to courageous decision to shrink disks next, even though more nodes
fail to allocate more due to memory than to disk.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

11 years agoImprove hspace shrinking strategy
Klaus Aehlig [Fri, 14 Jun 2013 13:48:47 +0000 (15:48 +0200)]
Improve hspace shrinking strategy

In tired allocation, hspace shrinks that resource of the instance
next, that causes failure on most nodes. While, this is not a bad
strategy in general, it can lead hspace into a dead end if for a large
number of nodes a particular resource blocks any further allocation of
policy compliant instances. So we improve the heuristics in that it
chooses to shrink such a resource next where by shrinking only this
resource a valid allocation can be made, if such a resource
exists. This improves the results in some cases, while still keeping
the computational complexity of the algorithm low.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

11 years agoConvenience function for iterating while the result is Ok
Klaus Aehlig [Fri, 14 Jun 2013 15:42:15 +0000 (17:42 +0200)]
Convenience function for iterating while the result is Ok

For a function f :: a -> GenericResult a, iterate it (in the sense of the
monad), until the result is Bad; return the list of values occurred.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

11 years agoProvide witness for the sum-type structure of GenericResult
Klaus Aehlig [Fri, 14 Jun 2013 13:47:55 +0000 (15:47 +0200)]
Provide witness for the sum-type structure of GenericResult

GenericResult, while rightfully a type of its own, is isomorphic
to Either. So, also provide the case analysis function (i.e., the
universal arrow out of the sum).

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

11 years agoDisable more version checks for alpha versions
Michele Tartara [Thu, 13 Jun 2013 14:56:30 +0000 (14:56 +0000)]
Disable more version checks for alpha versions

Alpha versions should not check for version numbers in READMEs
and documentation.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoAllow alpha versions not to have an entry in the NEWS file
Michele Tartara [Thu, 13 Jun 2013 14:15:15 +0000 (14:15 +0000)]
Allow alpha versions not to have an entry in the NEWS file

Alpha versions are still under heavy development, and can therefore not have an
entry in the NEWS file yet. The entry will have to be added before switching to
the first beta version.

Partially fixes Issue 448

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoAdd tests for check-news
Michele Tartara [Thu, 13 Jun 2013 12:09:40 +0000 (14:09 +0200)]
Add tests for check-news

Unit tests verifying the behaviour of the check-news script are added.

This required adding a new make target, "autotools-check" directly called from
"commit-check", because the usual tests are executed in the build directory,
whereas these, being relative to the autotools, cannot be executed there because
the files of the autotools/ directory are not copied do not belong in the build
directory.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoIntroduce support for alpha versions
Michele Tartara [Thu, 13 Jun 2013 11:00:12 +0000 (11:00 +0000)]
Introduce support for alpha versions

An alpha version can be used to name a release while a previous one is still
being developed.

E.g. 2.9.0~alpha1 can be out while 2.8.0~rc1 is being worked on.

When a version is marked as alpha, it is allowed to have unreleased versions
before it in the NEWS file, in order to simplify merges of the NEWS file itself
between the two development branches.

Partially fixes Issue 448.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoImprove docstring
Michele Tartara [Thu, 13 Jun 2013 10:59:47 +0000 (10:59 +0000)]
Improve docstring

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoFix bug in Makefile.am
Michele Tartara [Thu, 13 Jun 2013 15:32:53 +0000 (17:32 +0200)]
Fix bug in Makefile.am

There was a typo in the name of the script for launching offline tests.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoRefactor NodeInfo RPC regarding storage reporting
Helga Velroyen [Thu, 13 Jun 2013 09:21:34 +0000 (11:21 +0200)]
Refactor NodeInfo RPC regarding storage reporting

The NodeInfo RPC call is refactored to handle now more than
just storage reporting for volume groups.

Since NodeInfo now returns storage space information not
necessarily for volume groups, but also for other storage
entities, it is no longer appropriate to call the fields
of the NodeInfo result "vg_free" and "vg_size". We rename
it to "storage_free" and "storage_size" instead.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoUtility functions for storage types
Helga Velroyen [Thu, 13 Jun 2013 09:19:22 +0000 (11:19 +0200)]
Utility functions for storage types

Handling various storage types for the free space reporting
requires some utility functions. They will be invoked in
later patches. Unit tests are included.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoIntegrate free space reporting for file storage
Helga Velroyen [Wed, 12 Jun 2013 09:14:49 +0000 (11:14 +0200)]
Integrate free space reporting for file storage

This patch integrates the free space reporting for file
storage. So far, it is only called, when the default
disk template is a file-based disk template ("file" or
"sharedfile").

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoUnit tests for ApplyStorageSpaceFunction
Helga Velroyen [Wed, 12 Jun 2013 09:14:20 +0000 (11:14 +0200)]
Unit tests for ApplyStorageSpaceFunction

So far, the function 'ApplyStorageSpaceFunction' was not
covered by unit tests. Before the integration of space
reporting for file storage, we add those missing tests.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoRenamining space reporting for file storage
Helga Velroyen [Wed, 12 Jun 2013 08:44:48 +0000 (10:44 +0200)]
Renamining space reporting for file storage

Before being integrated, the function for space reporting
for file storage is renamed to a more expressive name.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoAdd storage type to NodeInfo result
Helga Velroyen [Thu, 13 Jun 2013 09:49:30 +0000 (11:49 +0200)]
Add storage type to NodeInfo result

So far, the storage information returned from RPC call
NodeInfo contained only information about volume groups.
In order to extend the storage reporting to other storage
type, we include another field "type" in the result of
the RPC call to be able to distinguish storage space
information from different storage units.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoUse cluster's hvparams in LUInstSetParams
Helga Velroyen [Fri, 14 Jun 2013 08:36:23 +0000 (10:36 +0200)]
Use cluster's hvparams in LUInstSetParams

Since the instance does not have hvparams at that point,
we have to use the cluster's hvparams here. This fixes
a crash when using 'gnt-instance modify'.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

11 years agoMerge branch 'stable-2.7' into stable-2.8
Klaus Aehlig [Fri, 14 Jun 2013 08:29:40 +0000 (10:29 +0200)]
Merge branch 'stable-2.7' into stable-2.8

* stable-2.7
  Make shrinkByType aware of individual disks
  Add a test for hspace to respect instance policy

Conflicts: (trival, take union of added files/tests)
Makefile.am
test/hs/shelltests/htools-hspace.test

Semantic conflicts:
test/data/htools/hspace-tiered-ipolicy.data
(adapt to changed text format)

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

11 years agoAdd a test for hspace to respect instance policy
Klaus Aehlig [Thu, 13 Jun 2013 14:05:46 +0000 (16:05 +0200)]
Add a test for hspace to respect instance policy

In this example, the instance policy for disks prevents allocation
of more than one instance per node. The test verifies that tiered
allocation still respects this and doesn't attempt to place policy
violating instances on the cluster.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoMake shrinkByType aware of individual disks
Klaus Aehlig [Thu, 13 Jun 2013 14:05:45 +0000 (16:05 +0200)]
Make shrinkByType aware of individual disks

When shrinking an instances, you can't just get smaller disk footprint
while leaving the individual disks as they are. Make the shrink
heuristic aware of that fact, and decrease all individual disks as
well. Fixes issue 484.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoFix lookup of xen toolstack in Haskell
Helga Velroyen [Thu, 13 Jun 2013 15:23:54 +0000 (17:23 +0200)]
Fix lookup of xen toolstack in Haskell

There was a bug in the haskell implementation of node
query which made the lookup of the xen toolstack xm/xl
fail.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoInline simple "alias" variables
Thomas Thrainer [Fri, 7 Jun 2013 09:47:38 +0000 (11:47 +0200)]
Inline simple "alias" variables

Remove variables in the form "var = self.var" throughout all LU's. Those
"alias" variables make it harder to read the code (it's no longer
immediately clear what's a field and what's a local variable), and can
introduce subtle bug (especially when not used consistently and when
they are re-assigned).

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoConvert node indices to UUIDs in configuration
Thomas Thrainer [Thu, 6 Jun 2013 13:53:07 +0000 (15:53 +0200)]
Convert node indices to UUIDs in configuration

cfgupgrade replaces the occurences of node names (where they are used as
index) with the node UUID.
It also supports the inverse replacement, so downgrades are supported
too.

Tests for cfgupgrade are adapted as well.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoIndex nodes by their UUID
Thomas Thrainer [Mon, 27 May 2013 14:17:41 +0000 (16:17 +0200)]
Index nodes by their UUID

No longer index nodes by their name but by their UUID in the cluster
config. This change changes large parts of the code, as the following
adjustments were necessary:
 * Change the index key to UUID in the configuration and the
   ConfigWriter, including all methods.
 * Change all cross-references to nodes to use UUID's.
 * External interfaces (command line interface, IAllocator interface,
   hook scripts, etc.) are kept stable.
 * RPC-calls can resolve UUID's as target node arguments, if the RPC
   runner is based on a ConfigWriter instance. The result dictionary is
   presented in the form the nodes are addressed: by UUID if UUID's were
   given, or by name if names were given.
 * Node UUID's are resolved in ExpandNames and then stored in the
   OpCode. This allows to check for node renames if the OpCode is
   reloaded after a cluster restart. This check is currently only done
   for single node parameters.
 * Variable names are renamed to follow the following pattern:
   - Suffix is 'node' or 'nodes': Variable holds Node objects
   - Suffix is 'name' or 'names': Variable holds node names
   - Suffix is 'uuid' or 'uuids': Variable holds node UUID's
 * Tests are adapted.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoAdd cluster name to instance migration RPC
Helga Velroyen [Wed, 12 Jun 2013 08:29:14 +0000 (10:29 +0200)]
Add cluster name to instance migration RPC

This fixes a 'FIXME' in the xen hypervisor. The instance
migration requires the cluster's name. This should come
from the RPC call, but so far was hackishly taken from
ssconf. Ssconf is intended to be used by scripts only and
not by the backend itself.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoRestructure documentation index page
Michele Tartara [Wed, 12 Jun 2013 14:48:30 +0000 (14:48 +0000)]
Restructure documentation index page

The index page of the documentation used to be just a list of links.
Now it is a proper introduction to all the other pages.

Fixes Issue 424.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoAdd missing parenthesis to description of --machine-readable
Klaus Aehlig [Wed, 12 Jun 2013 11:45:10 +0000 (13:45 +0200)]
Add missing parenthesis to description of --machine-readable

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

11 years agoSupport VNC binding to an interface
Klaus Aehlig [Mon, 10 Jun 2013 10:02:22 +0000 (12:02 +0200)]
Support VNC binding to an interface

Currently, the VNC bind address can only be specified as an IP
address. Given that this is a cluster-wide parameter, there
aren't many sensible choices besides 127.0.0.1 and 0.0.0.0. This
patch allows to also specify it as the address of a specifed
interface.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

11 years agoUpdate NEWS file for 2.8
Michele Tartara [Tue, 14 May 2013 12:42:15 +0000 (13:42 +0100)]
Update NEWS file for 2.8

Add to the NEWS file the list of modifications performed during the 2.8
development cycle.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>

11 years agoRemove XEN_CMD from configure.ac
Helga Velroyen [Thu, 6 Jun 2013 17:08:52 +0000 (17:08 +0000)]
Remove XEN_CMD from configure.ac

Removes the option --with-xen-cmd from the configure
script.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoRemove XEN_CMD from constants, adjust to PowercycleNode
Helga Velroyen [Thu, 6 Jun 2013 16:41:01 +0000 (18:41 +0200)]
Remove XEN_CMD from constants, adjust to PowercycleNode

This patch extend the RPC to powercycle a node by a
hvparams parameter. This parameter is used by the
xen hypervisor to determine which xen command to use.
The respective LU is adjusted as well.

Since this was the last operation depending on the
constants.XEN_CMD, it is removed eventually.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agohv_xen.py: make hvparams mandatory, remove fallbacks
Helga Velroyen [Wed, 5 Jun 2013 16:36:10 +0000 (18:36 +0200)]
hv_xen.py: make hvparams mandatory, remove fallbacks

This patch removes the fallback to the xen command from the
auto config and adds an exception instead. Also, the
hvparams parameter of the functions GetCommand, _RunXen and
_GetInstanceList are made mandatory.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoUse hvparams in GetAllInstancesInfo
Helga Velroyen [Thu, 6 Jun 2013 14:35:26 +0000 (16:35 +0200)]
Use hvparams in GetAllInstancesInfo

This patch extends the GetAllInstancesInfo method of the
hypervisors by a hvparams parameter. This change propagates
up to the RPC call all_instances_info, which also needed
to be extended. All callers of this call were adjusted
as well.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoUse hvparams in GetInstanceInfo
Helga Velroyen [Thu, 6 Jun 2013 14:22:11 +0000 (16:22 +0200)]
Use hvparams in GetInstanceInfo

This patch extends the GetInstanceInfo function of the
hypervisors by an hvparams parameters. This leads to
an extension of the instance_info RPC call and the
adjustmend of all classes using this call.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agobackend.py: remove fallback implementation of GetNodeInfo
Helga Velroyen [Thu, 6 Jun 2013 13:08:38 +0000 (15:08 +0200)]
backend.py: remove fallback implementation of GetNodeInfo

This removes the fallback implementation of the backend's
GetNodeInfo function to the old implementation. By now,
all calling code is adjusted to the new hvparams parameter
and thus, the old implementation should not be necessary
anymore.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoAdjust all callers of RPC 'call_node_info'
Helga Velroyen [Thu, 6 Jun 2013 11:45:22 +0000 (13:45 +0200)]
Adjust all callers of RPC 'call_node_info'

This patch contains all adjustments necessary to code that
uses the 'call_node_info' call. The adjustment is necessary
because the call's signature changed from receiving a list
of hypervisor names to a list of tuples
(hypervisor_name, hvparams).

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoAdd hvparams to RPC call 'node_info'
Helga Velroyen [Thu, 6 Jun 2013 11:40:10 +0000 (13:40 +0200)]
Add hvparams to RPC call 'node_info'

This patch adds the hvparams parameter to the RPC call
'node_info'. It also adjusts the related code in noded.py
and Query/Node.hs

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agobackend.py: use hvparams in GetNodeInfo
Helga Velroyen [Thu, 6 Jun 2013 08:51:21 +0000 (10:51 +0200)]
backend.py: use hvparams in GetNodeInfo

This patch extends the GetNodeInfo function of the backend
module by a hvparams parameter. For now, it contains a
fallback solution for when the parameter is None. This
fallback will be removed in a later patch of this series.
It was necessary to be abled to gradually adjust all
calling code without breaking everything at once.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agohypervisors: add hvparams to GetNodeInfo
Helga Velroyen [Thu, 6 Jun 2013 08:38:56 +0000 (10:38 +0200)]
hypervisors: add hvparams to GetNodeInfo

This patch extends the GetNodeInfo function of the
hypervisors by a hvparams parameter. The parameter
is currently only used by the xen hypervisor to determine
which xen toolstack ('xm' or 'xl') to use.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agohv_xen.py: renaming residual 'xm' occurrences
Helga Velroyen [Thu, 6 Jun 2013 12:21:07 +0000 (14:21 +0200)]
hv_xen.py: renaming residual 'xm' occurrences

Some methods still refered to 'xm', which is inaccurate now
that xen can also be run with 'xl'. No functional changes
otherwise.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoWatcher: Use hvparams when listing instances
Helga Velroyen [Wed, 5 Jun 2013 15:15:49 +0000 (17:15 +0200)]
Watcher: Use hvparams when listing instances

This patch makes the watcher use the hvparams from ssconf
to retrieve the list of instances from the hypervisors.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoInclude hvparams in ssconf files
Helga Velroyen [Wed, 5 Jun 2013 15:05:19 +0000 (17:05 +0200)]
Include hvparams in ssconf files

The watcher needs access to the cluster's hypervisor
parameters. This patch extends the ssconf infrastructure
by adding a hvparams file for each hypervisor. The format
of the hvparams file is a simple key=value format.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoUse hvparams in instance migration
Helga Velroyen [Wed, 5 Jun 2013 09:08:07 +0000 (11:08 +0200)]
Use hvparams in instance migration

This patch makes use of hvparams on instance migration to
determine the list of instance before the migration. This way, in
xen, the xl/xm choice is respected.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoVerify: node info and instance list
Helga Velroyen [Fri, 7 Jun 2013 08:28:52 +0000 (10:28 +0200)]
Verify: node info and instance list

This patch enhances node verification by:
- Factoring out the verification of the node info
  and the instance list to increase testability.
- Make both of them use the hvparams parameter.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoVerify: xen toolstack, hypervisor and hvparams
Helga Velroyen [Tue, 4 Jun 2013 15:24:49 +0000 (17:24 +0200)]
Verify: xen toolstack, hypervisor and hvparams

This patch extends the node verification by:
- Adding a check for the xen toolstack when the hypervisor
  is verified.
- Factoring out the hypervisor verification in a
  subfunction to increase testability.
- Factoring out the hvparams verification in a
  subfunction for the same reason.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agorpc / noded: add hvparams to instance_list call
Helga Velroyen [Fri, 24 May 2013 15:56:17 +0000 (17:56 +0200)]
rpc / noded: add hvparams to instance_list call

The 'instance_list' call needs to be extended to accept
hvparams. This is one of the few RPCs where it is
necessary, because there is no instance given whose
hvparams could be reused.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agobackend.py: use instance's hvparams whenever possible
Helga Velroyen [Fri, 24 May 2013 16:07:58 +0000 (18:07 +0200)]
backend.py: use instance's hvparams whenever possible

The backend module's function 'ListInstances' is called
within the module several times. In many cases, it is
possible to reuse the instance's hvparams for the
'ListInstances' call and thus avoiding having to extend
RPC calls.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agobackend.py: GetInstanceListForHypervisor
Helga Velroyen [Wed, 5 Jun 2013 09:20:02 +0000 (11:20 +0200)]
backend.py: GetInstanceListForHypervisor

In same cases, the call 'GetInstanceList' is only done for
one hypervisor. In those cases, it is more convenient to
not provide the full collection of hypervisor parameters
for all hypervisors, but only the ones for this hypervisor.
This patch factors out this particular case.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agobackend.py: hvparams in 'GetInstanceList'
Helga Velroyen [Fri, 24 May 2013 15:10:31 +0000 (17:10 +0200)]
backend.py: hvparams in 'GetInstanceList'

Propagating the use of hvparams further up the calling
hierarchy, this patch makes the backend module use the
hvparams in 'GetInstanceList'. Unit tests provided.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agohv_xen.py: _RunXen and GetInstanceList use hvparams
Helga Velroyen [Fri, 24 May 2013 13:38:11 +0000 (15:38 +0200)]
hv_xen.py: _RunXen and GetInstanceList use hvparams

Propagating the use of hvparams further up in the calling
hierarchy, the functions '_RunXen' and 'GetInstanceList'
use the given hvparams. Unit tests provided. Calling function
'StopInstance' adjusted in this patch as well.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agohv_xen.py: rename RunXmList to RunInstanceList
Helga Velroyen [Fri, 24 May 2013 14:20:36 +0000 (16:20 +0200)]
hv_xen.py: rename RunXmList to RunInstanceList

Since one can retrieve xen's instance list with both, 'xm'
or 'xl', the function name 'RunXmList' is no longer
appropriate. Renaming it to 'RunInstanceList'. No
functional changes otherwise.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agohv_xen.py: rename GetXmList to GetInstanceList
Helga Velroyen [Fri, 24 May 2013 13:55:31 +0000 (15:55 +0200)]
hv_xen.py: rename GetXmList to GetInstanceList

Since one can retrieve xen's instance list via both 'xm'
or 'xl', it is no longer appropriate to call the function
'GetXmList'. This patch renames it to 'GetInstanceList'.
Other than that, there are no functional changes.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agohv_xen._GetCommand: retrieve xen command from hvparams
Helga Velroyen [Fri, 24 May 2013 11:10:02 +0000 (13:10 +0200)]
hv_xen._GetCommand: retrieve xen command from hvparams

This patch adds a (so far optional) hvparams parameter
to the '_GetCommand' function. This dictionary is used
to retrieve the xen command (xm or xl). It is optional
for now to make the refactoring possible without breaking
everything at once.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoUnit tests for hv_xen._GetCommand
Helga Velroyen [Fri, 24 May 2013 11:03:13 +0000 (13:03 +0200)]
Unit tests for hv_xen._GetCommand

This patch adds unit tests for the current state of the
'GetCommand' method. The tests are rather trivial, but
having tests before starting to refactor seems to be
a good idea.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoAdd xen command (xm, xl) to hv parameters
Helga Velroyen [Thu, 16 May 2013 11:58:37 +0000 (13:58 +0200)]
Add xen command (xm, xl) to hv parameters

This patch adds the xen command (xm, xl) as hypervisor
parameter to the constants and adds validation to
the xen hypervisors.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoFixing docstring of hv_xen_unittest.py
Helga Velroyen [Tue, 4 Jun 2013 13:45:26 +0000 (15:45 +0200)]
Fixing docstring of hv_xen_unittest.py

The introductory comment of hv_xen_unittest.py referred to
the wrong hypervisor.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoMake SubmitOpCode expect options without print_jobid
Klaus Aehlig [Tue, 11 Jun 2013 08:24:47 +0000 (10:24 +0200)]
Make SubmitOpCode expect options without print_jobid

As opposed to SubmitOrSend, the SubmitOpCode function is
called also by commands not supporting submit options. Hence
only inspect these options, if they are actually present.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoAdd an option to print job id of submitted jobs on stdout
Klaus Aehlig [Thu, 6 Jun 2013 14:10:49 +0000 (16:10 +0200)]
Add an option to print job id of submitted jobs on stdout

When submitting a job, the job id, prefixed by 'JobID: ', is output to
stderr. While this is easy to understand for humans, for scripting, it
is more convenient to have (additionally) the id on stdout (and only
the id). Add an option to provide this.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoAdd new command gnt_job wait
Klaus Aehlig [Thu, 23 May 2013 15:38:22 +0000 (17:38 +0200)]
Add new command gnt_job wait

This command tacitly waits for a job to finish. In that
way, job dependency can also be handled in shell scripts.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

11 years agoAdd type annotation to avoid monomorphism restriction
Klaus Aehlig [Mon, 10 Jun 2013 14:45:17 +0000 (16:45 +0200)]
Add type annotation to avoid monomorphism restriction

Even though we need the let-bound variable showMoves only
at type [(String, String)] -> IO (), it's most general type
would be (PrintfArg a, PrintfArg b) => [(a, b)] -> IO ().
This causes the monomorphism restriction apply to that binding,
which is a warning (and, thanks to -Werror, fatal) on some
ghc versions.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoadd option --print-moves to hroller
Klaus Aehlig [Wed, 5 Jun 2013 14:37:32 +0000 (16:37 +0200)]
add option --print-moves to hroller

If non-redundant instances are present in the cluster, hroller will
plan for them to move to other nodes while the group is rebooted.
This adds an option to also show this plan.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

11 years agoNew tests for hspace and exclusive storage
Bernardo Dal Seno [Thu, 6 Jun 2013 17:55:15 +0000 (19:55 +0200)]
New tests for hspace and exclusive storage

hspace is run on clusters with exclusive storage enabled.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agohspace prints info about spindles
Bernardo Dal Seno [Thu, 6 Jun 2013 16:04:54 +0000 (18:04 +0200)]
hspace prints info about spindles

Statistics about spindles are tracked. In human-readable output, spindles
are printed only when used (i.e., exclusive storage is enabled). For
machine-oriented output, they are always there.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoAdd support for shrinking an instance spindles-wise
Bernardo Dal Seno [Thu, 6 Jun 2013 12:12:12 +0000 (14:12 +0200)]
Add support for shrinking an instance spindles-wise

This makes tiered allocation in hspace work also with respect to spindles.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoSpindles become part of htools resource spec
Bernardo Dal Seno [Thu, 6 Jun 2013 12:50:11 +0000 (14:50 +0200)]
Spindles become part of htools resource spec

Spindles are now part of resource spec. Instances get created with spindles
specified (which are just ignored when exclusive storage is disabled).

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agohtools cluster score takes spindles into account
Bernardo Dal Seno [Thu, 6 Jun 2013 10:35:28 +0000 (12:35 +0200)]
htools cluster score takes spindles into account

When exclusive storage is enabled, spindles are used instead of disk space
to compute the cluster score.

Comments and variable names in computePDsk has been changed to match the
actual code.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoUpdate spindles when moving instances in htools
Bernardo Dal Seno [Wed, 5 Jun 2013 15:44:34 +0000 (17:44 +0200)]
Update spindles when moving instances in htools

Spindles get updated, and errors raised when not enough free spindles
exist. No new error is raised when exclusive storage is disabled.

Unit tests included.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoUnit tests for htools and exclusive storage
Bernardo Dal Seno [Wed, 5 Jun 2013 20:53:10 +0000 (22:53 +0200)]
Unit tests for htools and exclusive storage

The existing tests are run also on nodes with exclusive storage enabled. The
values for spindles and exclusive storage are set in a consistent way, for
both nodes and instances.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoLoad complete instance disk information through LUXI
Bernardo Dal Seno [Tue, 4 Jun 2013 20:08:23 +0000 (22:08 +0200)]
Load complete instance disk information through LUXI

Information about size and spindles of all the disks of an instance is loaded
by the LUXI backend, instead of faking one equivalent big disk. In this way
instance policy checks are more accurate.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoLoad node spindles data in htools
Bernardo Dal Seno [Tue, 4 Jun 2013 18:49:05 +0000 (20:49 +0200)]
Load node spindles data in htools

The data structure for nodes gets a new field for free spindles, and the
existing field for total spindles gets renamed to avoid identifying it with
the node parameter that had the same name. These fields get filled with
data from the live node, when exclusive storage is enabled.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoRefactor reading live data in htools
Bernardo Dal Seno [Tue, 4 Jun 2013 16:38:11 +0000 (18:38 +0200)]
Refactor reading live data in htools

This simplifies different handling of individual items.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoExport node spindles
Bernardo Dal Seno [Tue, 4 Jun 2013 00:05:59 +0000 (02:05 +0200)]
Export node spindles

Node spindles (queried live) are exported through the LUXI, RAPI, and
iallocator interfaces.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agonode_info RPC reports info about free spindles
Bernardo Dal Seno [Mon, 3 Jun 2013 16:58:43 +0000 (18:58 +0200)]
node_info RPC reports info about free spindles

node_info RPC can be used to get information about free/total spindles.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoUpdate htools text-backend documentation
Bernardo Dal Seno [Tue, 4 Jun 2013 23:13:35 +0000 (01:13 +0200)]
Update htools text-backend documentation

Both instances and nodes have new fields.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoUse RpcResult.Warn where appropriate the cmdlib
Klaus Aehlig [Tue, 4 Jun 2013 16:11:39 +0000 (18:11 +0200)]
Use RpcResult.Warn where appropriate the cmdlib

To avoid repetitive code, make use of the functionality factored
out to the Warn method of RpcResult.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

11 years agoAdd a Warn function to RpcResult
Klaus Aehlig [Tue, 4 Jun 2013 15:19:31 +0000 (17:19 +0200)]
Add a Warn function to RpcResult

At various places, LU code just wants to warn about
a failed rpc, but continue nevertheless. So factor out
that common checking, message formatting, and notifying.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

11 years agoAdd --force option to gnt-cluster modify
Klaus Aehlig [Tue, 4 Jun 2013 12:54:41 +0000 (14:54 +0200)]
Add --force option to gnt-cluster modify

Make the force option of the ClusterSetParams Opcode available
on the command line.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

11 years agoAdd a force option to the ClusterSetParams Opcode
Klaus Aehlig [Tue, 4 Jun 2013 12:23:13 +0000 (14:23 +0200)]
Add a force option to the ClusterSetParams Opcode

If set, the op code will, in particular, try to set the master IP
on the new netdev, even if shutting down the master IP on the old
netdev failed.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

11 years agoDocument the monitoring daemon in the admin guide
Michele Tartara [Mon, 3 Jun 2013 21:58:02 +0000 (21:58 +0000)]
Document the monitoring daemon in the admin guide

The administrator's guide must include a section describing the monitoring
daemon and its API, in order for the users to be able to use it.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoFactor out the API of the monitoring daemon
Michele Tartara [Mon, 3 Jun 2013 21:53:12 +0000 (21:53 +0000)]
Factor out the API of the monitoring daemon

It will be included by both the design document and the user documentation.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoAdd monitoring agent info to the security document
Michele Tartara [Mon, 3 Jun 2013 21:11:59 +0000 (17:11 -0400)]
Add monitoring agent info to the security document

Add information regarding the monitoring agent and its security to
the security document.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoFix shadowing of library function
Michele Tartara [Mon, 3 Jun 2013 16:43:13 +0000 (12:43 -0400)]
Fix shadowing of library function

The "reads" field shadows a library function from Prelude. This commit
fixes the problem.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoExport device UUIDs to hooks and OS scripts
Christos Stavrakakis [Mon, 3 Jun 2013 16:31:26 +0000 (19:31 +0300)]
Export device UUIDs to hooks and OS scripts

Export UUIDs and names of instance NICs and disks to the environment
of OS scripts and instance related hooks.

Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agognt-cluster info: only parameters for enabled hypervisors
Klaus Aehlig [Mon, 3 Jun 2013 14:48:17 +0000 (16:48 +0200)]
gnt-cluster info: only parameters for enabled hypervisors

In the output of gnt-cluster info, restrict the hypervisor parameters
to those hypervisors that are enabled. This fixes issue 443.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>

11 years agoAdd shelltests for diskstats
Michele Tartara [Wed, 29 May 2013 21:40:30 +0000 (21:40 +0000)]
Add shelltests for diskstats

Check that the behavior of running the diskstats data collector is as
expected.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoLet the monitoring daemon provide the diskstats collector
Michele Tartara [Wed, 29 May 2013 21:08:14 +0000 (17:08 -0400)]
Let the monitoring daemon provide the diskstats collector

Add the collector to the list of those provided my the monitoring daemon.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoAdd diskstats data collector
Michele Tartara [Wed, 29 May 2013 20:29:36 +0000 (20:29 +0000)]
Add diskstats data collector

Add a new data collector responsible for gathering disk performance
statistics.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoAdd constant with the path of the diskstats
Michele Tartara [Wed, 29 May 2013 20:11:10 +0000 (20:11 +0000)]
Add constant with the path of the diskstats

This will be used by the diskstats storage collector.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

11 years agoAdd a CLI parameter for input files
Michele Tartara [Wed, 29 May 2013 20:09:22 +0000 (20:09 +0000)]
Add a CLI parameter for input files

For many data collectors it is useful (especially for testing) to have to
possibility to specify an input file.

This commit adds a generic option for doing that.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>