[Openstack] Load Balancers for Swift with nginx and pound

2013-06-14 Thread 王娜
Hello,Stackers

First question:
I built  a swift cluser,two proxy server , one nginx server ---load balance
 for two swift proxy server,and  two storage server

1.when I  stop swift proxy service on one proxy server
The command  swift -V 2 -A http://172.18.56.195:5000/v2.0 -U
service:glance -K pass  list  can not  list all  containers.

like this,before I stop the proxy service ,there are five containers.

root@proxy:~# swift -V 2 -A http://172.18.56.195:5000/v2.0 -U
service:glance -K pass  list
1
2
myfile
test
test3

once I stop one proxy server ,there are only 3 .

root@proxy:~# swift -V 2 -A http://172.18.56.195:5000/v2.0 -U
service:glance -K pass  list
1
2
test
the nginx.conf  like this
worker_processes  1;
events {
worker_connections  1024;
}
http {
include   mime.types;
default_type  application/octet-stream;
sendfileon;
keepalive_timeout  65;
client_max_body_size 10024M;
upstream swift {
server 172.18.56.199:8080;
server 172.18.56.235:8080;
 }
server {
listen   8080;
server_name  authserver;
location / {
proxy_pass http://authserver/;
}
error_page   500 502 503 504  /50x.html;
location = /50x.html {
root   html;
}
}
}


Question 2:

Because of the nginx problem ,so I change  to use pound ,but
when I execute  the command
swift -V 2 -A http://172.18.56.195:5000/v2.0 -U service:glance -K pass stat
and
swift -V 2 -A http://172.18.56.195:5000/v2.0 -U service:glance -K pass list

It  runs successfully

but
can not execute  post  or  upload

the error like this
root@proxy:~# swift -V 2 -A http://172.18.56.195:5000/v2.0 -U
service:glance -K pass post 3
Container PUT failed:
http://172.18.56.194:80/v1/AUTH_aadcbf03cf904eb68742478c9ae38eb4/3 501 Not
Implemented   This method may not be used.

the pound.conf like this


Userroot
Group   root
ListenHTTP
   Address 172.18.56.194
   Port80

End

   Service
  #HeadRequire (Host: your_host.com|Host: www.your_host.com)
  BackEnd
 Address 172.18.56.235
 Port 8080
  End
  BackEnd
 Address 172.18.56.199
 Port 8080
  End

End



Cheers
Wenna
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Load Balancers for Swift with nginx and pound

2013-06-14 Thread Christian Schwede

Hi,


Because of the nginx problem ,so I change  to use pound ,but
...
but can not execute  post  or  upload


regarding pound: you have to enable the PUT method to upload objects. 
Simply add xHTTP 2 in the section below:



Userroot
Group   root
ListenHTTP
   Address 172.18.56.194
   Port80
   xHTTP 2
End


This will enable PUT and DELETE methods (see 
http://linux.die.net/man/8/pound for further details).


But POST should work out of the box?

Cheers,

Christian



___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Load Balancers for Swift with nginx and pound

2013-06-14 Thread John Dickinson
Also, just as general info, don't use nginx in front of Swift. nginx buffers 
request bodies, and that can become very problematic when uploading content 
into the Swift cluster (especially since the body could be up to 5GB--not too 
many of those requests and you'll overload your nginx box).

Second, the inconsistency of the listings shouldn't be affected by your load 
balancer or proxy server. It's probably the result of Swift's eventual 
consistency model. If Swift was not able to update the account listings on 
container create, it will still return success to the client (for the container 
create), but it will queue the listing update to be performed later. THere is 
an updater process that runs to keep listings in sync and handle these 
situations. This is most obvious (ie you're most likely to see it) if you have 
had a failure in your cluster (eg network down or hard drive fail) and are 
trying to get the info after the failure has been restored but before the 
updater has done its work. SInce there are 3 copies of your account in the 
cluster, each with a listing of the containers, one may be out of sync. Perhaps 
you created a container while one of those drives was unavailable. The 
background replication and updater processes will take care of getting your 
listings back in
 to a consistent state. Make sure they are running, and check the logs to see 
if there are any problems.

--John




On Jun 14, 2013, at 4:27 AM, Christian Schwede i...@cschwede.de wrote:

 Hi,
 
 Because of the nginx problem ,so I change  to use pound ,but
 ...
 but can not execute  post  or  upload
 
 regarding pound: you have to enable the PUT method to upload objects. Simply 
 add xHTTP 2 in the section below:
 Userroot
 Group   root
 ListenHTTP
   Address 172.18.56.194
   Port80
   xHTTP 2
 End
 
 This will enable PUT and DELETE methods (see http://linux.die.net/man/8/pound 
 for further details).
 
 But POST should work out of the box?
 
 Cheers,
 
 Christian
 
 
 
 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Load Balancers for Swift with nginx and pound

2013-06-14 Thread Pete Zaitcev
On Fri, 14 Jun 2013 18:43:21 +0800
王娜 wangna...@gmail.com wrote:

 like this,before I stop the proxy service ,there are five containers.

I would double-check that both proxies had same ring files.

-- Pete

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp