Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 681132 - Add/Remove Software crashes on Startup (SSL cert. verify fails in RHN)
Add/Remove Software crashes on Startup (SSL cert. verify fails in RHN)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools (Show other bugs)
5.8
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Milan Zázrivec
Jiří Mikulka
:
: 684340 691552 691556 (view as bug list)
Depends On:
Blocks: 771385
  Show dependency treegraph
 
Reported: 2011-03-01 03:15 EST by kesseboehmer-holding
Modified: 2014-10-06 09:46 EDT (History)
10 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 771385 (view as bug list)
Environment:
Last Closed: 2012-02-21 01:30:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0250 normal SHIPPED_LIVE rhn-client-tools bug fix update 2012-02-20 10:07:09 EST

  None (edit)
Description kesseboehmer-holding 2011-03-01 03:15:05 EST
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 09:08:39 EST
  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 10:26:23 EST
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 12:21:16 EST
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 14:33:58 EDT
*** Bug 684340 has been marked as a duplicate of this bug. ***
Comment 5 James Antill 2011-03-28 16:54:31 EDT
*** Bug 691552 has been marked as a duplicate of this bug. ***
Comment 6 James Antill 2011-03-28 16:54:37 EDT
*** Bug 691556 has been marked as a duplicate of this bug. ***
Comment 7 Miroslav Suchý 2011-03-31 09:34:20 EDT
Fixed in upstream https://bugzilla.redhat.com/show_bug.cgi?id=691188#c6
Comment 8 jmolina 2011-03-31 09:40:25 EDT
Thanks, it seems to be working now.
Comment 10 Michael Mráka 2011-10-06 07:25:50 EDT
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 10:23:50 EST
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 07:29:37 EST
    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 01:30:10 EST
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.