If one is seeing this on a Ubuntu / Debian box during start of keystone after migrating DB from sqlite to MySQL, simply installing the associated python libraries would fix the issue.
root@keystone:~/openstack-keystone-79a9fde# ERROR: Unable to load keystone-legacy-auth from configuration file /etc/keystone/keystone.conf.
Got: ImportError('No module named MySQLdb',)
root@keystone:~/openstack-keystone-79a9fde# apt-get install python-mysqldb
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-support
Suggested packages:
python-egenix-mxdatetime python-mysqldb-dbg
The following NEW packages will be installed:
python-mysqldb python-support
0 upgraded, 2 newly installed, 0 to remove and 58 not upgraded.
Need to get 109 kB of archives.
After this operation, 578 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/main python-support all 1.0.13ubuntu1 [26.6 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ oneiric/main python-mysqldb amd64 1.2.3-0ubuntu1 [82.5 kB]
Fetched 109 kB in 0s (184 kB/s)
Selecting previously deselected package python-support.
(Reading database ... 55750 files and directories currently installed.)
Unpacking python-support (from .../python-support_1.0.13ubuntu1_all.deb) ...
Selecting previously deselected package python-mysqldb.
Unpacking python-mysqldb (from .../python-mysqldb_1.2.3-0ubuntu1_amd64.deb) ...
Processing triggers for man-db ...
Setting up python-support (1.0.13ubuntu1) ...
Setting up python-mysqldb (1.2.3-0ubuntu1) ...
Processing triggers for python-support ...
root@keystone:~/openstack-keystone-79a9fde# keystone &
[1] 13882
root@keystone:~/openstack-keystone-79a9fde# Starting the RAX-KEY extension
Starting the Legacy Authentication component
Service API listening on 0.0.0.0:5000
Admin API listening on 0.0.0.0:35357
I am a Linux Administrator in Hong Kong, specialized in RHEL administration as well as IAAS cloud deployment. :-)
2012年4月6日 星期五
2012年4月5日 星期四
Cyberduck authentication failure against Openstack Swift with swauth
During testing of Openstack Swift, I found that there isn't much GUI clients out there support Openstack Swift and the best option I could go with is Cyberduck.
Downloading it and then follow by installation on my windows test VM, everything appears to be good and smooth, except it keep saying "Login failed."
So I am pretty sure my username (account:username) and API Key (basically the password of the user) is correct however I am still not able to get in. I did some test with s3curl.pl and it is authenticating successfully without any issue.
Tried googling but there isnt article explaining this but somehow I found this article from cyberduck trac page. It looks like I have to modify some parameter on Cyberduck to allow it to work with Swift with swauth authentication module.
So as per the article suggested, I added below line to user.config and restarted Cyberduck. Now authentication seems to be working.
<setting name="cf.authentication.context" value="/auth/v1.0" />
Downloading it and then follow by installation on my windows test VM, everything appears to be good and smooth, except it keep saying "Login failed."
So I am pretty sure my username (account:username) and API Key (basically the password of the user) is correct however I am still not able to get in. I did some test with s3curl.pl and it is authenticating successfully without any issue.
Tried googling but there isnt article explaining this but somehow I found this article from cyberduck trac page. It looks like I have to modify some parameter on Cyberduck to allow it to work with Swift with swauth authentication module.
So as per the article suggested, I added below line to user.config and restarted Cyberduck. Now authentication seems to be working.
<setting name="cf.authentication.context" value="/auth/v1.0" />
2012年4月1日 星期日
Openstack Swift with swauth, getting "Account creation failed: 500 Server Error" when adding account
During testing of Swift with swauth, I was trying to add account to swauth database with swauth-add-account but it was failed out with "Account creation failed: 500 Server Error"
root@proxy:~# swauth-add-account -A https://1.2.3.4:8080/auth -K swauthkey testgp
Account creation failed: 500 Server Error
With further checking, it looks like "allow_account_management = true" have to be added under [app:proxy-server] tag of proxy-server.conf like this.
[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true
Once above line is added to configuration file, followed by proxy restart and that should fix the problem.
root@proxy:~s3-curl# swauth-add-account -A https://1.2.3.4:8080/auth -K swauthkey testgp
root@proxy:~s3-curl# swauth-list -A https://1.2.3.4:8080/auth -K swauthkey
{"accounts": [{"name": "system"}, {"name": "testgp"}]}
root@proxy:~# swauth-add-account -A https://1.2.3.4:8080/auth -K swauthkey testgp
Account creation failed: 500 Server Error
With further checking, it looks like "allow_account_management = true" have to be added under [app:proxy-server] tag of proxy-server.conf like this.
[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true
Once above line is added to configuration file, followed by proxy restart and that should fix the problem.
root@proxy:~s3-curl# swauth-add-account -A https://1.2.3.4:8080/auth -K swauthkey testgp
root@proxy:~s3-curl# swauth-list -A https://1.2.3.4:8080/auth -K swauthkey
{"accounts": [{"name": "system"}, {"name": "testgp"}]}
2012年3月31日 星期六
OpenStack Swift with swauth, Auth subsystem prep failed: 400 Bad Request
Was mudding around with Openstack Swift recently and found that there are quite a lot of issue to get it working.
One issue I come across today is the inability to run swauth-prep to set up the account environment on my swift-proxy (version 1.4.6).
root@proxy ~/s3-curl# swauth-prep -A https://127.0.0.1:8080/auth/v1 -K swauthkey
Auth subsystem prep failed: 400 Bad Request
Keep googling but dont have much finding. When I was stucked, i keep reading their online forum and then I come across an article saying the correct URL for swauth-prep should be on /auth/ instead of /auth/v1. So I changed the admin URL to
root@proxy:~/s3-curl# swauth-prep -A https://127.0.0.1:8080/auth/ -K swauthkey
root@proxy:~/s3-curl# swauth-list -A https://127.0.0.1:8080/auth/ -K swauthkey
{"accounts": [{"name": "system"}]}
And then viola, it works.
** BTW ** Chances that it is either swift storage permission problem or it is indicating a connection problem between swauth and swift nodes.
Below syslog error would indicate a connection issue between swauth node and swift storage nodes.
May 3 00:07:47 swift-proxy swift ERROR with Account server 192.168.0.11:6002/vdb1 re: Trying to PUT /AUTH_.auth: Connection refused
May 3 00:07:47 swift-proxy swift ERROR with Account server 192.168.0.12:6002/vdb1 re: Trying to PUT /AUTH_.auth: Connection refused
May 3 00:07:47 swift-proxy swift ERROR with Account server 192.168.0.13:6002/vdb1 re: Trying to PUT /AUTH_.auth: Connection refused
May 3 00:07:47 swift-proxy swift Account PUT returning 503 for (503, 503, 503) (txn: tx79ff210a2f5249989abecb8319a64126)
In above scenario, I checked my configuration and found that there is a discrepancy on port settings between rings file and swift node configuration files (object-server.conf / account-server.conf / container-server.conf)
One issue I come across today is the inability to run swauth-prep to set up the account environment on my swift-proxy (version 1.4.6).
root@proxy ~/s3-curl# swauth-prep -A https://127.0.0.1:8080/auth/v1 -K swauthkey
Auth subsystem prep failed: 400 Bad Request
Keep googling but dont have much finding. When I was stucked, i keep reading their online forum and then I come across an article saying the correct URL for swauth-prep should be on /auth/ instead of /auth/v1. So I changed the admin URL to
root@proxy:~/s3-curl# swauth-prep -A https://127.0.0.1:8080/auth/ -K swauthkey
root@proxy:~/s3-curl# swauth-list -A https://127.0.0.1:8080/auth/ -K swauthkey
{"accounts": [{"name": "system"}]}
And then viola, it works.
** BTW ** Chances that it is either swift storage permission problem or it is indicating a connection problem between swauth and swift nodes.
Below syslog error would indicate a connection issue between swauth node and swift storage nodes.
May 3 00:07:47 swift-proxy swift ERROR with Account server 192.168.0.11:6002/vdb1 re: Trying to PUT /AUTH_.auth: Connection refused
May 3 00:07:47 swift-proxy swift ERROR with Account server 192.168.0.12:6002/vdb1 re: Trying to PUT /AUTH_.auth: Connection refused
May 3 00:07:47 swift-proxy swift ERROR with Account server 192.168.0.13:6002/vdb1 re: Trying to PUT /AUTH_.auth: Connection refused
May 3 00:07:47 swift-proxy swift Account PUT returning 503 for (503, 503, 503) (txn: tx79ff210a2f5249989abecb8319a64126)
In above scenario, I checked my configuration and found that there is a discrepancy on port settings between rings file and swift node configuration files (object-server.conf / account-server.conf / container-server.conf)
訂閱:
文章 (Atom)