pespin submitted this change.
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
s1gw: ConnHdlr: Use stats reported by osmo-s1gw to expect PFCP Assoc Setup
Change-Id: I329745125d78786fc9c243f0047cd394de9b16d4
---
M s1gw/S1GW_ConnHdlr.ttcn
M s1gw/osmo-s1gw.config
2 files changed, 64 insertions(+), 5 deletions(-)
diff --git a/s1gw/S1GW_ConnHdlr.ttcn b/s1gw/S1GW_ConnHdlr.ttcn
index 6a1eb39..4505c1c 100644
--- a/s1gw/S1GW_ConnHdlr.ttcn
+++ b/s1gw/S1GW_ConnHdlr.ttcn
@@ -269,11 +269,22 @@
function f_ConnHdlr_register_pfcp() runs on ConnHdlr
{
f_pfcp_register();
- if (g_pars.idx == 0) {
- /* First ConnHdlr answers the AssocSetup: */
- activate(as_pfcp_handle_assoc_setup_req(do_repeat := true));
- } else {
+
+ /* First ConnHdlr answers the AssocSetup: */
+ if (g_pars.idx != 0) {
activate(as_pfcp_ignore(PFCP, tr_PFCP_Assoc_Setup_Req()));
+ return;
+ }
+
+ var StatsDMetricKeys statsd_keys := {
+ valueof(ts_StatsDMetricKey(g_pars.statsd_prefix & "gauge.pfcp.associated.value", "g"))
+ };
+ var StatsDMetrics statsd_snapshot := f_statsd_snapshot(statsd_keys, since_last_snapshot := false);
+ var boolean pfcp_associated := statsd_snapshot[0].val == 1;
+
+ if (not pfcp_associated) {
+ log("Waiting for IUT to associate over PFCP");
+ f_pfcp_wait_assoc_setup();
}
}
}
diff --git a/s1gw/osmo-s1gw.config b/s1gw/osmo-s1gw.config
index 86a89c1..8fcd994 100644
--- a/s1gw/osmo-s1gw.config
+++ b/s1gw/osmo-s1gw.config
@@ -32,6 +32,54 @@
{prefix, [" ", prefix, " ::"], ""},
" ", msg,
{mfa, [" (", mfa, ":", line, ")"], ""},
- reset, "\n"]}}}}]}]}].
+ reset, "\n"]}}}}]}
+ ]
+ },
+ {exometer_core,
+ [{predefined,
+ [%{[erlang, memory], {function, erlang, memory, [], value, []}, []},
+ %{[erlang, system_info], {function, erlang, system_info, ['$dp'], value, [process_count]}, []},
+ %{[erlang, statistics], {function, erlang, statistics, ['$dp'], value, [run_queue]}, []},
+ %{[erlang, io], {function, erlang, statistics, [io], match, {{'_', input}, {'_', output}}}, []}
+ ]
+ },
+ {report,
+ [{reporters,
+ [%%{exometer_report_tty, []},
+ {exometer_report_statsd,
+ [{hostname, "127.0.4.10"},
+ {port, 8125},
+ {prefix, "s1gw"},
+ {type_map, []}
+ ]
+ }
+ ]
+ },
+ {subscribers,
+ [%%{select, {[{ {['_' | '_'],'_','_'}, [], ['$_']}],
+ %% exometer_report_tty, value, 1000, true}}
+ {select, {[{ {['_' | '_'],counter,'_'}, [], ['$_']}],
+ exometer_report_statsd,
+ value,
+ 1000,
+ true,
+ [{report_type, counter}]
+ }
+ },
+ {select, {[{ {['_' | '_'],gauge,'_'}, [], ['$_']}],
+ exometer_report_statsd,
+ value,
+ 1000,
+ true,
+ [{report_type, gauge}]
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+].
%% vim:set ts=2 sw=2 et:
To view, visit change 37959. To unsubscribe, or for help writing mail filters, visit settings.