Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 251490 - Configration values are casted to int
Configration values are casted to int
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Other (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Justin Sherrill
Preethi Thomas
Depends On:
Blocks: 248630
  Show dependency treegraph
Reported: 2007-08-09 09:06 EDT by Miroslav Suchý
Modified: 2008-04-02 16:31 EDT (History)
0 users

See Also:
Fixed In Version: sat510
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-02 16:31:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Miroslav Suchý 2007-08-09 09:06:48 EDT
Description of problem:
During work on BZ 248890, I found that we try for every key = value, cast value
to int. But this sometime cause trouble. Like proxy.http_proxy_username or
As I see it can be problem for:
Other configuration values should be ok.

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

How reproducible:

Steps to Reproduce:
1. setup satellite or proxy behind http proxy 
2. set http proxy name or pass to 0123
Actual results:
it will fail

Expected results:
not fail

Additional info:
The problem is in file /usr/share/rhn/common/rhnConfig.py on line 436 in
sanitize function.
Comment 2 Justin Sherrill 2007-10-30 13:16:09 EDT
fixed in rev 133362.

Currently, these values will be always treated as strings:

Comment 3 Justin Sherrill 2007-11-09 17:30:55 EST
moving on_qa
Comment 5 Justin Sherrill 2007-12-06 14:02:15 EST
Hi Preethi,

It may just be easier if you look at the code.  I'm not sure how to have you
test it without setting up a http proxy or modifying the db connection info
(which i don't know how to do).

If you look in /usr/share/rhn/common/rhnConfig.py  at the parse_line function,
you'll see a conversion table that lists all the values listed above along with
the type they should be (str for string).

I then have:
        if converTable.get(key): 
                val = converTable.get(key)(val)
            except ValueError:

which says if the key is in the table, convert it to whichever  type it should
be converted to.                                                               
Comment 7 Justin Sherrill 2007-12-06 15:01:25 EST
moving to on_dev after promoting the package to the proxy for the next qa push.
Comment 8 Miroslav Suchý 2007-12-07 03:17:36 EST
you have test plan writen in my initial comment:

Steps to Reproduce:
1. setup satellite or proxy behind http proxy 
2. set http proxy name or pass to 0123

So in more detail.

1. Install squid on one machine
2. allow only access for user 0123, with pass 0123
3. Install rhn proxy on second machine
4. in /etc/rhn/rhn.conf set:
5. proxy.http_proxy =   to point on first machine with squid
6. proxy.http_proxy_username = 0123
7. proxy.http_proxy_password = 0123

To do it correctly. You should repeat it for jabberd, satellite, hibernate and
Comment 9 Preethi Thomas 2007-12-13 15:48:02 EST
Comment 10 Mike McCune 2008-03-26 00:38:04 EDT
works in stage.
Comment 11 Brandon Perkins 2008-04-02 16:31:18 EDT
Proxy 5.1.0 GA so Closed for Current Release.

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