Modify

Ticket #1120 (closed defect: fixed)

Opened 10 years ago

Last modified 8 years ago

The missing <Group> tag in Packages/sources.xml causes an error

Reported by: https://www.google.com/accounts/o8/id?id=AItOawmLDr6_IwcM-7CHU5E2-UFkuqAyk1X0LFk Owned by: https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
Priority: major Milestone: Bcfg2 1.3.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:

Description

Hi,

There seems to be an error when <Group> tag is missing and <Source ...> <Arch>..</Arch></Source> exists in Packages/sources.xml.

FYI, here is my Packages/sources.xml.

[[email protected] bcfg2]# cat Packages/sources.xml 
<Sources>
    <Group name="rhel-6.2">
       <Source type="yum" rawurl="ftp://ftp.ussg.indiana.edu/linux/centos/6.2/os/x86_64/"  >
       <Arch>x86_64</Arch>
       </Source>
    </Group>
</Sources>

As soon as bcfg2 -qvn runs without above the <Group> tag, the following error shows up

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/Bcfg2-1.2.3-py2.6.egg/Bcfg2/Server/Core.py", line 391, in GetProbes
    meta = self.build_metadata(name)
  File "/usr/lib/python2.6/site-packages/Bcfg2-1.2.3-py2.6.egg/Bcfg2/Server/Core.py", line 363, in build_metadata
    data = conn.get_additional_data(imd)
  File "/usr/lib/python2.6/site-packages/Bcfg2-1.2.3-py2.6.egg/Bcfg2/Server/Plugins/Packages/__init__.py", line 270, in get_additional_data
    collection = self._get_collection(metadata)
  File "/usr/lib/python2.6/site-packages/Bcfg2-1.2.3-py2.6.egg/Bcfg2/Server/Plugins/Packages/__init__.py", line 267, in _get_collection
    debug=self.debug_flag)
  File "/usr/lib/python2.6/site-packages/Bcfg2-1.2.3-py2.6.egg/Bcfg2/Server/Plugins/Packages/Collection.py", line 340, in factory
    collection = cclass(metadata, relevant, basepath, debug=debug)
  File "/usr/lib/python2.6/site-packages/Bcfg2-1.2.3-py2.6.egg/Bcfg2/Server/Plugins/Packages/Yum.py", line 100, in __init__
    "cache-%s" % self.cachekey)
  File "/usr/lib/python2.6/site-packages/Bcfg2-1.2.3-py2.6.egg/Bcfg2/Server/Plugins/Packages/Collection.py", line 47, in cachekey
    return md5(self.get_config()).hexdigest()
  File "/usr/lib/python2.6/site-packages/Bcfg2-1.2.3-py2.6.egg/Bcfg2/Server/Plugins/Packages/Yum.py", line 174, in get_config
    basereponame = source.get_repo_name(url_map)
  File "/usr/lib/python2.6/site-packages/Bcfg2-1.2.3-py2.6.egg/Bcfg2/Server/Plugins/Packages/Yum.py", line 721, in get_repo_name
    return Source.get_repo_name(self, url_map)
  File "/usr/lib/python2.6/site-packages/Bcfg2-1.2.3-py2.6.egg/Bcfg2/Server/Plugins/Packages/Source.py", line 163, in get_repo_name
    rname = self.groups[0]
IndexError: list index out of range

Attachments

Change History

comment:1 Changed 10 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc

  • Owner changed from desai to https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
  • Status changed from new to accepted

comment:2 Changed 10 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc

comment:3 Changed 10 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc

  • Status changed from accepted to closed
  • Resolution set to fixed

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.