Statistics
| Branch: | Tag: | Revision:

root / lib @ 73086975

# Date Author Comment
73086975 08/13/2009 02:49 pm Michael Hanselmann

rlib2: Remove leftover DOC_URI constant

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

b142ef15 08/13/2009 02:41 pm Iustin Pop

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next': (28 commits)
    Fix a typo in InitCluster
    Ignore results from drained nodes in iallocator
    Ship the ethers hook
    Ethers hook, compatibility with old lockfile
    Remove a few unused imports from noded/masterd...
942be002 08/13/2009 12:53 pm Michael Hanselmann

cmdlib: Add new automatic disk replacement mode

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

02a00186 08/13/2009 12:53 pm Michael Hanselmann

TLReplaceDisks: Simplify argument checking logic

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

bec0522b 08/13/2009 12:36 pm Guido Trotter

Fix a typo in InitCluster

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>
(cherry picked from commit 022c3a0b36cb60644b6861ff27ad59202883963c)

0d853843 08/12/2009 04:58 pm Iustin Pop

Ignore results from drained nodes in iallocator

Since drained nodes could be (partially or fully) broken in iallocator,
we ignore results from these nodes when building the cluster map in
preparation for sending it to the script.

This is a cheap change for the stable branch; ideally we should not...

53bd7366 08/12/2009 01:02 pm Guido Trotter

InstanceIpToNodePrimaryIpQuery

This implements CONFD_REQ_NODE_PIP_BY_INSTANCE_IP, and maps instance ips
to primary node ips.

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

7189e790 08/12/2009 01:02 pm Guido Trotter

querylib: abstract a couple of common errors

Rather than composing them every time, we'll keep "ready-made" tuples
for unknown entries and internal errors (which is, yet, unused)

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

ae130c81 08/12/2009 01:02 pm Guido Trotter

SimpleConfigReader: add IP address lookup helpers

Add the following functions to SimpleConfigReader:
GetInstanceByIp, nic ip -> instance name
GetNodePrimaryIp, node name -> node primary ip
GetInstancePrimaryNode, instance name -> primary node

For the first one we precalculate the _ip_to_instance, so we don't have...

6daf26a0 08/12/2009 12:54 pm Guido Trotter

Add NodeRoleQuery

This implements CONFD_REQ_NODE_ROLE_BYNAME.

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

4d5db19c 08/12/2009 12:54 pm Guido Trotter

Remove unused imports from confd files

confd.server and daemons/ganeti-confd import a few modules they don't
actually use. Clean them up.

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

12ce965f 08/12/2009 12:54 pm Guido Trotter

ConfdProcessor fix init docstring

The message is an error deriving from some code moving/refactoring
happening before the initial submission

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

09444532 08/12/2009 12:54 pm Guido Trotter

Add constants for a ping confd request

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

e16e4824 08/12/2009 12:54 pm Guido Trotter

Implement confd queries

We'll start with a simple ping query, which returns ok if it gets no
query argument, and an error if it gets any. Also non-implemented query
are handled by the base ConfdQuery class, so we don't have to
special-case them in ConfdProcessor anymore....

d21eda27 08/12/2009 12:54 pm Guido Trotter

ConfdProcessor: move verification to init

During a query execution we currently verify whether we have that query
supported in our dispatch table. Since it's an error not to have it
anyway, we move this verification to the class creation, erroring out...

197b0f5d 08/12/2009 12:54 pm Guido Trotter

Add a missing node role

Apart from being a master, a candidate, offline or drained, a node can
have one more state: none of those. Adding back the normal, nice,
healthy "just" a node! :)

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

ca2a5b13 08/12/2009 12:54 pm Guido Trotter

Add a common error code for confd

If we standardize common error codes, clients can make use of them to
react, rather than trying to parse error strings.

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

e843991b 08/12/2009 12:54 pm Guido Trotter

SimpleConfigReader.GetNodeStatusFlags

Adding a way to retrieve the three node status flags, all in one go,
from SimpleConfigReader. Non-existing nodes are handled by returning
"None".

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

1e82bc80 08/11/2009 05:05 pm Michael Hanselmann

rapi: Add /2/nodes/[node_name]/storage/modify resource

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

8381fa2d 08/11/2009 05:05 pm Michael Hanselmann

rlib2: Import rapi

This fixes ganeti-rapi which was broken in commit 7a95a954.

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

7a95a954 08/11/2009 02:55 pm Michael Hanselmann

rapi: Add /2/nodes/[node_name]/storage resource

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

