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

Set osmo-bts pcu-socket config to point to run dir

Otherwise osmo-bts stores the socket file in /tmp. If an earlier
instance doesn't finish cleanly, the file is left there and a new
instance will fail to start because it cannot create a new socket file
in the same place.

Change-Id: I5a1da23c45a4ac496fe765e0d78c52dae3e7808b
---
M src/osmo_gsm_tester/bts_osmotrx.py
M src/osmo_gsm_tester/bts_sysmo.py
M src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl
M src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
4 files changed, 15 insertions(+), 3 deletions(-)


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

diff --git a/src/osmo_gsm_tester/bts_osmotrx.py 
b/src/osmo_gsm_tester/bts_osmotrx.py
index 585647a..d8675cb 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -95,8 +95,13 @@
 
         values = dict(osmo_bts_trx=config.get_defaults('osmo_bts_trx'))
         config.overlay(values, self.suite_run.config())
-        config.overlay(values, 
dict(osmo_bts_trx=dict(oml_remote_ip=self.bsc.addr())))
-        config.overlay(values, dict(osmo_bts_trx=self.conf))
+        config.overlay(values, {
+                        'osmo_bts_trx': {
+                            'oml_remote_ip': self.bsc.addr(),
+                            'pcu_socket_path': os.path.join(str(self.run_dir), 
'pcu_bts')
+                        }
+        })
+        config.overlay(values, { 'osmo_bts_trx': self.conf })
 
         self.dbg('OSMO-BTS-TRX CONFIG:\n' + pprint.pformat(values))
 
diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py
index eab0bdb..f37f88b 100644
--- a/src/osmo_gsm_tester/bts_sysmo.py
+++ b/src/osmo_gsm_tester/bts_sysmo.py
@@ -119,7 +119,12 @@
 
         values = { 'osmo_bts_sysmo': config.get_defaults('osmo_bts_sysmo') }
         config.overlay(values, self.suite_run.config())
-        config.overlay(values, { 'osmo_bts_sysmo': { 'oml_remote_ip': 
self.bsc.addr() } })
+        config.overlay(values, {
+                        'osmo_bts_sysmo': {
+                            'oml_remote_ip': self.bsc.addr(),
+                            'pcu_socket_path': 
os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts')
+                        }
+        })
         config.overlay(values, { 'osmo_bts_sysmo': self.conf })
 
         self.dbg('SYSMOBTS CONFIG:\n' + pprint.pformat(values))
diff --git a/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl
index cf9666b..69f7ac1 100644
--- a/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl
@@ -16,6 +16,7 @@
  band ${osmo_bts_sysmo.band}
  ipa unit-id ${osmo_bts_sysmo.ipa_unit_id} 0
  oml remote-ip ${osmo_bts_sysmo.oml_remote_ip}
+ pcu-socket ${osmo_bts_sysmo.pcu_socket_path}
  gsmtap-sapi bcch
  gsmtap-sapi ccch
  gsmtap-sapi rach
diff --git a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
index 452b920..1737947 100644
--- a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
@@ -20,6 +20,7 @@
  band ${osmo_bts_trx.band}
  ipa unit-id ${osmo_bts_trx.ipa_unit_id} 0
  oml remote-ip ${osmo_bts_trx.oml_remote_ip}
+ pcu-socket ${osmo_bts_trx.pcu_socket_path}
  settsc
  gsmtap-sapi bcch
  gsmtap-sapi ccch

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

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

Reply via email to