LGTM, thanks
On Thu, Dec 5, 2013 at 1:49 PM, Hrvoje Ribicic <[email protected]> wrote: > According to commit 599ee321eb, any job-related error messages should > be encoded within a Ganeti-specific error and not passed on as a > string, to allow for easier parsing. > > For jobs suffering from an undesirable status after an unclean master > daemon shutdown, the message was not encoded, as reported in issue 618. > This patch fixes the problem. > > Signed-off-by: Hrvoje Ribicic <[email protected]> > --- > lib/jqueue.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/jqueue.py b/lib/jqueue.py > index 110d386..57fe4f3 100644 > --- a/lib/jqueue.py > +++ b/lib/jqueue.py > @@ -1756,8 +1756,9 @@ class JobQueue(object): > job.MarkUnfinishedOps(constants.OP_STATUS_QUEUED, None) > restartjobs.append(job) > else: > + to_encode = errors.OpExecError("Unclean master daemon shutdown") > job.MarkUnfinishedOps(constants.OP_STATUS_ERROR, > - "Unclean master daemon shutdown") > + _EncodeOpError(to_encode)) > job.Finalize() > > self.UpdateJobUnlocked(job) > -- > 1.8.5.1 > > -- -- Helga Velroyen | Software Engineer | [email protected] | Google Germany GmbH Dienerstr. 12 80331 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores
