Statistics
| Branch: | Tag: | Revision:

root @ 8a113c7a

# Date Author Comment
8a113c7a 01/09/2009 06:24 pm Iustin Pop

Add a new ssconf file with the ganeti version

The patch adds a new ssconf file containing the ganeti version.

Reviewed-by: imsnah

7d585316 01/09/2009 05:34 pm Iustin Pop

Work around a DRBD sync speed race condition

This is modified forward-port of commit 1544 on the 1.2 branch:

When DRBD is doing its dance to establish a connection with its
peer, it also sends the synchronization speed over the wire. In
some cases setting the sync speed only after setting up both...
90e722d1 01/09/2009 04:58 pm Iustin Pop

burnin: Add activate/deactivate disks

Reviewed-by: imsnah

cfacfd6e 01/09/2009 04:58 pm Iustin Pop

burnin: use the new replace_disks constants

This patch updates burnin to the latest replace disks constant, and
changes the constants' values to be more accurate.

Reviewed-by: imsnah

729164d0 01/09/2009 04:26 pm Iustin Pop

burnin: do not use offline nodes

This patch makes burnin skip the offline nodes in it's builtin node
selection. It also removes an extra line.

Reviewed-by: imsnah

94a02bb5 01/09/2009 04:26 pm Iustin Pop

Fix gnt-os for offline nodes

We shouldn't query offline nodes in gnt-os. This patch adds an utility
function to ConfigWriter that returns the names of online nodes and uses
it in LUDiagnoseOS to query only the good nodes.

Reviewed-by: imsnah

186ec53c 01/09/2009 02:52 pm Iustin Pop

Silence warning on node list for offline nodes

The warning in node list is meant for nodes that return wrong
information, but for offline nodes this case is normal.

Reviewed-by: imsnah

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

7e9366f7 01/09/2009 02:22 pm Iustin Pop

Cleanup replace-disks modes and options

