Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34053

Add support for local_subset client

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Despite the documentation is not mentioning it, it seems like SaltStack NetApi currently supports the local_subset client (https://github.com/saltstack/salt/blob/develop/salt/netapi/__init__.py)

      Would be great to have it available in the saltstack plugin.

        Attachments

          Activity

          Hide
          mchugh19 Christian McHugh added a comment - - edited

          Looks simple enough to add, but it appears that subset was only added for 2016.3, so it has not been released yet. Also, I noticed while testing 2016.0_rc2 that the salt command works as expected:

          # salt 'web*' --subset 1 cmd.run uptime 
          web3:
               21:49:29 up 15 min,  0 users,  load average: 0.00, 0.00, 0.00
          

          But that the salt-api, still seemed to run on all minions:

          JSON='[{"arg": "uptime", "sub": "1", "client": "local_subset","expr_form": "glob","fun": "cmd.run","tgt": "web*"}]'
          
          "return": [
                  {
                      "web1": " 21:50:21 up 5:54, 0 users, load average: 0.04, 0.03, 0.01",
                      "web3": " 21:50:22 up 16 min, 0 users, load average: 0.00, 0.00, 0.00"
                  }
              ]
          

          So it looks like there may be a little bit of work to do to support this upstream.

          Show
          mchugh19 Christian McHugh added a comment - - edited Looks simple enough to add, but it appears that subset was only added for 2016.3, so it has not been released yet. Also, I noticed while testing 2016.0_rc2 that the salt command works as expected: # salt 'web*' --subset 1 cmd.run uptime web3: 21:49:29 up 15 min, 0 users, load average: 0.00, 0.00, 0.00 But that the salt-api, still seemed to run on all minions: JSON='[{"arg": "uptime", "sub": "1", "client": "local_subset","expr_form": "glob","fun": "cmd.run","tgt": "web*"}]' "return": [ { "web1": " 21:50:21 up 5:54, 0 users, load average: 0.04, 0.03, 0.01", "web3": " 21:50:22 up 16 min, 0 users, load average: 0.00, 0.00, 0.00" } ] So it looks like there may be a little bit of work to do to support this upstream.
          Hide
          mchugh19 Christian McHugh added a comment -
          Show
          mchugh19 Christian McHugh added a comment - Here's the upstream bug report
          Hide
          mchugh19 Christian McHugh added a comment -

          Added in master

          Show
          mchugh19 Christian McHugh added a comment - Added in master
          Hide
          mchugh19 Christian McHugh added a comment -

          Added in master branch

          Show
          mchugh19 Christian McHugh added a comment - Added in master branch

            People

            Assignee:
            mchugh19 Christian McHugh
            Reporter:
            giuseppeiannello Giuseppe Iannello
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: