Uploaded image for project: 'MCollective'
  1. MCollective
  2. MCO-776

mcollective should support PQL queries

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: MCO 2.10.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      The mco STDIN discovery method now supports input from {{puppet query}}.

      Description

      At present mcollective supports a chaining construct like this:

      mco rpc foo -j | mco rpc ping
      

      This does on query and pipe the result back into mco as discovery source, this is powerful when combined with jq/jgrep to filter result sets.

      This is done via STDIN discovery method, this method should also support puppet query to enable:

      puppet query "inventory { facts.os.name = 'CentOS' }"| mco rpc puppetd runonce
      

        Attachments

          Issue Links

            Activity

            Hide
            michael.smith Michael Smith added a comment -

            Currently targeted at 2.10 because it was merged to master branch.

            Show
            michael.smith Michael Smith added a comment - Currently targeted at 2.10 because it was merged to master branch.
            Hide
            michael.smith Michael Smith added a comment - - edited

            This enables support via rpc; it appears other applications that wish to use it will need to call the helper explicitly (such as mcollective-puppet-agent).

            For example,

            puppet query "inventory { facts.fqdn = 'certname' }"| mco rpc puppet status
            

            will use the query output, but

            puppet query "inventory { facts.fqdn = 'certname' }"| mco puppet status
            

            currently won't.

            Show
            michael.smith Michael Smith added a comment - - edited This enables support via rpc; it appears other applications that wish to use it will need to call the helper explicitly (such as mcollective-puppet-agent). For example, puppet query "inventory { facts.fqdn = 'certname' }"| mco rpc puppet status will use the query output, but puppet query "inventory { facts.fqdn = 'certname' }"| mco puppet status currently won't.
            Hide
            michael.smith Michael Smith added a comment -

            Verified it works as described.

            Show
            michael.smith Michael Smith added a comment - Verified it works as described.

              People

              • Assignee:
                qa qa
                Reporter:
                ripienaar R.I.Pienaar
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support