Bug 1257206 - Satellite 6.1.1: Copy activation key via hammer times out
Satellite 6.1.1: Copy activation key via hammer times out
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.1.3
Unspecified Linux
unspecified Severity medium (vote)
: GA
: --
Assigned To: Brad Buckingham
jcallaha
: Triaged
Depends On: 1252945
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-26 09:31 EDT by Frank Reimer
Modified: 2016-07-27 07:39 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 07:39:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Frank Reimer 2015-08-26 09:31:20 EDT
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 15:29:38 EDT
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 04:19 EST
Created attachment 1089459 [details]
foreman-debug-20151104_1011.tar.xz
Comment 4 Frank Reimer 2015-11-04 04:29:41 EST
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 14:41:16 EST
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 14:41:46 EST
Created redmine issue http://projects.theforeman.org/issues/13958 from this bug
Comment 7 Brad Buckingham 2016-02-29 14:49:01 EST
Upstream katello PR for the issue mentioned in comment #5:
   https://github.com/Katello/katello/pull/5824
Comment 8 Bryan Kearney 2016-02-29 16:04:32 EST
Upstream bug component is Content Management
Comment 9 Brad Buckingham 2016-03-16 06:02:26 EDT
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 10:39:51 EDT
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 14:39:05 EDT
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 07:39:06 EDT
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.