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 585338 - yum grouplist (comps.xml) support
yum grouplist (comps.xml) support
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
0.8
All Linux
low Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Red Hat Satellite QA List
:
Depends On: 585233
Blocks: space11
  Show dependency treegraph
 
Reported: 2010-04-23 14:26 EDT by Rob See
Modified: 2010-08-19 04:24 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-19 04:24:05 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 Rob See 2010-04-23 14:26:11 EDT
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 05:39:20 EDT
Reassigning to Jan who's recently investigated some comps issue.
Comment 2 Jan Pazdziora 2010-04-26 06:10:31 EDT
Adding Justing to Cc.
Comment 3 Jan Pazdziora 2010-04-26 06:18:50 EDT
Justin's commit is d2e58acd844365aadda7d9fc6c7922d9889d1ce2.
Comment 4 Jan Pazdziora 2010-04-27 09:42:28 EDT
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 09:43:31 EDT
For the taskomatic (Java) generator, commit 44ebff2b482862ee8aa3eb5fe42ac7dad0d282c8 is needed.
Comment 6 Jan Pazdziora 2010-04-27 10:16:31 EDT
In general, I see this bugzilla is a dupe of 585233.
Comment 7 Rob See 2010-04-27 10:21:26 EDT
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 10:29:47 EDT
Putting back the blockers.
Comment 9 Jan Pazdziora 2010-04-27 11:01:25 EDT
(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 11:12:06 EDT
Ok, I see that you fixed the missing path separator in 	44ebff2b482862ee8aa3eb5fe42ac7dad0d282c8.
Comment 11 Jan Pazdziora 2010-04-27 11:14:13 EDT
(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 04:24:05 EDT
Spacewalk 1.1 has been released.

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