nanobts: Attempt at fixing race condition using ipaccess-config after power up
It seems there's a period of time in between the nanoBTS starts
announcing itself and it can actually be managed by the BSC
(ipaccess-config in this case). If ipaccess-config is called quickly
after nanoBTS it first announced, its TCP conn will be rejected with a
TCO RST, and ipaccess-config will fail. Let's see if waiting a few
seconds is enough to have this working more reliably.
Change-Id: Iec8adb2cd13d808a6ca1843dc95b81bd1a97d1c0
diff --git a/src/osmo_gsm_tester/bts_nanobts.py b/src/osmo_gsm_tester/bts_nanobts.py
index 9599022..6350c56 100644
--- a/src/osmo_gsm_tester/bts_nanobts.py
+++ b/src/osmo_gsm_tester/bts_nanobts.py
@@ -197,7 +197,7 @@
env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) }
self.proc = process.Process(self.name(), self.run_dir,
- (ipfind_path, '-b', self.bind_ip),
+ (ipfind_path, '-i', '1', '-b', self.bind_ip),
env=env)
self.suite_run.remember_to_stop(self.proc)
self.proc.launch()
@@ -229,7 +229,10 @@
def wait_bts_ready(self, ipaddr):
MainLoop.wait(self, self.bts_ready, ipaddr)
-
+ # There's a period of time after boot in which nanobts answers to
+ # abisip-find but tcp RSTs ipacces-config conns. Let's wait in here a
+ # bit more time to avoid failing after stating the BTS is ready.
+ MainLoop.sleep(self, 2)
class IpAccessConfig(log.Origin):
suite_run = None