Bug 1315591

Summary: GUI : No network is thrown when you try to remove a subscription on the system with no network
Product: Red Hat Enterprise Linux 6 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Jan Stavel <jstavel>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: bcourt, csnyder, jstavel, wpoteat
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.17.6-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 10:54:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
See an dialogue popping up saying "Network Error" none

Description Shwetha Kallesh 2016-03-08 07:44:36 UTC
Description of problem:
No network is thrown when you try to remove a subscription on the system with no network 

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


How reproducible:


Steps to Reproduce:
1.Register and attach subscriptions
2.Launch GUI and bring the network on the system down
3.Now try to remove a subscription in the My Subscriptions Tab

Actual results:
No error is thrown , a traceback on the console

Expected results:
Network error should be thrown to the user 

Additional info:

Traceback:

[root@dhcp35-224 ~]# subscription-manager-gui 
/usr/share/rhsm/subscription_manager/gui/widgets.py:336: GtkWarning: gtk_tree_store_get_value: assertion `VALID_ITER (iter, tree_store)' failed
  return self.model.get_value(self.tree_iter, self.store[key])
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/gui/mysubstab.py", line 134, in _handle_unbind_exception
    (selection['subscription'], selection['serial']), self.parent_win, format_msg=False)
  File "/usr/share/rhsm/subscription_manager/gui/widgets.py", line 336, in __getitem__
    return self.model.get_value(self.tree_iter, self.store[key])
TypeError: unknown type (null)

Comment 2 Chris Snyder 2016-05-02 15:16:01 UTC
Fix should be in master as of the commit info below

commit 7814c7494f9b554f69a95fc4a9217f531c762798
Author: William Poteat <wpoteat>
Date:   Fri Mar 18 13:06:28 2016 -0400

    1315591: Catches exception and allows process to continue
    
    Ends up in odd state where the previous selection is not reachable.
    Now the proper window with lack of connection information is
    displayed.


NOTE:

Even after this fix there is a strange GTK warning that is popping up. I believe that if anyone thinks this is an issue it should be addressed in a separate BZ.
Leaving a paste of the warning message here for future reference:


"""
`/usr/share/rhsm/subscription_manager/gui/widgets.py:337: GtkWarning: gtk_tree_store_get_value: assertion `VALID_ITER (iter, tree_store)' failed
  return self.model.get_value(self.tree_iter, self.store[key])`
"""

Comment 3 Shwetha Kallesh 2016-05-18 08:58:23 UTC
Created attachment 1158654 [details]
See an dialogue popping up saying "Network Error"

See network error when tried to unsubscribe on a system with no network

[root@dhcp35-45 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.17.6-1.el7
python-rhsm: 1.17.2-1.el7

Comment 4 John Sefler 2016-05-18 11:56:31 UTC
Comment 2 was NOT cherry picked to subscription-manager-1.16 released on RHEL6.8.

Re-flagging for delivery on rhel-6.9.0

Comment 6 Jan Stavel 2016-10-21 09:18:19 UTC
verified with this version of sub-man-gui

 {:full "1.17.15-1.git.0.2a2f747.el7",
   :major "1",
   :minor "17",
   :patch "15",
   :pre-release nil,
   :dev ["1.git.0.2a2f747" "1" "0" "2a2f747"]}

Comment 8 errata-xmlrpc 2017-03-21 10:54:37 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://rhn.redhat.com/errata/RHSA-2017-0698.html