Bug 577868 - spacewalk-remove-channel unhandled exception parsing /etc/rhn/rhn.conf
Summary: spacewalk-remove-channel unhandled exception parsing /etc/rhn/rhn.conf
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 530
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Justin Sherrill
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On:
Blocks: sat540-blockers
TreeView+ depends on / blocked
 
Reported: 2010-03-29 14:20 UTC by Vishal Gaikwad
Modified: 2018-11-14 20:09 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-28 14:55:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Vishal Gaikwad 2010-03-29 14:22:38 UTC
Here's what we have till now:

> /usr/share/rhn/common/rhnConfig.py(559)parse_file()
-> lineno = lineno + 1

(Pdb) print line
com.redhat.rhn.taskomatic.task.DailySummary,\

(Pdb) n
> /usr/share/rhn/common/rhnConfig.py(560)parse_file()
-> try:

(Pdb)
> /usr/share/rhn/common/rhnConfig.py(561)parse_file()
-> (keys, values) = parse_line(line)

(Pdb)
ValueError: 'unpack list of wrong size'
> /usr/share/rhn/common/rhnConfig.py(561)parse_file()
-> (keys, values) = parse_line(line)

(Pdb) print line
com.redhat.rhn.taskomatic.task.DailySummary,\

(Pdb) n
> /usr/share/rhn/common/rhnConfig.py(562)parse_file()
-> except:

(Pdb) n
> /usr/share/rhn/common/rhnConfig.py(563)parse_file()
-> raise ConfigParserError("Parse Error: <%s:%s>: '%s'" % (

(Pdb) n
ConfigParserError: <common.rhnConfig.ConfigParserError instance at 0xb7ae550c>
> /usr/share/rhn/common/rhnConfig.py(563)parse_file()
-> raise ConfigParserError("Parse Error: <%s:%s>: '%s'" % (

Basically, parse_line() is expected to return 'keys' and 'value' pairs and the distinction happens on the '=' character in the 'line' this fails if you have a continuation character '\' in the /etc/rhn/rhn.conf file.

I'm still working on the patch, I think the way to handle this would be to parse /etc/rhn/rhn.conf file and check the existence of '\' and '\n' (new line) at the end of every line, if found then replace that with a space " ".

Comment 2 Justin Sherrill 2010-07-27 17:40:55 UTC
Should be fixed now in spacewalk master:

10bbbabc430fafa7ab94312baa31ede559796808

Comment 4 Miroslav Suchý 2010-10-19 10:48:31 UTC
verified in stage

Comment 5 Clifford Perry 2010-10-28 14:50:47 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford


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