how to remove x-versions-location header

Asked by Netmagic Solutions

Hi,

We are trying to implement object versioning on our swift setup.

We apply the 'X-Versions-Location' header on a container with below command :

curl -i -XPUT -H "X-Auth-Token: AUTH_tkb97eb82ef37c433db3577a09c4f40cfe" -H "X-Versions-Location: versions" https://testswift.netmagicsolutions.com/v1/AUTH_cafdc147-9334-40ec-9e44-b4876e7a1ef2/mycontainer

Now, if we want to disable the versioning for the container "mycontainer", we need to remove the 'X-Versions-Location'.

How do we remove the X-Versions-Location header from the container ?

Regards,

Viral

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Netmagic Solutions
Solved:
Last query:
Last reply:
Revision history for this message
Netmagic Solutions (simplidrive) said :
#1

I referred below URL which says "To turn off Object Versioning on your current version container, remove its X-Versions-Location metadata by sending an empty key value."

http://www.rackspace.com/blog/rackspace-cloud-files-how-to-use-object-versioning/

I tried running this command but the header still remains.

curl -XPOST -D - -H "X-Auth-Token: AUTH_tk19e1c8b8f2dd43229c166de916ad0c57" -H "X-Versions-Location: " https://swifttest.netmagicsolutions.com/v1/AUTH_cafdc147-9334-40ec-9e44-b4876e7a1ef2/container

Thanks,

Viral

Revision history for this message
Netmagic Solutions (simplidrive) said :
#2

ok,

with the help of from John Dickinson the issue got resolved.

To disable the versioning on a container, we have to send empty headers.

In my case, the curl version I had (7.22.0) was not supporting sending of empty headers. Curl versions 7.23.0 and later support the same.

I simply upgraded the curl and libcurl packages to 7.27.0, and then gave below command which removed the header from the container.

curl -X POST -D - -H "X-Auth-Token: AUTH_tk19e1c8b8f2dd43229c166de916ad0c57" -H "X-Versions-Location;" https://testswift.netmagicsolutions.com/v1/AUTH_cafdc147-9334-40ec-9e44-b4876e7a1ef2/container

Thanks John.

Regards,

Viral