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 2149893 - Some custom repositories are failing to synchorize with error "This field may not be blank" after upgrading to Red Hat Satellite 6.11
Summary: Some custom repositories are failing to synchorize with error "This field may...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.11.4
Hardware: All
OS: All
unspecified
high
Target Milestone: 6.13.0
Assignee: Ian Ballou
QA Contact: Cole Higgins
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-01 10:42 UTC by Sayan Das
Modified: 2023-05-03 13:23 UTC (History)
8 users (show)

Fixed In Version: rubygem-katello-4.7.0.22-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2175010 (view as bug list)
Environment:
Last Closed: 2023-05-03 13:23:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35927 0 Normal Closed Some custom repositories are failing to synchorize with error "This field may not be blank" after upgrading to Katello 4... 2023-01-26 22:47:06 UTC
Foreman Issue Tracker 36196 0 Normal Closed 20230119003859_ensure_repo_username_password_nil_not_blank.rb tries to update repo.upstream_username rather than repo.ro... 2023-03-14 19:38:00 UTC
Red Hat Issue Tracker SAT-14146 0 None None None 2022-12-01 15:19:40 UTC
Red Hat Knowledge Base (Solution) 6981322 0 None None None 2022-12-01 10:43:19 UTC
Red Hat Product Errata RHSA-2023:2097 0 None None None 2023-05-03 13:23:18 UTC

Description Sayan Das 2022-12-01 10:42:09 UTC
Description of problem:

There are a couple of users who have reported this issue i.e.

* After upgrading to Red Hat Satellite 6.11, Some of the custom repositories are failing to get synced with the following error.

   ~~~
   Exception:
   PulpRpmClient::ApiError: Error message: the server returns an error
   HTTP status code: 400
   Response headers: {"Date"=>"Wed, 09 Nov 2022 15:07:29 GMT", "Server"=>"gunicorn", "Content-Type"=>"application/json", "Vary"=>"Accept,Cookie", "Allow"=>"GET, PUT, PATCH, DELETE, HEAD, OPTIONS", "X-Frame-Options"=>"DENY", "Content-Length"=>"89", "X-Content-Type-Options"=>"nosniff", "Referrer-Policy"=>"same-origin", "Correlation-ID"=>"ac17a33d-bea6-44e8-85b0-fd166cbd806d", "Access-Control-Expose-Headers"=>"Correlation-ID", "Via"=>"1.1 satellite.example.com", "Connection"=>"close"}
   Response body: {"username":["This field may not be blank."],"password":["This field may not be blank."]}
   ~~~

   
* Inspecting the repository from Satellite UI --> Content --> Products page, does not shows any username or password mentioned in the **Upstream Authorization** field as well.


Version-Release number of selected component (if applicable):

Satellite 6.11.4 and above


How reproducible:

By some customers who are using that satellite since 6.4 or 6.5 and have upgraded them to 6.11 


Steps to Reproduce:

NA


Actual results:

Sync fails with this error logged in production.log

   2022-11-09T08:48:33 [E|bac|075bdbe0] Error message: the server returns an error
    075bdbe0 | HTTP status code: 400
    075bdbe0 | Response headers: {"Date"=>"Wed, 09 Nov 2022 14:48:33 GMT", "Server"=>"gunicorn", "Content-Type"=>"application/json", "Vary"=>"Accept,Cookie", "Allow"=>"GET, 
PUT, PATCH, DELETE, HEAD, OPTIONS", "X-Frame-Options"=>"DENY", "Content-Length"=>"89", "X-Content-Type-Options"=>"nosniff", "Referrer-Policy"=>"same-origin", "Correlation
-ID"=>"075bdbe0-e38d-4c47-819f-27ca7182d620", "Access-Control-Expose-Headers"=>"Correlation-ID", "Via"=>"1.1 satellite.example.com", "Connection"=>"close"}
    075bdbe0 | Response body: {"username":["This field may not be blank."],"password":["This field may not be blank."]} (PulpRpmClient::ApiError)
    075bdbe0 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.17.4/lib/pulp_rpm_client/api_client.rb:83:in `call_api'
    075bdbe0 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.17.4/lib/pulp_rpm_client/api/remotes_rpm_api.rb:318:in `partial_update_with_http_info'
    075bdbe0 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.17.4/lib/pulp_rpm_client/api/remotes_rpm_api.rb:262:in `partial_update'
    075bdbe0 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.50/app/services/katello/pulp3/repository.rb:150:in `remote_partial_update'
    075bdbe0 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.50/app/services/katello/pulp3/repository.rb:138:in `update_remote'


And then, running this command against the concerned repo id fixes the issue:

# hammer repository update --id XXX --upstream-username='' --upstream-password=''



Expected results:

No such errors and no such manual actions should be needed. 



Additional info:

I believe a part of the improvement was done via BZ https://bugzilla.redhat.com/show_bug.cgi?id=2064793 | https://github.com/Katello/katello/pull/10018/files , due to which using "hammer repository update" we can fix the issue now but There should be some sort of migration script present that runs during upgrade, checks this inconsistency of values set for username\password between katello and pulpcore and fixes the same. 

As an end user, I should not need to run any additional commands to fix all my custom repos.

Comment 7 Ian Ballou 2023-01-11 23:09:33 UTC
Created redmine issue https://projects.theforeman.org/issues/35927 from this bug

Comment 8 Bryan Kearney 2023-01-13 00:03:09 UTC
Upstream bug assigned to iballou

Comment 9 Bryan Kearney 2023-01-13 00:03:12 UTC
Upstream bug assigned to iballou

Comment 10 Bryan Kearney 2023-01-26 20:03:09 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35927 has been resolved.

Comment 15 Ian Ballou 2023-03-14 18:16:07 UTC
Adding the new upstream issue.

Comment 21 errata-xmlrpc 2023-05-03 13:23:05 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 (Important: Satellite 6.13 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-2023:2097


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