<div dir="ltr">If you look at the raw API response from a HEAD on the "testing" container (maybe with curl) I think you'll see that you've set the wrong metadata key.<div><br></div><div><div>You should set "X-Version-Location: test_cont" instead of "X-Container-Meta-X-Version-Location: test_cont"</div>
</div><div><br></div><div>The `-m` option for `swift post` is only for setting user metadata; unfortunately it doesn't look like you can set arbitrary headers with `swift post`:</div><div><br></div><div><a href="https://bugs.launchpad.net/swift/+bug/1226256">https://bugs.launchpad.net/swift/+bug/1226256</a><br>
</div><div><br></div><div>I did this:</div><div><br></div><div>curl -H 'x-auth-token: <your-auth-token-goes-here>' <a href="http://localhost:8080/v1/AUTH_test/testing">http://localhost:8080/v1/AUTH_test/testing</a> -X POST -H 'x-versions-location: test_cont'<br>
</div><div><br></div><div>-Clay</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 16, 2013 at 6:12 AM, Raghavendra Rangrej <span dir="ltr"><<a href="mailto:rrrangrej@yahoo.com" target="_blank">rrrangrej@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am trying swift object versioning using swift CLIs (using swift post to change meta data).<br>
In container-server.conf, I have set the flag allow_versions = true.<br>
<br>
With CLI, I added meta data as follows:<br>
<br>
 swift stat testing<br>
  Account: AUTH_1335922166fb4c43a4929f4fba670f3712dw<br>
Container: testing<br>
  Objects: 3<br>
    Bytes: 157<br>
 Read ACL: -v<br>
Write ACL:<br>
  Sync To:<br>
 Sync Key:<br>
Meta X-Versions-Location: test_cont<br>
Accept-Ranges: bytes<br>
X-Timestamp: 1379065681.40505<br>
Content-Type: text/plain; charset=utf-8<br>
<br>
<br>
swift stat test_cont<br>
  Account: AUTH_1335922166fb4c43a4929f4fba670f3712dw<br>
Container: test_cont<br>
  Objects: 3<br>
    Bytes: 42<br>
 Read ACL:<br>
Write ACL:<br>
  Sync To:<br>
 Sync Key:<br>
Accept-Ranges: bytes<br>
X-Timestamp: 1379066009.84224<br>
Content-Type: text/plain; charset=utf-8<br>
<br>
If I upload a new content of the object in testing container, I am expecting a version to be created in test_cont container.<br>
But it is not the case.<br>
<br>
I was expecting once the flag is set and meta data is changed, old versions should be stored in test_cont dirs but it is not the case<br>
Even swift restart didn't help.<br>
<br>
Any idea ? if my expectation is wrong or swift versioning has issues?<br>
I am using swift 1.4.0 version<br>
<br>
swift --version<br>
swift 1.4.0<br>
<br>
Thanks for your time<br>
<br>
Raghavendra<br>
<br>
<br>
<br>
_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
</blockquote></div><br></div>