Statistics
| Branch: | Tag: | Revision:

root @ 021f5d6f

# Date Author Comment
021f5d6f 12/02/2008 12:19 pm Guido Trotter

Update gnt-backup online help

--src-node and --src-dir are not mandatory anymore

Reviewed-by: iustinp

b9322a9f 12/02/2008 12:19 pm Guido Trotter

ImportExport: make src_node and src_path optional

If src_node is not there we'll default to using the currently exported
instance name as src_path. Also, if src_path is not absolute we'll look
for it in EXPORT_DIR.

Reviewed-by: iustinp

c0cbdc67 12/02/2008 12:19 pm Guido Trotter

LUCreateInstance: handle import without src_node

If we get called with no source node we'll thread src_path as an
instance name exported in EXPORT_DIR in one of the nodes and look for
it with the export_list rpc call.

Reviewed-by: iustinp

9c8971d7 12/02/2008 12:19 pm Guido Trotter

LUCreateInstance: keep src node lock on import

Currently the node lock also guards against removing the import at the
wrong time, so if we're importing an instance image we want to keep the
source node locked. In the future we might want to put export locks at a...

bbe19c17 12/02/2008 07:07 am Iustin Pop

Fix master failover

The ssconf files were not updated by the master failover. We need to
push them, and since we already have RPC initialized, we can use the
standard ConfigWriter to do so - this will take care of both the config
file and the ssconf files....

112f18a5 12/02/2008 07:06 am Iustin Pop

Adjust cluster-verify to check for candidate role

Currently cluster verify checks all nodes for the same set of files,
even if the nodes are not master candidates.

This patch adds back checking of ssconf files for consistency and splits
the checksum check into different error reporting messages based on...

a8efbb40 12/02/2008 07:06 am Iustin Pop

Add candidate pool size checks in verify

Reviewed-by: imsnah

3e83dd48 12/02/2008 07:06 am Iustin Pop

Prevent demotion from candidate based on pool size

In gnt-cluster modify we prevent demotion from the candidate role if
there are not enough master candidates left.

Reviewed-by: imsnah

4b7735f9 12/02/2008 07:06 am Iustin Pop

Add cluster candidate pool size parameter

This patch adds a new cluster paramater "candidate_pool_size" which
tracks the desired size of the list of nodes with the master_candidate
flag set.

Reviewed-by: imsnah

8135a2db 12/02/2008 07:05 am Iustin Pop

Prevent master failover to a non candidate node

Reviewed-by: imsnah

f56618e0 12/02/2008 07:05 am Iustin Pop

Add the list of master candidates to ssconf

Reviewed-by: imsnah

59303563 12/02/2008 07:05 am Iustin Pop

Restrict job propagation to master candidates only

This patch restricts the job propagation to master candidates only, by
not registering non-candidates in the job queue node lists.

Note that we do intentionally purge the job queue if a node is toggled
to non-master status....

6a5b8b4b 12/02/2008 07:05 am Iustin Pop

Restrict config replication to master candidates

This patch restricts the config data replication to master candidates
only.

Reviewed-by: imsnah

b31c8676 12/02/2008 07:05 am Iustin Pop

Add a gnt-node modify operation

This patch adds the OpCode, LogicalUnit and gnt-node command for
modifying node parameters, more specifically the master candidate flag
for a node.

Reviewed-by: imsnah

0e67cdbe 12/02/2008 07:04 am Iustin Pop

Add master/master_candidate fields to node list

This patch adds listing of the master_candidate field (as Y/N) and of
the master role (again Y/N) for nodes.

Reviewed-by: imsnah

8b8b8b81 12/02/2008 07:04 am Iustin Pop

Introduce a new 'master_candidate' node attribute

The field is not yet used.

Reviewed-by: imsnah

89b14f05 12/02/2008 07:04 am Iustin Pop

Simplify a little the ssconf update

