Bug 68437 - up2date crashes when proxy support is activated.
up2date crashes when proxy support is activated.
Status: CLOSED RAWHIDE
Product: Red Hat Public Beta
Classification: Retired
Component: up2date (Show other bugs)
limbo
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Jay Turner
:
: 69337 69526 (view as bug list)
Depends On:
Blocks: 67217
  Show dependency treegraph
 
Reported: 2002-07-10 04:23 EDT by ntk
Modified: 2015-01-07 18:57 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-07-25 10:35:43 EDT
Type: ---
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 ntk 2002-07-10 04:23:56 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (Windows NT 5.0; U)

Description of problem:
I enable proxy support in up2date configuration. After this I see this :

[root@gk /etc/sysconfig/rhn]# up2date  &
[1] 3098
[root@gk /etc/sysconfig/rhn]# Traceback (most recent call last):
  File "/usr/sbin/up2date", line 17, in ?
    from up2date_client import rpcServer
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 7, in ?
    import up2dateAuth 
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 4, in ?
    import rpmSource
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 113, in ?
    psc = PackageSourceConfig()
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 83, in __init__
    self.serverSettings = ServerSettings()
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 62, in __init__
    if cfg.readEntry("enableProxy") and rpcServer.getProxySetting():
NameError: global name 'rpcServer' is not defined
[1]+  Exit 1                  up2date
_________________________________
Without proxy enabled seems works fine, but I can't check because my server must use proxy to connect to internet.

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


How reproducible:
Always

Steps to Reproduce:
1. type the following command "up2date --configure" 
2. Just enable proxy support in the menu 
3. start the up2date  - and you will see the crash
	

Actual Results:  Program crashes when it starts 

Expected Results:  Must work and communicate trough proxy

Additional info:

I make upgrade  from RH 7.3 to RH 8.0 beta 
[root@gk /etc/sysconfig/rhn]# cat /etc/redhat-release 
Red Hat Linux release 7.3.92 (Limbo)
[root@gk /etc/sysconfig/rhn]# rpm -qa | grep up2date
up2date-2.9.13-7.x.9
[root@gk /etc/sysconfig/rhn]# rpm -qa | grep py                                                                                                       
python-xmlrpc-1.5.1-7.x.3
rpm-python-4.1-0.34
python-devel-2.2.1-10
rpm404-python-4.0.4-8x.24
python-2.2.1-10
python-popt-0.8.9-8.x.9
pyOpenSSL-0.5pre-1
python-clap-1.0.0-6
___________________________________________
[root@gk /etc/sysconfig/rhn]# up2date  &
[1] 3098
[root@gk /etc/sysconfig/rhn]# Traceback (most recent call last):
  File "/usr/sbin/up2date", line 17, in ?
    from up2date_client import rpcServer
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 7, in ?
    import up2dateAuth 
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 4, in ?
    import rpmSource
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 113, in ?
    psc = PackageSourceConfig()
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 83, in __init__
    self.serverSettings = ServerSettings()
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 62, in __init__
    if cfg.readEntry("enableProxy") and rpcServer.getProxySetting():
NameError: global name 'rpcServer' is not defined
[1]+  Exit 1                  up2date
Comment 1 Mihai Ibanescu 2002-07-19 20:52:11 EDT
Fixed in up2date-2.9.13-7.x.9
Comment 2 Aleksey Nogin 2002-07-19 21:10:05 EDT
Are you sure you typed the version right? As far as I undrestand,
up2date-2.9.13-7.x.9 is what already in Limbo (and has this problem).
Comment 3 Mihai Ibanescu 2002-07-19 21:15:09 EDT
You're right, I'm wrong. up2date-2.9.15-7.x.9, we'll see look at making it public.
Comment 4 Bill Nottingham 2002-07-22 23:30:15 EDT
*** Bug 69526 has been marked as a duplicate of this bug. ***
Comment 5 Michael Young 2002-07-23 05:31:32 EDT
With rhnlib-0.8-8 up2date-2.9.17-7.x.9 up2date-gnome-2.9.17-7.x.9 I get the
following error when I try to run any up2date command with proxies turned on
(including up2date-config so I can't turn proxies off again)
Traceback (most recent call last):
  File "/usr/sbin/up2date-nox", line 17, in ?
    from up2date_client import rpcServer
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 7, in ?
    import up2dateAuth
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 4, in ?
    import rpmSource
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 113, in ?
    psc = PackageSourceConfig()
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 83, in __init__
    self.serverSettings = ServerSettings()
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 62, in __init__
    if cfg.readEntry("enableProxy") and rpcServer.getProxySetting():
AttributeError: 'module' object has no attribute 'getProxySetting'
Comment 6 Michael Young 2002-07-23 12:30:07 EDT
I get the same error with up2date*2.9.20-7.x.9 and rhnlib-0.8-9 .
Comment 7 Adrian Likins 2002-07-23 17:20:38 EDT
hmm. boggle. 

Seems to work fine for me, and code looks fine at first
glance. 

*ponder...*

rpcServer is imported. rpcServer.py definately has a get getProxySetting

Must be a scope issue with rpcServer blah,blah,blah, which import rpcServer again

Why it seems to work fine for me I have no idea, investigating...
Comment 8 Adrian Likins 2002-07-23 17:22:57 EDT
duh, it helps if I enableProxy to even get to this code path...
duplicated it, investigating
Comment 9 Adrian Likins 2002-07-23 18:01:41 EDT
okay, think I have a fix for this. I moved getProxySettings to
somewhere slightly more general, so I dont get recursive imports

should be in 2.9.22 or higher
Comment 10 Michael Schwendt 2002-07-24 00:23:09 EDT
*** Bug 69337 has been marked as a duplicate of this bug. ***
Comment 11 Michael Young 2002-07-25 07:45:02 EDT
I can now update named packages with up2date-2.9.27-7.x.9. (I get Not Found if I
try up2date -l but I guess that is a missing file on the server).
Comment 12 Mihai Ibanescu 2002-07-25 10:09:22 EDT
M.A.Young, can you please file another bug with the Not Found error please?
Comment 13 Michael Young 2002-07-25 10:35:39 EDT
Misa: Not Found error submitted as bug 69791
Comment 14 Jay Turner 2002-08-19 15:08:38 EDT
Fix confirmed with up2date-2.9.46-1.

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