s3+http URL causes assertion failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
== Basic Info ==
$ duplicity --version
duplicity 0.7.01
$ python2 --version
Python 2.7.9
OS: Arch Linux
Target Filesystem: S3
== Problem Description ==
When attempting to backup to S3, I've traditionally used the "s3+http" URL to avoid specifying the hostname.
The target URL is: "s3+http://
While this used to work, in recent duplicity this no longer works and leads to an assertion in __boto_single.py: "assert scheme == 's3'".
== Outsider's Hopefully Help Analysis ==
A bit of digging shows the problem is that urlparse is parsing the first bit of the URL as a hostname instead of the bucket name.
I believe the problem was introduced here: http://
The commit seems like it's just a refactoring of how uses_netloc is populated, but it also adds in a few schemes that weren't
in the original definition. I'm not sure if that's intentional but it seems wrong and probably worth checking to see if other schemes besides "s3+http" were mistakenly added.
== Changes to use_netloc ==
uses_netloc before this change can be in the lines removed here: http://
Notice how only 's3' (not gs or s3+http) is included.
However, all three protocols are added to the new uses_netloc code as seen here:
There's also a comment in backends.py that reinforces the notion that "s3+http" shouldn't be in "uses_netloc": http://
== Proposed Resolution ==
Removing the line in botobackend that adds "s3+http" to uses_netloc resolves the issue for me.
Changed in duplicity: | |
importance: | Undecided → Medium |
milestone: | none → 0.7.02 |
status: | New → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
Is this fix supposed to be released in vivid? I had to manually remove the s3 from vivid to make it work.