Statistics
| Branch: | Tag: | Revision:

root / lib / masterd @ 690e509d

# Date Author Comment
76b920e6 09/24/2013 09:17 am Thomas Thrainer

Display node names instead of node UUIDs

Display resolved node names instead of node UUIDs in a couple of
warnings and log messages.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Jose A. Lopes <>

a57e502a 09/24/2013 09:17 am Thomas Thrainer

Remove physical_id field from disk object

The 'physical_id' field of disk objects is no longer used, so remove it.
Also, all references are removed together with the code which made sure
that the physical_id is up to date when transmitted over RPC.

Signed-off-by: Thomas Thrainer <>...

0c3d9c7c 09/24/2013 09:17 am Thomas Thrainer

Replace physical_id with dynamic_params

The disk field 'physical_id' has to be kept up to date whenever a disk
object is sent to a node via RPC. This is done with the SetDiskID method
manually, which is a source of bugs.

This patch replaces the use of 'physical_id' with a new field names...

6da90c0a 08/28/2013 10:13 pm Helga Velroyen

Fixing renaming of DISK_LD_DEFAULTS

This fixes the somewhat over-eager renaming of
DISK_LD_DEFAULTS to DISK_DT_DEFAULTS, which clashes
with another occurence of DISK_DT_DEFAULTS. This
patch just undoes the renaming and additionally fixes
a test regarding shared file storage....

cd3b4ff4 08/28/2013 06:19 pm Helga Velroyen

Replace LD_* constants with DT_* constants

LD_* constants are basically like DT_* constants, except
for that both file and shared file were mapped to file.
In order to not having to maintain three slightly different
sets of disk-related constants (DT, LD and ST), we merge...

109a21b1 07/03/2013 07:57 pm Helga Velroyen

Fix typo in iallocator

Signed-off-by: Helga Velroyen <>
Reviewed-by: Klaus Aehlig <>

da803ff1 07/02/2013 12:47 pm Helga Velroyen

Extend RPC call 'node_info' by storage parameters

This patch extends the actual RPC call to accept storage
parameters with each storage units. It adjusts all code
which performs this code by integrating the 'exclusive
storage' flag into the lvm storage unit....

f43c898d 07/01/2013 02:40 pm Bernardo Dal Seno

Export CPUs used by the node OS

They are exported through the LUXI, RAPI, and IAllocator interfaces.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Klaus Aehlig <>

9353adde 06/27/2013 12:32 pm Helga Velroyen

iallocator: storage processing accepts space_info structure

This is a small refactoring to make the processing of
the storage space information not accept a node info
result, but the more specific space info structure instead.

Signed-off-by: Helga Velroyen <>...

b82d7182 06/27/2013 12:08 pm Helga Velroyen

iallocator: get rid of MakeLegacyNodeInfo

So far, the iallocator makes a node info call, converts
the result into a legacy node info structure and then
retrieves various values from it. This patch removes
the call to MakeLegacyNodeInfo completely, by letting the...

0ac34c90 06/27/2013 12:08 pm Helga Velroyen

iallocator: factor out instance memory summation

The iallocator adjusts the free memory by a calculation
of how much memory is actually currently used by instances
on the node. This calculation is rather complicated and
deserves its own function to increase testability. No...

11aa3ca5 06/27/2013 12:08 pm Helga Velroyen

iallocator: extract storage info directly from node info

So far, the iallocator made a node info RPC call, converted
the result into a legacy node info format and then extracted
the storage information from that. This patch removes the
middle step of this procedure, skipping the legacy node info...

20529708 06/27/2013 12:05 pm Helga Velroyen

iallocator: computation of storage data

This patch extracts the processing of the storage-related
data from the RPC call 'node_info' in a separate function
to increase testability. In addition, this patch contains
unit tests for this function.

Signed-off-by: Helga Velroyen <>...

0f70b3fb 06/27/2013 12:05 pm Helga Velroyen

iallocator: factor out 'get_attr' method

This patch extracts an inline 'get_attr' method to extract
data from the result of the RPC call 'node_info'. It was so
far an inline function in the middle of a bigger method, which made
the code hard to read.

