Modify ↓
Ticket #716 (closed defect: fixed)
A repository URL for the Packages plugin should work with or without a trailing slash
Reported by: | David Strauss <[email protected]…> | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.0.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: |
Description
Currently, the Packages plugin assumes a trailing slash. This causes a repository specified without a trailing slash to result in a backtrace following an attempt to download ftp://example.com/pubrepodata/repomd.xml.
Attachments
Change History
comment:1 Changed 14 years ago by Jeff Strunk <[email protected]…>
comment:2 Changed 14 years ago by strauss
How does it break that specification? The Packages plugin never accesses the root URL. It always appends things to it before requesting data.
comment:3 Changed 14 years ago by Jeff Strunk <[email protected]…>
When I run bcfg2-info, it listed the url for the Packages.gz file and said there was a 404 error. When I paste that url into my browser window, it downloads the Packages.gz file.
When the URL is specified without a trailing slash, it is successful.
The following has been cut to pass the spam filter. The ... replaces 6 lines.
Failed to read file /exports/v1/bcfg2/Packages/cache/http:@@[email protected]@[email protected]@[email protected]@Packages.gz Packages: File read failed; falling back to file download Packages: Updating http://packages.medibuntu.org//dists/jaunty/free/binary-i386/Packages.gz Packages: Failed to fetch url http://packages.medibuntu.org//dists/jaunty/free/binary-i386/Packages.gz. code=404 ... Failed to read file /exports/v1/bcfg2/Packages/cache/http:@@[email protected]@[email protected]@[email protected]@Packages.gz Unexpected instantiation failure for plugin Packages Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Core.py", line 128, in init_plugins self.plugins[plugin] = plug(self, self.datastore) File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugins/Packages.py", line 449, in __init__ source.setup_data() File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugins/Packages.py", line 71, in setup_data self.read_files() File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugins/Packages.py", line 354, in read_files raise Exception() Exception
Note: See
TracTickets for help on using
tickets.
[229c86e87a277fac5756dd9c33267b4780113198] (SVN r5243) is listed as fixing this, but it breaks the following specification:
If I end the URL with a '/', I always get a 404 error. This change brings the 404 error back.