131178b9 08/11/2009 12:40 pm Luca Bigliardi

Constants: config directories cleanup

Use variables already defined.
Introduce ganeti CONF_DIR.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

c3029d0a 08/11/2009 11:25 am Luca Bigliardi

Ssconf IP lists: change separator

Use " " instead of ",".

Signed-off-by: Luca Bigliardi <>

5909fb97 08/10/2009 09:26 pm Luca Bigliardi

Map Node/IP in ssconf IP lists

Map the node hostname with its primary/secondary ganeti IP in ssconf.
In this way a node can discover which are its IPs simply grepping ssconf files,
thus avoiding checks depending on network configuration.

Signed-off-by: Luca Bigliardi <>...

71f27d19 08/10/2009 04:46 pm Guido Trotter

confd.server.ConfdProcessor

A ConfdProcessor is the job processor for a confd query.
It's responsible for all the processing, from unpacking it, verifying
it, to calculating the result.

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

12426ae1 08/10/2009 03:57 pm Guido Trotter

Add empty ganeti.confd module

It will be used for the confd server code, and for a basic client
library.

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

ad8b2f9b 08/10/2009 03:56 pm Guido Trotter

SimpleConfigReader: s/Reload/_Load/

Since we use it also to load the config file initially we rename the
Reload function to _Load. Then we re-export it as Reload to clients
(since for them it's a reload).

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

7bcc78e4 08/10/2009 03:56 pm Guido Trotter

SimpleConfigReader.Reload, avoid double reloads

If for some reason we try to call Reload twice but the config file
hasn't changed, we don't want to load it again. Use stat() on the file
to cheaply avoid that situation.

We also return a boolean value, according to whether we have reloaded...

b125e3b3 08/10/2009 03:56 pm Guido Trotter

Basic exceptions used by confd

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

31c2a99e 08/10/2009 03:56 pm Guido Trotter

Reply status constants for confd

These are valid values for the "status" field in objects.ConfdReply

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

18679072 08/10/2009 03:56 pm Guido Trotter

constants for the confd daemon

Adding the various basic daemon constants for confd.

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

b5f5fae9 08/10/2009 03:23 pm Luca Bigliardi

Post cluster initialization LU

Add an 'empty' logical unit to run hooks after cluster initialization.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

77b60cdb 08/10/2009 01:41 pm Guido Trotter

Upgrade be/hv params with default values

From time to time we're adding new be or hv parameters. With this patch
missing parameters get set to the default value when loading the cluster
object. This patch version also considers the case when hv/be params...

e71b560a 08/10/2009 01:41 pm Iustin Pop

Implement the KERNEL_PATH parameter for xen-hvm

For the xen-hvm hypervisor, the KERNEL_PATH parameter is needed but
today is hardcoded to a constants in the xen hypervisor library (argh!).

This patch moves this to a hypervisor constant with the default value...

703dc23d 08/10/2009 01:41 pm Iustin Pop

Move HVM's device_model to a hypervisor parameter

This moves yet another hardcoded value to a hypervisor parameter. I
removed the 64/32 difference as it doesn't seem valid to me - it's more
of a local site config rather than arch config.

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

d2d7d5c3 08/10/2009 01:41 pm Guido Trotter

objects: add configuration upgrade system

Add a very basic configuration update mechanism to objects.
An object can define the UpgradeConfig method, which will be called at
init time, and use it to fill in missing defaults in the configuration.
In the future we may want to make it more complex, for example adding...

aafb303d 08/10/2009 01:41 pm Guido Trotter

Add cluster-init --no-etc-hosts parameter

If --no-etc-hosts is passed in at cluster init time we set a new
parameter in the cluster's object to false, and avoid adding nodes to
the hosts file. The UpgradeConfig function is used to set the value to
True, when upgrading from an old configuration version....

40765aa0 08/07/2009 02:32 pm Guido Trotter

serializer.DumpSignedJson

Don't indent the final message.

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

a0c26bdb 08/07/2009 02:32 pm Guido Trotter

SimpleConfigReader: add serial numbers reading

GetConfigSerialNo and GetClusterSerialNo return respectively the serial
number for the config and for the cluster object.

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

89c52785 08/07/2009 02:32 pm Guido Trotter

constants: confd node roles

confd will return the node role as an integer, which represents one of
the mutually exclusive roles a node can be in.

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

8486ffc0 08/07/2009 02:22 pm Guido Trotter

Merge branch 'master' into next

  • master:
    Update NEWS and version for 2.0.3 release
    devel/upload: revert rsync -p
    export: add meaningful exit code
    Fix detecting of errors in export
    Implement gnt-cluster check-disk-sizes
    rpc: add rpc call for getting disk size...
ea1518af 08/07/2009 02:19 pm Guido Trotter

constants: confd query types

Initially confd will support only two queries:

CONFD_REQ_NODE_ROLE_BYNAME
Given a node name, return its role.

CONFD_REQ_NODE_PIP_BY_INSTANCE_IP
Given an instance ip, return its node primary ip.
This rather weird query is the basis for ganeti nbma lookup....

1fe93c75 08/07/2009 12:24 pm Guido Trotter

SimpleConfigReader.Reload()

Rather than initializing the config statically at class creation time,
we load it every time Reload() is called.

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

18d750b9 08/07/2009 12:24 pm Guido Trotter

Confd{Request,Reply} objects

These objects are used to store confd queries and replies.

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

4e9dac14 08/07/2009 12:24 pm Guido Trotter

Serializer, remove salt_verifier functionality

The salt needs to be returned anyway, so we don't have to add another
key for the sender to recognize which request an answer is answering, so
all that infrastructure is useless. :(

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

a8a76bc2 08/07/2009 12:08 pm Guido Trotter

asycnotifier.AsyncNotifier

AsyncNotifier is a special asyncore class that delivers inotify events
asynchronously.

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

01cf7dbe 08/06/2009 08:41 pm Guido Trotter

SimpleConfigReader: Handle errors when loading

Handling both IOErrors and ValueErrors (thrown by the simplejson loader)

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

3f71b464 08/06/2009 07:36 pm Guido Trotter

ssconf.CheckMasterCandidate

This function checks that the current node is a master candidate, and
terminates otherwise. It will be used upon ganeti-confd startup.

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

f208978a 08/06/2009 07:13 pm Michael Hanselmann

Convert ldisk_degraded to tri-state value

This allows us to report “uncertain” states (LDS_UNKNOWN) for cases
where the code can't easily detect or report what's wrong with a
block device.

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

74f37195 08/06/2009 07:13 pm Michael Hanselmann

Add constants for local disk status

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

ddfe2228 08/06/2009 07:13 pm Michael Hanselmann

Handle None result from BlockdevFind

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

98825740 08/06/2009 07:13 pm Michael Hanselmann

objects.BlockDevStatus: Remove ToLegacyStatus

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

8113a52e 08/05/2009 08:05 pm Luca Bigliardi

Add master candidates IPs informations to ssconf

This will be used when querying confd, in order not to rely on DNS being
available.

Signed-off-by: Luca Bigliardi <>
Signed-off-by: Guido Trotter <>
Reviewed-by: Guido Trotter <>

4c14965f 08/05/2009 05:55 pm Guido Trotter

ConfigObject.ToDict() only export non-None values

The method is changed to a normal loop, to avoid calling getattr()
twice. Also getstate is changed to just use ToDict() by default.

This should also make getstate work for objects which have to
override the ToDict function because they contain other objects....

f9780ccd 08/05/2009 05:55 pm Luca Bigliardi

Add nodes IPs informations to ssconf

Having a list of primary/secondary IPs of all the nodes in ssconf can be useful
for scripts/hooks which need to automatically configure network properties for
the whole cluster (e.g.: ipsec/netfilter rules) without relying on a...

59672ca3 08/05/2009 04:09 pm Guido Trotter

serializer: fix a few docstrings

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

084f05a5 08/05/2009 02:19 pm Iustin Pop

export: add meaningful exit code

Currently ‘gnt-backup export’ always returns exit code zero, even in the
face of complete failure during backup (only failure to stop/start the
instance will cause job failure and thus non-zero exit code). This is
bad, since one cannot script the backup....

a48b08bf 08/05/2009 02:19 pm Iustin Pop

Fix detecting of errors in export

This should fix issue 61, by explicitely calling bash (which is is now a
non-explicit dependency) and setting the pipefail command.

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

36145b12 08/05/2009 12:13 pm Michael Hanselmann

Use objects for blockdev_getmirrorstatus RPC call result

This patch changes the return type for backend.BlockdevGetmirrorstatus from
a list of tuples to a list of objects.BlockDevStatus instances.

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

96acbc09 08/05/2009 12:12 pm Michael Hanselmann

Use object for blockdev_find RPC call result

This patch changes the return type for backend.BlockdevFind to an object
(objects.BlockDevStatus). Before a tuple was used. Adding more values to
this tuple causes a lot of work. Converting the result to an object with...

60975797 08/04/2009 05:36 pm Iustin Pop

Implement gnt-cluster check-disk-sizes

This patch adds a new opcode and lu for checking disk sizes. Currently
it does only top-level disk verification, and also doesn't check
primary/secondary node size mismatches (these two are added as TODOs in
the Exec() function of the LU)....

968a7623 08/04/2009 05:35 pm Iustin Pop

rpc: add rpc call for getting disk size

Note that this exports the disk size as bdev returns it, in bytes. The
value will be converted to MiB in cmdlib.

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

fcff3897 08/04/2009 05:35 pm Iustin Pop

bdev: Add function for reading actual disk size

This patch adds a GetActualSize for block devices that returns the
actual disk size. It is done using blockdev (and stat for file storage).

While this could be done via reading /sys/block/N/size, that is not as...

b4ec07f8 08/04/2009 05:35 pm Iustin Pop

Implement --ignore-size in activate-disks

This patch modified OpActivateDisks, LUActivateDisks and gnt-instance
activate-disks to support and pass this option to
_AssembleInstanceDisks.

The patch is quite trivial I think; there should be no issues from it...

e3443b36 08/04/2009 05:35 pm Iustin Pop

Add ignore size support in _AssembleInstanceDisks

This patch adds an optional parameter to _AssembleInstanceDisks that
allows ignoring of size information by making a copy of the disk
structure and setting the size to zero.

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

a805ec18 08/04/2009 05:35 pm Iustin Pop

Add a objects.Disk.UnsetSize() method

This method recursively resets the size of the disk and its children to
zero.

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

60bca04a 08/04/2009 05:34 pm Iustin Pop

bdev: allow ignoring of size in Assemble()

This patch changes the DRBD8 class (the only one to use the size in
Assemble) to ignore the size in Assemble when a zero size is passed.
This will allow activation of disks even when the size recorded in the
configuration is wrong....

a4d138b7 08/04/2009 02:46 pm Michael Hanselmann

cmdlib: Fix parameters for storage.FileStorage

It wants a list of directories, not a string.

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

efb8da02 08/04/2009 12:44 pm Michael Hanselmann

cmdlib: Add opcode to modify storage unit fields

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

8979196a 08/04/2009 12:44 pm Michael Hanselmann

Add RPC calls to modify storage fields

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

9b648ee7 08/04/2009 12:44 pm Michael Hanselmann

storage: Add function to modify fields

This allows the “allocatable” flag on LVM PVs to be changed.

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

d91427ea 08/04/2009 11:52 am Iustin Pop

Merge commit 'origin/branch-2.1' into feature/containers

  • commit 'origin/branch-2.1': (66 commits)
    Add automated disk repair changes to design doc
    Add review script
    Implement “gnt-node physical-volumes” command
    Add new opcode to list physical volumes...
9e5442ce 08/03/2009 04:42 pm Michael Hanselmann

Add new opcode to list physical volumes

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

6032697c 08/03/2009 04:42 pm Michael Hanselmann

storage: Use constants.py instead of local constants

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

54878c54 08/03/2009 04:42 pm Michael Hanselmann

storage: Fix semantics for directory size

The actual directory size is "used" space, not the total space on
the filesystem.

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

e8d563f3 08/03/2009 02:51 pm Iustin Pop

Add a Copy method to object.ConfigObject

This small patch adds a simple Copy method that is can be used for
'throw-away' copies of objects.

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

17cb7017 08/03/2009 12:25 pm Michael Hanselmann

Merge branch 'next' into branch-2.1

  • next:
    Add “gnt-job watch” command
    jqueue: Fix error when WaitForJobChange gets invalid ID
    jqueue: Update message for cancelling running job
6e237482 08/03/2009 12:22 pm Michael Hanselmann

jqueue: Fix error when WaitForJobChange gets invalid ID

When JobQueue.WaitForJobChange gets an invalid or no longer existing job ID it
tries to return job_info and log_entries, both of which aren't defined yet.

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

a9e97393 08/03/2009 12:20 pm Michael Hanselmann

jqueue: Update message for cancelling running job

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

abae1b2b 08/03/2009 12:12 pm Michael Hanselmann

cmdlib: Change tasklet logging to debug level

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

1c482bab 07/31/2009 02:31 pm Michael Hanselmann

rapi: Add /2/nodes/[node_name]/migrate resource

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

80cb875c 07/31/2009 02:30 pm Michael Hanselmann

cmdlib: Add new opcode to migrate node

It migrates all primary instances from the node to their secondaries.

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

3fb8680a 07/30/2009 07:36 pm Michael Hanselmann

rapi: Add default parameter to _checkIntVariable

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

b4a9eb66 07/30/2009 07:36 pm Michael Hanselmann

cmdlib: Add logging for tasklets

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

3a012b41 07/30/2009 07:36 pm Michael Hanselmann

cmdlib: Fix tasklets handling if no tasklets are added

If no tasklets are added, self.tasklets evaluates to None. The LU base
class will throw an exception because it thinks the derived class doesn't
implement the right methods.

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

73452f12 07/30/2009 02:02 pm Michael Hanselmann

rapi: Add /2/[node_name]/evacuate resource

This can be used to evacuate a node.

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

e337de97 07/29/2009 06:56 pm Michael Hanselmann

Add RPC calls for storage unit list

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

ac2d0fe4 07/29/2009 03:11 pm Michael Hanselmann

Add first implementation of generic storage unit framework

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

3f6a47a8 07/29/2009 03:09 pm Michael Hanselmann

utils: Add functions to calc directory size and free space on filesystem

These will be used by the new storage unit framework.

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

2503680f 07/29/2009 11:59 am Guido Trotter

Extend call_node_start_master rpc with no_voting

When the parameter is set to True and start_daemons is also True,
ganeti-masterd will be started with the new --no-voting --yes-do-it
options.

This new option is set to True only on masterfailover, when no_voting is...

3b1b0cb6 07/26/2009 01:31 pm Guido Trotter

Collapse SSL key checking/overriding for daemons

Signed-off-by: Guido Trotter <>

04ccf5e9 07/25/2009 05:32 pm Guido Trotter

Collapse daemon's main function

With three ganeti daemons, and one or two more coming, the daemon's main
function started becoming too much cut&pasted code. Collapsing most of
it in a daemon.GenericMain function. Some more code could be collapsed
between the two http-based daemons, but since the new daemons won't be...

dae3fdd2 07/24/2009 03:05 pm Guido Trotter

Slightly abstract the daemon logfile lookup

The original LOG_<DAEMON_NAME> constants for daemon logfiles are gone.
In their place there is a DAEMONS_LOGFILES dict, indexed by daemon name.

This is a minor change with the objective to uniform most of the
daemon's main() functions code, which is very similar one to the other....

83052f9e 07/24/2009 03:05 pm Guido Trotter

Remove <DAEMON>_PID constants

The <DAEMON>_PID constants were created to reference a daemon pid file,
but actually contain a daemon's name, because the various functions that
work with pidfiles abstract the filename from the daemon name
themselves. Removing the constants and using the actual daemon name...

8c96d01f 07/24/2009 03:05 pm Guido Trotter

Move rapi to GetDaemonPort

Currently rapi is the only daemon which accepts a port option, rather
than querying its own port from services, and failing back to the
default if not found. Changing this to conform to what other daemons do.

Also update the ganeti-rapi(8) manpage...

cd50653c 07/24/2009 03:04 pm Guido Trotter

Change GetNodeDaemonPort to GetDaemonPort in utils

GetNodeDaemonPort is used to lookup the node daemon port in the services
file, and if not found to return the default one. We make it a generic
function, which accepts the daemon name in input, so that it can be used...

775c6d3e 07/24/2009 03:01 pm Guido Trotter

Merge branch 'next' into branch-2.1

  • next:
    lvmstrap: Change diskinfo to use GenerateTable
    Get rid of constants.RAPI_ENABLE
    Remove references to utils.debug
    ganeti-rapi, replace hardcoded exit value
    Add the bind-address option to ganeti-rapi
    noded: Abstract hard-coded sys.exit value...
e1876432 07/24/2009 11:35 am Guido Trotter

Get rid of constants.RAPI_ENABLE

This constant is unused, except in qa. Removing it since it's always True.

This patch also removes the unused qa_rapi.PrintRemoteAPIWarning
function, and removes a comment about temporary constants "until we have
cluster parameters"....

464243a7 07/23/2009 04:19 pm Michael Hanselmann

cmdlib: Add init to Tasklet class

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

68b1fcd5 07/23/2009 12:07 pm Guido Trotter

Remove references to utils.debug

Various modules set it to True when called in debugging mode, but the
utils module supports no such global.

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