Statistics
| Branch: | Tag: | Revision:

root / lib / errors.py @ a52978c7

History | View | Annotate | Download (10.2 kB)

# Date Author Comment
e687ec01 08/25/2011 01:53 pm Michael Hanselmann

PEP8 style fixes

Identified using the “pep8” utility.

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

1ce03fb1 07/26/2011 02:19 pm Michael Hanselmann

Add ht-based result checks to opcodes

This adds the infrastructure necessary to check opcode results using
ht-based functions. Checks are added for two opcodes.

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

7578ab0a 04/18/2011 06:55 pm Michael Hanselmann

qlang: Add parser for query filter language

With this parser, command line utilities will be able to provide filters
through query2 in a simplistic language. Example filters:

name  "node3.example.com" 
master or (name "node4.example.com")
be/memory == 128 and name =~ /^web/i...
cbfa4f0f 02/22/2011 05:57 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4: (60 commits)
    Update news and bump version for 2.4.0 rc2
    Fix pylint warnings
    TestRapiInstanceRename use instance name
    Change the list formatting to a 'special' chars
    Add support for merging node groups
    Add option to rename groups on conflict...
df156277 02/15/2011 03:20 pm Michael Hanselmann

errors: Add list of possible failure types

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

7e975535 01/31/2011 05:38 pm Stephen Shirley

Minor grammar fix in QuitGanetiException docstring

Signed-off-by: Stephen Shirley <>
Reviewed-by: Michael Hanselmann <>

7a8bda3f 10/28/2010 07:56 pm Michael Hanselmann

luxi.ProtocolError: Derive from errors.LuxiError

This allows LUXI errors to be encoded and serialized.

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

4b63dc7a 10/13/2010 02:42 pm Iustin Pop

"Fix" handling of old software versions on startup

Currently, masterd startup with old software versions is very confusing
for users: we present two tracebacks, with a message in the middle about
"version mismatch". This can lead to users believing that all that needs...

0f979a34 08/18/2010 07:59 pm Guido Trotter

Merge branch 'devel-2.2'

  • devel-2.2:
    RAPI client: Support modifying instances
    RAPI: Allow modifying instance
    Small fixes for instance creation via RAPI documentation
    gnt-debug: Extend job queue tests
    jqueue: Mark opcodes following failed ones as failed, too...
8b312c1d 08/18/2010 11:26 am Manuel Franceschini

Introduce new IPAddress classes

This patch unifies the netutils functions dealing with IP addresses to
three classes:
- IPAddress: Common IP address functionality
- IPv4Address: IPv4 specific functionality
- IPv6address: IPv6-specific functionality

Furthermore it adds methods to check whether an address is a loopback...

84f790e6 08/17/2010 04:34 pm Michael Hanselmann

errors: Function to check whether value is encoded error

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

31155d60 07/16/2010 12:47 pm Balazs Lecz

Add ParseCpuMask() utility function

Also adds a generic ParseError exception.

Signed-off-by: Balazs Lecz <>
Reviewed-by: Michael Hanselmann <>

7e5913a7 07/07/2010 05:50 pm Luca Bigliardi

Merge branch 'devel-2.1'

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

4c32a8bd 07/07/2010 05:45 pm Luca Bigliardi

Mlockall: decrease warnings if ctypes module is not present

Node daemon prints a lot of warnings if --no-mlock option is not specified and
ctypes module is not present.

With the following patch the warning is printed only at noded startup.

Signed-off-by: Luca Bigliardi <>...

3d6c5566 06/23/2010 01:32 pm Guido Trotter

jqueue._LoadJobFromDisk: remove safety archival

Currently _LoadJobFromDisk archives job files it finds corrupted. Since
we want to use it to load files without holding locks, this could cause
a conflict: we just move the feature to _LoadJobUnlocked which is always...

e22af31d 05/21/2010 01:45 pm Guido Trotter

Remove errors.ConfdFatalError

