Skip to content

Changes

Started 8 hr 53 min ago
Queued 6.4 sec
Took 1 min 11 sec on built-in
mme_registry: add backwards compat for old sctp_client config

When 'mme_pool' is absent from the config, automatically populate the
MME pool with a single 'default' entry derived from the 'sctp_client'
section (including legacy mme_loc_addr/mme_rem_addr params), and emit
a deprecation warning.  osmo_s1gw_sup:init/1 normalises 'sctp_client'
in the app env (with all defaults applied) before children start, so
mme_registry can safely read it without duplicating the parsing logic.

Change-Id: Ia97fb61bbb5ace6f43d1a6768fb5fb6883158532
Related: SYS#7052
Vadim Yanitskiy at
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
Vadim Yanitskiy at
enb_proxy: fix stale SCTP events misprocessed during MME pool selection

When closing a connection to one MME and opening a new one to the next,
a SHUTDOWN_COMP event from the old (now-closed) socket can still be
pending in the process mailbox.  The sctp_assoc_change handlers in the
'connecting' and 'wait_s1setup_rsp' states were matching '_Socket',
ignoring the socket identity.  A stale SHUTDOWN_COMP would therefore
fall into the '_ -> repeat_state_and_data' branch, triggering a spurious
re-entry of 'connecting', which immediately closed the newly established
connection to the next MME and skipped to yet another pool entry.

Fix this by matching the Socket against the current S#state.sock in both
handlers.  Events arriving on a previously closed socket no longer match
these clauses and are silently dropped by the catch-all handle_event/4.

This was found thanks to the MME pooling TCs in ttcn3-s1gw-test.

Change-Id: I4211dd343607f045cf4dd33fa568ed580c79dd9f
Related: SYS#7052
Vadim Yanitskiy at
enb_proxy/mme_registry: add per-MME counters for connection events

Register a set of per-MME counters when an MME is added to the pool,
and increment them from enb_proxy at the relevant state transitions:

  - selected          (MME chosen for a connection attempt)
  - conn_est_timeout  (SCTP connection establishment timed out)
  - conn_est_failure  (SCTP connection establishment failed)
  - s1setup_rsp       (S1 SETUP RESPONSE received successfully)
  - s1setup_failure   (S1 SETUP FAILURE received from MME)
  - s1setup_rsp_timeout (timed out waiting for S1 SETUP RESPONSE)

A new global aggregate counter ?S1GW_CTR_ENB_PROXY_MME_SELECTED is
also added alongside the existing ?S1GW_CTR_ENB_PROXY_MME_SELECT_ERROR.

Change-Id: Ie0149c1ad0754af6d8f5f95d4e8919993eac3760
Related: SYS#7052
Vadim Yanitskiy at