- Jun 17, 2010
-
-
Michael Hanselmann authored
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>
-
Guido Trotter authored
This makes sure the out_socket can only be used for writing, and the in_socket for reading. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Useful if we want to add many tasks at once, without contention with the previous one we added starting. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Sometimes it's useful to write to the local filesystem, but immediate replication to all master candidates is not needed. The _WriteAndReplicateFileUnlocked function gets renamed to _UpdateJobQueueFile, as calling "write and replicate, but don't replicate" seemed a bit strange. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
The job queue currently has a static _GetJobInfoUnlocked method. Changing it to be a normal method of _QueuedJob, which makes more sense. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Move the work from _LoadJobUnlocked to _LoadJobFileFromDisk, which can then be used in other contexts as well. Also, if we fail to deserialize the job, archive it as well (before we archived it only if we failed to create the related object, but kept it there if deserialization failed. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
With the recent addition of a check for directories listed in Makefile local custom directories are always reported as unlisted. This patch adds support for a “Makefile.local” file, which can adjust settings in Makefile. Example: “DIRCHECK_EXCLUDE += xyz .mydata doc/manhtml”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 15, 2010
-
-
Guido Trotter authored
Among all users, turns out just one *may* need the output to be sorted. All the others can cope without. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Somewhere we do try/del/except and somewhere just pop. Using pop everywhere saves lines of code. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 14, 2010
-
-
Manuel Franceschini authored
Signed-off-by:
Manuel Franceschini <livewire@google.com> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Since OS objects are not stored in the configuration, we cannot put os_hvp there, therefore the TODO is obsolete… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, this function does three things: - special handling of constants.VALUE_DEFAULT - type enforcing of the resulting dict - filling the dictionary with defaults However, except for the first one, the second two do not belong in this function: - in the future, not all parameter dictionaries will be able to be enforced - filling the dictionary with defaults cannot be done via a defaults dict in all cases, and should be done by the specialized functions (ideally we'd pass a partial function instance here, but we don't have that yet…) As such, we remove the last items, and move them to the callers; this is overall the same complexity, as we were calling this function in just three places and constructing the many arguments was also complicated. Furthermore, we move the function out of LUSetInstanceParams, as in the future it will be used by LUSetClusterParams too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Since we'll need to be able to generate the OS-specific environment separately from the instance one, we move it to a separate function. We also add a new OS_NAME env. var which is identical to the INSTANCE_OS one (which won't exist for OS-only environments). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, the existing cluster.Fill* functions take as argument an instance. This means that in any case where we don't have an actual instance object, we have to resort to calling the low-level objects.FillDict function. This is bad for two reasons: - we have to know of, and we hardcode, the cluster object internals (e.g. that the nicparams are stored in a dict indexed by group) - which can result in subtle bugs, if the underlying storage mechanisms change This patch adds a lower-level implementation SimpleFillHV for FillHV and SimpleFillBE for FillBE, and adds a completely new SimpleFillNIC (all use cases until now hardcoded cluster.nicparams[constant.PP_DEFAULT] directly); it then uses these new functions in cmdlib.py. A side effect is that _CheckNicsBridgesExist loses the 'profile' parameter, which was unused. If it's needed, we should add it later via a proper profile parameter to SimpleFillNIC. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
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>
-
Michael Hanselmann authored
It's easy to forget to add a new directory to DIRS. This check should report such inconsistencies. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Older OpenSSL versions include DES-CBC3-* ciphers when specifying the HIGH group of ciphers. Removing potentially weak ciphers from the list of allowed ciphers ensures only strong ciphers are considered for SSL connections. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
This restores functionality lost in commit 387794f8. Found during tests using QA scripts. An instance should be started after it has been temporarily shutdown for an export. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
This should prevent bugs in our code from accidentally overwriting disks. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Tests have shown that usually we're CPU-bound for intra-cluster imports/exports. Disabling compression will help with this. Some versions of OpenSSL, depending on the build options, also compress transparently. This will need further work in Ganeti. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
This test moves an instance on the same cluster and, if successful, moves it back. While not testing a real move between two clusters, this is certainly better than nothing. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
This “magic” value will be used to ensure that we don't accidentially connect to the wrong daemon (e.g. due to a bug), comparable to DRBD's per-disk secret. Just depending on the SSL certificate isn't enough as it's always per instance and not per disk. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Instead of appending strings, stage parts in a list. Building the "dd" command is moved to a separate function. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
The hostname and port received from the remote cluster should be validated, just in case. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Upon sending signals, ESRCH can be reported when the target no longer exists. 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>
-
Guido Trotter authored
These files are being used to test the job queue performance with various changes and conditions. Adding them here for posterity. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@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
Currently each time we submit a job we check the job queue size, and the drained file. With this change we keep these pieces of information in memory and don't read them from the filesystem each time. Significant changes include: - The drained value can only be properly set by calling the appropriate cluster command "gnt-cluster queue drain/undrain" and not by removing/creating the file in the job queue directory. Not that anybody would have done it in this undocumented way before. - We get rid of the soft limit for the job queue, which we haven't ever used anyway. 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>
-
Guido Trotter authored
The name clarifies the difference between this and the internal lock. Also explain a bit better what it is. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Currently we sort the list of job queue files twice (once in utils.ListVisibleFiles with sort and then later with NiceSort). We apply the _RE_JOB_FILE regular expression twice (once in _ListJobFiles and once in _ExtractJobID). This simplifies the code a little, and a couple of functions performing basically the same job are collapsed. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
This also removes the relevant pylint disable. No point in keeping unused parameters around: if/when we need them it's easy to add it back. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Rather than raising Exception use GenericError and explain a bit better what happened. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-