[Openstack-operators] Swift: moving objects among accounts - edit DB or script it via http?

Judd Maltin openstack at newgoliath.com
Thu Dec 1 23:28:42 UTC 2011


Hi Andrew,

That's a great idea: but here's my predicament.  I have only one cluster.
One proxy server on the cluster has swauth setup, and working OK.  The
others have tempauth.  I'm trying to sync from a tempauth user's container
to a swauth user's container.

Setting up the container sync per these docs went great until the second
POST.. http://swift.openstack.org/overview_container_sync.html

$ swift -A http://cluster2/auth/v1.0 -U test2:tester2 -K testing2 post \
  -t 'http://cluster1/v1/AUTH_208d1854-e475-4500-b315-81de645d060e/container1' \
  -k 'secret' container2

The container2 post fails.  It's my new swauth user.  The container
exists.  I can upload a file to it.  The user has .admin group.  But the
"post" fails.  In fact, I can't post anything.

# swift -A http://127.0.0.1:8080/auth/v1.0 -U test1:tester1 -K testing1
post -t 'test' -k 'test' newmusic
Container POST failed:
http://127.0.0.1:8080/v1/AUTH_65d1b0c0-5899-4c30-9d72-f4afb93fb9b4/newmusic400
Bad Request

syslog shows:

Dec  1 18:22:27 proxy01-c01 proxy-server - - 01/Dec/2011/23/22/27 GET
/v1/AUTH_.auth/test1/tester1 HTTP/1.0 200 - Swauth - - - -
tx28849e183a04451aa7e7c609ee4e7054 - 0.0159
Dec  1 18:22:27 proxy01-c01 proxy-server - - 01/Dec/2011/23/22/27 GET
/v1/AUTH_.auth/.token_9/AUTH_tkecd237e696b84dc98b8967fb5c074639 HTTP/1.0
200 - Swauth - - - - tx5e4815e3b240464481ee6751a8940f0f - 0.0104
Dec  1 18:22:27 proxy01-c01 proxy-server - - 01/Dec/2011/23/22/27 GET
/v1/AUTH_.auth/test1/.services HTTP/1.0 200 - Swauth - - - -
tx08081e0df5b44664936d3c9100072c53 - 0.0129
Dec  1 18:22:27 proxy01-c01 swauth - 127.0.0.1 01/Dec/2011/23/22/27 GET
/auth/v1.0 HTTP/1.0 200 - - - - - - - - 0.0427
Dec  1 18:22:27 proxy01-c01 proxy-server 127.0.0.1 127.0.0.1
01/Dec/2011/23/22/27 POST
/v1/AUTH_65d1b0c0-5899-4c30-9d72-f4afb93fb9b4/newmusic HTTP/1.0 400 - -
test1%3Atester1%2CAUTH_tkecd237e696b84dc98b8967fb5c074639 - - -
tx2b90e21df50145f2a0e6a47275eaf3d0 - 0.0419

container-server problem?  I used chef to turn all my container-servers
into sync points, and restarted the container servers by hand.

No POSTs make it to any of my sysogs. :(

Thanks for the help!

-judd

On Thu, Dec 1, 2011 at 4:51 PM, Andrew Hale <Andrew.Hale at rackspace.co.uk>wrote:

> Hey Judd!
>
> I think you're out of luck with any quick db hacks to do this but have you
> looked at using container-sync to move the content to the new account? I
> just tested it fine on a SAIO box though haven't tried in a multi server
> environment - it should be fine though and does the copy within the cluster
> rather than streaming in and out.
>
> Andrew
>
>
> On 1 Dec 2011, at 20:54, Judd Maltin wrote:
>
> > Aloha Swifters!
> >
> > After a day of looking long and hard at Swift, I'm pretty sure that I'm
> going to have to write a script, and I can't just tweak the underlying
> sqlite db files.
> >
> > I'm going to write a script to walk the containers in "account A" via
> http and write (stream?) the objects it finds into containers on "account
> B", also via http.  A pointer to sample code would be helpful here. :-)
> >
> > It's not the end of the world.  But I just want to confirm with those
> in-the-know that there is no hacking of the DBs I can do to move the
> objects from one account to another.
> >
> > Many thanks!
> >
> > -judd
> >
>
> Andrew Hale
> Linux Systems Engineer II
>
> Tel: +442087342500
> Mob: +447720948819
> Fax:
> Web: www.rackspace.co.uk
>
> _______________________________________________
> > Openstack-operators mailing list
> > Openstack-operators at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20111201/7e6c7846/attachment-0002.html>


More information about the Openstack-operators mailing list