Statistics
| Branch: | Tag: | Revision:

root / daemons / ganeti-noded @ 2971c913

History | View | Annotate | Download (20.6 kB)

# Date Author Comment
622533d5 05/19/2009 04:43 pm Iustin Pop

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next': (25 commits)
    Move more hypervisor strings into constants
    Add -H/-B startup parameters to gnt-instance
    call_instance_start: add optional hv/be parameters
    Fix gnt-job list argument handling...
e557bae9 05/06/2009 02:56 pm Guido Trotter

Inform the OS create script of reinstalls

Sometimes reinstalls are slightly different than new installs. For
example certain partitions may need to be preserved accross reinstalls.
In order to do that on a per-os basis we pass in the INSTANCE_REINSTALL
variable to inform the create script about when a reinstall is...

cf192249 05/05/2009 04:41 pm Guido Trotter

ganeti-noded: add bind address option

This allows ganeti-noded to bind only on one interface rather than all
the ones on the machine. The default behaviour doesn't change.

Signed-off-by: Guido Trotter <>

9dae41ad 02/27/2009 07:08 pm Guido Trotter

Create runtime dir in bootstrap

Some hypervisors (KVM) need RUN_GANETI_DIR to exist even at cluster init
time. This patch creates it in InitCluster just before hv parameter
checking. Since the code to make list of directories is already repeated
twice in the code, and this would be the third time, we abstract it into...

07813a9e 02/24/2009 05:25 pm Iustin Pop

Remove the extra_args parameter in instance start

This patch removes the extra_args parameter and instead switches the
instance to the HV_KERNEL_ARGS hypervisor option.

This is a big change, but it's a needed cleanup, this extra parameter on
all RPC calls is not generic and we also need to have a persistent value...

1fae010f 02/12/2009 09:30 am Iustin Pop

Switch the instance_shutdown rpc to (status, data)

This patch changes the return type from this RPC call to include status
information and renames the backend method to match the RPC call name.

The patch is a little bigger than the reboot one, since this call is...

489fcbe9 02/12/2009 09:30 am Iustin Pop

Switch the instance_reboot rpc to (status, data)

This small patch changes the return type from this RPC call to include
status information and renames the backend method to match the RPC call
name.

Reviewed-by: ultrotter

f2ffd244 02/11/2009 12:20 pm Guido Trotter

ganeti-noded: Create LOCK_DIR if missing

We need this directory for locks, so if for any reason it's not there
we'll create it. The permissions are the standard /var/lock permissions.

Reviewed-by: iustinp

821d1bd1 02/09/2009 04:03 pm Iustin Pop

Uniformize some function names in backend.py

Currently, the names of the functions in backend.py that are actually
RPC procedures and are called from ganeti-noded are not corresponding to
the RPC names. This makes it hard to actually see which functions are...

23829f6f 02/09/2009 04:03 pm Iustin Pop

rpc.call_blockdev_find: convert to (status, data)

This patch converts the call_blockdev_find - which searches for block
devices and returns their status - to the (status, data) format. We also
modify the backend function name to match the rpc call.

Reviewed-by: ultrotter

1268d6fd 02/09/2009 12:31 pm Iustin Pop

Fix handling OS errors in AddOSToInstance

This patch fixes the error handling in the add OS to instance function
with regard to invalid OSes. Previously, we didn't handle any such
errors, with the end result that the user would have to look in the node
daemon log....

6906a9d8 01/21/2009 11:54 am Guido Trotter

Add calls in the intra-node migration protocol

Currently the hypervisor is expected to do all the migration from the
source side. With this patch we also add the option of passing some
information to the target side, and starting some operation there.

As a bonus, a function to cleanup any started operation is included....

6b93ec9d 01/13/2009 05:20 pm Iustin Pop

Forward-port DrbdNetReconfig

This is a modified forward-port of DrbdNetReconfig and their associated
RPCs. In Ganeti 2.0, these functions will be used for two things:
- live migration (as in 1.2)
- and for other network reconfiguration tasks, since DRBD8.Attach()...

7d88772a 01/09/2009 02:52 pm Iustin Pop

Rework the daemonization sequence

The current fork+close fds sequence has deficiencies which are hard to
work around:
- logging can start logging before we fork (e.g. if we need to emit
messages related to master checking), and thus use FDs which we...

56e7640c 01/08/2009 04:16 pm Iustin Pop

Add an instance_migratable rpc call

This is a forward-port of commit 1194 on the 1.2 branch:

This call will check whether an instance is up on its primary, and that
it has been started with symlinks. We currently have no on-secondary
checks, nor any hypervisor specific call....
b2e7666a 01/07/2009 07:02 pm Iustin Pop

Pass instance name to rpc call blockdev_close

This is an extract of commit 1166 on the 1.2 branch (Add a rpc call for
drbd network reconfiguration), but only the blockdev_close part.

The patch changes the blockdev_close call to take the instance so that...

dd875d32 12/18/2008 06:39 pm Michael Hanselmann

Job queue: Allow more than one file rename per RPC call

Reviewed-by: ultrotter

c41eea6e 12/11/2008 07:13 pm Iustin Pop

Fix epydoc format warnings

This patch should fix all outstanding epydoc parsing errors; as such, we
switch epydoc into verbose mode so that any new errors will be visible.

Reviewed-by: imsnah

56aa9fd5 12/05/2008 05:01 am Iustin Pop

Cleanup the config file on demotion from candidate

This patch adds a simple rpc which makes a backup of the config file and
then removes it. This is done so that cluster verify doesn't complain
immediately after demoting a node.

Reviewed-by: imsnah

19205c39 12/04/2008 05:23 pm Michael Hanselmann

ganeti-noded: Migrate to new HTTP server

Reviewed-by: amishchenko

84f2756e 12/04/2008 05:23 pm Michael Hanselmann

Rename all HTTP classes to camel case

It should be consistent.

Reviewed-by: amishchenko

817a030d 11/26/2008 06:49 pm Guido Trotter

convert run dir mode to constant

ganeti-noded used to create all directories under /var/run with an
hard-coded mode. convert it to a constant.

Reviewed-by: imsnah

03d1dba2 11/25/2008 02:37 pm Michael Hanselmann

Pass ssconf values from master to node

Instead of parsing the configuration on the node, we pass the ssconf
values from the master.

Reviewed-by: iustinp

eafd8762 11/21/2008 12:47 pm Michael Hanselmann

Use SSL for master/node RPC

This patch enables SSL between masterd and noded.

Reviewed-by: iustinp

ec17d09c 11/21/2008 12:46 pm Michael Hanselmann

Get rid of node daemon password

With the new SSL client certificate stuff it's no longer needed.

Reviewed-by: iustinp

6ddc95ec 11/21/2008 12:42 pm Michael Hanselmann

Add RPC call to update ssconf files

Reviewed-by: iustinp

8adbffaa 11/11/2008 12:58 pm Iustin Pop

Abstract runtime creation of dirs into a function

Currently the dir creation in ganeti-noded is in the main function. This
is not nice: we move it into a separate function and also add creation
of the OS_LOG_DIR (with different permissions, but in the same way)....

23e46494 10/24/2008 02:31 pm Michael Hanselmann

Document HttpServer.__init__

At the same time, simplify the interface a bit by not using a tuple.

Reviewed-by: killerfoxi, ultrotter

74c47259 10/23/2008 05:19 pm Iustin Pop

Export the disk index in the import/export scripts

We want to export the disk index as some OSes will only want to export
the first disk (or the second one, etc.), even if we have multiple
disks.

The patch also updates the backend.ExportSnapshot docstring....

6c0af70e 10/22/2008 05:09 pm Guido Trotter

Convert ImportOSIntoInstance to OS API 10

