if Context().test.stress and self.inquirer:
self.inquirer.start(self)
- def start(self, clean=False):
+ def start(self, clean=False, fatal=True):
'''Start the server with all bindings successful'''
for attempt in range(Server.START_MAX_ATTEMPTS):
time.sleep(Server.START_WAIT_ATTEMPTS)
check_log("STARTING %s AGAIN" % self.name)
- raise Failed("Couldn't bind all addresses or ports")
+ if fatal:
+ raise Failed("Server %s couldn't bind all addresses or ports" % self.name)
+ else:
+ check_log("BUSY PORTS, START OF %s FAILED" % self.name)
def ctl(self, cmd, wait=False, availability=True, read_result=False):
if availability:
return s.conf
- def start(self, clean=False):
+ def start(self, clean=False, fatal=True):
for zname in self.zones:
z = self.zones[zname]
if z.dnssec.enable != True:
#n3iters = z.dnssec.nsec3_iters or 0
#outf.write("%s NSEC3PARAM 1 %d %d -\n" % (z.name, n3flag, n3iters)) # this does not work!
- super().start(clean)
+ super().start(clean, fatal)
for zname in self.zones:
z = self.zones[zname]
def get_config(self):
return ''
- def start(self, clean=None):
+ def start(self, clean=None, fatal=None):
return True
def listening(self):
if server.external:
continue
- server.start(clean=True)
+ server.start(clean=True, fatal=False)
# When address/port is busy, Knot exits, BIND doesn't.
if not server.running() or not server.listening():