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
This commit is contained in:
Pau Espin 2017-08-08 13:55:24 +02:00
parent 4008b69bbe
commit 329b6f446c
4 changed files with 15 additions and 3 deletions

View File

@ -95,8 +95,13 @@ class OsmoBtsTrx(log.Origin):
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))

View File

@ -119,7 +119,12 @@ class SysmoBts(log.Origin):
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))

View File

@ -16,6 +16,7 @@ bts 0
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

View File

@ -20,6 +20,7 @@ bts 0
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