We have (again) the KeyToFilename function, so we move the writing of
the files to a method under SimpleStore.

Reviewed-by: imsnah

054596f0 12/02/2008 07:04 am Iustin Pop

Replicate the node list in ssconf

This patch adds node_list in the list of replicated values from
ConfigWriter.

Reviewed-by: imsnah

93384844 12/02/2008 07:03 am Iustin Pop

Revert "Get rid of ssconf"

This partially reverts the "Get rid of ssconf" patch.

It adds back a simpler version of the SimpleStore class, and drops the
WritableSimpleStore class. The new version of the class also has
node_list as a new key, and increases the size of the keys so that big...

b518a14a 12/02/2008 03:41 am Iustin Pop

burnin: fix usage of diskless template

This allows burnin to work with diskless instances (since we cannot pass
right now no disks to it).

Reviewed-by: imsnah

1d693311 12/01/2008 10:52 pm Michael Hanselmann

Update QA scripts to new cluster parameters

There are still issues, especially with "gnt-instance modify" and
resetting values. However, this is a start.

Reviewed-by: ultrotter

dfecf310 12/01/2008 10:52 pm Michael Hanselmann

gnt-instance add: Remove "--os-size" and "--swap-size"

They're not used anymore.

Reviewed-by: ultrotter

3097c858 12/01/2008 10:52 pm Michael Hanselmann

Fix RpcRunner._StaticSingleNodeCall

Unfortunately, a rpc.Client object was passed as the first parameter,
causing the function to always fail.

Found during QA testing.

Reviewed-by: ultrotter

b9222f32 12/01/2008 05:47 pm Guido Trotter

InitCluster: initialize master node serial_no

Currently it was left alone, and thus its value was "null".

Reviewed-by: imsnah

d599d686 12/01/2008 08:02 am Iustin Pop

Fix errors when the node info RPC is incomplete

[Forward-port from the 1.2 branch]

If ganeti starts before xend, the node information will not have all the
fields filled in. The patch changes so that missing keys will be treated
as unknown (this applies to other cases as well, not only xend not...

028c6b76 11/28/2008 03:58 pm Oleksiy Mishchenko

RAPI:Fix root list and unittest for it.

Reviewed-by: imsnah

a0dcf7c2 11/28/2008 02:02 pm Oleksiy Mishchenko

RAPI: Switch from opcodes to no native 2.0 queries.

Reviewed-by: imsnah

b7cb9024 11/28/2008 12:29 pm Michael Hanselmann

jqueue: Always print message for 100% when inspecting queue

Reviewed-by: iustinp

b28a3e8b 11/28/2008 12:28 pm Michael Hanselmann

gnt-job: Print message from CancelJob to standard output

Reviewed-by: iustinp

fbf0262f 11/28/2008 12:28 pm Michael Hanselmann

jqueue: Allow jobs waiting for locks to be canceled

- Add new "canceling" status
- Notify clients when job is canceled
- Give a return value from CancelJob
- Handle it in the client library

Reviewed-by: iustinp

87622829 11/27/2008 12:38 pm Iustin Pop

Improve the node add operation

Currently, the node add operation uses a job to query the node name and
the bootstrap function directly reads the config file for the cluster
name.

This patch changes to that both the cluster name and the verification of
the node is done via queries to the master....

f34901f8 11/27/2008 12:21 pm Iustin Pop

Fix logic bug in rev 2072

In revision 2072 "ConfigWriter: change cluster serial meaning" I misread
the serial_no update logic: it was about updating the serial number on
the object itself, not on the cluster.

So we don't actually have at all cluster serial number increase when a...

33987705 11/27/2008 05:13 am Iustin Pop

jqueue: fix a bug in an error path

Dictionaries raise KeyError, and not ValueError when invalid keys are
passes to del.

Reviewed-by: imsnah

cff4c037 11/27/2008 05:13 am Iustin Pop

ConfigWriter: change cluster serial meaning

Currently, we increase the cluster serial number for instance additions,
removals and renames. This is conforming with the REST paradigm, however
it means that for each of these operations, we need to push ssconf...

50a707fa 11/27/2008 05:13 am Iustin Pop

instance import: adapt to multi-disk/nic world

This is mostly a copy from gnt-instance add; import works, but it's not
optimal - device count/parametrs should be able to be reused.

Reviewed-by: ultrotter

726d7d68 11/27/2008 05:13 am Iustin Pop

Fix gnt-backup export

This patch fixes a bug in disk calculation for gnt-backup export, which
completely broke one-disk instance export.

The patch also corrects some error messages and style issues.

Reviewed-by: ultrotter

268b8e42 11/27/2008 05:13 am Iustin Pop

Fix a message in LUExportInstance

We never verified the node name before, so this is most likely not a
non-retrieve but a wrong name case.

Reviewed-by: ultrotter

e0e31530 11/27/2008 05:12 am Iustin Pop

Allow network-less instances

Currently there's no way to specify no NICs for an instance, even though
this is a supported configuration.

The patch adds a --no-nics option to gnt-instance add.

Reviewed-by: amishchenko

9d5ba39a 11/27/2008 05:12 am Iustin Pop

Fix gnt-job submit

The submit function was using a very old API. This patch brings it up to
date.

Reviewed-by: imsnah

0e050889 11/27/2008 05:12 am Iustin Pop

Small change to job failure output

Currently, job failures are done by raising OpExecError(job result). For
a one-opcode job that failed, this is very non-intuitive:
Failure: command execution error:
[u'Disk size change not possible, use grow-disk']

This patch changes the output in two ways:...

ecb091e3 11/27/2008 05:12 am Iustin Pop

Fix file-based block devices

We changed a while ago the protocol for opening block devices, but
FileStorage was not changed. This patch makes it work again.

Reviewed-by: imsnah

112050d9 11/27/2008 05:12 am Iustin Pop

Fix instance creation

This patch fixes the diskless and drbd/file based instances. Sorry :(

Reviewed-by: ultrotter

1cb8d376 11/26/2008 06:49 pm Guido Trotter

ganeti-masterd: create RUN_GANETI_DIR as well

Since we're not sure ganeti-noded has started yet, we need to create
RUN_GANETI_DIR before SOCKET_DIR as well, with the proper permissions.

Reviewed-by: imsnah

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

711b5124 11/26/2008 06:16 pm Michael Hanselmann

jqueue: Log progress and load jobs one by one

By logging more information, a user can see how far it is in inspecting
the queue. This can be useful with a large number of jobs. Also, instead
of loading all jobs in one go, load only the list of job IDs and then...

16714921 11/26/2008 06:15 pm Michael Hanselmann

jqueue: Shutdown workerpool in case of a problem

Reviewed-by: ultrotter

21f04e5e 11/26/2008 01:25 pm Oleksiy Mishchenko

RAPI: Make calls safier

Reviewed-by: imsnah

160e2921 11/26/2008 03:23 am Iustin Pop

Reduce duplication of work in rpc.Client

This patch removes the duplicate serialization and calls to
utils.GetNodeDaemonPort in rpc.Client, and instead moves them to calling
functions (the _*NodeCall ones recently introduced).

Reviewed-by: ultrotter

227647ac 11/25/2008 07:11 pm Guido Trotter

Move the MASTER_SOCKET to SOCKET_DIR

Before it was in the abstract linux namespace, where unfortunately we
couldn't easily check from python the credentials of the connecting
clients. Now we also have to remove the file on exit and when starting.

Reviewed-by: imsnah

d823660a 11/25/2008 07:11 pm Guido Trotter

ganeti-masterd: create SOCKET_DIR

If SOCKET_DIR doesn't exist we create it in the master daemon, before
trying to put a socket inside it.

Reviewed-by: imsnah

5ecb7e48 11/25/2008 07:10 pm Guido Trotter

Add SOCKET_DIR_MODE constant

We want the socket dir to have a restricted permission.

Reviewed-by: imsnah

b4442fd9 11/25/2008 07:10 pm Guido Trotter

Add SOCKET_DIR constant

This new directory under /var/run will be used for file based unix
sockets.

Reviewed-by: imsnah

68a5b97a 11/25/2008 07:10 pm Guido Trotter

Add very basic online help to devel/upload

Reviewed-by: imsnah

24991749 11/25/2008 02:57 pm Iustin Pop

Implement support for multi devices changes

This big patch adds support for:
- changing NIC/disks in the multi-device model
- adding/removing NICs
- adding/removing disks

The patch is big and not very nice; the error checking paths are not
very clear....

4be4691d 11/25/2008 02:57 pm Iustin Pop

Slight change to the LU initialization code

This patch adds support for a separate LU.CheckArguments() method which
should do syntactic checks without holding locks and without polluting
the ExpandNames which is a lock-related function. See for example the...

b637ae4d 11/25/2008 02:51 pm Iustin Pop

Fix a bug in LUSetInstanceParams

The wrong names were reused in a copy-paste.

Reviewed-by: imsnah

b6fdf8b8 11/25/2008 02:50 pm Iustin Pop

Show disk access mode in gnt-instance info

The mode parameter needs to be exported and shown in the info output.

Reviewed-by: imsnah

e2a65344 11/25/2008 02:50 pm Iustin Pop

Change _GenerateDiskTemplate iv_name generation

Currently the _GenerateDiskTemplate assumes it does initial creation of
disks (i.e. it starts with index 0).

For dynamic disk adds, we need to pass an additional offset. This patch
adds this offset and modifies its sole current caller....

d2acfe27 11/25/2008 02:50 pm Iustin Pop

Slighly improve multi-nic in gnt-instance info

Previously we had only one nic, so the NIC information was all on one
line. This patch changes it to:

- NICs:
- nic/0: MAC: aa:00:00:e8:b2:ef, IP: None, bridge: None
- nic/1: MAC: aa:00:00:53:ca:92, IP: None, bridge: xen-br0...
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

65c6b8e0 11/25/2008 01:18 pm Michael Hanselmann

ganeti.http: Don't reuse key and cert objects

Reusing the private key and certificate objects gave us problems. This
patch changes the code to only cache the PEM data, but the objects
themselves. For every socket, the private key and certificate objects
are created again....

d9a855f1 11/24/2008 05:39 pm Michael Hanselmann

Fix unittests broken by rev 2015

Ssconf files shouldn't be updated when running unittests.

Reviewed-by: ultrotter

d57ae7f7 11/24/2008 03:38 pm Michael Hanselmann

ganeti.rpc: Read SSL certificate and key only once per request

There's no need to read the SSL certificate and key for every node
in a request. Also add a TODO for better error reporting.

Reviewed-by: amishchenko

8dca23a3 11/24/2008 01:01 pm Iustin Pop

Documentation updates for mcpu.py

This is the only change needed to make mcpu epydoc-compliant.

Reviewed-by: ultrotter

b4364a6b 11/24/2008 11:48 am Guido Trotter

LUCreateInstance: Fix import mac AUTO mode

Previously on import LUCreateInstance used to recycle the mac if the instance
name was the same than the one used at export time. Now we do the same, but
apply the setting separately for each nic.

Reviewed-by: iustinp

0ca35d45 11/24/2008 11:47 am Guido Trotter

Burner: fix ImportExport

Update the call to CreateInstance used in ImportExport to the new API for
multidisk/nic.

Reviewed-by: iustinp

e36e96b4 11/24/2008 11:47 am Guido Trotter

LUCreateInstance unlock all nodes mid-way

When creating a new instance, after saving the instance data to the config file
and creating the disks, but before waiting for sync and installing the OS, we
release the node locks, to allow for more instance creations to proceed in...

18640d69 11/24/2008 11:47 am Guido Trotter

IAllocator: subtract down instances from free mem

Currently free_memory just reports the amount of free ram, as seen by the
hypervisor. We adjust this amount by subtracting the memory for any instance
which is down, and the difference for any instance which is configured to have...

955db481 11/24/2008 11:46 am Guido Trotter

Correct GetAllInstancesInfo rtype

GetAllInstancesInfo, in the backend, returns just a dict, not a dict of dicts.

Reviewed-by: iustinp

8cc7e742 11/24/2008 11:46 am Guido Trotter

IAllocator: use the right hypervisor

Since the hypervisor is instance dependent we'll get one on instance creation,
and use the one in the instance config on relocation.

Reviewed-by: iustinp

b57e9819 11/24/2008 11:46 am Guido Trotter

IAllocator: fill i_list in a more proper way

- reuse the previously called cluster_info, rather than calling it again
- get all the instances from the config atomically, to prevent race conditions
- use a list comprehension, for simplicity

Reviewed-by: iustinp

90a7547a 11/24/2008 11:45 am Guido Trotter

Parallelize instance operations on the same node

With static minors we don't have a race condition anymore when
starting/stopping/rebooting/reinstalling more than one instance on the same
node, so we'll drop node locking altogether.

Reviewed-by: iustinp

dafc7302 11/24/2008 11:44 am Guido Trotter

Convert iallocator to the new _ComputeDiskSize

_ComputeDiskSize's API was changed for multidisk support in r2010, but
iallocator's call to it were not fixed. Converting them now.

Reviewed-by: iustinp

e4376078 11/23/2008 05:35 pm Iustin Pop

Documentation updates for cmdlib.py

This makes cmdlib.py not throw epydoc errors anymore.

Reviewed-by: ultrotter

975e07c6 11/23/2008 05:35 pm Iustin Pop

Slight change to the apidoc build

Currently the temporary directory used for modules is under the current
directory; this patch changes it so a temp directory is used; so we
could build the apidocs with a R/O filesystem.

Reviewed-by: ultrotter

0779e3aa 11/23/2008 05:35 pm Iustin Pop

Only update ssconf on cluster serial change

There is no need to update ssconf if the cluster serial number has not
changed.

Reviewed-by: ultrotter

9fbfbb7b 11/23/2008 05:34 pm Iustin Pop

Enable auto-unit formatting in script output

This patch enables by default the old 'human-readable' option, but in a
slightly different model.

The option is now called "units" and takes either:
- 'h' for automatic formatting
- 'm', 'g' or 't' for mebi/gibi/tebibytes...

23b8c8d6 11/23/2008 05:34 pm Iustin Pop

Improvements to CLI output

This patch adds nicer formatting for some gnt-instance list operations.

Reviewed-by: ultrotter

c7f5f338 11/21/2008 05:55 pm Oleksiy Mishchenko

RAPI: Cancel a job

Reviewed-by: imsnah

00430f8e 11/21/2008 05:36 pm Iustin Pop

Make cli.py use FieldSet for matching fields

This changes cli.py to FieldSet usage so that gnt-instance list will
format nicely the disk.size/*, and the count of disks/nics.

Reviewed-by: ultrotter

a2d2e1a7 11/21/2008 05:35 pm Iustin Pop

Move FieldSet class to utils.py

Since we can use the FieldSet class in cli.py to nicely format disk
sizes and such, we move it to utils.py and also move its associated
unittest. I didn't remove the cmdlib.py unittest file as that's not the
good direction :)...

084a9f22 11/21/2008 05:35 pm Iustin Pop

Small burnin info message change

This looks beter than '0 disk'.

Reviewed-by: ultrotter

f768530c 11/21/2008 05:35 pm Iustin Pop

burnin: fix default growth parameter

Reviewed-by: ultrotter

3e0cea06 11/21/2008 05:35 pm Iustin Pop

Change disk index validation to FindDisk

This patch replaces the hand validation of the disk index with the
instance.FindDisk method (actually reverting to previous method, before
the multi-disk, but now with indexes).

Reviewed-by: ultrotter

ad24e046 11/21/2008 05:34 pm Iustin Pop

Change GrowDisk to work with multi-disk

This patch changes the instance.FindDisk method to take index arguments
(instead of iv_names), and changes GrowDisk and list instances
accordingly.

Reviewed-by: ultrotter

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

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

ganeti.http: Add another class to contain SSL key and certificate

Otherwise we would read them for every request the HTTP client
makes against a server and this is not needed.

Reviewed-by: iustinp

15486fa7 11/21/2008 12:46 pm Michael Hanselmann

ganeti-masterd: Remove PID file at the end

Removing the PID file should be the last thing done. This patch makes
sure it's also removed when master.server_cleanup() throws an exception.

Also initialize logging only after writing the PID file.

Reviewed-by: iustinp

4331f6cd 11/21/2008 12:45 pm Michael Hanselmann

Reuse HTTP client pool for RPC

ganeti-masterd: Add initialization and shutdown of RPC pool. It needs
to be shutdown before forking.

ganeti.cli: Add decorator function to initialize and shutdown RPC pool.

ganeti.rpc: Add functions to initialize and shutdown RPC pool. Throw...

54d1a06e 11/21/2008 12:42 pm Michael Hanselmann

Write ssconf files when updating configuration

Reviewed-by: ultrotter

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

Add RPC call to update ssconf files

Reviewed-by: iustinp

d418ebfb 11/21/2008 08:22 am Iustin Pop

Change replace secondary to work with multi-disk

Also fix an error in the CheckPrereq.

Reviewed-by: imsnah

0c223ea9 11/20/2008 02:50 pm Michael Hanselmann

ganeti.ssconf: Add function to write ssconf files

This function will be used to write ssconf files from the node daemon.
By creating a lock file, we synchronize different child processes of
ganeti-noded to not overwrite each other's changes. Also, external...

54155f52 11/20/2008 08:22 am Iustin Pop

Convert replace-disks (same nodes) to multi-disk

This patch changes the drbd8 replace disk only (no secondary change) to
work in with multi-disk. This mode of replaces works correctly with
replacing only a subset of disks.

Reviewed-by: imsnah

08db7c5c 11/20/2008 08:22 am Iustin Pop

Initial multi-disk/multi-nic support

This patch adds support for mult-disk/multi-nic in:
- instance add
- burnin

The start/stop/failover/cluster verify work as expected. Replace disk
and grow disk are TODO.

There's also a change gnt-job to allow dictionaries to be listed in...

41a776da 11/20/2008 08:19 am Iustin Pop

Add more disk/nic listing options in gnt-instance

This adds some more listing cases (useful for scripting/rapi):
- disk.sizes for a list of all sizes
- nic.(ips|macs|bridges)

Reviewed-by: imsnah

2864f2d9 11/20/2008 08:18 am Iustin Pop

Change Xen hypervisor to not use iv_name

Currently the iv_name is very linux-specific, and will break with the
multi-disk changes.

The patch changes this to generate sdX names based on the disk index in
the disks structure, instead of relying on the iv_name....

9a525d83 11/19/2008 03:18 pm Michael Hanselmann

ganeti.rpc: Use central functions for actual RPC calls

Before we had lots, lots and lots of code duplication. This patch
changes the code to use four central functions.

Reviewed-by: iustinp

33bbdbec 11/19/2008 03:18 pm Michael Hanselmann

Make HttpClientManager threadsafe

This allows a single HttpClientManager to be used from more than one
thread at the same time. We discussed having one HttpClientManager
per job queue thread. Assuming there should be one HTTP thread per
node, this would mean quadratic growth with the number of nodes. By...