> Dnia poniedziałek, 30 kwietnia 2012 12:28:52 Roberto De Ioris pisze:
>> Yes. you can use multiple static-check.
>>
>> We abuse that feature to implement 'inheritance/overriding' in static
>> file
>> serving:
>>
>> static-check = /testing
>> static-check = /production
>>
>> if we put a foo.png in /testing, it will be served, otherwise it will
>> fallback to /production
>
> It doesn't work for me but uWSGI is stating both dirs configured with
> check-
> static so it's a different issue.
> My vassal config:
>
> [uwsgi]
> autoload = true
> plugins-dir = /usr/lib/uwsgi/plugins
> socket = 172.16.200.55:3017
> stats = :4017
> add-header = X-AppID: 17
> pidfile = /var/run/emperor-app1.pid
> uid = www-data
> gid = www-data
> master = true
> vacuum = true
> no-orphans = true
> reload-mercy = 60
> idle = 600
> post-buffering = 4096
> memory-report = true
> auto-procname = true
> procname-prefix-spaced = [app1@656]
> processes = 4
> cheaper = 1
> cheaper-step = 1
> cheaper-overload = 8
> max-requests = 2000
> reload-on-rss = 256
> namespace = /sudoku/app1:node1
> chdir = /home/app1/
> cgroup = /cgroup/app1
> cgroup-opt = memory.limit_in_bytes=1073741824
> ksm = 20
>
> check-static = /mfs
> check-static = /home/app1/public
>
> static-index = index.html
> env = RAILS_ENV=staging
> plugins = rack
> rack = /home/app1/config.ru
> remap-modifier = 7:0
> ruby-gc-freq = 100
> env = GEM_HOME=/home/app1/vendor/bundle/ruby/1.9.1
> unsubscribe-on-graceful-reload = true
> subscribe-freq = 3
> subscribe-to = 172.16.200.53:2626:app1.domain.com
> logger = rsyslog:127.0.0.1:514,app1
> threaded-logger = true
> log-x-forwarded-for = true
> carbon = 172.16.200.72:2003
> carbon-id = app1
>
> /mfs is a MooseFS filesystem (fuse based) mounted on my node (inside or
> outside
> the chroot, I've tested both). When I request a file that is stored on
> /mfs I'm
> getting this strace output:
>
> curl app1.domain.com/tv/file1.txt
>
> lstat("/mfs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> lstat("/mfs/tv", 0x7fff6f519be0) = -1 ENOENT (No such file or
> directory)
> lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> lstat("/home/app1", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> lstat("/home/app1/public", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> lstat("/home/app1/public/tv", 0x7fff6f519be0) = -1 ENOENT (No such file or
> directory)
>
> root@node1:~# cd /sudoku/app1/mfs/
> root@node1:/sudoku/app1/mfs# ls -lh tv/file1.txt
> -rw-r--r-- 1 www-data www-data 1,2K 2012-04-27 16:14 tv/file1.txt
>
I have not tested your setup, but you are using namespaces, so all of the
mounted fs will disapeear in the new namespace.
I do not know if it is a viable solution, but can't you mount the moosefs
from uWSGI itself using
--exec-in-jail "fusemount ...."
?
--
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi