Review at  https://gerrit.osmocom.org/7626

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
---
M src/osmo_gsm_tester/bts_nanobts.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/26/7626/1

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

-- 
To view, visit https://gerrit.osmocom.org/7626
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec8adb2cd13d808a6ca1843dc95b81bd1a97d1c0
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pes...@sysmocom.de>

Reply via email to