Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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
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`
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
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