academicgareth's profile - activity

2014-01-16 10:06:13 -0500 answered a question How to set X-newest header when getting an object from swift using jclouds api

Is it possible from jClouds to set this header while trying to retrieve an object from swift?

of course possible for jClouds, but I think you should ask this in jClouds community

Is there any other alternative way to set this header (i.e. X-newest) to the value True always. Is there any configuration option in the swift server side to make it true always?

not yet, but that's a very good idea for swift, I will submit it later : )

2013-11-27 02:30:38 -0500 answered a question count objects in account_stat

Thanks Samuel Merritt, that solved my question.

2013-11-26 18:17:18 -0500 answered a question count objects in account_stat

Thanks, but I have a further question:

If I didn't run container-updater, the object count in "swift stat" should keep 0 (is it right?). But actually object count of account is updated from the second uploaded object. For example:

Uploading the 1st object, 'swift stat' says "object: 0, Bytes:0" Uploading the 2nd object, 'swift stat' says "object: 1, Bytes: (size of 1st object)" Uploading the 3rd object, 'swift stat' says "object: 2, Bytes: (size of 1st object and 2nd one)"

Is this normal?

2013-11-26 17:42:53 -0500 asked a question count objects in account_stat

I found that when adding or deleting an object, the table container_stat will be updated by the TRIGGER ( https://github.com/openstack/swift/blob/master/swift/container/backend.py#L71 (https://github.com/openstack/swift/bl...) ). But I didn't find how account_stat is updated. In the similar place ( https://github.com/openstack/swift/blob/master/swift/account/backend.py#L83 (https://github.com/openstack/swift/bl...) ), there are also some TRIGGER responding with adding or deleting a container, not the case of updating a container. So when an object is upload, the container_stat will be updated automatically, but account_stat will not. How and when is account_stat updated in Swift?

2013-11-26 17:36:37 -0500 answered a question Could someone point out to me the process of getting involved or contributing to the development of Swift?

You could work from here: https://github.com/openstack/swift/blob/master/CONTRIBUTING.md (https://github.com/openstack/swift/bl...)

good luck

2013-11-13 05:20:51 -0500 answered a question where is the code about objects mapping?

Your account "test" actually is "AUTH_test". Try this instead : )

2013-11-13 02:44:55 -0500 answered a question where is the code about objects mapping?

notice this:

Use your own device location of servers: such as "export DEVICE=/srv/node"

If you installed your cluster by SAIO document, I think you should export your own environment variable DEVICE by your own config files.

2013-11-13 01:35:08 -0500 answered a question where is the code about objects mapping?

See the last part of your output, and you can find that is ssh command:

ssh

"<command>"

That is used to run <command> in target address. And what is output of ls? That is what you need now.

So try paste&copy and run that ssh command: )

2013-11-12 14:19:05 -0500 answered a question where is the code about objects mapping?

If this is the first time you try swift, please use the newest codes. That error seems a very old bug.

2013-11-12 13:01:58 -0500 answered a question where is the code about objects mapping?

I think you don't need worried about changes in source codes, because reasonable functions may have been alreadt implemented in community.

In your case, swift-get-nodes could help you:

swift-get-nodes [-a] <ring.gz> <account> [<container>] [] could output real/physical address of an account/container/object, without disturbing running swift cluster.

2013-11-12 10:17:22 -0500 answered a question where is the code about objects mapping?

It's easy, and you don't need change source codes. Just try "swift-get-codes", following its help message and you could find physical address of an object, a container or an account.

2013-11-12 03:48:49 -0500 answered a question Is there a client of swift to add users and change password?

You could just install keystone instead of swauth on the node installed proxy server, and ignore my another suggestion. keystone could help you adding/change user password

2013-11-12 03:19:06 -0500 answered a question where is the code about objects mapping?

The strategies and background is subtle, but you could find the codes in: L416~L427

https://github.com/openstack/swift/blob/master/swift/obj/diskfile.py#L416 (https://github.com/openstack/swift/bl...)

It's now whole, but an enough hint for you

If you're interested in the theory about this, try to read this blog: http://julien.danjou.info/blog/2012/openstack-swift-consistency-analysis (http://julien.danjou.info/blog/2012/o...)

or swiftstack‘s book http://swiftstack.com/book/

2013-11-12 03:12:51 -0500 answered a question Is there a client of swift to add users and change password?

(1) & (2) are all ok

you could have your 4 nodes like that

[swift all servers + keystone], [swift all servers + keystone], [swift all servers + keystone], [swift all servers + keystone]

proxy + keystone on each node provide possibility to load-balance. If you need test first, you could try:

[swift obj/container/account server], [swift obj/container/account server], [swift obj/container/account server], [swift proxy server + keystone]

If you don't want to change your SAIO environment, just installing keystone and change your proxy config file then.

2013-11-12 02:50:54 -0500 answered a question Is there a client of swift to add users and change password?

I think keystone is more professional than swauth or tempauth.