Signed-off-by: Helga Velroyen <>...

c9c4b92d 06/27/2013 12:05 pm Helga Velroyen

iallocator: prepare RPC call 'node_info'

This patch does a small refactoring in the allocator. It extracts
the preparation and actual call of the 'node_info' call into a
separate function. This is done for better testability. No functional
changes otherwise....

da4a52a3 06/20/2013 05:04 pm Thomas Thrainer

Index instances by their UUID

No longer index instances 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...

32389d91 06/14/2013 02:43 pm Helga Velroyen

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

d0d7d7cf 06/13/2013 12:32 pm Thomas Thrainer

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

1c3231aa 06/13/2013 12:32 pm Thomas Thrainer

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

0200a1af 06/12/2013 10:18 am Helga Velroyen

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

a295eb80 06/12/2013 10:18 am Helga Velroyen

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

06fb92cf 06/07/2013 04:10 pm Bernardo Dal Seno

Export node spindles

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

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Klaus Aehlig <>

0e514de1 06/03/2013 04:15 pm Bernardo Dal Seno

Export instance disk spindles

Instance disk spindles can be queried via LUXI and RAPI, and are exported
through the allocator interface. This is a prerequisite for htools to
handle spindles.

The length of a RAPI query including all the instance fields now has become...

342a9b3b 05/31/2013 04:36 pm Bernardo Dal Seno

Merge branch 'stable-2.8' into master

  • stable-2.8:
    Document users-setup tool
    Adjusting permissions after confd start
    Ensure the queue socket has the right permissions
    Update IAllocator interface documentation
    Add NEWS entry for hail honoring networks...
98ae702b 05/29/2013 10:52 am Thomas Thrainer

Export connected networks to IAllocator

IAllocators should not put instances on nodes in nodegroups which are
not connected to the network the instance should be connected to.
Therefore, export the networks a node group is connected to to the
IAllocator, so it can account for this restriction....

1d4a4b26 05/28/2013 04:05 pm Thomas Thrainer

Add disks_active to configuration

This flag tracks if the disks of an instace are supposed to be active.
That's the case when an instance is running or when its disks got
activated explicitly (and in a couple of other cases).
It will be used by watcher to re-activate disks after a node reboot....

4b92e992 05/21/2013 03:13 pm Helga Velroyen

RPC 'node_info': <storage_type,key> instead of vg_names

This replaces the field 'vg_names' in the RPC call of 'node info' by
'storage_units'. A storage unit is a tuple <storage_type,key>
and a generalization of a vg_name. The list of vg names is replaced by...

9e946416 04/10/2013 02:53 pm Klaus Aehlig

The disk size of a diskless instance is 0, not None

For diskless instances it is still reasonable to sum up the disk usage
of all the (zero) disks, resulting in the empty sum. This uniformity
also has the advantage that iallocators (like hail) do not have to do...

36a566e8 03/04/2013 12:35 pm Iustin Pop

Allow iallocator to work without LVM storage

Currently, the iallocator interface requires LVM storage, due to the
way it computes the node storage information.

By changing the code to understand that GetVGName() can return None,
and by setting the disk_total/disk_free node parameters to the value...

473d87a3 02/15/2013 12:14 pm Iustin Pop

Rename lib/objectutils to outils.py

