Statistics
| Branch: | Tag: | Revision:

root / daemons / ganeti-rapi @ 1e915b86

History | View | Annotate | Download (7.5 kB)

# Date Author Comment
c1e7897d 05/04/2010 03:37 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    cfgupgrade: allow working with relative paths
    Cleanup /etc/hosts during node removal
    verify cluster: check /etc/hosts consistency
    Change the migration message
    qa: enable early release during parallel burnin...
71d23b33 05/03/2010 06:14 pm Iustin Pop

Fix pylint 0.20.0 warnings

These seem to be wrong, possibly a regression in pylint.

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

921efbb3 04/06/2010 03:32 pm Michael Hanselmann

Merge remote branch 'devel-2.1'

  • devel-2.1:
    Extend ConfdFilterCallback with consistency checks
    Abstract the confd client creation
    Remove unused import from test file
    kvm_flag hypervisor parameter
    Move the runas user at execution time
    Send "501 Not Implemented" back when method not found...
33664046 03/30/2010 05:21 pm René Nussbaumer

Send "501 Not Implemented" back when method not found

Before this was "400 Bad Request" and thus it didn't reflect
the reality.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

bb3776b4 03/15/2010 04:25 pm Michael Hanselmann

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1: (116 commits)
    Implement replacing cluster certs and keys via “gnt-cluster renew-crypto”
    cli: Add helper function to stop and start whole cluster
    cfgupgrade: Use new bootstrap function for certs and keys...
23ccba04 03/10/2010 12:17 pm Michael Hanselmann

http.auth: Fix bug with checking hashed passwords

When username and password were sent for a resource not requiring
authentication, it wouldn't be accepted if the user in question had a
hashed password. The reason was that the function GetAuthRealm used to...

16b037a9 01/22/2010 04:36 pm Michael Hanselmann

Remove http.HttpJsonConverter

With the move of the content-type handling to the various users of the HTTP
layer, this class isn't really useful anymore.

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

ab221ddf 01/22/2010 04:17 pm Michael Hanselmann

http.server: No longer enfore JSON encoding for body

The HTTP layer shouldn't care about the contents of the request data or
responses. This requires further changes in the RAPI code to handle client
requests correctly.

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

c10e2751 01/22/2010 04:17 pm Michael Hanselmann

ganeti-rapi: Remove serial number/ETag code

It was never used as intended.

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

24cd3744 01/04/2010 12:55 pm Iustin Pop

Merge remote branch 'devel-2.1'

  • devel-2.1: (40 commits)
    Fix unused imports or add silences where needed
    bdev: Add a TODO and a pylint silence
    confd: add a TODO and a pylint disable
    pylint: Temporarily disable W0201
    Disable R0922 in pylint
    Further pylint disables, mostly for Unused args...
30e4e741 01/04/2010 11:20 am Iustin Pop

Fix unused imports or add silences where needed

In some cases pylint doesn't parse the import correctly, so we add
silences; but there are also many cases of unused imports, which we
simply remove.

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

2d54e29c 01/04/2010 11:17 am Iustin Pop

Further pylint disables, mostly for Unused args

Many of our functions have to follow a given API, and thus we have to
keep a given signature, but pylint doesn't understand this. Therefore,
we silence this warning.

The patch does a few other cleanups.

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

f93427cd 01/04/2010 11:16 am Iustin Pop

daemons: handle arguments correctly and uniformly

Of all daemons, only rapi did abort when given argument. None of our
daemons use any arguments, but they accepted them blindly. This is a
very bad experience for the user.

This patch adds checking and exiting in all daemons, in a uniform way....

f4ad2ef0 01/04/2010 11:15 am Iustin Pop

Remove more unused variables

This removes unused variables in the rest of the code (outside lib/).

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

7260cfbe 01/04/2010 11:15 am Iustin Pop

Add targeted pylint disables

This patch should have only:

- pylint disables
- docstring changes
- whitespace changes

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

0648750e 12/01/2009 03:29 pm Michael Hanselmann

daemon.GenericMain: Don't use dict for SSL paths, improve CLI options

Pass SSL certificate and key paths from ganeti-* instead of using a dict. The
patch also improves the --ssl-{key,cert} options by giving the default in
--help output and changes the validation a bit....

0b08f096 10/29/2009 11:33 am Michael Hanselmann

ganeti-rapi: Use new function to verify passwords

