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 2162129 - Add validations for RHUI ACS create and update
Summary: Add validations for RHUI ACS create and update
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Alternate Content Sources
Version: 6.13.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: 6.13.0
Assignee: Quinn James
QA Contact: Samir Jha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-18 20:46 UTC by Vladimír Sedmík
Modified: 2023-05-03 13:24 UTC (History)
3 users (show)

Fixed In Version: rubygem-katello-4.7.0.11-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 13:24:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36042 0 Normal New Add validations for RHUI ACS create and update 2023-02-03 16:52:47 UTC
Red Hat Issue Tracker SAT-15044 0 None None None 2023-01-23 14:40:51 UTC
Red Hat Product Errata RHSA-2023:2097 0 None None None 2023-05-03 13:24:47 UTC

Description Vladimír Sedmík 2023-01-18 20:46:17 UTC
Description of problem:
RHUI ACS supports the 'yum' content-type only. However, we are able to create or update an ACS via hammer or API with the 'file' content-type.


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


How reproducible:
always


Steps to Reproduce:
1. Create and RHUI ACS via hammer or API providing file content-type and check the result:

[root@sat ~]# hammer alternate-content-source create --alternate-content-source-type "rhui" --content-type "file" --name "Test RHUI hammer" --base-url "https://rhui.example.com/pulp/content" --subpaths "test/repo1/,test/repo2/" --smart-proxy-ids 1
Alternate Content Source created.

[root@sat ~]# hammer alternate-content-source show --name "Test RHUI hammer"
ID:                            191
Name:                          Test RHUI hammer
Label:                         Test_RHUI_hammer
Base URL:                      https://rhui.example.com/pulp/content
Content type:                  file        <-------------------------------------
Alternate content source type: rhui
Subpaths:                      
 1) : test/repo1/
 2) : test/repo2/
Smart proxies:                 
 1) Id:              1
    Name:            satellite.redhat.com
    URL:             https://satellite.redhat.com:9090
    Download policy: on_demand

[root@sat ~]# pulp file acs list
[
  {
    "pulp_href": "/pulp/api/v3/acs/file/file/0b6ba443-5192-4877-9971-a60f265f3804/",
    "pulp_created": "2023-01-18T17:25:03.157620Z",
    "name": "Test_RHUI_hammer-https://satellite.redhat.com:9090-397",
    "last_refreshed": null,
    "paths": [
      "test/repo2//PULP_MANIFEST",
      "test/repo1//PULP_MANIFEST"
    ],
    "remote": "/pulp/api/v3/remotes/file/file/c14f62dd-5bea-4fc4-b9f3-e98b3bb595ac/"
  }
]

2. Try to update the content-type to 'yum' and back to 'file':
curl -sku admin:password -H "Content-type: application/json" -X PUT -d '{"content_type": "file"}' https://$(hostname)/katello/api/alternate_content_sources/191


Actual results:
ACS is created and updated.


Expected results:
There should be some validation to prevent user to do so.
Also 'product-ids' shouldn't be allowed for this ACS type.

Comment 1 Quinn James 2023-02-03 16:52:46 UTC
Created redmine issue https://projects.theforeman.org/issues/36042 from this bug

Comment 2 Bryan Kearney 2023-02-09 00:03:19 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36042 has been resolved.

Comment 8 errata-xmlrpc 2023-05-03 13:24:33 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.