Back when this was introduced, I mentioned that it breaks heavily tab
completion (ob<TAB> doesn't work anymore), but at that moment I didn't
have a suggestion what to name it. I think outils is good and short
enough, and doesn't conflict with anything else, so here it goes....

319322a7 12/21/2012 06:45 pm Bernardo Dal Seno

Call node_info RPCs with the exclusive_storage flag

The flag is read from the configuration and passed to the RPC.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>

1a3c5d4e 12/21/2012 06:45 pm Bernardo Dal Seno

Add exclusive_storage parameter to node_info RPC

The flag is passed to the low-level functions that need it, but it's not
yet used. Also, RPCs get just a default value for now.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>

f1222089 12/21/2012 11:24 am Dimitris Aragiorgis

Fix iallocator for nodegroups with no tags

_ComputeNodeGroupData() raises error if a group has no tags
when list(gdata.tags) is invoked. Use “gdata.GetTags()” instead.

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

376631d1 12/20/2012 05:06 pm Constantinos Venetsanopoulos

Implement the External Storage Interface

With this commit we introduce the External Storage Interface
to Ganeti, abbreviated: ExtStorage Interface.

The ExtStorage Interface provides Ganeti with the ability to interact
with externally connected shared storage pools, visible by all...

fb60bc6a 12/04/2012 07:54 pm Michael Hanselmann

iallocator: Add node whitelist

In the future instance creations might have a lock on all nodes as was
the case until the implementation of opportunistic locking. Nodes for
which the lock is not held will be shown to the iallocator plugin as if
they were marked offline....

3c286190 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass pep8 (make lint)

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

2c9fa1ff 11/20/2012 11:16 am Iustin Pop

Cleanup ht's use of positive/strictpositive

Currently, ht.py uses a bad terminology for positive/non-negative
numbers. Per http://en.wikipedia.org/wiki/Positive_number, this is the
correct terminology:

- A number is positive if it is greater than zero.
- A number is negative if it is less than zero....

659d769d 10/17/2012 07:45 pm Dato Simó

Merge branch 'devel-2.6' into master

  • devel-2.6:
    htools-excl.test: add test case for exclusion tags in hbal
    Instance.hs: rename 'tags' to 'exclTags', provide 'allTags'
    Group.hs: add 'allTags'; adjust loaders and test data for it
    Add hbal-excl-tags.data to Makefile.am, missed in 0397694...
579f4ee5 09/26/2012 03:57 pm René Nussbaumer

Verify the node count just if the allocation was successful

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

32eae1ec 09/24/2012 02:48 pm René Nussbaumer

Fix REQ_RESULT for MultiInstanceAllocRequest

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

69b0d82a 09/24/2012 02:47 pm René Nussbaumer

Fix a validation issue

We want to validate the result only if the iallocation run was a
success.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

9c492c2d 09/18/2012 06:09 pm Michael Hanselmann

Migrate lib/masterd/instance.py from constants to pathutils

File system paths moved from constants to pathutils.

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

6953756f 09/12/2012 04:14 pm René Nussbaumer

Small style adjustment

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

3d7d3a12 09/12/2012 04:14 pm René Nussbaumer

Make iallocator request types more strict

This adapts the type of some request input fields to more stricter ones.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

776b6291 09/12/2012 04:14 pm René Nussbaumer

Rework the required_nodes field

This was used to verify the result of instance allocation. However, this
is not logic which belongs to the cmdlib rather than to the iallocator
request itself. So abstract it by its own function. And update the
ValidateResult accordingly....

c269efc3 09/12/2012 12:27 pm René Nussbaumer

Disable pylint warnings for unknown members

For some reason pylint can't determine, that the members are calculated
upon runtime and complains. This is weird as the same mechanism works on
opcode/objects. I haven't found the issue for it yet, so let's just...

b1e47e2d 09/12/2012 12:27 pm René Nussbaumer

Adding new multi-allocation request

Now that we've the refactoring done, we can easily add the new mode and
everything works.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

0fcd0cad 09/12/2012 12:27 pm René Nussbaumer

Refactor IAllocator code

The IAllocator class was handling all the requests on its own, passing
in parameters on top level which works, but is hard to maintain and not
flexible.

With the upcoming change to the IAllocator for MultiAllocate we can't
use the toplevel parameters anymore. Therefore, we refactor the code...

0c77c331 09/12/2012 12:27 pm René Nussbaumer

Move _CalculateGroupIPolicy and _ComputeDiskSize

This makes it possible to better untangle the IAllocator code, which
would otherwise lead to a recursive import structure as we need those
helpers there as well.

Signed-off-by: René Nussbaumer <>...

62bfbc7d 05/10/2012 02:30 pm René Nussbaumer

cmdlib: Adapt the rpc calls

The following (blockdev) RPC calls are not converted yet (as they are
not straight forward or need more research):

  • bdev_sizes
  • blockdev_remove
  • blockdev_shutdown
  • blockdev_removechildren
  • blockdev_close
  • blockdev_getsize...
bc5d0215 12/01/2011 01:03 pm Andrea Spadaccini

Add basic support for disk parameters

objects.py: * add disk parameters to Disk, Cluster, NodeGroup.

constants.py: * add dictionaries that will hold types and default values for disk
parameters (for now, empty).

test/ganeti.constants_unittest.py:...

b8c160c1 11/01/2011 05:17 pm Michael Hanselmann

rpc: Change {import,export}_start to take source/dest in single argument

This simplifies the RPC argument encoding code.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

f8326fca 09/29/2011 12:41 pm Andrea Spadaccini

Move _TimeoutExpired to utils

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

6613661a 08/03/2011 05:42 pm Iustin Pop

Instance transfer: export component name to backend

This modifies the RPC layer to export the component name too to the
backend, so that it can be used in log files and messages.

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

5e26c4d9 08/03/2011 05:42 pm Iustin Pop

Instance transfer: add argument for the 'component'

Currently, transfer data is done mainly with just the instance name,
but when we have instances with multiple disks this is not enough to
distinguish between the different transfers being done for the
instance....

194e8648 07/29/2011 03:36 pm Iustin Pop

Replace %r with '%s' in masterd/instance.py

I still don't know why Michael is a fan of %r, but in the meantime
this patch changes:

WARNING: import u'import-2011-07-29_01_39_33-y3gZKV' on node1 failed:
Exited with status 1

into:

WARNING: import 'import-2011-07-29_01_39_33-y3gZKV' on node1 failed:...

c9300bb3 02/03/2011 04:52 pm Iustin Pop

Import-export: fix logging of daemon output

In case of failures, the recent daemon output is logged as %r on a
list of unicode strings, which results in the (ugly):

Thu Feb 3 05:13:34 2011 snapshot/0 failed to send data: Exited with status 1 (recent output: [u' DUMP: Date of this level 0 dump: Thu Feb 3 05:13:18 2011', u' DUMP: Dumping /dev/mapper/6369a5f7-1e67-4d0d-a4f0-956b3649c6d7.disk0_data.snap-1 (an unlisted file system) to standard output', u' DUMP: Label: none', u' DUMP: Writing 10 Kilobyte records', u' DUMP: mapping (Pass I) [regular files]', u' DUMP: mapping (Pass II) [directories]', u' DUMP: estimated 54301 blocks.', u' DUMP: Volume 1 started with block 1 at: Thu Feb 3 05:13:19 2011', u' DUMP: dumping (Pass III) [directories]', u' DUMP: dumping (Pass IV) [regular files]', u'socat: E SSL_write(): Connection reset by peer', u"dd: dd: writing `standard output': Broken pipe", u' DUMP: Broken pipe', u' DUMP: The ENTIRE dump is aborted.'])...

fb87cbeb 01/27/2011 07:07 pm Michael Hanselmann

Merge branch 'devel-2.3' into devel-2.4

  • devel-2.3:
    Wait for master to become available on initialization
    Start all daemons on cluster initialization
    Clarify job processing order in admin guide
    Improve option descriptions
    Remove two unused variables...
4478301b 01/20/2011 02:15 pm Michael Hanselmann

Improve import/export timeout settings

With this patch, the exporting node will retry to connect a few times.
The receiving node will make use of the master's increased timeout (see
previous patch).

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

