[PATCH master] jqueue: Look at archived jobs when watching

6 views
Skip to first unread message

Michael Hanselmann

unread,
Oct 4, 2012, 10:39:43 PM10/4/12
to ganeti...@googlegroups.com
First: This enables the use of “gnt-job watch $id” for archived jobs.

Now, the reason for actually making this work is that during
sufficiently large group or node evacuations jobs are archived before
the client gets to poll for their output. This led to situations where
the jobs would finish successfully, but the client reported an error
because it couldn't see the job anymore.
---
lib/jqueue.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/jqueue.py b/lib/jqueue.py
index 96c29a1..069884b 100644
--- a/lib/jqueue.py
+++ b/lib/jqueue.py
@@ -2257,7 +2257,7 @@ class JobQueue(object):
as such by the clients

"""
- load_fn = compat.partial(self.SafeLoadJobFromDisk, job_id, False,
+ load_fn = compat.partial(self.SafeLoadJobFromDisk, job_id, True,
writable=False)

helper = _WaitForJobChangesHelper()
--
1.7.7.3

Bernardo Dal Seno

unread,
Oct 5, 2012, 1:12:35 AM10/5/12
to Michael Hanselmann, ganeti...@googlegroups.com
On Fri, Oct 5, 2012 at 4:39 AM, Michael Hanselmann <han...@google.com> wrote:
> First: This enables the use of “gnt-job watch $id” for archived jobs.
>
> Now, the reason for actually making this work is that during
> sufficiently large group or node evacuations jobs are archived before
> the client gets to poll for their output. This led to situations where
> the jobs would finish successfully, but the client reported an error
> because it couldn't see the job anymore.
> ---
> lib/jqueue.py | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

LGTM, thanks.

Bernardo

Michael Hanselmann

unread,
Oct 5, 2012, 11:48:50 AM10/5/12
to ganeti...@googlegroups.com
First: This enables the use of “gnt-job watch $id” for archived jobs.

Now, the reason for actually making this work is that during
sufficiently large group or node evacuations jobs are archived before
the client gets to poll for their output. This led to situations where
the jobs would finish successfully, but the client reported an error
because it couldn't see the job anymore.

Signed-off-by: Michael Hanselmann <han...@google.com>
Reviewed-by: Bernardo Dal Seno <bdal...@google.com>
(cherry picked from commit 045694691691af1b10d1d055bdac55cf205e47de)
---
lib/jqueue.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/jqueue.py b/lib/jqueue.py
index d91da45..204966e 100644
--- a/lib/jqueue.py
+++ b/lib/jqueue.py
@@ -2282,7 +2282,7 @@ class JobQueue(object):

Bernardo Dal Seno

unread,
Oct 5, 2012, 12:11:02 PM10/5/12
to Michael Hanselmann, ganeti...@googlegroups.com
On Fri, Oct 5, 2012 at 5:48 PM, Michael Hanselmann <han...@google.com> wrote:
> First: This enables the use of “gnt-job watch $id” for archived jobs.
>
> Now, the reason for actually making this work is that during
> sufficiently large group or node evacuations jobs are archived before
> the client gets to poll for their output. This led to situations where
> the jobs would finish successfully, but the client reported an error
> because it couldn't see the job anymore.
>
> Signed-off-by: Michael Hanselmann <han...@google.com>
> Reviewed-by: Bernardo Dal Seno <bdal...@google.com>
> (cherry picked from commit 045694691691af1b10d1d055bdac55cf205e47de)
> ---
> lib/jqueue.py | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

LGTM

Bernardo
Reply all
Reply to author
Forward
0 new messages