Bug 585338 - yum grouplist (comps.xml) support
Summary: yum grouplist (comps.xml) support
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On: 585233
Blocks: space11
TreeView+ depends on / blocked
 
Reported: 2010-04-23 18:26 UTC by Rob See
Modified: 2010-08-19 08:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-19 08:24:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Rob See 2010-04-23 18:26:11 UTC
Description of problem:
yum grouplist doesn't list any groups after the relevant information has been added to the RHNCHANNELCOMPS. 

To make it work there are two things:

1) add 
        <one-to-one name="comps" property-ref="channel"
class="com.redhat.rhn.domain.channel.Comps" cascade="all" lazy="proxy"/>

to java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml. Thanks to jsherrill for this.

     There was an example I found for this on an old mailing list post showing that you had to have a relative path without a / at the beginning in the relative_filename field. My experience is that you must have a / at the beginning of it.

2) for the xmlrpc python side that actually pulls the file, it seems to want an absolute path in rhnChannelComps rather than a relative one. To fix this, I created a symlink /var/satellite/distro-trees /distro-trees 

-Rob

Comment 1 Michael Mráka 2010-04-26 09:39:20 UTC
Reassigning to Jan who's recently investigated some comps issue.

Comment 2 Jan Pazdziora 2010-04-26 10:10:31 UTC
Adding Justing to Cc.

Comment 3 Jan Pazdziora 2010-04-26 10:18:50 UTC
Justin's commit is d2e58acd844365aadda7d9fc6c7922d9889d1ce2.

Comment 4 Jan Pazdziora 2010-04-27 13:42:28 UTC
The Python stack serves the repomnd.xml correctly if the record stored in rhnChannelComps.relative_filename is correct relative path to the mount point (/var/satellite).

Comment 5 Jan Pazdziora 2010-04-27 13:43:31 UTC
For the taskomatic (Java) generator, commit 44ebff2b482862ee8aa3eb5fe42ac7dad0d282c8 is needed.

Comment 6 Jan Pazdziora 2010-04-27 14:16:31 UTC
In general, I see this bugzilla is a dupe of 585233.

Comment 7 Rob See 2010-04-27 14:21:26 UTC
Jan,

 I'm pretty sure there is still some sort of problem on the python side. If I delete the symlink I created at the root, I get the following traceback mailed to me. 


Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/server/apacheRequest.py", line 120, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/rhnRepository.py", line 251, in repodata
    return self._repodata_taskomatic(file_name)
  File "/usr/share/rhn/server/rhnRepository.py", line 220, in _repodata_taskomatic
    return self._repodata_python(file_name)
  File "/usr/share/rhn/server/rhnRepository.py", line 195, in _repodata_python
    output = repo.get_comps_file()
  File "/usr/share/rhn/server/repomd/repository.py", line 162, in get_comps_file
    return comps_view.get_file()
  File "/usr/share/rhn/server/repomd/view.py", line 335, in get_file
    comps_file = open(self.comps.filename)
IOError: [Errno 2] No such file or directory: '/distro-trees/SLC-5u4-x86_64/SL/repodata/comps.xml'

Local variables by frame
Frame get_file in /usr/share/rhn/server/repomd/view.py at line 335
                        self = <class 'server.repomd.view.CompsView'> <server.repomd.view.CompsView object at 0x2ac95c095250>

Frame get_comps_file in /usr/share/rhn/server/repomd/repository.py at line 162
                        self = <class 'server.repomd.repository.Repository'> <server.repomd.repository.Repository object at 0x2ac95b8f0750>
                  comps_view = <class 'server.repomd.view.CompsView'> <server.repomd.view.CompsView object at 0x2ac95c095250>

Frame _repodata_python in /usr/share/rhn/server/rhnRepository.py at line 195
                      c_info = <type 'dict'> {'name': 'CERN Scientific Linux 5.4 x86_64 Full', 'org_id': '1', 'summary': 'CERN Scientific Linux 5.4 x86_64 Full', 'last_modified': '20100403221534', 'parent_channel': '', 'label': 'rit-cernsl-5u4-x86_64', 'arch': 'channel-x86_64', 'id': '121', 'description': 'CERN Scientific Linux 5.4 x86_64 Full'}
                   file_name = <type 'str'> comps.xml
                        self = <type 'instance'> <server.rhnRepository.Repository instance at 0x2ac95b5efbd8>
                        repo = <type 'instance'> <server.repomd.repository.Repository object at 0x2ac95b8f0750>
                content_type = <type 'str'> text/xml
                      output = <type 'NoneType'> None

Comment 8 Jan Pazdziora 2010-04-27 14:29:47 UTC
Putting back the blockers.

Comment 9 Jan Pazdziora 2010-04-27 15:01:25 UTC
(In reply to comment #7)
> Jan,
> 
>  I'm pretty sure there is still some sort of problem on the python side. If I
> delete the symlink I created at the root, I get the following traceback mailed
> to me. 

[...]

> '/distro-trees/SLC-5u4-x86_64/SL/repodata/comps.xml'

I believe that your problem is the leading slash here. If you have '/distro-trees/SLC-5u4-x86_64/SL/repodata/comps.xml' in the rhnChannelComps and not 'distro-trees/SLC-5u4-x86_64/SL/repodata/comps.xml', the join

   filename = os.path.join(CFG.mount_point, comps_row[0])

at or around

/usr/share/rhn/server/repomd/mapper.py:639

will only return

the comps_row[0].

Only put relative filenames to rhnChannelComps.

Comment 10 Rob See 2010-04-27 15:12:06 UTC
Ok, I see that you fixed the missing path separator in 	44ebff2b482862ee8aa3eb5fe42ac7dad0d282c8.

Comment 11 Jan Pazdziora 2010-04-27 15:14:13 UTC
(In reply to comment #10)
> Ok, I see that you fixed the missing path separator in 
> 44ebff2b482862ee8aa3eb5fe42ac7dad0d282c8.    

Right. That one is for Java stack thou. So for the time being, you need to have the slash there for Java to work but you mustn't have it there for Python to work.

Comment 12 Milan Zázrivec 2010-08-19 08:24:05 UTC
Spacewalk 1.1 has been released.


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