On Fri, Jun 19, 2015 at 3:30 PM, 'Lisa Velden' via ganeti-devel <
[email protected]> wrote:

> and get rid of unnecessary check.
>
> Signed-off-by: Lisa Velden <[email protected]>
> ---
>  lib/jqueue/exec.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/lib/jqueue/exec.py b/lib/jqueue/exec.py
> index 50b7ac6..8e61805 100644
> --- a/lib/jqueue/exec.py
> +++ b/lib/jqueue/exec.py
> @@ -134,13 +134,13 @@ def main():
>
>      job = context.jobqueue.SafeLoadJobFromDisk(job_id, False)
>
> +    job.SetPid(os.getpid())
> +
>      if secret_params:
>        for i in range(0, len(secret_params)):
> -        if hasattr(job.ops[i].input, "osparams_secret") and
> secret_params[i]:
> +        if hasattr(job.ops[i].input, "osparams_secret"):
>            job.ops[i].input.osparams_secret = secret_params[i]
>

This bit belongs in part #2 (or a separate patch). It would be better to
change the patch so that it more atomic, according to its description.


>
> -    job.SetPid(os.getpid())
> -
>      execfun = mcpu.Processor(context, job_id, job_id).ExecOpCode
>      proc = _JobProcessor(context.jobqueue, execfun, job)
>      result = _JobProcessor.DEFER
> --
> 2.4.3.573.g4eafbef
>
>
Hrvoje Ribicic
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München

Geschäftsführer: Graham Law, Christine Elizabeth Flores
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Reply via email to