Bug 1257206 - Satellite 6.1.1: Copy activation key via hammer times out
Summary: Satellite 6.1.1: Copy activation key via hammer times out
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management
Version: 6.1.3
Hardware: Unspecified
OS: Linux
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: jcallaha
URL:
Whiteboard:
Depends On: 1252945
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-26 13:31 UTC by Frank Reimer
Modified: 2019-09-25 21:16 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:39:06 UTC
Target Upstream Version:


Attachments (Terms of Use)
foreman-debug-20151104_1011.tar.xz (12.93 MB, application/x-xz)
2015-11-04 09:19 UTC, Frank Reimer
no flags Details

Description Frank Reimer 2015-08-26 13:31:20 UTC
Description of problem:
If I try to copy an activation-key via hammer the command runs into a timeout. Nevertheless the copied activation-key is present afterwards with correct settings. 

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

How reproducible:
The timeout occurs every time I copy an activation-key with hammer. 

Steps to Reproduce:
1. hammer activation-key copy --organization <orga-name> --id <activation-key-id> --new-name <new-avtivation-key-name>


Actual results:
Error: Request Timeout

Expected results:
The command should process without any timeout. 

Additional info:

Comment 2 Brad Buckingham 2015-09-24 19:29:38 UTC
Hi Frank,

Can you attach a foreman-debug that includes logs from when you are seeing the timeout?

I have run a test on my Satellite 6.1.1 instance and am unable to reproduce the timeout.

RPMs installed:
   ruby193-rubygem-katello-2.2.0.66-1.el7sat.noarch
   rubygem-hammer_cli_katello-0.0.7.17-1.el7sat.noarch

e.g. hammer> activation-key list --organization-id 1
[Foreman] Username: admin
[Foreman] Password for admin: 
---|---------|----------------|-----------------------|--------------------------
ID | NAME    | CONSUMED       | LIFECYCLE ENVIRONMENT | CONTENT VIEW             
---|---------|----------------|-----------------------|--------------------------
1  | default | 2 of Unlimited | Library               | Default Organization View
4  | key2    | 0 of Unlimited |                       |                          
---|---------|----------------|-----------------------|--------------------------
hammer> activation-key copy --organization-id 1 --id 1 --new-name default_copy
Activation key copied
hammer> activation-key list --organization-id 1
---|--------------|----------------|-----------------------|--------------------------
ID | NAME         | CONSUMED       | LIFECYCLE ENVIRONMENT | CONTENT VIEW             
---|--------------|----------------|-----------------------|--------------------------
1  | default      | 2 of Unlimited | Library               | Default Organization View
6  | default_copy | 0 of Unlimited | Library               | Default Organization View
4  | key2         | 0 of Unlimited |                       |                          
---|--------------|----------------|-----------------------|--------------------------
hammer>

Comment 3 Frank Reimer 2015-11-04 09:19:58 UTC
Created attachment 1089459 [details]
foreman-debug-20151104_1011.tar.xz

Comment 4 Frank Reimer 2015-11-04 09:29:41 UTC
Hi Brad,

sorry for my late response. I uploaded the needed foreman-debug file. Unfortunately the problem still appears even if I already upgraded to Satellite 6.1.3. 

RPM`s installed:
- rubygem-hammer_cli_katello-0.0.7.18-1.el7sat.noarch
- ruby193-rubygem-katello-2.2.0.73-1.el7sat.noarch

It seems that Satellite/Hammer has problems to deal with Activation Keys > 10. I currently have 32 Activation Keys configured.

Best regards,

Frank



(In reply to Brad Buckingham from comment #2)
> Hi Frank,
> 
> Can you attach a foreman-debug that includes logs from when you are seeing
> the timeout?
> 
> I have run a test on my Satellite 6.1.1 instance and am unable to reproduce
> the timeout.
> 
> RPMs installed:
>    ruby193-rubygem-katello-2.2.0.66-1.el7sat.noarch
>    rubygem-hammer_cli_katello-0.0.7.17-1.el7sat.noarch
> 
> e.g. hammer> activation-key list --organization-id 1
> [Foreman] Username: admin
> [Foreman] Password for admin: 
> ---|---------|----------------|-----------------------|----------------------
> ----
> ID | NAME    | CONSUMED       | LIFECYCLE ENVIRONMENT | CONTENT VIEW        
> 
> ---|---------|----------------|-----------------------|----------------------
> ----
> 1  | default | 2 of Unlimited | Library               | Default Organization
> View
> 4  | key2    | 0 of Unlimited |                       |                     
> 
> ---|---------|----------------|-----------------------|----------------------
> ----
> hammer> activation-key copy --organization-id 1 --id 1 --new-name
> default_copy
> Activation key copied
> hammer> activation-key list --organization-id 1
> ---|--------------|----------------|-----------------------|-----------------
> ---------
> ID | NAME         | CONSUMED       | LIFECYCLE ENVIRONMENT | CONTENT VIEW   
> 
> ---|--------------|----------------|-----------------------|-----------------
> ---------
> 1  | default      | 2 of Unlimited | Library               | Default
> Organization View
> 6  | default_copy | 0 of Unlimited | Library               | Default
> Organization View
> 4  | key2         | 0 of Unlimited |                       |                
> 
> ---|--------------|----------------|-----------------------|-----------------
> ---------
> hammer>

Comment 5 Brad Buckingham 2016-02-29 19:41:16 UTC
Using the Katello upstream (nightly), I was not able to reproduce the timeout scenario with a configuration consisting of 105 activation keys, each with environment, content view and 2 subscriptions (pools).  It is quite possible that the issue was resolved via other upstream developments (e.g. scoped_search conversion, enhancements to activation keys...etc).

That said, prior to the above statement, I did receive an error on the upstream when subscriptions were attached to the key; therefore, I am going to submit a change for that with this bugzilla so that the scenario can be validated together.

Comment 6 Brad Buckingham 2016-02-29 19:41:46 UTC
Created redmine issue http://projects.theforeman.org/issues/13958 from this bug

Comment 7 Brad Buckingham 2016-02-29 19:49:01 UTC
Upstream katello PR for the issue mentioned in comment #5:
   https://github.com/Katello/katello/pull/5824

Comment 8 Bryan Kearney 2016-02-29 21:04:32 UTC
Upstream bug component is Content Management

Comment 9 Brad Buckingham 2016-03-16 10:02:26 UTC
The issue mentioned in comment 5 was addressed by bug 1252945.  Once that bug goes to ON_QA, this one can as well to re-test the timeout scenario.

The redmine and PR referenced in comments 6 & 7 will not be needed.

Comment 10 Brad Buckingham 2016-03-16 14:39:51 UTC
Since bug 1252945 is fully triaged and in POST, I am going to move this one to POST as well.  We can move to ON_QA when that bug also goes ON_QA.

Comment 12 jcallaha 2016-06-16 18:39:05 UTC
Verified in Satellite 6.2 Beta Snap 15.2

No timeout encountered after 15 activation key copies.

[root@qe-blade-11 ~]# hammer activation-key copy --id 1 --new-name copy  --organization-id 1
Activation key copied

Comment 13 Bryan Kearney 2016-07-27 11:39:06 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-2016:1501


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