- Aug 10, 2010
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
With this patch, a new PycURL object will be created for each request. This should make the RAPI client safe for simultaneous calls from multiple threads. Unittests are adjusted accordingly. An unnecessary variable assignment is also removed from the unittest script. This patch survived a small QA and unittests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Aug 09, 2010
-
-
Manuel Franceschini authored
Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 05, 2010
-
-
Manuel Franceschini authored
This patch fixes a bug reported in [0]. Newer drbd versions can have another digit beyond the regular major, minor and point release digits. We modify the regex used to match that with an optional parts which is not saved. Furthermore it adds unittests that test for these different cases. Now the data read from /proc is passed into the _GetVersion method, which makes testing easier. [0] http://code.google.com/p/ganeti/issues/detail?id=110 Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 30, 2010
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Also add some assertions. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Before strict checking was implemented, NIC IP addresses could be set to “None”. Commit bd061c35 added more strict checking, including enforcing the IP address to be a string. With this new type, it can again be set to None. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
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
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch fixes two issues with job archival. First, the LoadJobFromDisk can return 'None' for no-such-job, and we shouldn't add None to the job list; we can't anyway, as this raises an exception: node1# gnt-job archive foo Unhandled protocol error while talking to the master daemon: Caught exception: cannot create weak reference to 'NoneType' object After fixing this, job archival of missing jobs will just continue silently, so we modify gnt-job archive to log jobs which were not archived and to return exit code 1 for any missing jobs. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jul 29, 2010
-
-
Iustin Pop authored
If we call burning with only existing instance, then it will fail to create any of them, and thus in the removal phase it won't have anything to remove. Since calling luxi.SUBMIT_MULTIPLE_JOBS with an empty job set is an error (and will raise an exception), this creates a very strange error in burnin (which is unfortunately hidden by ExecJobSet()). As such, we modify CommitQueue to return immediately if it has an empty op queue. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, we require both --force and --force-multiple for skipping the confirmation on instance reinstalls. After offline conversations, this has been deemed to be excessive, and this patch changes the meaning of --force-multiple to be a “stronger” force, and not require both. So, to skip the prompts: - single instance reinstallation requires either --force or --force-multiple - multiple instance reinstallation requires --force-multiple Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, if a job execution raises a Ganeti-specific error (i.e. subclass of GenericError), then we encode it as (error class, [error args]). This matches the RAPI documentation. However, if we get a non-Ganeti error, then we encode it as simply str(err), a single string. This means that the opresult field is not according to the RAPI docs, and thus it's hard to reliably parse the job results. This patch changes the encoding of a failed job (via failure) to always be an OpExecError, so that we always encode it properly. For the command line interface, the behaviour is the same, as any non-Ganeti errors get re-encoded as OpExecError anyway. For the RAPI clients, it only means that we always present the same type for results. The actual error value is the same, since the err.args is either way str(original_error); compare the original (doesn't contain the ValueError): "opresult": [ "invalid literal for int(): aa" ], with: "opresult": [ [ "OpExecError", [ "invalid literal for int(): aa" ] ] ], Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This can be used from shell-scripts to quickly check the status of the master node, before launching a series of jobs (and handling the failure of the jobs due to masterd other issues). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Since we don't support upgrades from 1.2.4 without restarting the instance, the 'not restarted since 1.2.5' check/error is wrong/misleading. Since the live migration works anyway without the links (it recreates them during the disk reconfiguration anyway), we remove the check and we transform it into a warning (to the node daemon log only, unfortunately). For 2.3, we'll need to change the symlink creation from instance start time to disk activation time (but that requires more RPC changes). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
During a discussion in July 2010 it was decided that we'll stabilize on /2. See message ID <20100716180012.GA9423@google.com> for reference. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
A lot of assertions are used in Ganeti's code. Some unittests even check whether AssertionError is raised in some cases. Explicitely ensuring assertions are evaluated makes sure those tests don't fail and assertions are checked. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
David Knowles authored
Signed-off-by:
David Knowles <dknowles@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
By changing it to a normal parameter, which must be a sequence, we can start using keyword parameters. Before this patch all arguments to “AddTask(self, *args)” were passed as arguments to the worker's “RunTask” method. Priorities, which should be optional and will be implemented in a future patch, must be passed as a keyword parameter. This means “*args” can no longer be used as one can't combine *args and keyword parameters in a clean way: >>> def f(name=None, *args): ... print "%r, %r" % (args, name) ... >>> f("p1", "p2", "p3", name="thename") Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: f() got multiple values for keyword argument 'name' Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Document that it should only be called from within RunTask and add an assertion for this. This means we can no longer use a method on the pool and hence remove WorkerPool.ShouldWorkerTerminate. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
HasRunningTask is never used except for an assertion, where we don't really need the lock. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This way fewer private variables of the pool are accesssed by the worker. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This is related to issue 105. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jul 28, 2010
-
-
Iustin Pop authored
Most (all?) of our commands use dash-separator: replace-disks, verify-disks, add-tags, etc. “gnt-cluster masterfailover” is an old exception to this rule. The patch replaces it with master-failover, add a compatiblity alias, and updates the documentation for this change. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Since the RAPI QA suite doesn't seem to offer easy testing of failed creations, I didn't add this to the QA. Pointers on how to do it are welcome. The patch also changes the 'os' argument to be required, since that is how the LU expects it, and without it we just fail later instead of directly at submission time. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
“find .” requires that “-path” arguments start with a dot, otherwise they are not matches. Additionally, we also include the QA files in the tags, for easier search while modifying the QA suite. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, if the cli.JobExecutor class is being used, and one of the jobs is being archived before it can check its result, it will raise a stracktrace as _ChooseJob is not prepared to handle this case. This case makes JobExecutor work better with lost jobs (it still reports them as 'failed', but it doesn't break and returns a proper error message), and modifies the generic FormatError to report the JobLost exception properly, instead of as "Unhandled Ganeti Exception". Since JobExecutor is hard to test properly, I only tested this manually, via a fake invocation. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds handling of permission errors so that we don't show tracebacks when a non-root user runs a gnt-* command. Since in the future we'll have different permissions, we need to handle this in RAPI too. It also fixes a typo in RAPI error message and the docstrings of LUXI errors. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
The new name is then displayed by the clients. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Manuel Franceschini <livewire@google.com>
-