This enables the use of hashed passwords in rapi_users.

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

6c948699 08/25/2009 07:00 pm Michael Hanselmann

Style fixes for ganeti-*

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

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

be73fc79 07/23/2009 11:39 am Guido Trotter

ganeti-rapi, replace hardcoded exit value

substitute exit(1) with exit(constants.EXIT_FAILURE).
Also fix a wrongly indented line.

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

8790ac54 07/23/2009 11:39 am Guido Trotter

Add the bind-address option to ganeti-rapi

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

6e99c5a0 02/13/2009 05:54 pm Iustin Pop

RAPI: fixes related to write mode

This patch fixes many small issues related to write functions:
- update documentations w.r.t. how to add users
- update the instance add function for latest API
- add instance delete
- fix addition of tags
- update some error messages...

1f8588f6 02/13/2009 01:38 pm Iustin Pop

RAPI: format error messages as JSON

This patch changes the format of the HTTP error messages from text/html, which
is hard to parse from RAPI clients, to JSON which can be automatically parsed.

The error message is an object, which contains always three keys:...

77e1d753 02/13/2009 01:38 pm Iustin Pop

Make RAPI return 502/504 errors for luxi errors

This changes the RAPI error codes for luxi errors; a timeout error is
now reported properly as 504, while any other luxi error is reported as
502.

It would be good to convert even more errors into proper return codes in...

6bb258a7 02/13/2009 01:37 pm Iustin Pop

Fix ganeti-rapi startup with missing certificate

This patch displays a nicer error message compared to the default
stacktrace.

Reviewed-by: imsnah

2ed6a7d6 02/05/2009 04:09 pm Iustin Pop

rapi: fix SSL mode and use SSL by default

This patch fixes the SSL mode (by actually constructing SSL parameters
from the command line options) and enables SSL by default; the old “-S”
option which enabled SSL is now changed to “--no-ssl”. The certificate...

85414b69 02/04/2009 05:11 pm Iustin Pop

rapi: fix authentication and queries

For queries, we don't want to require authentication. We fix this by adding an
override GetAuthRealm in the rapi daemon.

We also fix a method name.

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

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

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

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

bc2929fc 12/04/2008 05:24 pm Michael Hanselmann

ganeti-rapi: Convert 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

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

7a8f64da 10/21/2008 11:32 pm Oleksiy Mishchenko

Pass request headers in to RAPI handlers.

Reviewed-by: iustinp

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

713faea6 10/17/2008 04:06 pm Oleksiy Mishchenko

ETag passing support.

Reviewed-by: imsnah

16a8967d 10/16/2008 07:54 pm Michael Hanselmann

rapi: Convert to new HTTP server class

Requests are no longer logged to a separate file.

Reviewed-by: amishchenko

a2f92677 10/15/2008 11:22 am Michael Hanselmann

rapi: Whitespace fixes

Reviewed-by: ultrotter

441e7cfd 07/31/2008 12:06 pm Oleksiy Mishchenko

First write operation (add tag) for Ganeti RAPI

Add instance tag handling, improved error logging.
...oh, yes adopt instance listing for RAPI2!

Reviewed-by: iustinp

5675cd1f 07/30/2008 11:33 am Iustin Pop

Implement checking for the master role in rapi

This patch moves the CheckMaster function from ganeti-masterd to ssconf
(most logical place, it cannot go in utils since we would have recursive
imports between ssconf and utils) and changes ganeti-rapi to also call...

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

Use constants for the pid file stems

Reviewed-by: imsnah

f71245a0 07/29/2008 11:48 am Iustin Pop

Make the rapi daemon create a pidfile

This is needed for controlling it cleanly with start-stop daemon.

Reviewed-by: ultrotter

cfe3c70f 07/28/2008 01:17 pm Michael Hanselmann

Implement signal handling in ganeti-rapi

Reviewed-by: iustinp

3cd62121 07/28/2008 01:17 pm Michael Hanselmann

Move ganeti-rapi core code to daemon

All other daemons have their main code in themselves and not in a module.
This patch does the same to ganeti-rapi by moving the code from
lib/rapi/RESTHTTPServer.py to daemons/ganeti-rapi.

Reviewed-by: iustinp

8c229cc7 07/11/2008 12:47 pm Oleksiy Mishchenko

Initial copy of RAPI filebase to the trunk

Reviewed-by: iustinp