From 893ba49e68440671853e6c4305f98359ef03419f Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Tue, 13 Oct 2020 01:59:14 +0200 Subject: [PATCH] GPRS Services: Temporarily open to all Open GPRS services and do not restart the osmo-sgsn every 24 hours. Let's see how long it runs and how everything behaves with the maximum load we can give it. --- modules/rhizo_base/manifests/openbsc.pp | 7 ++++ .../rhizo_base/templates/osmo-sgsn.cfg.erb | 39 +++++++++++++++++++ .../rhizo_base/templates/rhizomatica.cron.erb | 2 +- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 modules/rhizo_base/templates/osmo-sgsn.cfg.erb diff --git a/modules/rhizo_base/manifests/openbsc.pp b/modules/rhizo_base/manifests/openbsc.pp index 2908f49..b00e7e8 100644 --- a/modules/rhizo_base/manifests/openbsc.pp +++ b/modules/rhizo_base/manifests/openbsc.pp @@ -134,6 +134,13 @@ class rhizo_base::openbsc { content => template('rhizo_base/make_sgsn_acl_config.erb'), mode => "0750", } + + file { '/etc/osmocom/osmo-sgsn.cfg': + content => template('rhizo_base/osmo-sgsn.cfg.erb'), + mode => "0750", + notify => Service['osmo-sgsn'], + } + package { [ 'osmo-sgsn' ]: ensure => 'installed', require => Class['rhizo_base::apt'], diff --git a/modules/rhizo_base/templates/osmo-sgsn.cfg.erb b/modules/rhizo_base/templates/osmo-sgsn.cfg.erb new file mode 100644 index 0000000..ef63285 --- /dev/null +++ b/modules/rhizo_base/templates/osmo-sgsn.cfg.erb @@ -0,0 +1,39 @@ +! +! Osmocom SGSN configuration +! +! +log stderr + logging level set-all fatal + logging print category 1 + logging print file basename last + logging print level 1 + logging print extended-timestamp 1 + logging level gprs error + logging level mm error + logging level llc error +line vty + no login +! +sgsn + gtp local-ip <%= @vpn_ip_address %> + ggsn 0 remote-ip <%= @ggsn_ip_address %> + ggsn 0 gtp-version 1 + ggsn 0 echo-interval 60 + auth-policy accept-all + gsup remote-ip 127.0.0.1 + gsup remote-port 4222 + authentication optional +! +ns + timer tns-block 3 + timer tns-block-retries 3 + timer tns-reset 3 + timer tns-reset-retries 3 + timer tns-test 30 + timer tns-alive 3 + timer tns-alive-retries 10 + encapsulation udp local-port 23000 + encapsulation framerelay-gre enabled 0 +! +bssgp +! diff --git a/modules/rhizo_base/templates/rhizomatica.cron.erb b/modules/rhizo_base/templates/rhizomatica.cron.erb index f6afbfc..281babd 100644 --- a/modules/rhizo_base/templates/rhizomatica.cron.erb +++ b/modules/rhizo_base/templates/rhizomatica.cron.erb @@ -75,7 +75,7 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn # 0 */6 * * * root /usr/bin/sv restart osmo-nitb 2>&1 > /dev/null # Rebuild ACL config and restart the SGSN (stopgap pre HLR solution, we loose all PDP contexts) - 55 2 * * * root /etc/osmocom/make_sgsn_acl_config > /etc/osmocom/osmo-sgsn.cfg ; systemctl restart osmo-sgsn +# 55 2 * * * root /etc/osmocom/make_sgsn_acl_config > /etc/osmocom/osmo-sgsn.cfg ; systemctl restart osmo-sgsn # It's a new day.... 30 5 * * * root /home/rhizomatica/bin/check_broken.sh