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:
When Satellite is known as a different name the notification feature from the task 'InsightsFullSync' looks for the Capsules name as 'SmartProxy.default_capsule.name'. If the cname and FQDN are different this will throw issues with finding the server.
Version-Release number of selected component (if applicable):
6.9.3
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
# foreman-rake console
Loading production environment (Rails 6.0.3.4)
irb(main):001:0> ENV['SATELLITE_RH_CLOUD_FOREMAN_HOST']
=> nil
irb(main):002:0> ::SmartProxy.default_capsule.name
=> "satellite.example.com"
irb(main):003:0> ::Host.unscoped.friendly.find(ENV['SATELLITE_RH_CLOUD_FOREMAN_HOST'] || ::SmartProxy.default_capsule.name)
Traceback (most recent call last):
2: from lib/tasks/console.rake:5:in `block in <top (required)>'
1: from (irb):3
ActiveRecord::RecordNotFound (can't find record with friendly id: "satellite.example.com")
irb(main):004:0> ::Host.unscoped.friendly.find("satellite.example.com")
Traceback (most recent call last):
2: from lib/tasks/console.rake:5:in `block in <top (required)>'
1: from (irb):4
ActiveRecord::RecordNotFound (can't find record with friendly id: "satellite.example.com")
irb(main):005:0> ::Host.unscoped.friendly.find("real.satellite.com")
=> #<Host::Managed id: 1, name: "real.satellite.com", last_compile: "2021-07-03 09:14:49", last_report: [FILTERED], updated_at: "2021-07-03 09:14:59", created_at: "2017-11-15 11:20:44", root_pass: [FILTERED], architecture_id: 1, operatingsystem_id: 13, environment_id: 2, ptable_id: 371, medium_id: nil, build: false, comment: "Satellite", disk: "", installed_at: nil, model_id: 1, hostgroup_id: 1260, owner_id: 3, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", compute_resource_id: 2, puppet_proxy_id: 1, certname: "real.satellite.com", image_id: nil, organization_id: 1, location_id: 2, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "XXXXXXXX", global_status: 0, lookup_value_matcher: [FILTERED], discovery_rule_id: nil, openscap_proxy_id: 1, pxe_loader: "PXELinux BIOS", initiated_at: nil, build_errors: nil>
Expected results:
Additional info:
To workaround this bug, you need to change the internal Capsule name back to "real.satellite.com"
Steps:
1) Web UI -> Infrastructure -> Capsule -> Click Edit the internal Capsule -> Set the name to "real.satellite.com"
2) Restart the Satellite so the change can take effect in Dynflow
foreman-maintain service restart
3) After that try manually trigger the InsightFullSync task
Web UI -> Configure -> Insights -> Click Start Recommendation Sync.
4) Check it the ask can finish successfully.
I'll move to post once plugin version would be available
Comment 5Lukáš Hellebrandt
2022-05-24 15:15:14 UTC
Verified with Sat 6.11 snap 20.0.
1) Created a Sat, imported manifest, registered host
2) Created some issue on the host that CRC would show as Advisory, in my case: SMBLoris (added `max smbd processes = 0` to /etc/samba/smb.conf global section)
3) Waited for the Advisory to show in CRC
4) Configure -> Insights -> ... -> Sync recommendations
5) Go to the task 4) created => It succeeded and the Advisories are now shown in Configure -> Insights
6) Infrastructure -> Capsules -> Edit the internal capsule
7) There are fields Name and URL, changed Name to `renamed-capsule.wrong.fqdn.com`
8) Repeated 4) and 5)
9) `foreman-maintain service restart`
1) Repeated 4) and 5)
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: When Satellite is known as a different name the notification feature from the task 'InsightsFullSync' looks for the Capsules name as 'SmartProxy.default_capsule.name'. If the cname and FQDN are different this will throw issues with finding the server. Version-Release number of selected component (if applicable): 6.9.3 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: # foreman-rake console Loading production environment (Rails 6.0.3.4) irb(main):001:0> ENV['SATELLITE_RH_CLOUD_FOREMAN_HOST'] => nil irb(main):002:0> ::SmartProxy.default_capsule.name => "satellite.example.com" irb(main):003:0> ::Host.unscoped.friendly.find(ENV['SATELLITE_RH_CLOUD_FOREMAN_HOST'] || ::SmartProxy.default_capsule.name) Traceback (most recent call last): 2: from lib/tasks/console.rake:5:in `block in <top (required)>' 1: from (irb):3 ActiveRecord::RecordNotFound (can't find record with friendly id: "satellite.example.com") irb(main):004:0> ::Host.unscoped.friendly.find("satellite.example.com") Traceback (most recent call last): 2: from lib/tasks/console.rake:5:in `block in <top (required)>' 1: from (irb):4 ActiveRecord::RecordNotFound (can't find record with friendly id: "satellite.example.com") irb(main):005:0> ::Host.unscoped.friendly.find("real.satellite.com") => #<Host::Managed id: 1, name: "real.satellite.com", last_compile: "2021-07-03 09:14:49", last_report: [FILTERED], updated_at: "2021-07-03 09:14:59", created_at: "2017-11-15 11:20:44", root_pass: [FILTERED], architecture_id: 1, operatingsystem_id: 13, environment_id: 2, ptable_id: 371, medium_id: nil, build: false, comment: "Satellite", disk: "", installed_at: nil, model_id: 1, hostgroup_id: 1260, owner_id: 3, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", compute_resource_id: 2, puppet_proxy_id: 1, certname: "real.satellite.com", image_id: nil, organization_id: 1, location_id: 2, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "XXXXXXXX", global_status: 0, lookup_value_matcher: [FILTERED], discovery_rule_id: nil, openscap_proxy_id: 1, pxe_loader: "PXELinux BIOS", initiated_at: nil, build_errors: nil> Expected results: Additional info: To workaround this bug, you need to change the internal Capsule name back to "real.satellite.com" Steps: 1) Web UI -> Infrastructure -> Capsule -> Click Edit the internal Capsule -> Set the name to "real.satellite.com" 2) Restart the Satellite so the change can take effect in Dynflow foreman-maintain service restart 3) After that try manually trigger the InsightFullSync task Web UI -> Configure -> Insights -> Click Start Recommendation Sync. 4) Check it the ask can finish successfully.