In 1.2, due to the md+drbd7 legacy, we had a complex choice of replace
modes, and the new drbd8 modes where forced into this syntax, with some
complicated rules of transition from one mode to another (if REPLACE_ALL...

82e37788 01/08/2009 06:39 pm Iustin Pop

Fix cluster verify/node net test for offline nodes

For offline nodes, we shouldn't add them to the NV_NODELIST and
NV_NODENETTEST tests since they most likely won't succeed.

The patch makes gnt-cluster verify happy again in such cases.

Reviewed-by: imsnah

3247bbac 01/08/2009 06:05 pm Iustin Pop

rpc: Add a method for easy check of remote results

The patch adds a new method to the rpc.RpcResult class called
"RemoteFailMsg" which is useful for the RPC calls which return a
(status, payload) style result.

Reviewed-by: imsnah

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....
cf8df3f3 01/08/2009 02:03 pm Iustin Pop

bdev: forward-port ReAttachNet/DisconnectNet

This is plain copy of the 1.2 ReAttachNet and DisconnectNet methods on
the DRBD8 device, with the logger to logging module changes and the
ReAttachNet method renamed to AttachNet.

These methods are not used anywhere right now, but will be used for...

5282084b 01/07/2009 07:02 pm Iustin Pop

backend: Remove symlinks by disk name

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

backend: Remove symlinks by disk name, not using a wildcard
Reviewed-by: ultrotter

The changes to the original patch are related to the docstring style and...

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

03dfa658 01/07/2009 07:02 pm Iustin Pop

Fix the _RemoveBlockDevLinks() function

This is a forward-port of commit 1163 on the 1.2 branch:
This fixes the removal of the instance symlinks (probably breakage from
the glob changes).

Reviewed-by: imsnah
3c9c571d 01/07/2009 07:01 pm Iustin Pop

Remove instance's symlinks

This is a forward-port of commits 1150 and 1151 on the 1.2 branch:
Add _RemoveBlockDevLinks auxiliary function, called when an instance
fails to start and when it is shut down.

Reviewed-by: iustinp

and:
Fix cut&paste error when removing symlinks...

ec596c24 01/07/2009 07:01 pm Iustin Pop

Catch BlockDeviceError when starting instance

This is a forward-port of commit 1149 on the 1.2 branch:
_GatherAndLinkBlockDevs used to raise the errors.BlockDeviceError
exception when it failed to create a block device, and with this patch
set it does so also when it fails to create a symlink to it....

9332fd8a 01/07/2009 07:01 pm Iustin Pop

Create symlinks to intances' block devices

This is a forward-port of commit 1148 on the 1.2 branch:
Change the _GatherBlockDevs private function, called only one time by
StartInstance, to _GatherAndLinkBlockDevs, and make it transform the
device returned even more by calling the new _SimlinkBlockDev auxiliary...

069cfbf1 01/07/2009 07:01 pm Iustin Pop

Simplify hypervisor block_devices structure

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

The hypervisor doesn't need to be passed the whole block device
structure, so we'll just give it the block device name on the local
node, and the name as seen by the instance. This will make it easier to...
2b17c3c4 01/07/2009 04:38 pm Iustin Pop

_AssembleInstanceDisks: fix rpcresult handling

Commit 2117 changed _AssembleInstanceDisks to correctly parse the
failure status of the new RpcResult structure, but it didn't fix the
storing of only the result payload. Since RpcResult is not JSON
serializable, LUActivateInstanceDisks is failing....

e09fdcfa 01/06/2009 11:57 am Iustin Pop

Fix some pylint-detected issues

Two bad indentation cases and a missing variable.

Reviewed-by: imsnah

5b099da9 12/19/2008 09:31 pm Michael Hanselmann

ganeti.bootstrap: Set permissions on newly uploaded files

Reviewed-by: amishchenko

699777f2 12/19/2008 09:31 pm Michael Hanselmann

ganeti.cmdlib: Check remote API certificate on "gnt-cluster verify"

Reviewed-by: amishchenko

2438c157 12/19/2008 09:30 pm Michael Hanselmann

ganeti.bootstrap: Upload remote API certificate to new nodes

Reviewed-by: amishchenko

5557b04c 12/19/2008 09:30 pm Michael Hanselmann

ganeti.bootstrap: Prepare for remote API certificate

Reviewed-by: amishchenko

c4415fd5 12/19/2008 09:30 pm Michael Hanselmann

ganeti.bootstrap: Write SSL key to temporary file and set permissions

Previously, we set the permissions only after writing the key. This
gave other users on the system a small window during which they could
read the key.

Reviewed-by: amishchenko

61a08fa3 12/19/2008 09:30 pm Michael Hanselmann

ganeti.bootstrap: Generate SSL certificate for remote API

Reviewed-by: amishchenko

40a97d80 12/19/2008 09:29 pm Michael Hanselmann

ganeti.bootstrap: Move SSL certificate generation into separate function

Reviewed-by: amishchenko

b5b67ef9 12/19/2008 02:58 pm Michael Hanselmann

ganeti-rapi: Implement HTTP authentication

Passwords are stored in "$localstatedir/lib/ganeti/rapi_users". User
options specify the access permissions of a user (see docstring for
ganeti.http.ReadPasswordFile), for which only "write" is supported
to grant write access. Every other user has read-only access....

7e9760c3 12/19/2008 02:58 pm Michael Hanselmann

ganeti-rapi: Introduce per-request context

This will be used to evaluate access permissions to resources.

Reviewed-by: amishchenko

e6e94655 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Function to read password file

Lines in the password file are of the following format:

<username> <password> [options]

Fields are separated by whitespace. Username and password are
mandatory, options are optional and separated by comma (",")....

68fa9caf 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Add support for private data in HTTP requests

Reviewed-by: amishchenko

be500c29 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Add support for basic HTTP authentication

As per RFC2617.

Reviewed-by: amishchenko

f8bd7df3 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Prepare authentication for HTTP server

The authentication class will override PreHandleRequest.

Reviewed-by: amishchenko

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

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

Reviewed-by: ultrotter

d7fd1f28 12/18/2008 06:38 pm Michael Hanselmann

ganeti.jqueue: Group job archivals to reduce number of RPC calls

Reducing the actual number of RPC calls will come in another patch.

Reviewed-by: ultrotter

f8ad5591 12/18/2008 06:38 pm Michael Hanselmann

Prevent RPC timeout on auto-archiving jobs

With a large job queue, auto-archiving jobs can take a very long time,
causing timeouts on the luxi RPC layer. With this change, auto-
archive returns after half of the RPC timeout has passed. The user
will see how many jobs are left unchecked....

78d12585 12/18/2008 06:38 pm Michael Hanselmann

jqueue: When auto-archiving jobs, calculate job status only once

This is done by passing the job object to _ArchiveJobUnlocked instead
of only the job ID. Also return whether job was actually archived.

Reviewed-by: ultrotter

58b22b6e 12/18/2008 06:23 pm Michael Hanselmann

Use subdirectories for job queue archive

As it turned out, having many files in a single directory can be
very painful. With this patch, only 10'000 files are stored in a
directory for the job queue archive. With 10'000 directries, this
allows for up to 100 million jobs be archived without having large...

6e797216 12/18/2008 06:23 pm Michael Hanselmann

Add rename function automatically creating directories if needed

Unfortunately, os.makedirs in Python 2.4 is not safe against multiple
processes creating the same directory tree at the same time. This is
only fixed in Python 2.5 and up. Adding more checks in our code doesn't...

aea0ed67 12/18/2008 06:21 pm Michael Hanselmann

ganeti.http: Don't pass poller object around

They're cheap to instantiate and doing this changes makes the code
a bit simpler.

Reviewed-by: ultrotter

79589f25 12/18/2008 03:45 pm Michael Hanselmann

Rename http.HttpInternalError to HttpInternalServerError

All other exceptions are named after the error name in RFC2616 (HTTP/1.1).

Reviewed-by: amishchenko

b3660886 12/18/2008 03:45 pm Michael Hanselmann

ganeti.http: Add more constants and errors

Reviewed-by: amishchenko

45eac583 12/18/2008 03:45 pm Michael Hanselmann

ganeti.http: Ignore ENOTCONN when shutting down the connection

Reviewed-by: amishchenko

a8e01e9f 12/18/2008 03:44 pm Michael Hanselmann

Implement support for additional headers with HTTP errors

Reviewed-by: amishchenko

f30ca1e6 12/17/2008 04:30 pm Michael Hanselmann

Add simple unittests for ganeti.http

More complex unittests will need some refactoring in the HTTP code.

Reviewed-by: amishchenko

e38220e4 12/17/2008 04:09 pm Michael Hanselmann

ganeti.bootstrap: Whitespace fix

Reviewed-by: iustinp

f87b405e 12/17/2008 03:18 pm Michael Hanselmann

Add job queue size limit

A job queue with too many jobs can increase memory usage and/or make
the master daemon slow. The current limit is just an arbitrary number.
A "soft" limit for automatic job archival is prepared.

Reviewed-by: iustinp

7167159a 12/17/2008 01:24 pm Michael Hanselmann

utils.KillProcess: Use waitpid() to wait for child processes

Sometimes the proc filesystem doesn't reflect the current status of
a process. By calling waitpid(), we make sure to get the current
information, at least for child processes. The timeout is still...

26de0cf1 12/16/2008 06:24 pm Guido Trotter

Release ganeti 2.0~alpha1

Reviewed-by: iustinp

513e896d 12/16/2008 06:24 pm Guido Trotter

LUConnectConsole: fix primary_node online check

The primary node is part of the instance, not of the opcode.

Reviewed-by: iustinp

bf988c29 12/16/2008 06:24 pm Guido Trotter

_RunCmdPipe: handle EINTR in poller.poll()

poll() can be interrupted. rather than failing we retry until it
returns.

Reviewed-by: iustinp

14aa53cb 12/16/2008 06:24 pm Guido Trotter

KVM: improve socat interface

Call socat with a full path specified at configure time, rather than
just by its name, and check for the binary to exist at hypervisor
verify.

Reviewed-by: iustinp

dd71f05b 12/16/2008 06:23 pm Guido Trotter

KVM: use a different default kernel path

It makes sense for the default kvm kernel not to be called "xenU".

Reviewed-by: iustinp

f088165d 12/15/2008 12:06 pm Michael Hanselmann

ganeti.http: Add three TODOs for improvements

Reviewed-by: iustinp

f2e13d55 12/15/2008 11:48 am Michael Hanselmann

ganeti.http: Explicitly initiate handshake

Otherwise it would be done on the first read/write operation, making
error handling more difficult (such as EOF during handshake).

Reviewed-by: iustinp

d7fa9982 12/15/2008 11:40 am Michael Hanselmann

ganeti.http: Implement handshake socket operation

Reviewed-by: iustinp

39cfc25b 12/15/2008 11:40 am Michael Hanselmann

ganeti.http: Handle SSL_ERROR_ZERO_RETURN

Also add a comment next to the place where the SSL connection is shut
down.

Reviewed-by: iustinp

3c7f6c44 12/14/2008 02:05 pm Iustin Pop

cleanup: ConfigWriter, initialize all attributes

We should initialized the _last_cluster_serial in the constructor too (just to
be consistent).

Reviewed-by: amishchenko

f6f91001 12/14/2008 02:05 pm Iustin Pop

cleanup: rapi v2 instance tags wrong attribute

This was changed in the past, but it seems this class was forgotten.

Reviewed-by: amishchenko

3f3dfc15 12/14/2008 02:05 pm Iustin Pop

cleanup: http server, line too long

Reviewed-by: amishchenko

5a9c3f46 12/14/2008 02:05 pm Iustin Pop

cleanup: http client, line too long

Reviewed-by: amishchenko

5661b908 12/14/2008 02:04 pm Iustin Pop

cleanup: xen hypervisor

Wrong indentation and uniformize one method signature.

Reviewed-by: amishchenko

08137f9e 12/14/2008 02:04 pm Iustin Pop

cleanup: kvm code likes to redefine names

Reviewed-by: amishchenko

9c034cbe 12/14/2008 02:04 pm Iustin Pop

lib/ssh.py: import the logging module

This only means most of our error paths in this module were not working
(and generating exceptions).

Reviewed-by: amishchenko

bf75f132 12/14/2008 02:04 pm Iustin Pop

SshRunner: add docstring for _BuildSshOptions

Reviewed-by: amishchenko

67047322 12/14/2008 02:04 pm Iustin Pop

Improve _autoconf.py comments

This adds a docstring to the _autoconf.py file detailing how it's
generated (the other comment it's not visible in pydoc/epydoc).

Reviewed-by: amishchenko

ad1bf20c 12/14/2008 02:04 pm Iustin Pop

cleanup: use _ for unused loop counter

Reviewed-by: amishchenko

805f0c07 12/14/2008 02:04 pm Iustin Pop

cleanup: WorkerPool, wrong variable name

Quoting Michael: "why is this even working?"

Reviewed-by: imsnah,amishchenko

0b5ad33e 12/14/2008 02:03 pm Iustin Pop

cleanup: TcpPing, wrong variable name

The default value of 'False' wasn't initialized properly. It doesn't
require initialization, but it's cleaner this way.

Reviewed-by: amishchenko

cd34e7bf 12/14/2008 02:03 pm Iustin Pop

cleanup: SetEtcHostsEntry unused var

Reviewed-by: amishchenko

a0add446 12/14/2008 02:03 pm Iustin Pop

cleanup: fix IAllocator hypervisor usage

Two problems: the iallocator.hypervisor wasn't initialized to None in
the constructor, so pylint doesn't realize it's initialized later with
setattr.

Second, 'hypervisor' is a module, so we shouldn't use it as a variable....

4504c3d6 12/14/2008 02:03 pm Iustin Pop

cleanup: LUReplaceDisks unused vars

And a small whitespace fix.

Reviewed-by: amishchenko

9ca87a96 12/14/2008 02:03 pm Iustin Pop

cleanup: do not hide upper-scope name

hypervisor is a module, so we shouldn't use it as an argument.

Reviewed-by: amishchenko

43017d26 12/14/2008 02:03 pm Iustin Pop

cleanup: fix use of _CheckNodeOnline

A few cases of wrong variable name.

Reviewed-by: amishchenko

8153e7e3 12/14/2008 02:03 pm Iustin Pop

cleanup: LUAddNode, LUSetNodeParams unused variable

This is a leftover from the abstraction of AdjustCandidatePool, and it
also requires the config lock, so it's better to remove it.

Reviewed-by: amishchenko

d1dc3548 12/14/2008 02:02 pm Iustin Pop

cleanup: LURenameCluster wrong variable name

Reviewed-by: amishchenko

95268cc3 12/14/2008 02:02 pm Iustin Pop

cleanup: fix export NIC count the same way as disk

For safety, we use the same algorithm as in disk count.

Reviewed-by: amishchenko

bca2e7f4 12/14/2008 02:02 pm Iustin Pop

cleanup: fix backend._RecursiveFindBD

_RecursiveFindBD takes a parameter that isn't used; moreover, nowhere in
the SVN history can I find a case that it has been used.

As such, remove this parameter and fix its callers.

Reviewed-by: amishchenko

9a4e6f41 12/14/2008 02:02 pm Iustin Pop

cleanup: more unused vars

Reviewed-by: amishchenko

3bc6be5c 12/14/2008 02:02 pm Iustin Pop

cleanup: sanitize a default parameter

Instead of relying that the usage of the parameter is ok with mutable
default parameters, let's just make it safer..

Reviewed-by: amishchenko

9728ae5d 12/14/2008 02:02 pm Iustin Pop

cleanup: exceptions should derive from Exception

Reviewed-by: amishchenko

7bc9e58f 12/14/2008 02:02 pm Iustin Pop

cleanup: fix GatherMasterVotes

Remove unused vars

Reviewed-by: amishchenko

531baf8e 12/14/2008 02:01 pm Iustin Pop

cleanup: _InitSSHSetup doesn't need its argument

Reviewed-by: imsnah

fab1e3a4 12/14/2008 02:01 pm Iustin Pop

cleanup: fix 'variable unused' warning

In the iteration we don't care about the node names, so we change the
for loop to be over the values (and not itervalues).

Reviewed-by: amishchenko

22692e48 12/12/2008 06:50 pm Michael Hanselmann

ganeti.http: Rename HttpBase._using_ssl to HttpBase.using_ssl

It'll be queried from other classes.

Reviewed-by: iustinp

f4322a1e 12/12/2008 06:50 pm Michael Hanselmann

ganeti.http: Rename HttpSocketBase to HttpBase

It's more appropriate.

Reviewed-by: iustinp

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

16f323ce 12/11/2008 04:58 pm Iustin Pop

Switch epydoc to parse only

epydoc seems to be mightily confused by decorators and how they change
functions (it starts mixing the parameters of the decorated function
into the decorator itself); so we want it to parse only and not look at
the objects themselves....

52e2f66e 12/10/2008 02:11 pm Michael Hanselmann

ganeti.backend: Improve compression check

Reviewed-by: iustinp

358a8811 12/10/2008 02:06 pm Michael Hanselmann

ganeti.http: Docstring updates

Reviewed-by: iustinp

13b63666 12/09/2008 08:42 pm Michael Hanselmann

ganeti.http: Remove _HttpClientError

This is a leftover from old code.

Reviewed-by: iustinp

59305197 12/09/2008 07:35 pm Michael Hanselmann

ganeti.http.server: Increase connection backlog to 1024

This solves a problem with many concurrent requests. By default, 1024
is the maximum backlog on Linux kernels. We limit the number of clients
through MAX_CHILDREN, too. The idea of just increasing the backlog is...

12bce260 12/09/2008 03:24 pm Michael Hanselmann

RPC: Compress file upload data

Adding compression to larger amounts of data is more efficient than
transferring it (len(nodes) - 1) times over the network without
compression. We were able to compress a 800KB config file to about
30 KB, which is about 40 KB with Base64 encoding (required due to...

832261fd 12/09/2008 11:33 am Iustin Pop

Warn for instances living on offline nodes

The patch also changes the result to error for non-reachable secondary nodes
(as for primary nodes).

Reviewed-by: ultrotter

ee513a66 12/08/2008 07:45 pm Iustin Pop

Fix _AdjustCandidatePool

Currently the ConfigWriter.MaintainCandidatePool returns node names, and
_AdjustCandidatePool uses them as such, but then it passes these to
context.ReaddNode which in turn passes them to jqueue.JobQueue.AddNode which
uses them as objects.Node instances....

3a5ba66a 12/08/2008 01:46 pm Iustin Pop

gnt-node modify: add the offline attribute

This patch changes gnt-node modify and the associated opcode/lu to allow
modification of the node offline attribute.

Setting a node into offline mode automatically demotes it from the
master role.

Reviewed-by: ultrotter

ed83f5cc 12/08/2008 11:10 am Iustin Pop

RPC: do not make calls to offline nodes

This patch changes the _MultNodeCall and _SingleNodeCall helpers to not
actually make calls to offline nodes, but instead generate fake
responses which have a parameter caller 'offline' set so that callers
can check for this value if they want (otherwise, it's just a failed RPC...

c6286afc 12/07/2008 01:01 pm Guido Trotter

chmod ganeti.initd before uploading it

When an upload is done to a node which doesn't have any version of
ganeti installed, this prevents a non-executable-initd error later in
the upload.

Reviewed-by: imsnah