Modify

Ticket #1068 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

Malformed URL in Packages/config.xml Throws Traceback

Reported by: rcuza Owned by: https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
Priority: minor Milestone: Bcfg2 1.2.1 Release (Bugfix)
Component: bcfg2-server Version: 1.0
Keywords: v1.1.3 Cc: sol.jerome@…

Description

When there is a URl that returns a 404 error in the Packages/config.xml file, running bcfg2 on a client throws a traceback error.

Here is an example

Failed to read file
/var/lib/bcfg2/Packages/cache/http:@@security.debian.org@debian@dists@squeeze@updates@main@binary-amd64@Packages.gz
Packages: File read failed; falling back to file download
Packages: Updating
http://security.debian.org/debian/dists/squeeze/updates/main/binary-amd64/Packages.gz
Packages: Failed to fetch url
http://security.debian.org/debian/dists/squeeze/updates/main/binary-amd64/Packages.gz.
code=404
Packages: Updating
http://security.debian.org/debian/dists/squeeze/updates/main/binary-i386/Packages.gz
Packages: Failed to fetch url
http://security.debian.org/debian/dists/squeeze/updates/main/binary-i386/Packages.gz.
code=404
Failed to read file
/var/lib/bcfg2/Packages/cache/http:@@security.debian.org@debian@dists@squeeze@updates@main@binary-amd64@Packages.gz
Failed to update source
Traceback (most recent call last):
 File "/usr/lib/pymodules/python2.6/Bcfg2/Server/Plugins/Packages.py",
line 120, in setup_data
   self.read_files()
 File "/usr/lib/pymodules/python2.6/Bcfg2/Server/Plugins/Packages.py",
line 403, in read_files
   reader = gzip.GzipFile(fname)
 File "/usr/lib/python2.6/gzip.py", line 79, in __init__
   fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory:
'/var/lib/bcfg2/Packages/cache/http:@@security.debian.org@debian@dists@squeeze@updates@main@binary-amd64@Packages.gz'
Loading experimental plugin(s): Packages

Expected result is no traceback. The "Failed to fetch" and 404 should be sufficient to get the sysadmin looking in the right direction.

Nice to have: suggested troubleshooting steps in error message.

Attachments

Change History

comment:1 Changed 10 years ago by solj

  • Cc sol.jerome@… added
  • Milestone changed from Bcfg2 1.3.0 Release to Bcfg2 1.2.1 Release (Bugfix)

Can you reproduce this with the latest HEAD?

comment:2 Changed 10 years ago by solj

  • Component changed from bcfg2-client to bcfg2-server

comment:3 Changed 10 years ago by rcuza

  • Keywords v1.1.3 added

This traceback was produced with version 1.1.3. I will update bug when I've had a chance to test it against HEAD.

Note: Plugins/Packages?.py was rebuilt from 1.1.3 to current HEAD.

comment:4 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:5 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.