swauth/tempauth is designed to sample authorisation for swift. If you need to change account data, you have to change config file first. For example in tempauth:

user_acc_you = yourpass .admin

means, "you" is the user in account "acc", in another word "acc:you" is swift user, and "yourpass" is your password. ".admin" means admin is the role of "you" in "acc". So everything of authorisation data is in your config file. As a result, if you want to let end users to change their password in dashboard, at least you need change your config file for whole swift cluster and restart swift servers. Obviously that is not a good choice in production environment.

In another hand, if you're trying keystone, you maybe find that you don't need change swift config files and restart swift anymore. Just run something like "keystone add-user --user-name user2 --user-password pw2".

So my advice is trying keystone if you run your swift in a strict environment

2013-11-05 03:40:17 -0500 answered a question Can the user in swift certified by swauth be seen by S3?

I found you didn't use test or testing in your swauth section. You could have a try "admin:key" and "swauthkey"

2013-11-05 03:16:50 -0500 answered a question Can the user in swift certified by swauth be seen by S3?

What is your aws_access_key_id and its key? And what content have you used in swauth section in config file

2013-11-01 11:04:32 -0500 answered a question Can the user in swift certified by swauth be seen by S3?

1st, you should install swift3 middleware to enable s3-style api 2nd, setup boto connection and try boto's libraries, like this:

import boto from boto.s3.connection import S3Connection conn= S3Connection( aws_access_key_id='system:root', aws_secret_access_key='testpass', port=8080, host='127.0.0.1', is_secure=False, calling_format=boto.s3.connection.OrdinaryCallingFormat())

2013-11-01 09:25:33 -0500 answered a question Can the user in swift certified by swauth be seen by S3?

