FAQ
I've recently has 2014.1.5 minions get locked in processing (ie several days later they refuse a highstate because the state command started 4+ days ago is still running!). Is there a good way to retrospectively catch these cases?

-- JCL
On 13 May 2014, at 16:05, Colton Myers wrote:

When you run a salt command, the master first creates a JID for the job, and creates an entry in the job cache. It then sends that command to all minions. The minions then decide whether they are supposed to run the command (based on the target string), and run it if they match the target.

The master, by default, will wait for the minions to return their data, checking in with them at the end of the timeout period to see if they are still running the job. If they say they are still running the job, it will continue to wait, otherwise it will return to the CLI.

To check if minions are still running a job, you can use `salt '*' saltutil.find_job <jid>`

To implement progress events, the module itself would have to fire events at certain points in the job. This would be very doable in custom modules, just look at the event documentation: http://docs.saltstack.com/en/latest/topics/event/index.html

Hope that helps!

--
Colton Myers


On Fri, May 9, 2014 at 2:57 AM, Vitold S wrote:
Hello everyone,

I think about how to get understanding about my master was send command.
When I receive JID it mean that my command delivered?
May by salt have ACK packet or another mode with progress of command?
Some case longterm executing (example send 4gb file or sleep 120) how to understand that command still active? Have some salt class helper for that?

tnx

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Colton Myers at Jul 11, 2014 at 9:48 pm
    Are you looking for salt to figure out when a job is stuck and end it? Or
    just an easy way to end jobs that you know are stuck?

    --
    Colton Myers

    On Wed, Jul 2, 2014 at 12:55 AM, JC Lawrence wrote:

    I've recently has 2014.1.5 minions get locked in processing (ie several
    days later they refuse a highstate because the state command started 4+
    days ago is still running!). Is there a good way to retrospectively catch
    these cases?

    -- JCL


    On 13 May 2014, at 16:05, Colton Myers wrote:

    When you run a salt command, the master first creates a JID for the job,
    and creates an entry in the job cache. It then sends that command to all
    minions. The minions then decide whether they are supposed to run the
    command (based on the target string), and run it if they match the target.

    The master, by default, will wait for the minions to return their data,
    checking in with them at the end of the timeout period to see if they are
    still running the job. If they say they are still running the job, it will
    continue to wait, otherwise it will return to the CLI.

    To check if minions are still running a job, you can use `salt '*'
    saltutil.find_job <jid>`

    To implement progress events, the module itself would have to fire events
    at certain points in the job. This would be very doable in custom modules,
    just look at the event documentation:
    http://docs.saltstack.com/en/latest/topics/event/index.html

    Hope that helps!

    --
    Colton Myers

    On Fri, May 9, 2014 at 2:57 AM, Vitold S wrote:

    Hello everyone,

    I think about how to get understanding about my master was send command.
    When I receive JID it mean that my command delivered?
    May by salt have ACK packet or another mode with progress of command?
    Some case longterm executing (example send 4gb file or sleep 120) how to
    understand that command still active? Have some salt class helper for that?

    tnx

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected].
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected].
    For more options, visit https://groups.google.com/d/optout.


    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected].
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/d/optout.
  • JC Lawrence at Jul 12, 2014 at 5:35 am
    There are multiple answers... First is detection/alerting. Second is recovery.

    -- JCL
    On 11 Jul 2014, at 14:47, Colton Myers wrote:

    Are you looking for salt to figure out when a job is stuck and end it? Or just an easy way to end jobs that you know are stuck?

    --
    Colton Myers


    On Wed, Jul 2, 2014 at 12:55 AM, JC Lawrence wrote:
    I've recently has 2014.1.5 minions get locked in processing (ie several days later they refuse a highstate because the state command started 4+ days ago is still running!). Is there a good way to retrospectively catch these cases?

    -- JCL

    On 13 May 2014, at 16:05, Colton Myers wrote:

    When you run a salt command, the master first creates a JID for the job, and creates an entry in the job cache. It then sends that command to all minions. The minions then decide whether they are supposed to run the command (based on the target string), and run it if they match the target.

    The master, by default, will wait for the minions to return their data, checking in with them at the end of the timeout period to see if they are still running the job. If they say they are still running the job, it will continue to wait, otherwise it will return to the CLI.

    To check if minions are still running a job, you can use `salt '*' saltutil.find_job <jid>`

    To implement progress events, the module itself would have to fire events at certain points in the job. This would be very doable in custom modules, just look at the event documentation: http://docs.saltstack.com/en/latest/topics/event/index.html

    Hope that helps!

    --
    Colton Myers


    On Fri, May 9, 2014 at 2:57 AM, Vitold S wrote:
    Hello everyone,

    I think about how to get understanding about my master was send command.
    When I receive JID it mean that my command delivered?
    May by salt have ACK packet or another mode with progress of command?
    Some case longterm executing (example send 4gb file or sleep 120) how to understand that command still active? Have some salt class helper for that?

    tnx

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/d/optout.


    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/d/optout.


    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedJul 2, '14 at 6:55a
activeJul 12, '14 at 5:35a
posts3
users2

2 users in discussion

JC Lawrence: 2 posts Colton Myers: 1 post

People

Translate

site design / logo © 2023 Grokbase