- Change ImportOSIntoInstance not to get any "os_disk" and "swap_disk"
arguments but to accept multiple target images to import, and to
return a list of booleans with the result of each import
- Change the relevant rpc call and the only caller to conform...

82d9caef 10/20/2008 03:50 pm Iustin Pop

Remove the logger.py module

Since now we use only one function from the logger module
(SetupLogging), we move it to utils.py (which is already imported by all
users of this function), and we remove the module.

Reviewed-by: imsnah

d15a9ad3 10/17/2008 05:37 pm Guido Trotter

Cleanup os_add/rename rpc for OS API 10

- remove now unused osdev and swapdev arguments from backend, noded,
rpc, cmdlib
- convert docstrings to epydoc

Reviewed-by: iustinp

5d672980 10/15/2008 04:13 pm Iustin Pop

Add a rpc call for changing the drain flag

A new multi-node call is added that sets/resets the drain flag.

Reviewed-by: imsnah

6217e295 10/14/2008 01:19 pm Iustin Pop

Export the hypervisor.ValidateParameters over RPC

The newly-added node-specific ValidateParams hypervisor method is
exported over RPC, using the semi-standard (success, message) return
value. Multi-node call, so that we call on both primary and secondary at...

16ad1a83 10/13/2008 04:49 pm Iustin Pop

Fix a few rpc-related errors

This fixes:
- whitespace change, double lines between methods
- duplication of call_upload_file, introduced by mistake in rev 1795
and which went undetected because of the many changes in that ref
(only diff -b shows it clearly)...

caad16e2 10/12/2008 11:40 pm Iustin Pop

Abstract checking own address into a function

Currently, we check if we have a given ip address (i.e. it's alive on
one of our interfaces) but manually calling TcpPing(source=localhost).
This works, but having it spread all over the code makes it hard to...

cc28af80 10/10/2008 07:00 pm Michael Hanselmann

Convert ganeti-noded to new HTTP server class

Reviewed-by: iustinp

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

Move the hypervisor attribute to the instances

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

9f0e6b37 10/07/2008 02:39 pm Iustin Pop

rpc.call_instance_migrate: pass the whole instance

