Bug 987626 - opening preference dialog results in PUTS to the server api
opening preference dialog results in PUTS to the server api
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.10
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Bryan Kearney
IDM QE LIST
:
Depends On:
Blocks: rhsm-rhel510
  Show dependency treegraph
 
Reported: 2013-07-23 15:13 EDT by Adrian Likins
Modified: 2013-09-30 19:15 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-30 19:15:11 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)

  None (edit)
Description Adrian Likins 2013-07-23 15:13:01 EDT
Description of problem:

When the dialog is opened, we end up causing change events on all the entries, and they are hooked up to update the server state when that happens. I don't think that should happen for just opening the dialog.

It seems like when the dialog is opened, we make a request to the server to get the most recent consumer, then set the entries to those values, but we trigger a change event there, and that ends up making all three entries PUT an updated Consumer to the server. 


Expected results:

Ideally on opening the dialog, there are no request to the server, but we probably need at least one when we first show the dialog to get any server changes.

Though, by that point, we have made other GET /consumer calls, so we shouldn't really need to do it again.

The initial settings of the entry widgets should not cause them to call their change callbacks. This would prevent the unneeded PUT requests. 


The dialog also currently makes all those request each time it is show, which
seems unneeded. If we can reuse the results of whatever the latests getConsumer call was, we should be able to avoid any calls when reshowing the dialog.
Comment 1 Adrian Likins 2013-07-23 15:13:49 EDT
rhsm.log from initial showing of dialog

2013-07-23 15:12:44,467 [DEBUG]  @connection.py:415 - Making request: GET /candlepin/consumers/ace5ebc2-3e1c-4513-aa9d-c2de0394afb9
2013-07-23 15:12:44,588 [DEBUG]  @connection.py:434 - Response status: 200
2013-07-23 15:12:44,590 [DEBUG]  @injection.py:80 - Returning instance for feature PLUGIN_MANAGER
2013-07-23 15:12:44,590 [DEBUG]  @certdirectory.py:204 - Installed product IDs: ['37060']
2013-07-23 15:12:44,590 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-07-23 15:12:44,592 [INFO]  @preferences.py:193 - release changed to: 
2013-07-23 15:12:44,593 [DEBUG]  @connection.py:415 - Making request: PUT /candlepin/consumers/ace5ebc2-3e1c-4513-aa9d-c2de0394afb9
2013-07-23 15:12:44,795 [DEBUG]  @connection.py:434 - Response status: 204
2013-07-23 15:12:44,796 [DEBUG]  @connection.py:415 - Making request: GET /candlepin/owners/admin/servicelevels
2013-07-23 15:12:44,874 [DEBUG]  @connection.py:434 - Response status: 200
2013-07-23 15:12:44,877 [INFO]  @preferences.py:182 - SLA changed to: None
2013-07-23 15:12:44,878 [DEBUG]  @connection.py:415 - Making request: PUT /candlepin/consumers/ace5ebc2-3e1c-4513-aa9d-c2de0394afb9
2013-07-23 15:12:45,042 [DEBUG]  @connection.py:434 - Response status: 204
2013-07-23 15:12:45,045 [INFO]  @preferences.py:210 - Auto-attach preference changed to: True
2013-07-23 15:12:45,046 [DEBUG]  @connection.py:415 - Making request: PUT /candlepin/consumers/ace5ebc2-3e1c-4513-aa9d-c2de0394afb9
2013-07-23 15:12:45,175 [DEBUG]  @connection.py:434 - Response status: 204
Comment 2 Cory Scheviak 2013-07-31 10:27:47 EDT
0e2244e2a88ea147586d6082ca2c29309a289bbb

subscription-manager.git
Comment 6 Sharath Dwaral 2013-08-07 13:28:12 EDT
Version:

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-gui-1.8.18-1.el5
subscription-manager-migration-data-1.11.3.2-1.git.0.14f9d59.el5
python-rhsm-1.8.16-1.el5
subscription-manager-migration-1.8.18-1.el5
subscription-manager-1.8.18-1.el5
subscription-manager-firstboot-1.8.18-1.el5
python-rhsm-debuginfo-1.8.16-1.el5
subscription-manager-debuginfo-1.8.18-1.el5


Verification:

Log on clicking preference

# tail -f /var/log/rhsm/rhsm.log
2013-08-07 13:23:44,580 [DEBUG]  @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-08-07 13:23:44,580 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-08-07 13:23:44,581 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/fsharath-candlepin.pem'
2013-08-07 13:23:44,581 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-08-07 13:23:44,582 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/sharath-candlepin.pem'
2013-08-07 13:23:44,582 [DEBUG]  @connection.py:415 - Making request: GET /subscription/consumers/f4ebf177-eac7-4537-bdea-9d4a67a6626b
2013-08-07 13:23:47,707 [DEBUG]  @connection.py:434 - Response status: 200
2013-08-07 13:23:47,708 [WARNING]  @connection.py:438 - Clock skew detected, please check your system time
2013-08-07 13:23:47,711 [DEBUG]  @injection.py:80 - Returning instance for feature PLUGIN_MANAGER
2013-08-07 13:23:47,711 [DEBUG]  @certdirectory.py:204 - Installed product IDs: ['100000000000006', '1000000000000023', '1144', '100000000000011', '27060', '69', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000060', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '213412341236', '213412341237', '213412341234', '213412341235', '100000000000020', '32060', '88888', '100000000000069', '900', '917571', '801', '806', '37070']
2013-08-07 13:23:47,711 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,711 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,711 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,712 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,713 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,714 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,714 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,714 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,714 [INFO]  @release.py:115 - No products with RHEL product tags found
2013-08-07 13:23:47,715 [DEBUG]  @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-08-07 13:23:47,715 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-08-07 13:23:47,715 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/fsharath-candlepin.pem'
2013-08-07 13:23:47,715 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-08-07 13:23:47,716 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/sharath-candlepin.pem'
2013-08-07 13:23:47,716 [DEBUG]  @connection.py:415 - Making request: GET /subscription/owners/6786288/servicelevels
2013-08-07 13:23:49,469 [DEBUG]  @connection.py:434 - Response status: 200
2013-08-07 13:23:49,473 [INFO]  @preferences.py:212 - Auto-attach preference changed to: True
2013-08-07 13:23:49,474 [DEBUG]  @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-08-07 13:23:49,474 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-08-07 13:23:49,475 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/fsharath-candlepin.pem'
2013-08-07 13:23:49,475 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-08-07 13:23:49,475 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/sharath-candlepin.pem'
2013-08-07 13:23:49,476 [DEBUG]  @connection.py:415 - Making request: PUT /subscription/consumers/f4ebf177-eac7-4537-bdea-9d4a67a6626b
2013-08-07 13:23:51,378 [DEBUG]  @connection.py:434 - Response status: 204



On opening the dialog, there are no request to the server

VERIFIED
Comment 9 errata-xmlrpc 2013-09-30 19:15:11 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.

http://rhn.redhat.com/errata/RHBA-2013-1332.html

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