Bug 615333 - subscription-manager-gui hangs if its attempts to subscribe to a previously available pool
Summary: subscription-manager-gui hangs if its attempts to subscribe to a previously a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Bryan Kearney
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks: 636830
TreeView+ depends on / blocked
 
Reported: 2010-07-16 14:22 UTC by wes hayutin
Modified: 2015-05-14 15:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-23 16:14:07 UTC
Embargoed:


Attachments (Terms of Use)
No more entitlements are avilable from pool... (19.25 KB, image/png)
2010-10-18 15:22 UTC, John Sefler
no flags Details

Description wes hayutin 2010-07-16 14:22:06 UTC
Description of problem:

You will need two rhel6 clients to test.
For this scenario I used the id xeops/redhat

SystemCLI and SystemGUI are the two boxes I will demonstrate with.

On the SystemGUI:
1. register to candlepin1 hosted server
2. Click add to add entitlements, "Select Subscriptions to add" window
3. Note the available pools

On the SystemCLI:
1. register to candlepin1 hosted server
2. list available
3. bind to a pool w/ only one entitlement left (RHEL standard unlimited)

On the SystemGUI:
The available list will of course still show that the pool that was consumed by the cli is available
1. Try to subscribe to the same pool (RHEL standard unlimited)

The GUI hangs
Nothing interesting in the /var/log/rhsm/rhsm.log

This may be a candlepin bug too, I'm not sure.
Either there is a routine on the server that is not returning or we need to add
a timeout to the subscription-manager client

Thanks

Comment 1 wes hayutin 2010-07-16 14:24:19 UTC
On my second attempt I did get the following error..


TypeError: hide() takes no arguments (2 given)
199 (True, 'Red Hat Enterprise Linux Advanced Platform, Standard (Unlimited Sockets)', <GtkTreeIter at 0x1dd4660>)
Traceback (most recent call last):
  File "/root/subscription-manager/src/gui/managergui.py", line 552, in onSubscribeAction
    ent_ret = UEP.bindByEntitlementPool(consumer['uuid'], pool)
  File "/root/subscription-manager/src/connection.py", line 215, in bindByEntitlementPool
    return self.conn.request_post(method)
  File "/root/subscription-manager/src/connection.py", line 82, in request_post
    return self._request("POST", method, params)
  File "/root/subscription-manager/src/connection.py", line 66, in _request
    self.validateResponse(response)
  File "/root/subscription-manager/src/connection.py", line 76, in validateResponse
    parsed['displayMessage'])
connection.RestlibException: rulefailed.no.entitlements.available

Thats a good sign the server is doing the right thing.

Is it possible for the client to catch this error
rulefailed.no.entitlements.available
and refresh the available pools?

Comment 2 wes hayutin 2010-07-16 14:27:55 UTC
On a third attempt the client seems to be hanging again.

Comment 3 James Bowes 2010-10-04 19:41:49 UTC
In attempting to reproduce this I wasn't able to make it hang (no more than any typical candlepin1 slowness). So i'd like to propose we instead focus this bug on ensuring that all entitlement rule failures are properly human readable, i18n'd, and displayed in the gui and cli.

Sound good?

Comment 4 Adrian Likins 2010-10-05 13:43:32 UTC
I haven't been able to reproduce this either.

Comment 5 James Bowes 2010-10-06 18:18:07 UTC
Ok, the client will now display a nice message for this case.

Comment 6 James Bowes 2010-10-07 13:29:34 UTC
Displaying the message requires version 0.89 of the client, the message itself is in (or will be in) candlepin 0.0.39

Comment 7 John Sefler 2010-10-18 15:21:34 UTC
VERIFIED against hosted candlepin1 WITH CLIENT VERSION
[root@jsefler-itclient01 ~]# rpm -q subscription-manager-gnome
subscription-manager-gnome-0.92-1.el6.x86_64

SEE ATTACHED SCREENSHOT OF MESSAGE RENDERED IN GUI WHEN ALL AVAILABLE ENTITLEMENTS HAVE BEEN CONSUMED BY OTHERS.

FROM /var/log/rhsm/rhsm.log
2010-10-18 11:16:04,735 [ERROR] onSubscribeAction() @managergui.py:849 - Failed to subscribe to product Red Hat Enterprise Linux Entitlement Alpha Error: No free entitlements are available for the pool with id '8a878c912bb1d48a012bb1d566da0099'
2010-10-18 11:16:04,736 [ERROR] onSubscribeAction() @managergui.py:850 - No free entitlements are available for the pool with id '8a878c912bb1d48a012bb1d566da0099'
Traceback (most recent call last):
  File "/usr/share/rhsm/gui/managergui.py", line 835, in onSubscribeAction
    ent_ret = UEP.bindByEntitlementPool(consumer['uuid'], pool)
  File "/usr/share/rhsm/connection.py", line 310, in bindByEntitlementPool
    return self.conn.request_post(method)
  File "/usr/share/rhsm/connection.py", line 147, in request_post
    return self._request("POST", method, params)
  File "/usr/share/rhsm/connection.py", line 126, in _request
    self.validateResponse(result)
  File "/usr/share/rhsm/connection.py", line 141, in validateResponse
    parsed['displayMessage'])
RestlibException: No free entitlements are available for the pool with id '8a878c912bb1d48a012bb1d566da0099'


Moving to VERIFIED

Comment 8 John Sefler 2010-10-18 15:22:51 UTC
Created attachment 454145 [details]
No more entitlements are avilable from pool...

Comment 9 John Sefler 2010-11-23 16:14:07 UTC
This bug was opened/resolved/closed against the Entitlement-Alpha release.


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