Hi there,

just three short questions regarding async jobs.

1.) How can I check the async_status of a "fire and forget" job on all my
servers at once? So instead of checking a specific server's job id
115503716196.18657 (mind the dot) I would like to basically check
115503716196.*, which doesn't work. Also just "115503716196" doesn't work.

2.) Is there a way to kill "fire and forget" async jobs?

3.) Is there some sort of garbage collection being done for the
~/.ansible_async/ directory or does that grow forever?

Here's a bit more explanation regarding just my first question, how I can
check the async_status of a job on all my servers at once:

Say I'm executing an async job like that:

ansible all -B 90 -P 0 -a "sleep 80"

I get a confirmation of successful start like this:

background launch...

ip_srv1 | success >> {
     "ansible_job_id": "115503716196.18657",
     "results_file": "/home/ubuntu/.ansible_async/115503716196.18657",
     "started": 1
}

ip_srv2 | success >> {
     "ansible_job_id": "115503716196.6532",
     "results_file": "/home/ubuntu/.ansible_async/115503716196.6532",
     "started": 1
}


Now, is there a way to check the status of the job on all servers at once?

I tried the obvious choice first and did:

ansible all -m async_status -a "jid=115503716196"

However, this just results in:

ip_srv1 | FAILED >> {
     "ansible_job_id": "115503716196",
     "failed": true,
     "msg": "could not find job"
}

ip_srv2 | FAILED >> {
     "ansible_job_id": "115503716196",
     "failed": true,
     "msg": "could not find job"
}

Only if I do:

ansible all -m async_status -a "jid=115503716196.18657"

I get what I want - but of course only for the server of which I typed in
the concret job id.


54.171.202.93 | success >> {
     "ansible_job_id": "115503716196.18657",
     "changed": false,
     "results_file": "/home/ubuntu/.ansible_async/115503716196.18657",
     "started": 1
}

54.72.229.37 | FAILED >> {
     "ansible_job_id": "115503716196.18657",
     "failed": true,
     "msg": "could not find job"
}

