Statistics
| Branch: | Tag: | Revision:

root / lib @ 0e67cdbe

# Date Author Comment
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...

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

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

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

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

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

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

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

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

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

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

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

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

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

7c46aafd 11/19/2008 02:59 pm Oleksiy Mishchenko

HTTP server: Do not decode empty entity body

Reviewed-by: imsnah

d50b3059 11/19/2008 01:09 pm Oleksiy Mishchenko

RAPI: Instance modify.

Split parameters filter to the separate function and reuse it in instance creation.

71c1af58 11/18/2008 12:06 pm Iustin Pop

Allow querying of variable number of parameters

This patch adds support for querying in gnt-instance list of:
- disk.count
- nic.count
- disk.size/$N
- nic.(ip|mac|bridge)/$N

The patch also disables the exception raised when the header description...

31bf511f 11/18/2008 12:04 pm Iustin Pop

Convert cmdlib.py to _FieldSet

This patch converts the current usage of _CheckOutputFields to the
FieldSet class, but it doesn't start to use its variable matching
features.

Reviewed-by: ultrotter

6de7c41d 11/18/2008 12:00 pm Iustin Pop

Add a FieldSet class for variable parameter sets

This patch adds a _FieldSet class that can be used for the new variable
parameter sets: e.g. the sda_size will change to disk/0.size (or
similar) and we need to both check validity and extract the index of the...

0c55c24b 11/14/2008 06:59 pm Oleksiy Mishchenko

RAPI: Instance startup/shutdown resources

Reviewed-by: imsnah

2276aa29 11/14/2008 12:34 pm Oleksiy Mishchenko

RAPI: Implement an instance reboot

Reviewed-by: imsnah

8049a1d7 11/12/2008 02:52 pm Michael Hanselmann

Use utils.ReadFile to read SSL certificate

Reviewed-by: iustinp

4c7c81d7 11/12/2008 02:52 pm Michael Hanselmann

ganeti.rpc: Use utils.ReadFile instead of reading file directly

Reviewed-by: iustinp

6346a9e5 11/12/2008 02:51 pm Michael Hanselmann

utils.SetupLogging: Remove previously setup handlers

If a logging function is called before the logging module is setup
using utils.SetupLogging, it calls logging.basicConfig, which adds
a StreamHandler, on its own. If we leave it in, all log output will...

a3811745 11/12/2008 02:51 pm Michael Hanselmann

jqueue: Always use rpc.RpcRunner

"from ganeti.rpc import RpcRunner" does not conform to the style guide.

Reviewed-by: iustinp

fda5f19f 11/12/2008 02:51 pm Michael Hanselmann

bootstrap: Always use rpc.RpcRunner

"from ganeti.rpc import RpcRunner" does not conform to the style guide.

Reviewed-by: iustinp

7c28c575 11/12/2008 02:50 pm Michael Hanselmann

ganeti.rpc: Convert to ganeti.serializer

This is one of the last places where the simplejson module is
used directly.

Reviewed-by: iustinp

ecfe9491 11/12/2008 02:50 pm Michael Hanselmann

Convert RPC module to new HTTP client

Currently, HttpClientManager is instantiated for every RPC call. This
will be changed with another patch, as will the use of SSL. The “Run”
method is no longer needed.

Reviewed-by: iustinp

e1bd0072 11/12/2008 05:43 am Iustin Pop

Fix utils.KillProcess

Rev 1978 introduced a breakage on the SIGKILL finall signal to the
process, due to mistyped variable.

Reviewed-by: francis.perron

438a366a 11/11/2008 06:16 pm Michael Hanselmann

ganeti.http: Implement SSL for HTTP client

Implementing SSL for the HTTP client required more work than I expected.
For correct error handling, quite a lot of code is needed. To avoid
code duplication, I moved a lot of the socket handling code into a
single function named _SocketOperation. It takes care of the polling...

b11c9e5c 11/11/2008 01:02 pm Michael Hanselmann

ganeti.daemon: Add timers to Mainloop

This is a fallout from my work on the HTTP client class. Repeating
timers are prepared, but not yet implemented.

Reviewed-by: iustinp

d868edb4 11/11/2008 12:58 pm Iustin Pop

Convert trunk to posix-compatibility

We change two functions to use RunCmd without shell, and the other
(which needs a ssh command line) is changed to the '>... 2>&1' syntax.

Reviewed-by: imsnah

44bf25ff 11/11/2008 12:58 pm Iustin Pop

Remove zombie special case from IsProcessAlive

Based on the discussion on the mailing list, we remove the special
casing of zombie processes.

Note we don't use kill -0 since that has a different meaning than "check
process is alive", so this function is still linux-specific....

ff5251bc 11/11/2008 12:58 pm Iustin Pop

Add cleanup of processes to utils.KillProcess

In case the process we want to signal is our own process, and the signal
we send is a deadly one, we should also cleanup after the process.

This patch adds a new parameter waitpid to this function that does this,...

cb4e8387 11/11/2008 12:58 pm Iustin Pop

Fix instance rename

As can be seen from the patch, we remove from the locking manager
inst.name. However, we do this right after cfg.RenameInstance, which
changes inst.name to the new name. So we need to remove old_name not
the new name.

The real question is why does the glm allow me to remove a not-existing...

bb2ee932 11/11/2008 05:12 am Iustin Pop

Fix gnt-instance reinstall

Commit 1881 changed a rpc call but didn't fix all its users. This should
fix it (but I can't test as HTTP is broken).

Reviewed-by: imsnah

8797df43 11/11/2008 05:12 am Iustin Pop

Implement working directory for utils.RunCmd

In order to replace usage of the shell just for 'cd %s; ...' we need to
be able to specify the working directory for childs.

The patch also changes the default working directory (when not
specified) to "/", as opposed to the current dir; since the daemos run...

b14f759e 11/10/2008 02:38 pm Michael Hanselmann

ganeti.http: Move SSL socket creation into base class

The same code will be used by the HTTP client.

Reviewed-by: iustinp

b14b975f 11/10/2008 02:37 pm Michael Hanselmann

ganeti.daemon: Make Mainloop more flexible

While working on the HTTP client class, I wanted to use Mainloop
before deciding to use threads instead.

- Add docstrings
- Rename "quit" to "running", move it to a local variable
- Support adding and removing I/O listeners while running...

d7bace1b 11/10/2008 12:14 pm Michael Hanselmann

ganeti.http: Add constant for "Unexpected EOF"

This is an expected error message and will be used in two places.

Reviewed-by: iustinp

8a0b06d2 11/06/2008 01:25 pm Michael Hanselmann

Add new HTTP client class

It is based on the WorkerPool class which is already used for the job
queue and master daemon. Each request must be encapsulated in an
instance of HttpClientRequest, which will then be passed to
HttpClientManager for processing. Upon completion, the request object...

64357ed8 11/06/2008 01:24 pm Michael Hanselmann

ganeti.http: Use 411 Length Required in server code

Reviewed-by: iustinp

cd4d138f 11/05/2008 06:37 pm Guido Trotter

Update LUGrowDisk _WaitForSync call

The _WaitForSync call changed in r1794 but the GrowDisk call wasn't updated
then. This makes GrowDisk work in trunk.

Reviewed-by: iustinp

8a9f9060 11/05/2008 04:04 pm Michael Hanselmann

ganeti.http: Add more constants

As a preparation for the new HTTP client class, add more constants
to ganeti.http.

Reviewed-by: iustinp

116db7c7 10/28/2008 01:21 am Iustin Pop

Small documentation updates for workerpool.py

Reviewed-by: imsnah