From ea62990c25b2a79aa2bc8e38959ae4d67f418d70 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Mon, 27 Nov 2017 13:45:46 +0100 Subject: [PATCH] TT#26103 Check sunrpc and rptengine kernel modules availability Change-Id: I64b8209fee73b1c3e13dce1c55cf45c3b27121a8 --- templates/615_kernel-modules.yaml.tt2 | 30 +++++++++++++++++++++++++++ templates/goss.yaml.tt2 | 1 + 2 files changed, 31 insertions(+) create mode 100644 templates/615_kernel-modules.yaml.tt2 diff --git a/templates/615_kernel-modules.yaml.tt2 b/templates/615_kernel-modules.yaml.tt2 new file mode 100644 index 0000000..8dc6ba0 --- /dev/null +++ b/templates/615_kernel-modules.yaml.tt2 @@ -0,0 +1,30 @@ +[% + PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname'; + hostname = out; + + argv.host = hostname; + argv.role = 'proxy'; + PROCESS '/usr/lib/ngcp-ngcpcfg/has_role'; + is_proxy = out; +-%] +[% PERL -%] + my $node_state = qx(ngcp-check-active -v); + chomp $node_state; + + $stash->set(node_state => $node_state); +[% END -%] + +command: + + lsmod | grep -Eq "^sunrpc ": + exit-status: 0 + stdout: [] + stderr: [] +[% IF is_proxy && node_state == 'active' && rtpproxy.enabled == "yes" -%] + + lsmod | grep -c xt_RTPENGINE: + exit-status: 0 + stdout: + - '/^2$/' + stderr: [] +[% END -%] \ No newline at end of file diff --git a/templates/goss.yaml.tt2 b/templates/goss.yaml.tt2 index c82071a..32fecfc 100644 --- a/templates/goss.yaml.tt2 +++ b/templates/goss.yaml.tt2 @@ -21,6 +21,7 @@ gossfile: [% IF general.ngcp_type != 'spce' -%] 511_init-daemons-ngcp-pro.yaml: {} [% END -%] + 615_kernel-modules.yaml: {} 800_network-hostname.yaml: {} [% IF sipwise.system_tester.skip_dns_check_test != "true" -%] 810_network-dns-debian.yaml: {}