From 232985753c57b60bccd25b89b896974b18cdafcb Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Tue, 10 Jan 2023 23:19:45 +0100 Subject: [PATCH] Update BSC restart-on-update mechanism --- modules/rhizo_base/files/bin/check_dirty.sh | 7 ++++--- modules/rhizo_base/manifests/osmocom.pp | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/rhizo_base/files/bin/check_dirty.sh b/modules/rhizo_base/files/bin/check_dirty.sh index 5abd3aa..2ef9594 100755 --- a/modules/rhizo_base/files/bin/check_dirty.sh +++ b/modules/rhizo_base/files/bin/check_dirty.sh @@ -14,9 +14,10 @@ if [ -a /tmp/FS-dirty -o -a /tmp/OSMO-dirty ]; then fi if [ -a /tmp/OSMO-dirty ] ; then waitfor0calls - logc "NITB is tagged for restart due to Puppet update" - sv restart osmo-nitb + logc "Osmo BSC is tagged for restart due to Puppet update" + systemctl daemon-reload + systemctl restart osmo-bsc rm /tmp/OSMO-dirty - logc "osmo-nitb restarted" + logc "osmo-bsc restarted" fi fi diff --git a/modules/rhizo_base/manifests/osmocom.pp b/modules/rhizo_base/manifests/osmocom.pp index 906f14a..fa485aa 100644 --- a/modules/rhizo_base/manifests/osmocom.pp +++ b/modules/rhizo_base/manifests/osmocom.pp @@ -19,6 +19,7 @@ class rhizo_base::osmocom::buster inherits rhizo_base::osmocom::common { package { [ 'osmo-bsc', 'osmo-bsc-meas-utils' ]: ensure => '1.9.0+rhizo3b', require => Class['rhizo_base::apt'], + notify => Exec['notify-osmo-restart'], } package { [ 'osmo-msc' ]: require => Class['rhizo_base::apt'], @@ -44,6 +45,7 @@ class rhizo_base::osmocom::stretch inherits rhizo_base::osmocom::common { package { [ 'osmo-bsc' ]: ensure => '1.9.0+rhizo3s', require => Class['rhizo_base::apt'], + notify => Exec['notify-osmo-restart'], } package { [ 'osmo-msc' ]: ensure => '1.9.0+rhizo7s',