Bug 1998566

Summary: Could not update repository with URL (ISE 500 in logs) when url was not previously set
Product: Red Hat Satellite Reporter: Stephen Wadeley <swadeley>
Component: RepositoriesAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: hyu, jsherril, mawerner, myarboro, smallamp, zhunting
Target Milestone: 6.10.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-4.1.1.21-1,tfm-rubygem-katello-4.1.1.28-1 Doc Type: Known Issue
Doc Text:
Cause: Updating a repository to add a url when it previously did not have a url will fail with an Internal Server Error 500. Workaround (if any): If you need to add a url to a repository without one, simply delete the repository and re-create it.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:13:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen Wadeley 2021-08-27 15:28:42 UTC
Description of problem:

Could not update repository with URL

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

How reproducible:
same error on different Satellite

Steps to Reproduce:
1. hammer product create  --name 'TestProduct' --organization-id 1
2. hammer repository  create --content-type yum  --name CustomRepo --product 'TestProduct' --organization-id 1
3. hammer repository  update  --url 'https://stephenw.fedorapeople.org/fakerepos/multiple_errata'  --name CustomRepo --product 'TestProduct' --organization-id 1

Actual results:

Could not update the repository:
  Task 72f3b063-111c-4665-9304-a90e31d2b452: NoMethodError: undefined method `[]' for true:TrueClass

Expected results:

Repo is updated with URL

Comment 2 Stephen Wadeley 2021-08-27 17:16:31 UTC
Despite error, repo was updated


~]# hammer repository info --name CustomRepo --product 'TestProduct' --organization-id 1
Id:                 1
Name:               CustomRepo
Label:              CustomRepo
Description:        
Organisation:       Default Organization
Red Hat Repository: no
Content Type:       yum
Mirror on Sync:     yes
Url:                https://stephenw.fedorapeople.org/fakerepos/multiple_errata
Publish Via HTTP:   yes
Published At:       https://<redacted>.redhat.com/pulp/content/Default_Organization/Library/custom/TestProduct/CustomRepo/
Relative Path:      Default_Organization/Library/custom/TestProduct/CustomRepo
Download Policy:    immediate
HTTP Proxy:         
    HTTP Proxy Policy: global_default_http_proxy
Product:            
    Id:   1
    Name: TestProduct
GPG Key:            

Sync:               
    Status: Not Synced
Created:            2021/08/27 15:21:25
Updated:            2021/08/27 15:23:22
Content Counts:     
    Packages:       0
    Source RPMS:    0
    Package Groups: 0
    Errata:         0
    Module Streams: 0

Comment 4 Justin Sherrill 2021-08-30 14:39:54 UTC
Created redmine issue https://projects.theforeman.org/issues/33370 from this bug

Comment 5 Bryan Kearney 2021-08-30 16:05:39 UTC
Upstream bug assigned to jsherril

Comment 6 Bryan Kearney 2021-08-30 16:05:41 UTC
Upstream bug assigned to jsherril

Comment 8 Sudhir Mallamprabhakara 2021-08-31 11:35:38 UTC
@Brad - I suggest we add this in the beta release notes.

Comment 9 Matt Werner 2021-08-31 15:21:25 UTC
Marked this as a known issue to include in RNs.

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

Comment 15 Justin Sherrill 2021-09-27 13:33:09 UTC
*** Bug 2008095 has been marked as a duplicate of this bug. ***

Comment 19 errata-xmlrpc 2021-11-16 14:13:42 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