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 1965901 - Unable to sync insights recommendations, task fails with "Unable to authenticate using rh_cloud_token setting".
Summary: Unable to sync insights recommendations, task fails with "Unable to authentic...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Inventory
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.10.0
Assignee: Shimon Shtein
QA Contact: Jameer Pathan
URL:
Whiteboard:
: 1966418 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-31 05:24 UTC by Jameer Pathan
Modified: 2023-05-19 10:05 UTC (History)
3 users (show)

Fixed In Version: tfm-rubygem-foreman-tasks-4.1.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:11:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 32729 0 Urgent Closed Dynflow doesn't reflect changes in Setting 2021-06-11 13:04:31 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:11:30 UTC

Description Jameer Pathan 2021-05-31 05:24:58 UTC
Description of problem:
Unable to sync insights recommendations, task fails with "Unable to authenticate using rh_cloud_token setting".

Version-Release number of selected component (if applicable):
- Satellite 6.10.0 snap 2
- tfm-rubygem-foreman_rh_cloud-3.0.20-1.el7sat.noarch

How reproducible:
- Always

Steps to Reproduce:
- Import manifest
- Go to Configure > Insights
- Add RH Cloud token
- Click on "Start Recommendation sync"
- Click on task link

Actual results:
- Task fails with following error message:
ERF50-1206 [Foreman::WrappedException]: Unable to authenticate using rh_cloud_token setting ([RestClient::BadRequest]: 400 Bad Request)ERF50-1206 [Foreman::WrappedException]: Unable to authenticate using rh_cloud_token setting ([RestClient::BadRequest]: 400 Bad Request)ERF50-1206 [Foreman::WrappedException]: Unable to authenticate using rh_cloud_token setting ([RestClient::BadRequest]: 400 Bad Request)ERF50-1206 [Foreman::WrappedException]: Unable to authenticate using rh_cloud_token setting ([RestClient::BadRequest]: 400 Bad Request)


Expected results:
- Successfully syncing insights recommendations.

Additional info:

Comment 2 Jameer Pathan 2021-05-31 12:51:16 UTC
This issue is not observed after I restart satellite services using 
foreman-maintain(even though everything is running already) and doing `systemctl daemon-reload`.

[root@dhcp-2-149 ~]# foreman-maintain service restart
Running Restart Services
================================================================================
Check if command is run as root user:                                 [OK]
--------------------------------------------------------------------------------
Restart applicable services: 

Stopping the following service(s):
rh-redis5-redis, postgresql, pulpcore-api, pulpcore-content, pulpcore-resource-manager, rh-redis5-redis, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, puppetserver, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy
/ stopping puppetserver                                                         
Warning: Stopping foreman.service, but it can still be activated by:
  foreman.socket
/ stopping rh-redis5-redis                                                      
Warning: postgresql.service changed on disk. Run 'systemctl daemon-reload' to reload units.

Warning: Stopping pulpcore-api.service, but it can still be activated by:
  pulpcore-api.socket

Warning: Stopping pulpcore-content.service, but it can still be activated by:
  pulpcore-content.socket
\ All services stopped                                                          

Starting the following service(s):
rh-redis5-redis, postgresql, pulpcore-api, pulpcore-content, pulpcore-resource-manager, rh-redis5-redis, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, puppetserver, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy
- starting rh-redis5-redis                                                      
Warning: postgresql.service changed on disk. Run 'systemctl daemon-reload' to reload units.
- starting puppetserver                                                         
Job for foreman.service failed because the control process exited with error code. See "systemctl status foreman.service" and "journalctl -xe" for details.
| All services started                                                [OK]      
--------------------------------------------------------------------------------

[root@dhcp-2-149 ~]# systemctl daemon-reload

Comment 3 Jameer Pathan 2021-05-31 12:53:28 UTC
After performin step mentioned in comment#2, task related to adding rh_token finishes successfully.
But even after that satellite doesn't show any insights recommendations.

Comment 4 Jameer Pathan 2021-06-01 09:12:04 UTC
*** Bug 1966418 has been marked as a duplicate of this bug. ***

Comment 7 Evgeni Golov 2021-06-01 10:07:23 UTC
As written in BZ#1966418:

I don't think the component (Foreman Maintain) is correct.

If this is a freshly deployed machine (or a fresh upgrade), the Installer should have kicked systemd accordingly after modifying the file.
If it didn't, that's an Installer bug.

At the same time, the attached traceback doesn't show anything about *why* things are not working.
So please provide a full one, or a reproducer machine.


However, this BZ has more logs attached, and they log that `foreman.service` could not be started properly.

Can we please see a reproducer machine?

Comment 9 Adam Ruzicka 2021-06-11 13:04:32 UTC
This bz was a symptom of underlying bug in foreman-tasks/dynflow. dynflow-sidekiq@* processes loaded settings on process start and used that cached view of settings throughout their entire life. The fix will land in foreman-tasks-4.1.2

Comment 10 Jameer Pathan 2021-06-28 12:51:15 UTC
Verified:

Verified with:
- Satellite 6.10.0 snap 6
- tfm-rubygem-foreman_rh_cloud-4.0.22-1.el7sat.noarch
- tfm-rubygem-foreman-tasks-4.1.2-1.el7sat.noarch

Test steps:
- Import manifest
- Register a satellite content host with insights.
- Go to Configure > Insights
- Add RH Cloud token
- Click on "Start Recommendation sync"
- Click on task link

Observation:
- Successfully synced insights recommendations.

Comment 13 errata-xmlrpc 2021-11-16 14:11:21 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.10 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-2021:4702


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