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 2119117 - ACS create fails when --smart-proxy-ids option not passed with "undefined method `uniq' for nil:NilClass"
Summary: ACS create fails when --smart-proxy-ids option not passed with "undefined met...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Alternate Content Sources
Version: 6.12.0
Hardware: All
OS: All
unspecified
high
Target Milestone: 6.12.0
Assignee: Chris Roberts
QA Contact: Gaurav Talreja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-17 15:09 UTC by Gaurav Talreja
Modified: 2022-11-16 13:35 UTC (History)
3 users (show)

Fixed In Version: tfm-rubygem-katello-4.5.0.14-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:35:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-12499 0 None None None 2022-09-01 14:45:59 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:35:31 UTC

Description Gaurav Talreja 2022-08-17 15:09:56 UTC
Description of problem:


Version-Release number of selected component (if applicable):
Satellite 6.12.0 Snap 6.1

How reproducible:
Always

Steps to Reproduce:
1. Enable ACS lab feature
2. # hammer alternate-content-source create --name test_repo_acs --base-url http://reposerver.example.com:33333 --subpaths fake_yum0/
Could not create the Alternate Content Source.:
  undefined method `uniq' for nil:NilClass

3. # hammer alternate-content-source create --name test_repo_acs --base-url http://reposerver.example.com:33333 --subpaths fake_yum0/ --smart-proxy-ids 1
Alternate Content Source created.

Actual results:
Could not create the Alternate Content Source.:
  undefined method `uniq' for nil:NilClass

Expected results:
An error like "Missing arguments for '--smart-proxy-ids'" or take satellite as default

Additional info:

Comment 1 Ian Ballou 2022-08-17 16:22:07 UTC
This is fixed upstream in code that I believe is not back-portable to 6.12 (it was included in further feature completion): https://github.com/Katello/katello/blame/master/app/lib/actions/katello/alternate_content_source/create.rb#L11

Comment 2 Brad Buckingham 2022-08-18 14:12:51 UTC
Is --smart-proxy-ids a required parameter for the create command?

If the mentioned fix is not backportable for 6.12, can the error behavior be improved?

Comment 3 Ian Ballou 2022-08-30 13:38:53 UTC
--smart-proxy-ids is not specifically required.  The error could be dealt with by applying the code that I linked in comment 1.

Comment 4 Chris Roberts 2022-08-30 14:46:52 UTC
Tested this on my devel box and it works correctly:

[vagrant@centos7-hammer-devel hammer-cli-foreman]$ hammer alternate-content-source create --name test_repo_acs --base-url http://reposerver.example.com:33333 --subpaths fake_yum0/
Alternate Content Source created.

Since this is not backportable to 6.12 I say we push this to 6.13? Removing the Triage word for Brad to decide what to do.

Comment 5 Ian Ballou 2022-08-30 14:50:34 UTC
I'd vote for a fix that's applied only to Katello 4.5 and downstream.  It should be pretty small, perhaps only one line.

Comment 6 Chris Roberts 2022-08-31 21:34:17 UTC
Thats fair, I will submit a MR downstream for 6.12

Setting 6.12 flags for BZ triage team

Comment 8 Gaurav Talreja 2022-09-27 15:42:02 UTC
Hi Ian/Chris, 

Using Snap 12, the mentioned command works with and without the --smart-proxy-ids option, however, no capsule is assigned to ACS in the case of no --smart-proxy-ids option. Is this expected behaviour?

Also same goes for capsule selection in the ACS create wizard in UI, or shouldn't it be Satellite by default?


Thanks,
Gaurav

Comment 9 Ian Ballou 2022-09-27 16:47:51 UTC
Hey Gaurav,

For Satellite 6.12, it's okay to have ACSs that don't have smart proxies.

We wouldn't want a default because a user might unwittingly create an ACS that affects their library repositories.

Comment 10 Gaurav Talreja 2022-09-27 20:51:50 UTC
Ian, Thanks for the confirmation, I'll move this BZ to VERIFIED.

Comment 14 errata-xmlrpc 2022-11-16 13:35: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 (Important: Satellite 6.12 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:8506


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