800ac399 12/02/2010 05:44 pm Iustin Pop

Make snapshots multi-vg aware

Currently, the Snapshot() function of LogicalVolume returns only the
logical volume path, with the assumption that we only have one VG. But
with the recent changes, it makes more sense to return the full data (vg
and lv) from it, so as to not require computing it in the master....

ba5619c2 11/29/2010 05:05 pm Michael Hanselmann

Use IPv6 for import/export

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

b705c7a6 08/18/2010 11:27 am Manuel Franceschini

Support for resolving hostnames to IPv6 addresses

This patch enables IPv6 name resolution by using socket.getaddrinfo
instead of socket.gethostbyname_ex.

It renames the HostInfo class to Hostname and unifies its use throughout
the code. This is achieved by using static calls where no object is...

85b3901b 08/10/2010 07:35 pm Michael Hanselmann

masterd.instance: Add missing argument

_DiskTransferPrivate takes three parameters, not two.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Manuel Franceschini <>

a744b676 07/09/2010 04:37 pm Manuel Franceschini

Introduce lib/netutils.py

This patch moves network utility functions to a dedicated module.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

403f5172 06/28/2010 02:04 pm Guido Trotter

Remove pred from compat.any/all

This makes it compatible with the python builtin, and we can even use
the builtin when running under the right version of python. The all and
any functions are renamed to _all and _any, so that they can be tested,
and (non)existing unittests are updated (translation: there are no unit...

d51ae04c 06/14/2010 07:58 pm Michael Hanselmann

Use import/export magic for backup/import and inter-cluster moves

This should prevent bugs in our code from accidentally overwriting
disks.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

5bb95572 06/14/2010 07:57 pm Michael Hanselmann

Disable compression for all intra-cluster imports/exports

Tests have shown that usually we're CPU-bound for intra-cluster
imports/exports. Disabling compression will help with this.

Some versions of OpenSSL, depending on the build options, also
compress transparently. This will need further work in Ganeti....

af1d39b1 06/14/2010 07:57 pm Michael Hanselmann

backend: Add support for import/export magic

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

acd65a16 06/14/2010 07:56 pm Michael Hanselmann

import/export: Validate remote host/port

The hostname and port received from the remote cluster should
be validated, just in case.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

e6b8d02d 06/08/2010 04:12 pm Michael Hanselmann

Show formatted ETA for disk sync and import/export

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

1a2e7fe9 06/08/2010 04:12 pm Michael Hanselmann

import/export: Show progress updates to user

With this patch, we show progress updates approx. once per minute.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

a5310c2a 05/21/2010 06:18 pm Michael Hanselmann

Allow control of import/export compression method

For exports to/imports from the same machine, compression will
not be used anymore.

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

eb630f50 05/21/2010 06:17 pm Michael Hanselmann

Put common import/export daemon options into object

The X509 key name and CA are passed from cmdlib all the way to
the backend import/export daemon. With the addition of an option
to choose the compression method, another parameter would have
to be passed all the way. By moving these options to a separate...

9bf56d77 05/18/2010 06:53 pm Michael Hanselmann

Implement opcode changes for remote-import

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

4a96f1d1 05/18/2010 06:53 pm Michael Hanselmann

Implement opcode changes for remote-export

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

1410fa8d 05/18/2010 06:53 pm Michael Hanselmann

Add opcode to prepare export

To prepare a remote export, the X509 key and certificate need to be generated.
A handshake value is also returned for an easier check whether both clusters
share the same cluster domain secret.

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

387794f8 05/04/2010 03:38 pm Michael Hanselmann

LUExportInstance: Move exporting code to helper class

This will simplify the implementation of intra-cluster instance
exports and reduces the number of local variables in
LUExportInstance.Exec.

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

5d97d6dd 04/23/2010 05:50 pm Michael Hanselmann

cmdlib: Add utility to transfer instance data within the cluster

This is yet another wrapper around the instance import/export utility
classes, providing an even simpler API for instance imports/exports within
the same cluster.

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

033a1d00 04/23/2010 05:50 pm Michael Hanselmann

cmdlib: Add utility for instance data import/export

Interpreting the backend's import/export daemon status is a bit tricky.
This utility code keeps track of multiple transfers at the same time.
Users can supply callback functions to react to events.

Timeouts are currently hardcoded. Intra-cluster instance moves will likely...

dc101ecc 04/21/2010 04:56 pm Michael Hanselmann

Add ganeti.masterd module

This will be used to keep masterd-specific code.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>