Modify

Ticket #716 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

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]…>

[229c86e87a277fac5756dd9c33267b4780113198] (SVN r5243) is listed as fixing this, but it breaks the following specification:

<APTSource>
<Group>jaunty</Group>
<Group>workstation</Group>
<URL>http://packages.medibuntu.org</URL>
<Version>jaunty</Version>
<Component>free</Component>
<Component>non-free</Component>
<Arch>i386</Arch>
<Arch>amd64</Arch>
</APTSource>

If I end the URL with a '/', I always get a 404 error. This change brings the 404 error back.

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 

comment:4 Changed 14 years ago by desai

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

I've tested this source both with and without a trailing slash against trunk, and am unable to reproduce this issue any more. I think we've got this one handled.

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.