Bug 681132 - Add/Remove Software crashes on Startup (SSL cert. verify fails in RHN)
Summary: Add/Remove Software crashes on Startup (SSL cert. verify fails in RHN)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools
Version: 5.8
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Milan Zázrivec
QA Contact: Jiří Mikulka
URL:
Whiteboard:
: 684340 691552 691556 (view as bug list)
Depends On:
Blocks: 771385
TreeView+ depends on / blocked
 
Reported: 2011-03-01 08:15 UTC by kesseboehmer-holding
Modified: 2014-10-06 13:46 UTC (History)
10 users (show)

Fixed In Version: rhn-client-tools-0.4.20-57.el5
Doc Type: Bug Fix
Doc Text:
Cause: Originally in the times of up2date, when no yum exist at all, we had our own set of classes which represent different errors. And we feel no shame to print traceback when such error was raised. Consequence: But as Linux matured (and yum raised) we have to be friendly to users. And yum expected that all errors which happen due some problem with repo, will be instance of yum.RepoError. But our old code did not know that and nobody fixed that. Fix: I came and made error SSLCertificateVerifyFailedError a child of yum.RepoError. Result: As result, whenever some error with repository occure - Yum (or Pup) will be meet with error which has known ancestors and instead of printing unfriendly traceback, these programs can print nice error message or even present dialog window. This will significantly lower confuse level of our users.
Clone Of:
: 771385 (view as bug list)
Environment:
Last Closed: 2012-02-21 06:30:10 UTC
Target Upstream Version:


Attachments (Terms of Use)
Crash Dump (3.31 KB, text/plain)
2011-03-01 08:15 UTC, kesseboehmer-holding
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0250 0 normal SHIPPED_LIVE rhn-client-tools bug fix update 2012-02-20 15:07:09 UTC

Description kesseboehmer-holding 2011-03-01 08:15:05 UTC
Created attachment 481550 [details]
Crash Dump

Description of problem:

Add/Remove Software crashes on Startup

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


How reproducible:


Steps to Reproduce:
1. Start Add/Remove Software

Comment 1 James Antill 2011-03-01 14:08:39 UTC
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 186, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 64, in __call__
    raise up2dateErrors.SSLCertificateVerifyFailedError()
SSLCertificateVerifyFailedError: The SSL certificate failed verification.

Comment 2 Miroslav Suchý 2011-03-01 15:26:23 UTC
Well, the cause of this is that you have bad SSL certificate to access to rhn.redhat.com or you RHN Satellite. There is nothing we can do that about that. Reporter should use correct certificate.
I will ignore this part.

What we can fix is that Traceback. And it should be part of GUI/CLI tool using this plugin to catch this exception and provid nice error message - or in case of pirut - to provide nice error window. Presumable with some Cancel/Try Again.

James, do you agree, that pirut should catch this exception? If yes, can you take this BZ back. Otherwise I'm going to close it as there is nothing I can fix in plugin.

Comment 3 James Antill 2011-03-01 17:21:16 UTC
Changing the GUI significantly at this point is ... unlikely.

In general we don't want to be catching 666 random exceptions within the core, so we'd "expect" that the rhn plugin would catch the exception and rethrow as RepoError/NoMoreMirrorsRepoError/RepoMDError or even PluginYumExit (I'm not sure what pirut does with the later though).

Comment 4 James Antill 2011-03-21 18:33:58 UTC
*** Bug 684340 has been marked as a duplicate of this bug. ***

Comment 5 James Antill 2011-03-28 20:54:31 UTC
*** Bug 691552 has been marked as a duplicate of this bug. ***

Comment 6 James Antill 2011-03-28 20:54:37 UTC
*** Bug 691556 has been marked as a duplicate of this bug. ***

Comment 7 Miroslav Suchý 2011-03-31 13:34:20 UTC
Fixed in upstream https://bugzilla.redhat.com/show_bug.cgi?id=691188#c6

Comment 8 jmolina 2011-03-31 13:40:25 UTC
Thanks, it seems to be working now.

Comment 10 Michael Mráka 2011-10-06 11:25:50 UTC
Backported change from spacewalk master as
------------------------------------------------------------------------
r207195 | mmraka | 2011-10-06 13:24:17 +0200 (Thu, 06 Oct 2011) | 5 lines

681132 - inherit SSLCertificateVerifyFailedError from RepoError

backported from 3ef12a289c1f1341144caf2af1d2595cd1500a66
691188 - inherit SSLCertificateVerifyFailedError from RepoError

------------------------------------------------------------------------

Comment 14 Jiří Mikulka 2012-01-03 15:23:50 UTC
The first part of this problem is already fixed in rhn-client-tools (now up2dataErrors.SSLCertificateVerifyFailedError inherits from RepoError), but there is still problem in pirut, which still handles this exception incorrectly. I created a new Bug #771385.

Reproducer:
1. register to Satellite
2. change SSLCert in /etc/sysconfig/rhn/up2date to some existing and valid (but for another different Satellite) cert
3. run `yum check-update` - readable error message is shown (not traceback)
4. run `pirut` - 'Exception Occured' window with traceback + traceback in terminal is shown

Switching to VERIFIED (from the satellite devel/qa point of view).

Comment 15 Miroslav Suchý 2012-02-13 12:29:37 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: Originally in the times of up2date, when no yum exist at all, we had our own set of classes which represent different errors. And we feel no shame to print traceback when such error was raised.

Consequence: But as Linux matured (and yum raised) we have to be friendly to users. And yum expected that all errors which happen due some problem with repo, will be instance of yum.RepoError. But our old code did not know that and nobody fixed that.

Fix: I came and made error SSLCertificateVerifyFailedError a child of yum.RepoError.

Result: As result, whenever some error with repository occure - Yum (or Pup) will be meet with error which has known ancestors and instead of printing unfriendly traceback, these programs can print nice error message or even present dialog window. This will significantly lower confuse level of our users.

Comment 16 errata-xmlrpc 2012-02-21 06:30:10 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.

http://rhn.redhat.com/errata/RHBA-2012-0250.html


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