Currently the call_instance_migrate call only passes the instance name;
we need to pass the whole object for the hypervisor_type changes (all
the other individual instance rpc calls already pass the instance...

62c9ec92 10/06/2008 06:58 pm Iustin Pop

backend.py change to get cluster name from master

Currently there are three function in backend that need the cluster name
in order to instantiate an SshRunner. The patch changes these to get the
cluster name from the master in the rpc call; once the multi-hypervisor...

8594f271 10/01/2008 08:36 pm Michael Hanselmann

Convert ganeti-noded

Replace ssconf with utility functions.

Reviewed-by: iustinp

8785cb30 09/09/2008 03:57 pm Michael Hanselmann

ganeti-noded: Add constant for queue lock timeout

Reviewed-by: iustinp

4e071d3b 09/09/2008 03:24 pm Iustin Pop

Export backend.GetMasterInfo over the rpc layer

We create a multi-node call so that querying all nodes for agreement
will be fast.

Reviewed-by: imsnah

506cff12 09/09/2008 12:01 pm Michael Hanselmann

Use lock timeout for queue updates in ganeti-noded

This helps to prevent complete deadlocks.

Reviewed-by: iustinp

f1f3f45c 09/05/2008 03:29 pm Michael Hanselmann

noded: Get job queue lock while purging queue content

Only one process should modify the queue at the same time.

Reviewed-by: iustinp

af5ebcb1 08/08/2008 02:21 pm Michael Hanselmann

noded: Add RPC function to rename job queue files

This will be used to archive jobs.

Reviewed-by: iustinp

7f30777b 08/08/2008 02:20 pm Michael Hanselmann

noded: Add decorator for job queue lock

The lock will also be needed by another function.

Reviewed-by: iustinp

25d6d12a 08/08/2008 01:03 pm Michael Hanselmann

Implement queue locking in node daemon

Reviewed-by: iustinp

aa9075c5 08/08/2008 01:02 pm Michael Hanselmann

More logging for errors during noded RPC calls

Reviewed-by: iustinp

ca52cdeb 08/08/2008 01:01 pm Michael Hanselmann

Add job queue RPC functions

jobqueue_update: Uploads a job queue file's content to a node. The
most common operation is to upload something that we already have
in a string. Unlike in the upload_file function, the file is not
read again when distributing changes, but content has to be passed...

59f187eb 07/30/2008 03:32 pm Iustin Pop

Unify SetupDaemon/SetupLogging

The 'old-style' info, error, debug logs do not make much sense. This
patch unifies the SetupLogging and SetupDaemon functions. As a result,
all the commands logs to a 'commands.log' file.

The patch also changes the log setup to keep going if there's an error...

1c65840b 07/30/2008 11:32 am Iustin Pop

Add a new parameter to backend.(Start|Stop)Master

This patch adds a new, unused for now, parameter to the start and stop
master operations in backend. The idea behind it is that we need to be
able to control whether the IP (de)activation is coupled with daemon...

99e88451 07/29/2008 12:06 pm Iustin Pop

Use constants for the pid file stems

Reviewed-by: imsnah

73d927a2 07/23/2008 05:23 pm Guido Trotter

ganeti-noded: write and remove pid file

Reviewed-by: iustinp

84b58db2 07/21/2008 06:32 pm Michael Hanselmann

Handle signals in node daemon

This also fixes a TODO added by ultrotter by killing the parent
process when QuitGanetiException is raised.

Reviewed-by: ultrotter

761ce945 07/16/2008 12:48 pm Guido Trotter

Fork ganeti-noded

Create a new ForkingHTTPServer in ganeti-noded by deriving both from
NodeDaemonHttpServer and ForkingMixin. This will allow us to process
concurrent requests.

Reviewed-by: imsnah

1df6506c 07/11/2008 03:20 pm Michael Hanselmann

Use new HTTP server classes in ganeti-noded

Reviewed-by: iustinp

ff5fac04 07/09/2008 05:46 pm Iustin Pop

Fix double-logging in daemons

Currently, in debug mode, both the logfile handler and the stderr
handler will log debug messages. Since the stderr is redirected to the
same logfile (to catch non-logged errors), it means log entries are
doubled.

The patch adds an extra parameter to the logger.SetupDaemon() function...

c89189b1 07/09/2008 05:43 pm Iustin Pop

ganeti-noded logging improvements

The patch adds some more logging to the node daemon:

- log methods at beggining not only at the end
- log method parameters (they are very verbose, but useful)

A separate change is to initialize the global variable in the global...

195c7f91 07/08/2008 05:42 pm Iustin Pop

Create all SUB_RUN_DIRS in ganeti-noded

Rather than just creating BDEV_CACHE_DIR we loop through the
SUB_RUN_DIRS list and create all its childs.

Reviewed-by: iustinp

c3d7f69b 06/27/2008 05:27 pm Guido Trotter

ganeti-noded: Fix handling of QuitGanetiException

- s/GanetiQuitException/QuitGanetiException/
- Look for the arguments in err.args, not err itself

Reviewed-by: iustinp

9ae49f27 06/26/2008 05:42 pm Guido Trotter

ganeti-noded: quit on QuitGanetiException

Accoring to the usage documented in the QuitGanetiException docstring,
if we receive such an exception we'll set the global _EXIT_GANETI_NODED
variable to True, and then return either a valid value or an error
message to the user. This will be the last request we serve, though,...

3b3db8fd 06/26/2008 05:42 pm Guido Trotter

ganeti-noded: serve not quite forever

Rather than calling httpd.serve_forever() in ganeti-noded we'll call
httpd.handle_request() but just while a global variable, which we'll
call _EXIT_GANETI_NODED, remains false.

Reviewed-by: iustinp

d61cbe76 06/20/2008 02:04 pm Iustin Pop

Add a rpc call for BlockDev.Close()

This patch adds rpc layer calls (in rpc.py and the equivalent in
ganeti-noded) to close a list of block devices, and the wrapper in
backend.py that takes a list of Disk objects, identifies them and
returns correctly formatted results....

4c8ba8b3 06/17/2008 09:50 am Iustin Pop

Implement block device grow at the rpc layer

This simple patch exposes the block device grow operation at the rpc
layer. It does not increase the protocol version as it has been recently
changed by the live failover rpc call.

Reviewed-by: imsnah

2a10865c 06/16/2008 04:57 pm Iustin Pop

Add migration support at the rpc layer

This patch adds the migration rpc call and its implementation in the
backend. The patch does not deal with the correct activation of disks.

Because of the new RPC, the protocol version is increased.

Reviewed-by: imsnah

2a2060ff 06/13/2008 03:46 pm Michael Hanselmann

Replace logging functions with calls to logging module

- Shorter code
- Reorder arguments to logger.SetupLogging calls to make more sense

Reviewed-by: iustinp

8d528b7c 04/28/2008 12:47 pm Iustin Pop

Move iallocator script execution to ganeti-noded

Currently the iallocator execution takes place in the master, which is a
violation of the current architecture, and will create problems with a
threaded master daemon.

This patch moves the execution to the backend, similar to the hooks...

a5d7fb43 04/05/2008 03:40 pm Manuel Franceschini

ganeti-noded directory functions for file backend

Reviewed-by: ultrotter

8f765069 04/04/2008 03:02 pm Iustin Pop

Move the daemonize function to utils.py

Currently, in ganeti-noded we have the createDaemon function. Since
we'll need the same in other daemons, we move this function to utils.py

With the move, a few changes were also done:
- change the name to Daemonize()...

6e12fa3c 03/27/2008 05:46 pm Iustin Pop

Reduce log noise for the new http-based rpc

This patch just removes an extraneous \n from the log message making it
nicer to view.

Reviewed-by: schreiberal

0214b0c0 03/19/2008 12:17 pm Iustin Pop

Make ganeti-noded create BDEV_CACHE_DIR automatically

Currently in order to deal with tmpfs /var/run, we create the
BDEV_CACHE_DIR in the init script. However, that does not cover all the
cases, and it's not a proper place to deal with it: for example, dealing...

b15d625f 03/11/2008 09:44 am Iustin Pop

Modify utils.TcpPing to make source address optional

This patch modifies TcpPing and its callers to make the source address
selection optional. Usually, the kernel will know better what
source address to use, just in some cases we want to enforce a given...

81010134 02/22/2008 02:39 pm Iustin Pop

Break trunk by removing twisted

This patch switches from the twisted usage for inter-node protocol to
simple BaseHTTPServer/httplib. The patch has more deletions because we
use no authentication, no encryption at all.

As such, this is just for trunk, and only for testing. What it brings is...

06009e27 02/05/2008 04:12 pm Iustin Pop

Add a test opcode that sleeps for a given duration

This can be used for testing purposes.

Reviewed-by: ultrotter,imsnah

f362096f 11/29/2007 06:03 pm Iustin Pop

Make utils.RunCmd log failures when using debug

This patch adds logging of command failures to the debug log in case the
user either started the command (gnt-*) or the node daemon with the
debug flag.

Reviewed-by: imsnah

dfa96ded 11/05/2007 02:43 am Guido Trotter

Convert os_get to use OS rather than InvalidOS

In order to do this for simplicity we leave the OSFromDisk function as-is and
we convert the eventual exception to an OS object in ganeti-noded. The
unmangling gets simplified and so does the code for checking whether the OS is...

4e679f11 11/05/2007 02:43 am Guido Trotter

Simplify diagnose mangling/unmangling functions

The functions in ganeti-noded and rpc.py still deal with the fact that an
InvalidOS error could be returned by DiagnoseOS. As this is not the case
anymore simplify their code for the current behavior.

Reviewed-By: iustinp

3f78eef2 11/02/2007 03:44 pm Iustin Pop

Implement device to instance mapping cache

Currently, troubleshooting DRBD problems involves a manual process of going
backwards from the DRBD device to the instance that owns it.

This patch adds a weak (i.e. not guaranteed to be correct or up-to-date)
cache of device to instance. The cache should be, in normal operation,...

f3e513ad 10/29/2007 05:44 pm Iustin Pop

Implement block device renaming

This patch add code for renaming a device; more precisely, for changing
the unique_id of the device. This means:
- logical volumes, rename the volume
- drbd8, change the remote peer

This is needed for the being able to replace disks for drbd8....

153d9724 10/25/2007 02:22 pm Iustin Pop

Modify two mirror-device related rpc calls

The two calls mirror_addchild and mirror_removechild take only one child
for addition/removal. While this is enough for our md usage, for local
disk replacement in drbd8, we need to be able to specify both the data...

007a2f3e 10/17/2007 06:00 pm Alexander Schreiber

Patch series for reboot feature, part 1

This patch series implements the reboot command for gnt-instance. It
supports three types of reboot: soft (hypervisor reboot), hard (instance
config rebuild and reboot) and full (full instance shutdown and startup
again)....

b50f022f 10/15/2007 04:04 pm Iustin Pop

Fix node daemon log file permissions

The creation of the log file for the node daemon lacks the mode
parameter, so after applying the current umask, the file got 0700
permissions. Restrict this to the correct 0600.

Reviewed-by: schreiberal

16abfbc2 10/10/2007 08:20 pm Alexander Schreiber

Remove fping as a dependency for Ganeti.

This patch completely gets rid of fping
- replace all fping invocations with TcpPing calls
- update documentation accordingly.
- associated cleanups (use constant for localhost IP, use more sensible
defaults for TcpPing and use those)...

319856a9 10/04/2007 02:33 pm Michael Hanselmann

Change configuration storage format from Pickle to JSON.

- Add NEWS file with major changes between versions.
- Bump RPC version number
- No longer serialize in RPC, but just convert to dict

Old Pickle based configuration files can be converted using the cfgupgrade...

decd5f45 09/17/2007 02:52 pm Iustin Pop

Implement instance rename operation

This patch adds support for instance rename operation at all remaining
layers: RPC, OpCode/LU and CLI.

Reviewed-by: imsnah

3ecf6786 08/14/2007 06:17 pm Iustin Pop

Style changes for pep-8 and python-3000 compliance.

This changes the raising of exceptions from:
raise Exception, value
to
raise Exception(value)

as the first form will be removed in python-3000 and the second form is
preferred now.

The changes also involve a few cases of changing from raising standard...

a0c3fea1 08/03/2007 03:35 pm Michael Hanselmann

Add instance name to LVM volume as a tag.

Reviewed-by: iustinp

098c0958 07/26/2007 02:40 pm Michael Hanselmann

Comment formatting updates.

Reviewed-by: iustinp

cb91d46e 07/25/2007 02:46 pm Iustin Pop

Since the watcher can run on all nodes, let's get rid of the cron file
handling, as it can be static and outside of ganeti.

This also means we can get rid of a lot of infrastructure too:
- the master/node config files checkers
- one rpc function

588d1da3 07/24/2007 04:43 pm Michael Hanselmann

Fix parameter formatting.

Reviewed-by: iustinp

dcb93971 07/24/2007 02:45 pm Michael Hanselmann

- Implement “gnt-node volumes”
- Create all --output options using a constant
- Put node checking code from opcodes into a single function
- Do the same for output fields

Reviewed-by: iustinp

3c9a0742 07/18/2007 03:07 pm Michael Hanselmann

Replace tabs with spaces.

Reviewed-by: iustinp

a8083063 07/16/2007 04:39 pm Iustin Pop

Initial commit.