412 Precondition Failed
I am using curl command to test swift ReST API, when I typed in the following command:
curl -k -D - -H "X-Auth-Key: test" -H "X-Auth-User: admin" https:/
I got the following response:
HTTP/1.1 412 Precondition Failed
Content-Type: text/html; charset=UTF-8
Content-Length: 7
Date: Wed, 07 Sep 2011 13:27:09 GMT
I used bexar code and devauth, any opinion? Thanks!
Question information
- Language:
- English Edit question
- Status:
- Expired
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Yes, don't use such al old release. My suggestion is that you give it a try with 1.4.X version of swift using Ubuntu 10.04. I assume this is a SAIO setup.
Revision history for this message
|
#2 |
only use apt-get to upgrade swift code or do I need to re-deploy swift on my muliti-nodes?
Revision history for this message
|
#3 |
I typed in command:
apt-cache showpkg swift
I got the following results:
Package: swift
Versions:
1.2.0-0ubuntu1~
Description Language:
Reverse Depends:
Dependencies:
1.2.0-0ubuntu1~
Provides:
1.2.0-0ubuntu1~
Reverse Provides:
which means swift version is 1.2.0
after I typed in command:
add-apt-repository ppa:swift-
I got the following results:
Package: swift
Versions:
1.4.3~20110822.
Description Language:
1.2.0-0ubuntu1~
Description Language:
Reverse Depends:
Dependencies:
1.4.3~20110822.
1.2.0-0ubuntu1~
Provides:
1.4.3~20110822.
1.2.0-0ubuntu1~
Reverse Provides:
now there are two versions here: v1.4.3 and v1.2.0
here comes the question: which one is the one I am using, and how to decide?
I typed in command:
apt-get upgrade swift
and here is the response :
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
linux-generic-pae linux-headers-
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
which means there is no upgrade, did I really install swift v1.4.3, when?
Any opinion? Or how to upgrade swift to version 1.4.3?
Thanks a lot!
Revision history for this message
|
#4 |
root@ubuntu:~# dpkg -l swift
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
ii swift 1.2.0-0ubuntu1~
Revision history for this message
|
#5 |
the above is un-upgraded one, the following is the one after upgrading
root@ubuntu:
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
ii swift 1.4.3~20110822.
Revision history for this message
|
#6 |
this is the response of dpkg -L command before upgrading
root@ubuntu:~# dpkg -L swift
/.
/usr
/usr/bin
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/st
/usr/bin/
/usr/share
/usr/share/doc
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
and the following is the response of dpkg -L command after upgrading
root@ubuntu:
/.
/usr
/usr/share
/usr/share/doc
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/man
/usr/share/man/man8
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/bin
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/swift
/usr/bin/
/usr/bin/
/usr/bin/
we can see that it's different, so I think the current version is 1.4.3, am I right?
Revision history for this message
|
#7 |
What do you get when you run:
dpkg -l | grep swift
Revision history for this message
|
#8 |
Ok, quite a bit of information there :) I don't personally use the packages provided by launchpad PPA, since I've only had issues with them. Instead I use the ones that are available at http://
Upgrading swift 1.2.0 to a 1.4.X version could be messy but not impossible, since there have been quite a few changes to swift and its configurations. I would suggest you get a git copy of the swift github repo and use the sample configurations provided to setup your 1.4.X configuration files prior to the upgrade.
Also, when we go through the process of upgrading swift to a newer release on a multi-node environment. We usually start with the Storage nodes (one zone at a time). Once all the storage nodes have been upgraded and everything looks ok, we proceed to upgrading the proxy servers (also one zone at a time). After that we upgrade our other internal swift systems that are not user related.
Instead of using an "apt-get upgrade" command, just use "apt-get install [SWIFT PACKAGES ... ]". For example, if I'm upgrading storage nodes the command that will run on each storage node would be something like:
"apt-get install python-swift swift swift-account swift-container swift-object --force-yes -Vy"
Obviously, first I run the command above with -Vs instead of -Vy on at least one box just to make sure the proper packages will be retrieved.
Also note that since 1.4.X, the swauth authentication is now a separate project:
https:/
The same goes for the swift stats logging, which is also a separate project now:
https:/
https:/
You could also do something like the following for checking on the version if you are in doubt.
root@saio-
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import swift
>>> print swift.__version__
1.4.2
>>>
Revision history for this message
|
#9 |
Jay Payne (letterj) ,
on proxy & auth node:
root@ubuntu:~# dpkg -l | grep swift
ii python-swift 1.2.0-0ubuntu1~
ii swift 1.2.0-0ubuntu1~
ii swift-auth 1.2.0-0ubuntu1~
ii swift-proxy 1.2.0-0ubuntu1~
on storage node:
root@ubuntu:~# dpkg -l | grep swift
ii python-swift 1.2.0-0ubuntu1~
ii swift 1.2.0-0ubuntu1~
ii swift-account 1.2.0-0ubuntu1~
ii swift-container 1.2.0-0ubuntu1~
ii swift-object 1.2.0-0ubuntu1~
Revision history for this message
|
#10 |
Marcelo Martins (btorch) ,
Thank you very much! Very helpful, I will have a try according to what you said, and I will let you know if I succeed.
Revision history for this message
|
#11 |
This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.