This exception is caught, but never thrown. It became useless when we
moved confd from on/off to enabled/disabled, but always running on all
nodes. Removing its definition and the code catching it can do no harm.

Signed-off-by: Guido Trotter <>...

d984846d 12/28/2009 02:05 pm Iustin Pop

Merge branch 'devel-2.0' into devel-2.1

  • devel-2.0:
    Fix indentation in hv_kvm
    Implement BuildHooksEnv for NoHooksLU
    Clarifiy some more wide pylint disables
    Fix two bugs in seldom-used codepaths
    Update pylintrc
    Add targetted pylint disables
    Partial cherry-pick of 6c881c5 from the 2.1 branch...
1e57442a 12/18/2009 03:01 pm René Nussbaumer

Fix a typo in the doc string

MaybeRaise in lib/errors.py had a typo in the doc string

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

2c8a5690 11/06/2009 04:08 pm Guido Trotter

Add errors.ReservationError

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

104f4ca1 11/04/2009 01:54 pm Iustin Pop

Introduce a wrapper for hostname resolving

Currently a few of the LU's CheckPrereq use utils.HostInfo which raises
a resolver error in case of failure. This is an exception from the
standard that CheckPrereq should raise an OpPrereqError if the error is
in the 'pre' phase (so that it can be retried)....

5c983ee5 11/02/2009 04:14 pm Iustin Pop

Introduce two-argument style for OpPrereqError

This patch introduces a two-argument style for OpPrereqError. Only the
direct raise calls in cmdlib.py are converted, other users will follow.

cli.py is modified to handle both two-argument style and the current...

159d4ec6 11/02/2009 04:06 pm Iustin Pop

Remove the OpRetryError exception

This is only used in two places, in an error path that is no longer
valid since Ganeti 2.0. We remove the try..except since we should not
get it anymore (and if we do, then we should catch it in all
config.Update cases) and we remove the exception class completely....

a6607331 09/25/2009 06:56 pm Iustin Pop

Move the luxi error handling into errors.py

Currently the luxi error handling is hardcoded as special encoding on
the masterd-side and special decoding on the client side. This patch
moves it to errors.py such that other parts of the code can reuse the
same encoding....

e4ccf6cd 09/16/2009 03:55 pm Guido Trotter

Confd client library

Initial confd client library implementation. This initial version uses
asyncore, and supports answers via a callback.

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

c8eded0b 09/16/2009 03:55 pm Guido Trotter

AsyncUDPSocket: Move to a well defined UDP size

Currently we read maximum 4K packets, and don't check packets when
sending them. With this patch we move to a well defined maximum size of
60K.

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

9748ab35 09/16/2009 03:55 pm Guido Trotter

Move fourcc packing/unpacking to main confd module

This way it can be used by the client as well

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

589dee9a 08/28/2009 02:07 pm Guido Trotter

Add errors.InotifyError

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

6956e9cd 08/27/2009 06:21 pm Iustin Pop

Move the luxi error handling into errors.py

Currently the luxi error handling is hardcoded as special encoding on
the masterd-side and special decoding on the client side. This patch
moves it to errors.py such that other parts of the code can reuse the
same encoding....

b125e3b3 08/10/2009 03:56 pm Guido Trotter

Basic exceptions used by confd

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

ac2d0fe4 07/29/2009 03:11 pm Michael Hanselmann

Add first implementation of generic storage unit framework

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

f4a2f532 07/14/2009 01:35 pm Guido Trotter

HMAC authenticated json messages

This patch includes HMAC authenticated json messages to the serializer.
The new interface works on any json-encodable data type, and can sign it
with a private key and an optional salt. The same private key must be
used upon message loading to verify the message....

8e70b181 06/15/2009 08:08 pm Iustin Pop

Remove old invalid-os related functionality

We no longer need OS objects to be able to represent invalid OSes. This
cleans up the code handling those cases.

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

0623d351 06/15/2009 08:08 pm Iustin Pop