Cheers
Ingmar


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c9921296-7411-4ae3-b078-95897c287a73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Ingmar Schlecht at Dec 4, 2014 at 9:25 pm
    Hi there,

    just bumping my old question up again.

    Especially the first and second question are still of high interest for me
    (nobody using async jobs in the way I do?):

    1.) How can I check the async_status of a "fire and forget" job on all my
    servers at once? So instead of checking a specific server's job id
    115503716196.18657 (mind the dot) I would like to basically check
    115503716196.*, which doesn't work. Also just "115503716196" doesn't work.

    2.) Is there a way to kill "fire and forget" async jobs?

    Best
    Ingmar
    On Wednesday, November 12, 2014 3:14:31 PM UTC+1, Ingmar Schlecht wrote:

    Hi there,

    just three short questions regarding async jobs.

    1.) How can I check the async_status of a "fire and forget" job on all my
    servers at once? So instead of checking a specific server's job id
    115503716196.18657 (mind the dot) I would like to basically check
    115503716196.*, which doesn't work. Also just "115503716196" doesn't work.

    2.) Is there a way to kill "fire and forget" async jobs?

    3.) Is there some sort of garbage collection being done for the
    ~/.ansible_async/ directory or does that grow forever?

    Here's a bit more explanation regarding just my first question, how I can
    check the async_status of a job on all my servers at once:

    Say I'm executing an async job like that:

    ansible all -B 90 -P 0 -a "sleep 80"

    I get a confirmation of successful start like this:

    background launch...

    ip_srv1 | success >> {
    "ansible_job_id": "115503716196.18657",
    "results_file": "/home/ubuntu/.ansible_async/115503716196.18657",
    "started": 1
    }

    ip_srv2 | success >> {
    "ansible_job_id": "115503716196.6532",
    "results_file": "/home/ubuntu/.ansible_async/115503716196.6532",
    "started": 1
    }


    Now, is there a way to check the status of the job on all servers at once?

    I tried the obvious choice first and did:

    ansible all -m async_status -a "jid=115503716196"

    However, this just results in:

    ip_srv1 | FAILED >> {
    "ansible_job_id": "115503716196",
    "failed": true,
    "msg": "could not find job"
    }

    ip_srv2 | FAILED >> {
    "ansible_job_id": "115503716196",
    "failed": true,
    "msg": "could not find job"
    }

    Only if I do:

    ansible all -m async_status -a "jid=115503716196.18657"

    I get what I want - but of course only for the server of which I typed in
    the concret job id.


    54.171.202.93 | success >> {
    "ansible_job_id": "115503716196.18657",
    "changed": false,
    "results_file": "/home/ubuntu/.ansible_async/115503716196.18657",
    "started": 1
    }

    54.72.229.37 | FAILED >> {
    "ansible_job_id": "115503716196.18657",
    "failed": true,
    "msg": "could not find job"
    }

    Cheers
    Ingmar

    --
    You received this message because you are subscribed to the Google Groups "Ansible Project" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e3b5c01a-f36d-4173-b502-53e56eeb5eb6%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Michael DeHaan at Dec 5, 2014 at 12:29 am
    1. async_status works on a particular JID but cannot be called on
    wildcards.

    2. killing fire and forget jobs? Not presently.

    3. For the async directory you would want to delete the leftover files
    manually. I believe non "fire and forget" jobs do delete the file.


    On Thu, Dec 4, 2014 at 1:25 PM, Ingmar Schlecht wrote:

    Hi there,

    just bumping my old question up again.

    Especially the first and second question are still of high interest for me
    (nobody using async jobs in the way I do?):

    1.) How can I check the async_status of a "fire and forget" job on all my
    servers at once? So instead of checking a specific server's job id
    115503716196.18657 (mind the dot) I would like to basically check
    115503716196.*, which doesn't work. Also just "115503716196" doesn't work.

    2.) Is there a way to kill "fire and forget" async jobs?

    Best
    Ingmar

    On Wednesday, November 12, 2014 3:14:31 PM UTC+1, Ingmar Schlecht wrote:

    Hi there,

    just three short questions regarding async jobs.

    1.) How can I check the async_status of a "fire and forget" job on all my
    servers at once? So instead of checking a specific server's job id
    115503716196.18657 (mind the dot) I would like to basically check
    115503716196.*, which doesn't work. Also just "115503716196" doesn't work.

    2.) Is there a way to kill "fire and forget" async jobs?

    3.) Is there some sort of garbage collection being done for the
    ~/.ansible_async/ directory or does that grow forever?

    Here's a bit more explanation regarding just my first question, how I can
    check the async_status of a job on all my servers at once:

    Say I'm executing an async job like that:

    ansible all -B 90 -P 0 -a "sleep 80"

    I get a confirmation of successful start like this:

    background launch...

    ip_srv1 | success >> {
    "ansible_job_id": "115503716196.18657",
    "results_file": "/home/ubuntu/.ansible_async/115503716196.18657",
    "started": 1
    }

    ip_srv2 | success >> {
    "ansible_job_id": "115503716196.6532",
    "results_file": "/home/ubuntu/.ansible_async/115503716196.6532",
    "started": 1
    }


    Now, is there a way to check the status of the job on all servers at once?

    I tried the obvious choice first and did:

    ansible all -m async_status -a "jid=115503716196"

    However, this just results in:

    ip_srv1 | FAILED >> {
    "ansible_job_id": "115503716196",
    "failed": true,
    "msg": "could not find job"
    }

    ip_srv2 | FAILED >> {
    "ansible_job_id": "115503716196",
    "failed": true,
    "msg": "could not find job"
    }

    Only if I do:

    ansible all -m async_status -a "jid=115503716196.18657"

    I get what I want - but of course only for the server of which I typed in
    the concret job id.


    54.171.202.93 | success >> {
    "ansible_job_id": "115503716196.18657",
    "changed": false,
    "results_file": "/home/ubuntu/.ansible_async/115503716196.18657",
    "started": 1
    }

    54.72.229.37 | FAILED >> {
    "ansible_job_id": "115503716196.18657",
    "failed": true,
    "msg": "could not find job"
    }

    Cheers
    Ingmar


    --
    You received this message because you are subscribed to the Google Groups
    "Ansible Project" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/ansible-project/e3b5c01a-f36d-4173-b502-53e56eeb5eb6%40googlegroups.com
    <https://groups.google.com/d/msgid/ansible-project/e3b5c01a-f36d-4173-b502-53e56eeb5eb6%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Ansible Project" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgxXPMP-PbgRVQdvRO6brqU8YOJBokZhaG5nAqbXz_9cSg%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupansible-project @
postedNov 12, '14 at 3:42p
activeDec 5, '14 at 12:29a
posts3
users2

2 users in discussion

Ingmar Schlecht: 2 posts Michael DeHaan: 1 post

People

Translate

site design / logo © 2022 Grokbase