I have used boto(https://github.com/boto/boto) to test s3 api for swift.

But which api did you use in cyberduck for swift, s3-style or swift-style?

2013-11-01 09:07:50 -0500 answered a question how to use s3curl to upload objects in swift with swift3 and swauth?

I think you should have to update swauth section for username test:tester and password: testing

2013-11-01 09:07:49 -0500 answered a question how to use s3curl to upload objects in swift with swift3 and swauth?

I think you should have to update swauth section for username test:tester and password: testing

2013-11-01 09:02:16 -0500 answered a question Can the user in swift certified by swauth be seen by S3?

If you have to use S3 client, you need your swift response S3-style-api for your swift servers. Currently, for swift, there is a middleware to implement the S3-style-api: https://github.com/fujita/swift3

It's not difficult and you could clone the source codes and have a run

2013-10-21 04:07:31 -0500 answered a question Who uses openstack swift?

SME: http://www.storagemadeeasy.com/OpenStack/?gclid=COmP5Zv-27kCFQkF4god5UEA9Q (http://www.storagemadeeasy.com/OpenSt...) cloudfoundry: http://blog.cloudfoundry.com/2013/07/12/openstack-swift-as-a-cloud-foundry-service/ (http://blog.cloudfoundry.com/2013/07/...) Cloudwatt(maybe): http://techs.enovance.com/5893/benchmark-openstack-swift (http://techs.enovance.com/5893/benchm...) wikipedia: http://www.quora.com/How-does-Wikipedia-store-back-up-its-data (http://www.quora.com/How-does-Wikiped...) netapp: http://www.slideshare.net/openstackindia/storage-as-a-service-and-openstack-cinder (http://www.slideshare.net/openstackin...) Cloudscaling: http://www.quora.com/OpenStack/How-stable-is-OpenStack-Swift (http://www.quora.com/OpenStack/How-st...) Nephoscale: see above Korea Telecom: see above HP:see above Softlayer:see above OVH:https://api.ovh.com/openstack-swift-for-pcs-howto.xml magic solotions: http://www.netmagicsolutions.com/

this is some companies using swift I found

2013-08-08 03:38:26 -0500 answered a question problem in Authencation

You could ask any questions in https://answers.launchpad.net/swift

2013-08-06 09:22:39 -0500 answered a question Can anyone give me the link or procedure to install swift and how to use swift?

You don't need to write anything. Here is a good document to run Swift: http://docs.openstack.org/developer/swift/development_saio.html (http://docs.openstack.org/developer/s...)

2013-08-06 09:19:59 -0500 answered a question How to run unit test?

run "./.unittests"

2013-07-16 02:34:29 -0500 answered a question total amount of accounts, containers, objects

which how many accounts/containers/objetcs in my cluster?

  • use swift stat, swift stat account, swift stat account container

how many objects on one specifiy node?

  • I'm not sure for this.
2013-07-11 10:07:04 -0500 answered a question separate replication network

update your swift version

2013-07-11 03:28:53 -0500 answered a question Perform a GET and get http/ 1.1 503 Internal Server Error

There may be some config error during deployment, but bugs

2013-06-27 06:31:56 -0500 answered a question Get object failed with 503 error

Because your didn't get a response from obj server with 200 or 404.

Proxy should get enough 200 or enough 404 from obj server and convert it into 200 or 404 to user (you). All of your nodes are timeout, so proxy request all nodes then.

2013-06-26 02:04:43 -0500 answered a question Swift Keystone Authentication Fails

Let's fix things one by one. 1. using apt-get is ok 2. use this: swift -V 2 -A http://172.16.0.201:5000/v2.0 -U service:swift -K swift stat (add the '-V 2')

2013-06-25 09:53:47 -0500 answered a question Swift Keystone Authentication Fails

Some errors on your ports? You use 443 at 172.16.0.201 for swift, so your should have an endpoint like 172.16.0.201:443, but in your post, 172.16.0.203:443 is used. Have a check on this.

2013-06-25 09:14:36 -0500 answered a question Swift Keystone Authentication Fails

I‘m trying this, and find some similar problems. What's your swift log of that command? And you use the current codes on master branch?

2013-06-25 02:41:17 -0500 answered a question transactions

Good question I think, but if you have any ideas like this, the best way is going to IRC (#openstack-swift). If most developers like this, it will be implemented soon.

2013-06-25 02:35:05 -0500 answered a question Swift Keystone Authentication Fails

Just setting log level to DEBUG is ok for watching details.

If you're not familiar with keystone log, you could just post a link here.

2013-06-24 17:12:04 -0500 answered a question auth problems

Thanks clayg, that solved my question.

2013-06-24 17:01:49 -0500 answered a question Swift Keystone Authentication Fails

Could you show your keystone log here? Your current config seems correct. Watching keystone's log could be more helpful

2013-06-20 10:23:42 -0500 answered a question [Openstack][ Swift]Multiple Zones or Multiple IPS per zone

"1 zone with 4 node storage" I think

In my experience, region is used to different city, datacentor, or vlan in test environment. Zone is used to server rack/cabinet, ip of course is for nodes, sdx is for hard drive.

Your ip address in your ring is already to distinguish different nodes.

2013-06-04 17:33:41 -0500 answered a question swift keystoneclient error “got an unexpected keyword argument 'insecure'”

The problems is in python-keystoneclient where is that Client ant its parent class define.

Your keystoneclient is not newest. Update your codes if you could use master branch

I have a simple scan of keystoneclient and find that in an old version the Client.__init__ doesn't use insecure keyword. So have a try to updating your keystoneclient.

2013-03-31 02:40:37 -0500 answered a question auth problems

You're right. I checked codes again. That bug is not related about this.

Thanks clayg

2013-03-28 09:03:43 -0500 answered a question auth problems

I still need an answer

2013-03-20 10:32:04 -0500 answered a question To create multiple accounts on Swift

There're two kinds of authorizing in swift. One is tempauth, another is keystone. I think you used tempauth, because you mentioned "which is setup in one of the configuration " In tempauth, the account could not be modified in runtime. The only way to modify an account is change that configuration, which is proxy-server.conf.

There's a document to understanding of that. http://swiftstack.com/blog/2012/01/04/swift-tempauth/ (http://swiftstack.com/blog/2012/01/04...)

2013-03-13 07:51:07 -0500 asked a question auth problems

in keystoneauth.py

267 def _authorize_unconfirmed_identity(self, req, obj, referrers, roles): 268 """" 269 Perform authorization for access that does not require a 270 confirmed identity. 271 272 :returns: A boolean if authorization is granted or denied. None if 273 a determination could not be made. 274 """ 275 # Allow container sync. 276 if (req.environ.get('swift_sync_key') 277 and (req.environ['swift_sync_key'] == 278 req.headers.get('x-container-sync-key', None)) 279 and 'x-timestamp' in req.headers): 280 log_msg = 'allowing proxy %s for container-sync' % req.remote_addr 281 self.logger.debug(log_msg) 282 return True 283 284 # Check if referrer is allowed. 285 if swift_acl.referrer_allowed(req.referer, referrers): 286 if obj or '.rlistings' in roles: 287 log_msg = 'authorizing %s via referer ACL' % req.referrer 288 self.logger.debug(log_msg) 289 return True 290 return False

My question is in line 290, why return False here but not let this run follow authorizing check? This request may be allowed by other condition. This is a case here: https://bugs.launchpad.net/swift/+bug/1082973 (https://bugs.launchpad.net/swift/+bug...)

same codes in tempauth, so what's the design idea here?

2013-03-10 18:38:49 -0500 answered a question what's the _junk in codes?

Thanks Mike Barton, that solved my question.

2013-03-10 18:38:37 -0500 answered a question what's the _junk in codes?

Thank you I miss this line: 1096: dest = '/' + dest

2013-03-10 17:04:55 -0500 asked a question what's the _junk in codes?

try: _junk, dest_container, dest_object = dest.split('/', 2) except ValueError: return HTTPPreconditionFailed( request=req, body='Destination header must be of the form ' '<container name="">/')

what's that _junk? correct dest should be "container/object" but how does that string split into 3 parts?