Conver node_leave_cluster rpc to new style result

This patch converts this rpc call to the new style result, and also
changes in the process the meaning of the QuitGanetiException's
arguments and the node daemon rpc call exception handler.

The problem with the exception handler is that we used a two-stage one,...

a5728081 02/10/2009 05:06 pm Guido Trotter

Instance parameters: force typing

We want all the hv/be parameters to have a known type, rather than a
random mix of empty string, boolean values, and None, so we declare the
type of each variable and we enforce/convert it.

- Add some new constants for enforceable value types...

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

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

686d7433 10/15/2008 01:52 pm Iustin Pop

Implement the job queue drain flag

We add a (per-node) queue drain flag that blocks new job submission.
There is not yet an interface to add/remove the flag (will come in next
patches).

Reviewed-by: imsnah

6797ec29 10/15/2008 01:51 pm Iustin Pop

Implement transport of ganeti errors across luxi

This patch adds a generic method to identify the ganeti error given its
class name, and implements this across the luxi protocol.

Reviewed-by: imsnah

d11bda8d 10/15/2008 01:51 pm Iustin Pop

Change the JobQueueError parent class

Currently this is not derived from GenericError, but there's no reason
for it to be so.

Reviewed-by: imsnah

f1da30e6 07/11/2008 07:17 pm Michael Hanselmann

Add experimental persistency to job queue

It's not perfect and it's not finished, but it's a start.

- Serial number is read only once, but written on each update
- Jobs are kept only on disk (caching will be implemented)

Reviewed-by: iustinp

9f9c8ee2 06/27/2008 05:27 pm Guido Trotter

Simplify QuitGanetiException instantiation

Rather than packing all the arguments in a tuple, let's pass them
plainly. The superclass won't complain.

Reviewed-by: iustinp

e50bdd68 06/26/2008 05:42 pm Guido Trotter

Add errors.QuitGanetiException

This exception does not signal an error but serves the purpose of making
the ganeti daemon shut down after handling a request. Currently it will
be used by ganeti-noded but in the future ganeti-masterd might make use
of it as well. Its usage is documented in the docstring....

b0059682 06/26/2008 05:41 pm Guido Trotter

Add missing empty line in SshKeyError's docstring

Reviewed-by: iustinp

7bca53e4 06/18/2008 03:32 pm Michael Hanselmann

ganeti-watcher: Replace custom exceptions with ganeti.error.*

Reviewed-by: iustinp

685ee993 04/28/2008 04:01 pm Iustin Pop

Convert cli.SubmitOpCode to use the master

This patch converts the cli.py SubmitOpCode method to use the unix
protocol and thus execute the opcodes via the master.

The patch allows a partial burnin to work with the master. Currently the
query opcodes, since they are executed via the SubmitOpCode, are...

2f31098c 10/10/2007 01:00 pm Iustin Pop

Remove the shebang from modules

Since modules are not directly executables, remove the shebang from
them. This helps with lintian warnings.

Also make the autogenerated _autoconf.py contain two comment lines at
the beginning, like the other modules.

Reviewed-by: ultrotter

305a7297 10/04/2007 02:51 pm Guido Trotter

Ship (and display) path for InvalidOS errors too.

- Document the expected change to errors.InvalidOS
- Always pass the additional argument
- Modify DiagnoseOS output to show the path

Reviewed-by: iustinp, imsnah

89e1fc26 09/21/2007 04:37 pm Iustin Pop

Remove requirement that host names are FQDN

We currently require that hostnames are FQDN not short names
(node1.example.com instead of node1). We can allow short names as long
as:
- we always resolve the names as returned by socket.gethostname()
- we rely on having a working resolver...

5c947f38 08/08/2007 12:37 pm Iustin Pop

Implement tag support for cluster, nodes and instances.

This is only the backend part, from the command line the tags can't be
read/modified yet.

Reviewed-by: imsnah

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

Comment formatting updates.

Reviewed-by: iustinp

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

Initial commit.