mogilefs module 1.0.2

Daniel daniel at telesat.co.jp
Mon Aug 10 12:54:29 MSD 2009


Valery

I tried the patch but had a problem with the class value.
First the compiler report a warning that stopped the compile:

gcc -c -O -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I
src/http -I src/http/modules -I src/mail \
-o
objs/addon/nginx_mogilefs_module-1.0.2patched/ngx_http_mogilefs_module.o \
mod/nginx_mogilefs_module-1.0.2patched//ngx_http_mogilefs_module.c
cc1: warnings being treated as errors
mod/nginx_mogilefs_module-1.0.2patched//ngx_http_mogilefs_module.c: In
function ‘ngx_http_mogilefs_class_command’:
mod/nginx_mogilefs_module-1.0.2patched//ngx_http_mogilefs_module.c:1336:
warning: unused variable ‘u’
make[1]: ***
[objs/addon/nginx_mogilefs_module-1.0.2patched/ngx_http_mogilefs_module.o]
Error 1
make[1]: Leaving directory `/root/nginx-0.7.61'
make: *** [build] Error 2

commented the 1336 line and retry the compile without problems.

but when I use the mogilefs_class directive, the PUT process stopped
until timeout.

The debug log:

2009/08/10 17:10:50 [debug] 7424#0: *9 mogilefs request: "create_open
key=sunset3.jpg&domain=images&class=mogilefs_class"
. . .
2009/08/10 17:10:50 [debug] 7424#0: *9 mogilefs: "ERR unreg_class
unreg_class"
2009/08/10 17:10:50 [error] 7424#0: *9 mogilefs error: "unreg_class
unreg_class" while reading response header from upstream, client:
127.0.0.1, server: localhost, request: "PUT /totriple/sunset3.jpg
HTTP/1.1", subrequest: "/mogstored_spare_155602492/sunset3.jpg",
upstream: "192.168.141.116:6001", host: "localhost"
2009/08/10 17:10:50 [debug] 7424#0: *9 finalize http upstream request: 500
2009/08/10 17:10:50 [debug] 7424#0: *9 finalize mogilefs request

looks like the class parameter is not sent (triple), the parametername
is sent(mogilefs_class).

My nginx.conf :
location /totriple/ {
mogilefs_tracker trackers;
mogilefs_domain images;
mogilefs_class triple;
mogilefs_methods PUT;
mogilefs_pass {
proxy_pass $mogilefs_path;
}
}

Regards,
Tuqui



Valery Kholodkov さんは書きました:
> Daniel wrote:
>
>> As i said in the first sentence linking POST to PUT would be useful,
>> maybe making a bridge between your Upload module and Mogilefs module
>> could be enough to do the task.
>> In other point as Michael said, using variables to set
>> mogilefs_domain would be useful too.
>> I looked the source but I didn't find how to set the Class for
>> uploading files.
>
> Please try attached patch. It implements mogilefs_class directives.
> The directive accepts up to 8 arguments, each of them can contain
> variables. The first argument which evaluates to non-empty string is
> supplied as class parameter to MogileFS tracker. If no argument
> evaluates to non-empty string or directive is not set, no class
> parameter will be supplied to MogileFS tracker.
>


-- 
*********************************************************
仲宗根 ダニエル
マリーン・システム・アソシエイツ株式会社
〒900-0036 沖縄県浦添市牧港5丁目2番1号
沖縄電力本店別館6F
Tel : 098-942-5575
Fax : 098-942-5574
URL : www.telesat.co.jp
      www.netfan.ne.jp
Mail : daniel at telesat.co.jp
*********************************************************
Daniel Nakasone
Marine System Associates, Inc.
Address : 5-2-1 Makiminato Annex 6F
          Urasoe City,
          Okinawa Japan 900-0036
Tel : +81-98-942-5575
Fax : +81-98-942-5574
URL : www.telesat.co.jp
      www.netfan.ne.jp
Mail : daniel at telesat.co.jp
*********************************************************






More information about the nginx mailing list