Attention is currently required from: fixeria, osmith.
Hello Jenkins Builder, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41624?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: enb_proxy: add initial MME pooling support
......................................................................
enb_proxy: add initial MME pooling support
Rework the CONNECTING state to dynamically select an MME from the pool
via mme_registry:mme_select/1, passing the eNB's Tracking Area Codes
(from the ?'id-SupportedTAs' IE of the S1 SETUP REQUEST) and a list of
already-tried MMEs, so successive attempts pick a different candidate.
On connection failure (SCTP establishment timeout or error), or when the
selected MME rejects the S1 SETUP REQUEST or fails to respond in time,
the FSM re-enters the CONNECTING state rather than terminating. This
triggers another mme_select/1 call with the failed MME added to the
tried_mmes list. S1 SETUP FAILURE PDUs from the MME are intentionally
not forwarded to the eNB, so the retry is fully transparent.
Once mme_select/1 exhausts all candidates it returns 'error'; at that
point the FSM builds and sends an S1 SETUP FAILURE PDU to the eNB and
terminates.
Other changes:
* add close_sock/1, close_conn/1 helpers; simplify terminate/3
* add ?S1GW_CTR_ENB_PROXY_MME_SELECT_ERROR counter
Change-Id: I83dc4a78c78a7b87e87f5ca9a941a168d6c1dc36
Related: SYS#7052
---
M include/s1gw_metrics.hrl
M src/enb_proxy.erl
M src/s1ap_utils.erl
M src/s1gw_metrics.erl
4 files changed, 84 insertions(+), 33 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/24/41624/6
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41624?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I83dc4a78c78a7b87e87f5ca9a941a168d6c1dc36
Gerrit-Change-Number: 41624
Gerrit-PatchSet: 6
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42299?usp=email )
Change subject: enb_registry: rework handling of eNB property updates
......................................................................
enb_registry: rework handling of eNB property updates
The idea of an enb_event/0 containing the current MME connection
state and the associated information (Global-eNB-ID, eNB/MME conn
info) looked promising initially, however turned out to be
impractical in light of ongoing MME pooling related changes.
* remove type enb_state/0
* rename type enb_event/0 -> enb_prop/0
* rename function enb_event/2 -> enb_update/2 (now private)
* enb_prop/0: separate the state from other properties
* enb_update/2: accept a list of enb_prop/0 - enb_proplist/0
* add typed notify_*() helpers that group related property updates,
ensuring consistency and serving as the sole public call sites
* notify_mme_connecting(): explicitly clears mme_conn_info
* openapi: EnbItem.state reflects the actual enb_proxy FSM state
Change-Id: Ib5c5dedce729151cd7350390987fdd008b254ef4
Related: SYS#7052
---
M contrib/openapi.yaml
M doc/osmo-s1gw-cli.md
M priv/openapi.json
M src/enb_proxy.erl
M src/enb_registry.erl
5 files changed, 104 insertions(+), 63 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/99/42299/2
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42299?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ib5c5dedce729151cd7350390987fdd008b254ef4
Gerrit-Change-Number: 42299
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42290?usp=email )
Change subject: erab_fsm: fix comment inaccuracies and a typo
......................................................................
erab_fsm: fix comment inaccuracies and a typo
Two comments copy-pasted from session_establish were left saying
"ESTABLISH Req" in session_modify and session_delete handlers where
"MODIFY Req" and "DELETE Req" are correct respectively.
Also fix typo "unieue" -> "unique" in init/1.
Change-Id: If84638142988767363aa080012b44082dee39f90
---
M src/erab_fsm.erl
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/90/42290/1
diff --git a/src/erab_fsm.erl b/src/erab_fsm.erl
index f281e4b..1e39cb7 100644
--- a/src/erab_fsm.erl
+++ b/src/erab_fsm.erl
@@ -233,7 +233,7 @@
init([UID]) ->
set_logging_prefix(UID),
?LOG_DEBUG("Creating E-RAB FSM (UID ~p)", [UID]),
- %% request a unieue SEID for this E-RAB FSM
+ %% request a unique SEID for this E-RAB FSM
{ok, SEID} = pfcp_peer:seid_alloc(),
{ok, erab_wait_setup_req,
#erab_state{uid = UID,
@@ -360,7 +360,7 @@
{reply, From, {error, {timeout, ?FUNCTION_NAME}}}};
session_modify(info, #pfcp{type = session_modification_response,
- seid = SEID_Rsp, %% matches F-SEID we sent in the ESTABLISH Req
+ seid = SEID_Rsp, %% matches F-SEID we sent in the MODIFY Req
ie = #{pfcp_cause := 'Request accepted'}},
#erab_state{mod_kind = ModKind,
from = From,
@@ -504,7 +504,7 @@
rel_kind = RelKind} = S) ->
case PDU of
#pfcp{type = session_deletion_response,
- seid = SEID_Rsp, %% matches F-SEID we sent in the ESTABLISH Req
+ seid = SEID_Rsp, %% matches F-SEID we sent in the DELETE Req
ie = #{pfcp_cause := 'Request accepted'}} ->
?LOG_DEBUG("PFCP session deleted"),
case RelKind of
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42290?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: If84638142988767363aa080012b44082dee39f90
Gerrit-Change-Number: 42290
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42292?usp=email )
Change subject: pfcp_peer: replace deprecated erlang:timestamp/0 with os:system_time/1
......................................................................
pfcp_peer: replace deprecated erlang:timestamp/0 with os:system_time/1
erlang:timestamp/0 is deprecated since OTP 18. os:system_time(second)
is the modern replacement and yields the result directly in seconds,
removing the need to reassemble the {MegaSec, Sec, _} tuple.
Change-Id: I4ad886a2222f0cee8a668b42efe8bfac800a55ac
---
M src/pfcp_peer.erl
1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/92/42292/1
diff --git a/src/pfcp_peer.erl b/src/pfcp_peer.erl
index a4cc2d5..e1b3aa1 100644
--- a/src/pfcp_peer.erl
+++ b/src/pfcp_peer.erl
@@ -477,11 +477,10 @@
-spec get_recovery_timestamp() -> pos_integer().
get_recovery_timestamp() ->
- {NowMS, NowS, _NowUS} = erlang:timestamp(),
- %% erlang:timestamp() returns time relative to the UNIX epoch (1970),
+ %% os:system_time/1 returns time relative to the UNIX epoch (1970),
%% but for PFCP we need time relative to the NTP era 0 (1900).
%% 2208988800 is the diff between 1900 and 1970.
- NowMS * 1_000_000 + NowS + 2208988800.
+ os:system_time(second) + 2208988800.
-spec get_f_seid(pfcp_seid(), peer_state()) -> pfcp_f_seid().
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42292?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I4ad886a2222f0cee8a668b42efe8bfac800a55ac
Gerrit-Change-Number: 42292
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42294?usp=email )
Change subject: s1ap_proxy: fix discarded result of handle_ies/3 in HO REQ ACK handler
......................................................................
s1ap_proxy: fix discarded result of handle_ies/3 in HO REQ ACK handler
The call processing the optional E-RABFailedToSetupListHOReqAck IE did
not pattern-match its return value, causing any errors returned by
handle_ies/3 to be silently swallowed. Bind the result to {_, S2}
to make the intent explicit.
Change-Id: I1c8feeb63fe23876ae443784980e9dc22a450c54
---
M src/s1ap_proxy.erl
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/94/42294/1
diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl
index a29a817..ef7665e 100644
--- a/src/s1ap_proxy.erl
+++ b/src/s1ap_proxy.erl
@@ -604,8 +604,8 @@
end,
%% handle the (optional) list of failed E-RABs
%% no #proxy_state modification is expected here
- handle_ies(?'id-E-RABFailedToSetupListHOReqAck',
- C0#'HandoverRequestAcknowledge'.protocolIEs, S2),
+ {_, S2} = handle_ies(?'id-E-RABFailedToSetupListHOReqAck',
+ C0#'HandoverRequestAcknowledge'.protocolIEs, S2),
{Result, S2};
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42294?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I1c8feeb63fe23876ae443784980e9dc22a450c54
Gerrit-Change-Number: 42294
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42296?usp=email )
Change subject: enb_registry: fix pattern match in handle_info 'DOWN' handler
......................................................................
enb_registry: fix pattern match in handle_info 'DOWN' handler
PIDs maps pid() => enb_handle() (an integer), so maps:find/2 returns
{ok, SomeHandle}. The old pattern {ok, Pid} tried to match an integer
against the already-bound pid() variable, which never succeeds.
This handler is only called on abnormal termination (process crash),
so the broken match caused the registry entry to never be cleaned up
in that case. Fix by using a fresh {ok, Handle} binding and removing
the now-redundant follow-up maps:get/2 call.
Change-Id: I4cb044e8071c4ae2fc48c507f8733af6c617ec46
---
M src/enb_registry.erl
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/96/42296/1
diff --git a/src/enb_registry.erl b/src/enb_registry.erl
index 54eca5d..d2487a0 100644
--- a/src/enb_registry.erl
+++ b/src/enb_registry.erl
@@ -257,8 +257,7 @@
pids = PIDs} = S) ->
?LOG_INFO("eNB process (pid=~p) terminated with reason ~p", [Pid, Reason]),
case maps:find(Pid, PIDs) of
- {ok, Pid} ->
- Handle = maps:get(Pid, PIDs),
+ {ok, Handle} ->
enb_metrics_reset(maps:get(Handle, ENBs)),
?LOG_INFO("eNB (handle=~p, pid=~p) has been unregistered", [Handle, Pid]),
{noreply, S#state{enbs = maps:remove(Handle, ENBs),
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42296?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I4cb044e8071c4ae2fc48c507f8733af6c617ec46
Gerrit-Change-Number: 42296
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42297?usp=email )
Change subject: enb_registry: fix duplicate registration check in enb_register/0
......................................................................
enb_registry: fix duplicate registration check in enb_register/0
next_handle was bound in the function head and reused in the case
pattern {ok, Handle}, turning what looks like a binding into an
equality test against next_handle. The duplicate check therefore
only fired if the previously assigned handle happened to equal the
current next_handle counter, which is essentially never true.
Fix by removing next_handle from the function head pattern and reading
it with S#state.next_handle inside the error branch, so that Handle in
{ok, Handle} is always a fresh binding that matches any existing handle.
Change-Id: Ia64f3e2e79bea055e5c37df9bce91a4bcbf7184c
---
M src/enb_registry.erl
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/97/42297/1
diff --git a/src/enb_registry.erl b/src/enb_registry.erl
index d2487a0..29a2575 100644
--- a/src/enb_registry.erl
+++ b/src/enb_registry.erl
@@ -155,13 +155,13 @@
handle_call(enb_register,
{Pid, _Tag},
#state{enbs = ENBs,
- pids = PIDs,
- next_handle = Handle} = S) ->
+ pids = PIDs} = S) ->
case maps:find(Pid, PIDs) of
{ok, Handle} ->
?LOG_ERROR("eNB (handle=~p, pid=~p) is *already* registered", [Handle, Pid]),
{reply, {error, already_registered}, S};
error ->
+ Handle = S#state.next_handle,
%% keep an eye on the process being registered
MonRef = erlang:monitor(process, Pid),
%% create and store an initial eNB state
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42297?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ia64f3e2e79bea055e5c37df9bce91a4bcbf7184c
Gerrit-Change-Number: 42297
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>