mogilefs module 1.0.2

Daniel daniel at
Mon Aug 10 12:54:29 MSD 2009


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 \
objs/addon/nginx_mogilefs_module-1.0.2patched/ngx_http_mogilefs_module.o \
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’:
warning: unused variable ‘u’
make[1]: ***
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
. . .
2009/08/10 17:10:50 [debug] 7424#0: *9 mogilefs: "ERR 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:, server: localhost, request: "PUT /totriple/sunset3.jpg
HTTP/1.1", subrequest: "/mogstored_spare_155602492/sunset3.jpg",
upstream: "", 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;


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号
Tel : 098-942-5575
Fax : 098-942-5574
Mail : daniel at
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
Mail : daniel at

More information about the nginx mailing list