Revision d8bcfe21 daemons/ganeti-confd

b/daemons/ganeti-confd
48 48
from ganeti import constants
49 49
from ganeti import errors
50 50
from ganeti import daemon
51
from ganeti import netutils
51 52

  
52 53

  
53 54
class ConfdAsyncUDPServer(daemon.AsyncUDPSocket):
......
58 59
    """Constructor for ConfdAsyncUDPServer
59 60

  
60 61
    @type bind_address: string
61
    @param bind_address: socket bind address ('' for all)
62
    @param bind_address: socket bind address
62 63
    @type port: int
63 64
    @param port: udp port
64 65
    @type processor: L{confd.server.ConfdProcessor}
65 66
    @param processor: ConfdProcessor to use to handle queries
66 67

  
67 68
    """
68
    daemon.AsyncUDPSocket.__init__(self)
69
    daemon.AsyncUDPSocket.__init__(self,
70
                                   netutils.GetAddressFamily(bind_address))
69 71
    self.bind_address = bind_address
70 72
    self.port = port
71 73
    self.processor = processor
......
251 253
    print >> sys.stderr, "Need HMAC key %s to run" % constants.CONFD_HMAC_KEY
252 254
    sys.exit(constants.EXIT_FAILURE)
253 255

  
256
  # TODO: once we have a cluster param specifying the address family
257
  # preference, we need to check if the requested options.bind_address does not
258
  # conflict with that. If so, we might warn or EXIT_FAILURE.
259

  
254 260

  
255 261
def ExecConfd(options, _):
256 262
  """Main confd function, executed with PID file held

Also available in: Unified diff