salt icon indicating copy to clipboard operation
salt copied to clipboard

Targeting by subnet is not working

Open grep4linux opened this issue 10 years ago • 7 comments

Targeting by subnet is not working.

My network interface is configured on the salt master as:

# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP qlen 1000
    link/ether 02:fb:c6:6d:56:99 brd ff:ff:ff:ff:ff:ff
    inet 172.31.28.20/20 brd 172.31.31.255 scope global eth0
    inet6 fe80::fb:c6ff:fe6d:5699/64 scope link 
       valid_lft forever preferred_lft forever

# hostname -i
172.31.28.20

My minions are:

salt \* grains.get 'ip4_interfaces:eth0'
minion01:
    - 172.31.8.86
minion02:
    - 172.31.13.61
minion03:
    - 172.31.7.124
minion04:
    - 172.31.8.5
saltmaster:
    - 172.31.28.20

Targeting with the following commands:

# salt -S 172.31.13.61 status.uptime
No minions matched the target. No command was sent, no jid was assigned.
ERROR: No return received
# salt -S '172.31.13.61' status.uptime
No minions matched the target. No command was sent, no jid was assigned.
ERROR: No return received

and sometimes a response, but with incorrect targets:

# salt -S '172.31.8.86' status.uptime 
minion01:
     15:49pm  up   0:02,  0 users,  load average: 0.02, 0.02, 0.01
No minions matched the target. No command was sent, no jid was assigned.
minion02:
    Minion did not return. [No response]
minion03:
    Minion did not return. [No response]
minion04:
    Minion did not return. [No response]
saltmaster:
    Minion did not return. [No response]

and here is a full CIDR example:

salt -S '172.31.16.0/20' status.uptime
No minions matched the target. No command was sent, no jid was assigned.
ERROR: No return received

grep4linux avatar Jan 06 '16 16:01 grep4linux

@grep4linux - have you tried targeting with [email protected]/20 to see if that change in syntax works?

ssgward avatar Jan 06 '16 18:01 ssgward

Looking at documentation here: https://docs.saltstack.com/en/latest/topics/targeting/compound.html

Not sure if this is the new way of targeting or just an additional way.

ssgward avatar Jan 06 '16 18:01 ssgward

Is this still broken on develop?

(I notice there have been a lot of dupe issues about it and work touching it lately.)

pprince avatar Mar 08 '16 10:03 pprince

I believe this is still broken.

ssgward avatar Mar 08 '16 15:03 ssgward

@grep4linux This is a duplicate of #29188 and #30962 and has been fixed by #31201.

@pprince This should be fixed on the develop branch, as the fix for this issue in #31201 was merged-forward to the 2016.3 and develop branches. Are you running into troubles still on develop? Or just wondering the status?

rallytime avatar Mar 08 '16 15:03 rallytime

Was just wondering the status. Thanks.

Thanks, -Paul P.

On Tue, Mar 8, 2016 at 10:54 AM, Nicole Thomas [email protected] wrote:

@grep4linux https://github.com/grep4linux This is a duplicate of #29188 https://github.com/saltstack/salt/issues/29188 and #30962 https://github.com/saltstack/salt/issues/30962 and has been fixed by #31201 https://github.com/saltstack/salt/pull/31201.

@pprince https://github.com/pprince This should be fixed on the develop branch, as the fix for this issue in #31201 https://github.com/saltstack/salt/pull/31201 was merged-forward to the 2016.3 and develop branches. Are you running into troubles still on develop? Or just wondering the status?

— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/30175#issuecomment-193835691.

pprince avatar Mar 09 '16 07:03 pprince

Given that we have a fix for this merged, I'm going to go ahead and close this issue. Thanks.

cachedout avatar Mar 18 '16 18:03 cachedout