- Jul 01, 2010
-
-
Michael Hanselmann authored
Currently the RAPI client uses the urllib2 and httplib modules from Python's standard library. They're used with pyOpenSSL in a very fragile way, and there are known issues when receiving large responses from a RAPI server. By switching to PycURL we leverage the power and stability of the widely-used curl library (libcurl). This brings us much more flexibility than before, and timeouts were easily implemented (something that would have involved a lot of work with the built-in modules). There's one small drawback: Programs using libcurl have to call curl_global_init(3) (available as pycurl.global_init) while exactly one thread is running (e.g. before other threads) and are supposed to call curl_global_cleanup(3) (available as pycurl.global_cleanup) upon exiting. See the manpages for details. A decorator is provided to simplify this. Unittests for the new code are provided, increasing the test coverage of the RAPI client from 74% to 89%. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This does not yet fix all issues in the RAPI interface which were introduced with the type system. More testing is needed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
This will allow instance rename without dns check as it does for instance add. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 30, 2010
-
-
Manuel Franceschini authored
Currently a TcpPing using the target address as source is used to determine wheter or not an IP address belongs to a node. This does not work for IPv6 anymore (I'm not sure why) as binding to IPv6 localhost as source for the TCP connection in TcpPing still results in a successful connection, even in case the target address is non-local. Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This needs lots of work, but it can successfully launch an LXC-based instance. See the docstring for the limitations/work to be done. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
Manuel Franceschini authored
Support IPv6 configuration for 'drbdsetup show' parser and add unittests concerning that case. Renames some data files to use consistent names clarifying their usage. Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Manuel Franceschini authored
Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Manuel Franceschini authored
Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Manuel Franceschini authored
This patch introduces functions to check for valid IPv4 and IPv6 addresses and converts IsValidIP() to return True if it is either a IPv4 or a IPv6 address. For now we do not change the functional behavior and replace IsValidIP with IsValidIP4. This might change in the future. Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Manuel Franceschini authored
Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Manuel Franceschini authored
Commit 625ac113 introduced 'osparams' slot in OPSetClusterParams which was not passed when invoked via gnt-cluster modify. Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Manuel Franceschini authored
Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Manuel Franceschini authored
Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Manuel Franceschini authored
Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Why it's needed here but not a few lines above is a mistery that only pylint understands. Also fix an indentation error in another disable, for the same function. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jun 29, 2010
-
-
Guido Trotter authored
Each luxi connection now creates an asyncore MasterClientHandler (which is an AsyncTerminatedMessageStream subclass, sending each message to a client worker). This makes it harder to DOS the master daemon by just creating luxi connections, as each of them will use memory and file descriptors, but not a dedicated thread. Each connection will only handle one message at a time. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
- It's ok if the optional modules functools, roman and hashlib are not there. - It's ok to reference any and all before defining them. We're doing all this exactly because, under python 2.4, they are undefined. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Currently the message stream can process any number of messages in parallel (if they get dispatched to different threads or processes). In order to limit their number we only handle messages and read from the socket if we're under a certain limit of unanswered ones. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
This function adds the ability for a AsyncTerminatedMessageStream to have a thread-safe message delivery function. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
This should catch cases where we update the configuration version, but forget to adjust cfgupgrade accordingly. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
This is needed in a new test script for cfgupgrade where it's better to only use the minimum parts necessary for testing cfgupgrade. Including full configuration data to ensure verification doesn't fail would make maintenance difficult. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
In the condition for checking the configuration directory, one “or” should have been an “and”. This bug was in cfgupgrade since commit 95e4a814 (June 2008). Found thanks to a test script. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Since configuration changes are now usually done in the configuration writer class, cfgupgrade's only task is to change the config version. This means we can easily support upgrading from Ganeti 2.0 and 2.1 to 2.2. This patch also brings a couple of small cleanups. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Three constants were no longer user after commit 11c31f5c, which removed support for upgrading from Ganeti 1.2. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 28, 2010
-
-
Guido Trotter authored
The comments seem to imply we can remove deprecated slots after 2.1 is released. This is not quite true, if we still want to support upgrading straight from 2.0. So let's specify better that they can be removed only after upgrading from 2.0 can be deprecated. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Also, improve logging of type errors, to ease debugging. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
By using ssynchronized in the new way, we can remove the module-global _big_jqueue_lock and revert back to an internal _lock inside the jqueue. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The ssynchronized decorator takes the lock to act on in input. With this change we allow a string to be passed, and if so we assume the function it protects is a class method, and we act on the member of the class itself named as the string we got. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
We can share the jqueue lock when we do per-job updates. These only conflict with updates/checks on the same job from another thread (eg. CancelJob, ArchiveJob, which keep the lock unshared, since they are less frequent). Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Move some code to a decorated function rather than explicitely acquiring/releasing the lock in AppendFeedback. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
All users of this function were converted to another method, hence we can remove it. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Remove the jqueue _lock member and convert to a _big_jqueue_lock sharedlock. This allows smooth transition from the old single lock to a more granular approach. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Every time we call MarkUnfinishedOps we do it in a try/finally block that updates the job file. With this patch we move the try/finally inside. CancelJobUnlocked is removed, because it just becomes a wrapper over MarkUnfinishedOps with two constant values. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-