FAQ
From the master side, you could use `salt-run manage.up`. I'm not sure of
the best way from the minion side...would be easy enough if you tried to do
a module sync or pillar refresh, however. Most use cases require
connection information from the master side, not sure anyone has ever
requested it from the minion side.

--
Colton Myers

On Tue, Jun 24, 2014 at 5:19 AM, Vitold S wrote:

Your solution with using "salt.utils.minions.CkMinions"
have no result. Output is:

set([])

But realy minion is connected and working ...

понедельник, 23 июня 2014 г., 10:59:05 UTC+4 пользователь Volker S.
написал:
On 6/22/14 10:54 PM, Vitold S wrote:
Hello every one,

how to dertermine connection status via API or cli command.
Without netstat wrapping and etc. workaround way
1 #!/usr/bin/python
2 import salt.config
3 import salt.utils.minions
4
5 opts = salt.config.master_config('/etc/salt/master')
6 ckminion = salt.utils.minions.CkMinions(opts)
7 print ckminion.connected_ids()

But that just wraps around salt.utils.network.* which effectively does
the same as a netstat.

You can do the same with

$ lsof -i:4505 | sed 's/^.*->//' | awk -F':' '{ print $1 }'

- felskrone


--
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 salt-users+unsubscribe@googlegroups.com.
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 salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Dmitry Golubenko at Jul 9, 2014 at 3:20 am

    В Втр, 08/07/2014 в 17:13 -0600, Colton Myers пишет:
    From the master side, you could use `salt-run manage.up`. I'm not
    sure of the best way from the minion side...would be easy enough if
    you tried to do a module sync or pillar refresh, however. Most use
    cases require connection information from the master side, not sure
    anyone has ever requested it from the minion side.
    I've requested few years ago when there was 0mq connectivity problems
    (solved later by tcp_keepalive.* options) to force minion
    restart/reconnect by cron when minion lost connection with master. I
    think it is useful feature to force minion 'ping master' to test
    connectivity and restart/reconnect when connectivity is lost.

    salt-call is not an option because it opens new connect (and resolves
    dns to possibly different address)
    --
    Colton Myers


    On Tue, Jun 24, 2014 at 5:19 AM, Vitold S wrote:
    Your solution with using "salt.utils.minions.CkMinions"
    have no result. Output is:


    set([])


    But realy minion is connected and working ...

    понедельник, 23 июня 2014 г., 10:59:05 UTC+4 пользователь
    Volker S. написал:
    On 6/22/14 10:54 PM, Vitold S wrote:
    Hello every one,

    how to dertermine connection status via API or cli command.
    Without netstat wrapping and etc. workaround way
    1 #!/usr/bin/python
    2 import salt.config
    3 import salt.utils.minions
    4
    5 opts =
    salt.config.master_config('/etc/salt/master')
    6 ckminion = salt.utils.minions.CkMinions(opts)
    7 print ckminion.connected_ids()

    But that just wraps around salt.utils.network.* which
    effectively does
    the same as a netstat.

    You can do the same with

    $ lsof -i:4505 | sed 's/^.*->//' | awk -F':' '{ print
    $1 }'

    - felskrone




    --
    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 salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedJul 8, '14 at 11:13p
activeJul 9, '14 at 3:20a
posts2
users2

2 users in discussion

Colton Myers: 1 post Dmitry Golubenko: 1 post

People

Translate

site design / logo © 2022 Grokbase