minor bug report..
komtanoo.pinpimai at livetext.com
komtanoo.pinpimai at livetext.com
Sat Sep 30 01:54:13 UTC 2006
What I did is installing whole new system with 411 with new OS + packages,
everything from debian etch distribution. After mogdbsetup, I started a
tracker, then ran "mogadm domain add xxx", it said, "Unable to retrieve
domains from trackers".
If you look at the code, api/perl/Mogilefs/Backend.pm at 411,
*_debug = *MogileFS::Client::_debug;
is below sub do_request, which has a _debug() calling statement, but sub
_debug doesn't exist at that point.
-----
sub do_request {
my MogileFS::Backend $self = shift;
my ($cmd, $args) = @_;
_fail("invalid arguments to do_request")
unless $cmd && $args;
local $SIG{'PIPE'} = "IGNORE" unless $FLAG_NOSIGNAL;
my $sock = $self->{sock_cache};
my $argstr = _encode_url_string(%$args);
my $req = "$cmd $argstr\r\n";
my $reqlen = length($req);
my $rv = 0;
if ($sock) {
# try our cached one, but assume it might be bogus
_debug("SOCK: cached = $sock, REQ: $req");
$rv = send($sock, $req, $FLAG_NOSIGNAL);
....
*_debug = *MogileFS::Client::_debug;
-----
So I move the *_debug above the sub routine and it just works.
It's weird if it works for you, maybe incompatibility of perl ? mine is
5.8.8 from stock debian.
I think it safe to move the statement up to the head of file to avoid any
future problem.
-kem
On Fri, September 29, 2006 3:20 pm, Brad Fitzpatrick wrote:
> I'm using 409 and it works fine for me:
>
>
> $ mogadm domain add foo
> $ mogadm domain add foo
> Domain already exists.
> $ mogadm domain delete foo
> $ svn info | grep ^Rev
> Revision: 409
>
>
> And when I upgrade to 411, same thing.
>
>
> How can I reproduce?
>
>
>
> On Thu, 28 Sep 2006 komtanoo.pinpimai at livetext.com wrote:
>
>
>> At 411, the *_debug is still under do_request and adding domain is
>> failing for me.
>>
>> -kem
>>
>>
>> On Thu, September 28, 2006 5:28 pm, Brad Fitzpatrick wrote:
>>
>>> I think Jonathan already fixed this today (independent of you
>>> reporting it?) in svn rev 411.
>>>
>>> Could you verify?
>>>
>>>
>>>
>>>
>>> On Thu, 28 Sep 2006 komtanoo.pinpimai at livetext.com wrote:
>>>
>>>
>>>
>>>> Hi All,
>>>>
>>>>
>>>>
>>>> Right now, I'm trying to use the latest MogileFS from trunk, but
>>>> I'm
>>>> not able to add domain, it always complains "Unable to retrieve
>>>> domains from trackers". I traced some codes and found that in
>>>> "Backend.pm",
>>>>
>>>>
>>>> *_debug = *MogileFS::Client::_debug;
>>>>
>>>>
>>>>
>>>> should be lifted to the head of the file or at least above
>>>> do_request otherwise do_request will fail because it calls _debug,
>>>> which has already been moved to MogileFS::Client, and it's not
>>>> initialized yet at that point. I guess there is an exception handler
>>>> covers do_request so it won't return the real error message, but the
>>>> default one which is misleading.
>>>>
>>>> -kem
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>
More information about the mogilefs
mailing list