- Jun 22, 2010
-
-
Iustin Pop authored
While we'll need to update the source files too, at least this change makes pylint 0.21 not fail on the current source tree. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
'format' is a new built-in function, and 'bytes' is a new builtin type. We rename this to make pylint happy (and remove potential bugs). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Commit cf26a87a added a tiny typo, which would break non-FQDN arguments to modify node storage. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
The update of the valid status in LUDiagnoseOS says: valid = valid and osl and osl[0][1] However, in Python, “True and []” (which '[]' we get for an invalid OS) will result in “[]”, and thus the valid field for an OS will be either True or an empty list. Which is not what we want… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 18, 2010
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Socket functions can raise more than just gaierror. Most of the times, socket.gethostbyname_ex will return gaierror, but rarely it will also raise herror. For completeness, we catch all socket exceptions with data of type (code, description). Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Fix the sentence to say what it means. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jun 17, 2010
-
-
Michael Hanselmann authored
The httplib module used by urllib2 requires its sockets to have a makefile() method to provide a file-like interface (or rather file-in-Python-like) to the socket. PyOpenSSL doesn't implement makefile() as the semantics require files to call dup(2) on the underlying file descriptors, something not easily done on SSL sockets. Python up to and including 2.5 have a class to simulate makefile(), httplib.FakeSocket. With the addition of SSL support in Python 2.6, this class was deprecated and no longer functions. This patch adds a new, simpler wrapper class which is used in Python 2.6 and above only. It's good enough for this use. There are general problems in these generic wrapper classes--none of them handles SSL I/O properly. They break, for example, when the server requests a renegotiation. This will need more work. Signed-off-by:
Michael Hanselmann <hansmi@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>
-
- Jun 14, 2010
-
-
Iustin Pop authored
Since the introduction of OS-specific hvparams, we shouldn't ever use objects.FillDict directly for instances, but instead go via the cluster object. Otherwise the os_hvp will be ignored. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
In case an OS has inconsistent declarations, we might get into a case where one node reports a valid variants list (with OS API >=15), and another node has OS API < 15, in which case its supported_variants gets the default value of None. This leads to the same variable having inconsistent data types, which leads to subtle bugs later: instead of reporting something like "Inconsistent OS API versions", the LU exits with a run-time exception. Furthermore, in another datapath, variants is initialized to '[]' in case of OS diagnose failures. The patch changes _TryOSFromDisk to initialize variants to '[]' for OS api level below 15, and changes the variants calculation in DiagnoseOS to be more readable. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 13, 2010
-
-
Iustin Pop authored
A typo in the Raise() method of rpc.RpcResult means that any remote errors will lack an appropriate error code; this will confuse e.g. RAPI users. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 11, 2010
-
-
Guido Trotter authored
With this change unknown disk and nic parameters will be refused, rather than silently ignored, so that one can't pass them in by mistake and not realize what went wrong. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
The various _Check* helper functions expect an lu to be passed in, but the TL is passed instead. This works... sometimes! :) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 10, 2010
-
-
Iustin Pop authored
This makes it uniform with the other hypervisors. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
- Jun 04, 2010
-
-
Guido Trotter authored
When executing the kvm runtime we were currently accessing a mix of the parameters as configured currently on the instance and the ones it was started with. We were doing it without a precise criteria, but quite by chance we got it *almost* right. The only remaining issue was that when ganeti was upgraded and some parameters were added, trying to access them from the "old" ones caused a keyerror, since they weren't present back when the instance was started. To fix this: - We fill the startup-time dict with any new parameter - We provide a clear guideline on which version of the parameters to access, and about the fact that new parameters must have an instance-migration backwards compatible default Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This is used not only for aborted migrations, so the docstring should reflect that. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Currently it's impossible to grow a disk if an instance is shutdown, because the disk could not be assembled. Now we take care of assembling it, and shutting it down after. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
If the disks= parameter is passed, we can assemble/wait for sync/shutdown only some disks belonging to an instance, rather than all. This is useful to only activate/sync/shutdown the affected disk when growing it. 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:
Michael Hanselmann <hansmi@google.com>
-
- Jun 03, 2010
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 02, 2010
-
-
Guido Trotter authored
- _ThreadedClient was added on the idea of making this unittest concurrent, which was actually never done (we could test everything without it, so well) - handle_write() was never called without filling the send queue, and this caused me trouble now that I learned to look at coverage 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:
Luca Bigliardi <shammash@google.com>
-
Guido Trotter authored
Since this affects developers' systems, document it in NEWS and devnotes.rst 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>
-
Iustin Pop authored
I was wrong, actually LANG-vs-LC_ALL only fixed one case, by mistake. To get proper UTF-8 encoding, we need to enforce any UTF-8 locale. We choose the 'default' of en_US.UTF-8. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Again, check-man :) Commit 5fa16422 removed LC_ALL=C, since that breaks the check. However, with no LANG/LC_* variables, man-db is still broken. We import the new lintian behaviour, i.e. LANG=C (which seems to differ from LC_ALL=C, even with empty environment). I'm not sure of the difference, though. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 01, 2010
-
-
Balazs Lecz authored
Backported from master, 72087dcd Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Same result, but what happens is clearer. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
This bug was found in the asyncore master patch series, but actually applies to 2.1 for AsyncUDPSocket as well. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Balazs Lecz authored
This patch adds a new boolean hypervisor parameter to the KVM hypervisor, named 'use_chroot'. If it's turned on for an instance, than KVM is started in "chroot mode": Ganeti creates an empty directory for the instance and passes the path of this dir to KVM via the -chroot flag. KVM changes its root to this directory after starting up. It also adds a "quarantine" feature for moving any unexpected files to a separate directory for later analysis. This has been backported from master, commit 84c08e4e Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
1) Don't break when the roman module is not found 2) Test that not finding the roman module doesn't make TryToRoman fail (currently that is the case) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Finally gnt-instance has roman support as well. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Convert to roman (if so the user wishes) the following: - cluster candidate size - uid pool - any integer be or hv parameter Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The convert= option of compat.tryToRoman is used to do optional conversion without duplicating formatting code. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Rather than relying on a static list of fields, we opportunistically convert all integers. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The new TryToRoman function provides optional easy to use roman conversion. Nunc cum demonstrationi unitati. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Since the current start_timestamp opcode attribute refers to the inital start time, before locks are acquired, it's not useful to determine the actual execution order of two opcodes/jobs competing for the same lock. This patch adds a new field, exec_timestamp, that is updated when the opcode moves from OP_STATUS_WAITLOCK to OP_STATUS_RUNNING, thus allowing a clear view of the execution history. The new field is visible in the job output via the 'opexec' field. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Some confusion arose handling EINTR on this function: in python 2.6 socket.error is an IOError, and thus: - It's an EnvironmentError - It has an .errno member In 2.4 and 2.5 it's not, and so its errno variable must be extracted from the args tuple. This patch fixes both the function, and the unittests. This is a cherry-pick of master commit 965d0e5b with the portions not relevant to 2.1 removed (changes to the RetryOnSignals function). Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-