glusterfsd fails to launch if eth0 does not have an ip address even with default transport.socket.bind-address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
This bug is triggered on init, when the dhcp is delayed :
eth0 is up, but does not already have an ipv4 address
glusterfsd is launched an fails with :

[2009-10-14 17:02:04] E [name.c:385:af_inet_server_get_local_sockaddr] server: getaddrinfo failed for host 0.0.0.0, service 6996 (Name or service not known)
[2009-10-14 17:02:04] E [server-protocol.c:7660:init] server: failed to bind/listen on socket

Example of config files which should works even if eth0 does not have an ipv4:

volume server
  type protocol/server
  option transport-type tcp
  option transport.address-family inet
  option transport.socket.bind-address 0.0.0.0
end-volume

volume server
  type protocol/server
  option transport-type tcp
end-volume

volume server
  type protocol/server
  option transport.address-family inet
  option transport-type tcp
end-volume

I joined a patch that fix the problem, but there may be a more clean way to do it.
I checked the code of lighttpd: http://redmine.lighttpd.net/projects/lighttpd/repository/entry/trunk/src/network.c#L426
They use gethostbyname for ipv4 and getaddrinfos for ipv6, don't know if there is a good reason for that.
thanks,

Corentin Chary (1):
  transport/socket: glusterfsd fails to run if eth0 does not have an
    ipv4 addr

 transport/socket/src/name.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)





[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux