Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-27244

Add a setting to exclude infrastructure hosts from remote execution search query

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.15.0
    • Remote Execution
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 0

      Problem Statement

      In many use cases, user only interested to run the remote execution job against  all Satellite managed clients using the "host ~ *" query. Having infrastructure hosts included in search query will cause the REX jobs of the infrastructure hosts to fail and resulting bad host statuses because user doesn't setup a  ssh public key trust for the infrastructure hosts.

      The bad host status is also causing the Red Herring and confusion to the Satellite users and it requires the user to clear the bad host status every time.

      Currently, this can only be workaround by limiting the  "execute_jobs_on_infrastructure_hosts" permission for non-admin users. There is no way to limit the admin users.

       

      In "foreman_remote_execution-12.0.5/app/models/concerns/foreman_remote_execution/host_extensions.rb"

              scope :execution_scope, lambda {
                if User.current&.can?('execute_jobs_on_infrastructure_hosts')
                  self
                else
                  search_for('not (infrastructure_facet.foreman = true or set? infrastructure_facet.smart_proxy_id)')
                end
              } 

       

       

              Unassigned Unassigned
              rhn-support-hyu Hao Chang Yu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: