On 08/30/2012 08:27 AM, Yin Yin wrote:
Hi, Harsh:
  I make some break in glusterd , and can gdb the qemu-kvm forked from libvirtd.

break in glusterd:

(gdb) i b
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x00007f903ef1a0a0 in server_getspec at glusterd-handshake.c:122
2       breakpoint     keep y   0x00000034f4607070 in rpcsvc_program_actor at rpcsvc.c:137
breakpoint already hit 2 times
3       breakpoint     keep y   0x00007f903ef199f0 in glusterd_set_clnt_mgmt_program at glusterd-handshake.c:359
4       breakpoint     keep y   0x00007f903ef1a0a0 in server_getspec at glusterd-handshake.c:122

in rpcsvc_handle_rpc_call fun, it call rpcsvc_program_actor and return right.
(gdb) p *actor
$13 = {procname = "GETSPEC", '\000' <repeats 24 times>, procnum = 2, actor = 0x7f903ef1a0a0 <server_getspec>, vector_sizer = 0, unprivileged = _gf_false}

but in 

     if (0 == svc->allow_insecure && unprivileged && !actor->unprivileged) {
                        
/* Non-privileged user, fail request */
                        
gf_log ("glusterd", GF_LOG_ERROR,
                                
"Request received from non-"
                                
"privileged port. Failing request");
                        
rpcsvc_request_destroy (req);
                        
return -1;
        
}

so the server_getspec on server not be called, which cause qemu-kvm progress failed.

my question:
1.(0 == svc->allow_insecure && unprivileged && !actor->unprivileged) which one wrong here ? 

Best Regards,
Yin Yin


Yin,
   IIUC, you need to set this option to True on your gluster volume to get past this error.
Gluster experts can provide more info here.

Option: nfs.ports-insecure
Default Value: (null)
Description: Allow client connections from unprivileged ports. By default only privileged ports are allowed. Use this option to enable or disable insecure ports for a specific subvolume and to override the global setting  set by the previous option.

volume set <VOLNAME> <KEY> <VALUE> - set options for volume <VOLNAME>

eg: gluster volume set <volname> nfs.ports-insecure on
something like that.