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 1553338 - activation-key copy fails with "undefined method" and Internal Server Error
Summary: activation-key copy fails with "undefined method" and Internal Server Error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Activation Keys
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: jcallaha
URL:
Whiteboard:
: 1575344 1577798 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-08 17:17 UTC by Dylan Gross
Modified: 2021-12-10 15:46 UTC (History)
19 users (show)

Fixed In Version: tfm-rubygem-katello-3.4.5.76-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1596347 (view as bug list)
Environment:
Last Closed: 2018-08-22 20:07:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Snippet of production.log during activation-key copy attempt. (16.84 KB, text/plain)
2018-03-08 17:19 UTC, Dylan Gross
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 23084 0 Normal Closed activation-key copy fails with "undefined method" and Internal Server Error 2020-03-31 10:12:02 UTC
Red Hat Knowledge Base (Solution) 3490161 0 None None None 2018-06-22 12:45:04 UTC

Description Dylan Gross 2018-03-08 17:17:50 UTC
Description of problem:

   When attempting to copy an activation-key via hammer or the webUI, the overall copy attempt will fail to copy all of the configuration of the original activation key.   

The new key will get created with *some* of the configuration info (Lifecycle Environment, Content View, Host Collections), but will be missing other information (Subscription, repository sets)


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

   Red Hat Satellite 6.3.0


How reproducible:   Seems always.

Steps to Reproduce:
1.   Create an activation key:  i.e.  "rhel7"
2.   Attach a subscription to that activation key,
3.   Copy the activation key.
   # hammer activation-key copy --name rhel7 --new-name rhel7copy2 --organization myorg

Actual results:

The hammer output and the production.log yield an undefined method error, and the prodcution.log yields an "Internal Server Error"


Expected results:

The activation key copies and the resulting new activation key contains the same subscription and repository set information.


Additional info:

Comment 1 Dylan Gross 2018-03-08 17:19:20 UTC
Created attachment 1405938 [details]
Snippet of production.log during activation-key copy attempt.

Comment 2 Dylan Gross 2018-03-09 04:10:49 UTC
Update - After creating a new activation key in the upgraded Red Hat Satellite 6.3, I've lost the ability to reproduce the issue.

Previously when I was able to reproduce in my lab what the customer was seeing, I was copying activation keys that existed in Red Hat Satellite 6.2.

The Satellite was then upgraded to Red Hat Satellite 6.3 and the copy attempts failed.

After creating a new Activation Key in the upgraded 6.3 satellite, the activation key copy attempts worked as expected.

Comment 3 Bengt Giger 2018-03-09 10:24:56 UTC
I still can reproduce the issue, even with new keys:

Could not copy the activation key:
  undefined method `[]' for #<Katello::ContentOverride:0x007f0007db9148>

Probably related: if copied via Web GUI, no response is shown. I looked at the browser console log, there is no response at all from the server.

production.log looks identical to the log attached.

Comment 5 Partha Aji 2018-04-02 14:10:18 UTC
Connecting redmine issue http://projects.theforeman.org/issues/23084 from this bug

Comment 6 Satellite Program 2018-04-10 08:14:36 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/23084 has been resolved.

Comment 10 Brad Buckingham 2018-05-16 17:36:43 UTC
*** Bug 1577798 has been marked as a duplicate of this bug. ***

Comment 15 Brad Buckingham 2018-06-22 12:45:05 UTC
*** Bug 1575344 has been marked as a duplicate of this bug. ***

Comment 18 Patrick Creech 2018-07-02 20:04:10 UTC
Hey partha, this failed to cherrypick, can you take a look?

Comment 24 Ben 2018-07-31 09:03:11 UTC
Just a note that I'm seeing the same issue in 6.3.2:

2018-07-31 09:50:57 5ea7358e [app] [E] NoMethodError: undefined method `[]' for #<Katello::ContentOverride:0x00007fcb3602d920>

Comment 25 jcallaha 2018-08-03 19:02:13 UTC
Verified in Satellite 6.3.3 Snap 2. Activation keys are now successfully copied without issue.


-bash-4.2# hammer activation-key list --organization-id 1
---|--------------|-------------------|-----------------------|------------------
ID | NAME         | HOST LIMIT        | LIFECYCLE ENVIRONMENT | CONTENT VIEW     
---|--------------|-------------------|-----------------------|------------------
3  | ak-capsule-7 | 0 of Unlimited    | DEV                   | Capsule RHEL 7 CV
2  | ak-rhel-6    | 0 of Unlimited    | DEV                   | RHEL 6 CV        
1  | ak-rhel-7    | 4158 of Unlimited | DEV                   | RHEL 7 CV        
---|--------------|-------------------|-----------------------|------------------


-bash-4.2# hammer -v activation-key copy --id 1 --new-name copied --organization-id 1
Activation key copied


-bash-4.2# hammer activation-key list --organization-id 1
---|--------------|-------------------|-----------------------|------------------
ID | NAME         | HOST LIMIT        | LIFECYCLE ENVIRONMENT | CONTENT VIEW     
---|--------------|-------------------|-----------------------|------------------
3  | ak-capsule-7 | 0 of Unlimited    | DEV                   | Capsule RHEL 7 CV
2  | ak-rhel-6    | 0 of Unlimited    | DEV                   | RHEL 6 CV        
1  | ak-rhel-7    | 4158 of Unlimited | DEV                   | RHEL 7 CV        
4  | copied       | 0 of Unlimited    | DEV                   | RHEL 7 CV        
---|--------------|-------------------|-----------------------|------------------


-bash-4.2# hammer activation-key info --id 1
Name:                  ak-rhel-7
ID:                    1
Description:           
Host Limit:            Unlimited
Auto Attach:           false
Lifecycle Environment: DEV
Content View:          RHEL 7 CV
Host Collections:


-bash-4.2# hammer activation-key info --id 4
Name:                  copied
ID:                    4
Description:           
Host Limit:            Unlimited
Auto Attach:           false
Lifecycle Environment: DEV
Content View:          RHEL 7 CV
Host Collections:

Comment 27 errata-xmlrpc 2018-08-22 20:07:08 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, 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/RHBA-2018:2550


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