Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2026239 - Config report upload failed with "No smart proxy server found on ["capsule.example.com"] and is not in trusted_hosts"
Summary: Config report upload failed with "No smart proxy server found on ["capsule.ex...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Puppet
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.11.0
Assignee: Lukas Zapletal
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
: 2052589 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-24 07:36 UTC by Hao Chang Yu
Modified: 2024-12-20 21:38 UTC (History)
9 users (show)

Fixed In Version: foreman-3.1.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2071004 (view as bug list)
Environment:
Last Closed: 2022-07-05 14:30:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34026 0 Normal Closed Importing puppet report via the API does not authorize 2022-03-31 15:53:04 UTC
Red Hat Knowledge Base (Solution) 6719591 0 None None None 2022-03-21 08:42:56 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:30:39 UTC

Description Hao Chang Yu 2021-11-24 07:36:00 UTC
Description of problem:
After upgrading to Satellite 6.10, config reports failed to upload due to the error below:

# production.log
------------------------------------------------------------
Started POST "/api/config_reports" for <CAPSULE IP> at <time>
Processing by Api::V2::ConfigReportsController#create as JSON
  Parameters: {"config_report"=>"[FILTERED]", "apiv"=>"v2"}
No smart proxy server found on ["capsule.example.com"] and is not in trusted_hosts  <=========
...
Completed 403 Forbidden in 34ms (Views: 13.0ms | ActiveRecord: 9.3ms | Allocations: 16915)
------------------------------------------------------------

This happens to all the Capsules without "Ansible" feature because Satellite tries to find all the smart proxies with the feature of "Ansible". Previously, it would look for "Puppet" feature. Since all capsules don't have the "Ansible" feature enabled, Satellite doesn't include them in trusted hosts list.


# Satellite 6.9:
foreman-rake console
irb(main):001:0> ConfigReportImporter.authorized_smart_proxy_features
=> ["Puppet"]


# Satellite 6.10
foreman-rake console
irb(main):003:0> ConfigReportImporter.authorized_smart_proxy_features
=> ["Ansible"]


# Expected features:
foreman-rake console
irb(main):003:0> ConfigReportImporter.authorized_smart_proxy_features
=> ["Puppet", "Ansible"]


In "foreman/app/services/config_report_importer.rb"

class ConfigReportImporter < ReportImporter
  def self.authorized_smart_proxy_features
    @authorized_smart_proxy_features ||= super + ['Puppet'] <=====
  end


In "foreman_ansible-6.3.4/app/services/foreman_ansible/ansible_report_importer.rb"

module ForemanAnsible
  module AnsibleReportImporter
  ...
    included do
      ...
      def self.authorized_smart_proxy_features
        super + ['Ansible']  <================== This is appending the list of parent
      end


In "foreman_ansible-6.3.4/lib/foreman_ansible/engine.rb"

::ConfigReportImporter.include ForemanAnsible::AnsibleReportImporter  <======= This seems like not appending the list

Comment 3 Ondřej Ezr 2021-12-03 13:21:59 UTC
This issue was also reported upstream in thread https://community.theforeman.org/t/no-smart-proxy-server-found-on-foreman-puppet-example-com-and-is-not-in-trusted-hosts/26215

It is not related to the Puppet extraction as that will only be in 7.0, so it should not affect 6.10

It already has upstream ticket and PR, hopefully it will be resolved soon.

Comment 4 Bryan Kearney 2021-12-04 00:05:53 UTC
Upstream bug assigned to lzap

Comment 5 Bryan Kearney 2021-12-04 00:05:55 UTC
Upstream bug assigned to lzap

Comment 6 Bryan Kearney 2021-12-18 20:06:20 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34026 has been resolved.

Comment 8 Jan Jansky 2022-03-21 08:44:20 UTC
*** Bug 2052589 has been marked as a duplicate of this bug. ***

Comment 9 Vladimír Sedmík 2022-04-05 21:43:27 UTC
Verified in 7.0 snap 14:
1) Had 6.9.9 Satellite + external Capsule without Ansible feature enabled.
2) Upgraded both to 6.10.4 - the issue was successfully reproduced (fix is going to be cherry-picked into 6.10.5)
3) Upgraded both to 7.0.0 snap 14 - reports were successfully uploaded per interval and/or manually by `puppet agent -t`

Comment 12 errata-xmlrpc 2022-07-05 14:30:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5498


Note You need to log in before you can comment on or make changes to this bug.