The life of an OpenStack contributor checking for Jenkins failures

We have all been there, we are committing a two character change in a project and send our review all happy and dandy with the review tool full of hope that our change is rock solid : You now that a two character change cannot fail. This is a tiny change in some arcane part of the Swift code that can never get passed by the tests launched in Jenkins and should just be a straightforward commit....

December 24, 2013

How to access Rackspace Cloud with latest novaclient/swiftclient

I spent too much time trying to figure out how to use the latest swiftclient/novaclient with Rackspace Cloud that I thought I would have to document it somewhere to avoid the pain for others. Assuming you don’t want to use pyrax and no OS_AUTH_SYSTEM plugin but just pure OpenStack python-novaclient/swiftclient on Rackspace cloud then you just need to export those variables in your shell : export OS_REGION_NAME=ORD export OS_USERNAME=username export OS_TENANT_NAME=" " export OS_PASSWORD=password export OS_AUTH_URL=https://identity....

September 27, 2013

Quick Swift Tip: How to remove a header with Curl

curl is obviously an extremely popular way to experiment a REST API. Unfortunately one of its shortcoming is not able to remove a custom header but just to modify or add it. In swift if you prefix your Meta header with X-remove it would then just do that and remove the header. For example when I wanted to remove the account quota header from an account with a reseller admin token I had just to do that :...

July 17, 2013

How to launch the Swift functional test suite with Keystone

It is easy to launch the swift functional tests with v2 auth (Keystone). Assuming you have a recent version of python-swiftclient, python-keystoneclient and swift you need to first add a few users which is easily done with this script : Assuming you have already your OS_* variables configured with an admin, you can just launch it and it will : add a tenant/user named test/tester. add a tenant/user name test2/tester2. add a user tester3 belonging to test2 but not operator on that tenant....

June 14, 2013

Keystone and PKI tokens overview

PKI tokens has been implemented in keystone by [Adam Young][1] and others and was shipped for the OpenStack grizlly release. It is available since the version 2.0 API of keystone. PKI is a beautiful acronym to [Public-key infrastructure][2] which according to wikipedia defines it like this : Public-key cryptography is a cryptographic technique that enables users to securely communicate on an insecure public network, and reliably verify the identity of a user via digital signatures....

May 2, 2013

Howto revoke a token with keystone and PKI (v2.0 API)

This is something I have been asked and I was at first under impression it was only available in v3, digging a bit more into the code there is actually a way to do that in v2 when you are using PKI tokens. Since I could not find much documentation online here is a description of the steps how to do it. Let first get a PKI token, you can do it the hard way by sending a json blob to the keystone url and parse the json results like this :...

April 22, 2013

On trying to be pylint compatible

How I feel when I try to address all pylint warning/errors: Adapted from http://devopsreactions.tumblr.com/post/47690154351/trying-to-code-to-w3c-standards

April 11, 2013

Swift and quotas in upcoming 1.8.0 (Grizzly) release.

There is two new nifty middlewares for doing quotas in upcoming Swift release 1.8.0 called container_quotas and account_quotas. Those are two different middlewares because they are actually addressing different use cases. container_quotas is typically used by end users the use case here is to let user to specify a limit on one of their container. Why would you want to restrict yourself you may ask ? This is because when you allow a public upload to a container for example with tempurl or/and formpost you want to make sure people are not uploading a unlimited amount of datas....

March 8, 2013

emacs anything with magit

I have been using quite a bit the anything-mode for Emacs, it’s basically a Quicksilver/Alfred or Gnome-do for Emacs and allow to configure a lot of different sources to complete some chosen ‘source’with different actions. With my work on OpenStack I have found myself jumping a lot between git directories and due configured the variable ‘magit-repo-dirs for easy access to most of them easily. Plugging those two just seemed natural I had already this in my emacs to quickly open those magit repository directories :...

February 10, 2013

Upload to OpenStack Swift via CORS/HTML5 request.

One of our client at eNovance had a need to be able to upload to Swift directly from a web browser without going via a PHP proxy. Things in browser-land are not exactly the same as what we have in user-land, it is a bit more restricted to ensure the end-user security and there is a few hoops to jump through to get it working. To be able to do a xmlrpc upload to another server (swift in this case) there is a ‘standard/recommendation’ document made by W3C about it located here :...

February 1, 2013