Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to enable CDN: KeyError 'x-cdn-uri' ? wrong type of cloudfiles container? #3

Open
ariddell opened this issue Oct 2, 2014 · 6 comments

Comments

@ariddell
Copy link
Contributor

ariddell commented Oct 2, 2014

Uploading works, but I get this error:

Uploading dist\lda-0.3.0.5.g35dfe57.win32-py2.7.exe [0.490 MB]
Uploading dist\lda-0.3.0.5.g35dfe57-cp27-none-win32.whl [0.291 MB]
Updating index.html with 13 links
Failed to enable CDN: KeyError 'x-cdn-uri'

I might have setup my cloudfiles incorrectly.

Just noting it here. Minor problem compared to the last one.

@ogrisel
Copy link
Owner

ogrisel commented Oct 2, 2014

I have the same problem. I did not find the time to investigate that issue. It's probably a bug in libcloud and/or rackspace.

In the mean time you can activate the public CDN manually in the rackspace cloud web interface. You only need to do it once per container.

@ogrisel
Copy link
Owner

ogrisel commented Oct 2, 2014

Use a short TTL, e.g. 15 min if you want you to be able to see an index.html file that is not too old.

@ariddell
Copy link
Contributor Author

ariddell commented Oct 2, 2014

I also just turned on the directory listing feature (rather than uploading an index.html).

Is there a reason to use the CDN rather than just a normal cloud files repository? I can't recall if the cost is any different.

(anyway, feel free to do what you want with this issue!)

@ogrisel
Copy link
Owner

ogrisel commented Oct 2, 2014

I also just turned on the directory listing feature (rather than uploading an index.html).

I don't know how to do that. Where did you see such an option?

Is there a reason to use the CDN rather than just a normal cloud files repository? I can't recall if the cost is any different.

I understood that CDN was the only way to turn a cloud files container into a public HTTP / HTML website suitable for consumption by pip install -f <url> package_name.

@ariddell
Copy link
Contributor Author

ariddell commented Oct 2, 2014

You're right -- I thought there was a public + not cdn option available.

As for the directory listing, the relevant option is X-Container-Meta-Web-Listings. You can set it via:

curl -I -X POST -H "X-Container-Meta-Web-Listings: true" -H "X-Auth-Token: ${RACKSPACE_AUTH_TOKEN}" ${RACKSPACE_ENDPOINT}/container_name

you have to use an auth token rather than the api key, but getting that isn't so bad.

I can confirm that the directory listing works fine for doing --find-links -- no need for an index.html

@ogrisel
Copy link
Owner

ogrisel commented Oct 3, 2014

Alright I did not know about that. It would be great to send a PR to apache libcloud to add it as an extension the rackspace provider (using the ex_ prefix).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants