Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33383 )
Change subject: rlcmac: BS_CV_MAX=0 should be interpreted as =1 when calculating N3104_MAX
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33383
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: Ia83173afdbb25df18c7cead7857fe1b39a1ce82f
Gerrit-Change-Number: 33383
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 21 Jun 2023 10:26:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/33310 )
Change subject: mgwpool: Document keepalive feature
......................................................................
mgwpool: Document keepalive feature
Related: SYS#6481
Change-Id: I2cb4e2098b71b386278eb6026271a6d786a34c2a
---
M common/chapters/mgwpool.adoc
1 file changed, 77 insertions(+), 22 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/common/chapters/mgwpool.adoc b/common/chapters/mgwpool.adoc
index c4cf28a..afb0d2b 100644
--- a/common/chapters/mgwpool.adoc
+++ b/common/chapters/mgwpool.adoc
@@ -8,7 +8,7 @@
scale-out to multiple cores on a single host.
The load distribution is managed in such a way that when a new call is placed,
-the pool will automatically assign the call to the MGW with the lowest load.
+the pool will automatically assign the call to the available MGW with the lowest load.
MGW pooling is recommended for larger RAN or CN installations. For small networks
and lab installations the classic method with one MGW per {program-name} offers
@@ -72,11 +72,11 @@
OsmoBSC> show mgw-pool
% MGW-Pool:
% MGW 0:media-gw-0
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 1
% MGW 1:media-gw-1
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 0
----
@@ -96,6 +96,7 @@
OsmoBSC(config)# network
OsmoBSC(config-net)# mgw 2
OsmoBSC(config-mgw)# ?
+ keepalive Monitor if the MGCP link against MGW is still usable
local-ip local bind to connect to MGW from
local-port local port to connect to MGW from
remote-ip remote IP address to reach the MGW at
@@ -110,15 +111,15 @@
----
% MGW-Pool:
% MGW 0:media-gw-0
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 2
% MGW 1:media-gw-1
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 3
% MGW 2:mgw <1>
-% mgcp-client: disconnected
+% MGCP link: disconnected,DOWN
% service: unblocked
% ongoing calls: 0
----
@@ -146,33 +147,77 @@
OsmoBSC# show mgw-pool
% MGW-Pool:
% MGW 0:media-gw-0
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 2
% MGW 1:media-gw-1
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 3
% MGW 2:mgw
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 0
----
It should be noted that MGCP a protocol is used via UDP, the connect only
-happens locally to forward the UDP datagrams properly. Also (unless a reset
-endpoint is configured like in the example config above) there will be no
-immediate interaction with the MGW. However, the log should at least confirm
-the connect worked and the MGCP client has been created successfully.
+happens locally to forward the UDP datagrams properly (state printed in
+`mgcp-client: (dis)connected` above). Also (unless a reset endpoint is
+configured like in the example config above) there will be no immediate
+interaction with the MGW. However, the log should at least confirm the connect
+worked and the MGCP client has been created successfully.
----
Mon Aug 2 17:15:00 2021 DLMGCP mgcp_client.c:788 MGCP client: using endpoint domain '@mgw'
Mon Aug 2 17:15:00 2021 DLMGCP mgcp_client.c:908 MGCP GW connection: r=127.0.0.1:2427<->l=127.0.0.1:2727
----
-It is strongly advised to check the activity on the related MGW and to follow
-the log in order to see that the communication between {program-name} and the MGW is
-working correctly.
+For that reason, it is strongly advised to enable the `keepalive` feature in
+{program-name} to schedule periodical MGCP queries against the MGW, in order to
+make sure it is reachable (the state `MGCP link: UP|DOWN` printed above). See
+section <<mgw_pooling_keepalive>> below for more information.
+
+[[mgw_pooling_keepalive]]
+==== Monitor MGCP link (keepalive) / MGCP-Client
+
+The `keepalive` feature in {program-name} allows scheduling periodical queries
+on the MGCP layer in order to make sure it is reachable and hence obtain
+information on the state of the MGCP link. This is in turn used by the MGW Pool
+when picking an MGW from the pool: MGWs whose link is considered to be DOWN are
+skipped.
+
+The feature consists of:
+- A `keepalive request-interval` which will trigger a transmission of an MGCP
+AuditEndpoint command targeting endpoint with name `keepalive request-endpoint`.
+This interval is updated every time any message is transmitted in the MGCP link,
+meaning the MGCP AuditEndpoint message is only triggered if no message has been
+transmitted since `keepalive request-interval` seconds ago.
+- A `keepalive timeout` which upon triggering (because no message was received
+over that amount of time) will then consider the MGW to be non-reachable (link
+DOWN).
+
+The `keepalive` parameters are to be preferrably configured so that
+`"keepalive request-interval" * 2 < "keepalive timeout"`.
+
+Example VTY configuration of `keepalive` feature in {program-name}:
+----
+ mgw 0
+ ...
+ keepalive request-interval 20 <1>
+ keepalive request-endpoint null <2>
+ keepalive timeout 50 <3>
+----
+
+<1> Transmit an MGCP AuditEndpoint message to the MGW if no message has been
+sent to it over last 20 seconds
+<2> The MGCP AuditEndpoint targets the `null` endpoint. This is a special
+endpoint available at OsmoMGW for those purposes, but any available endpoint can
+be configured and used instead.
+<3> Consider the MGCP link to be DOWN if no message is received from the MGW
+over the last 50 seconds
+
+NOTE: The `keepalive` feature is disabled by default, and must be explicitly
+configured in order to enable it.
[[mgw_pooling_blocking]]
==== Blocking an MGW / MGCP-Client
@@ -188,15 +233,15 @@
OsmoBSC# show mgw-pool
% MGW-Pool:
% MGW 0:media-gw-0
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 11
% MGW 1:media-gw-1
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 12
% MGW 2:mgw
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: blocked
% ongoing calls: 10
----
@@ -208,15 +253,15 @@
OsmoBSC# show mgw-pool
% MGW-Pool:
% MGW 0:media-gw-0
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 15
% MGW 1:media-gw-1
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: unblocked
% ongoing calls: 14
% MGW 2:mgw
-% mgcp-client: connected
+% MGCP link: connected,UP
% service: blocked
% ongoing calls: 0
----
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/33310
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I2cb4e2098b71b386278eb6026271a6d786a34c2a
Gerrit-Change-Number: 33310
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/33313 )
Change subject: mgcp_client: pool: Only pick clients with an MGCP link considered to be UP
......................................................................
mgcp_client: pool: Only pick clients with an MGCP link considered to be UP
This way the user ends up picking a working MGW instance instead of one
which is not reachable around the time.
Related: SYS#6481
Change-Id: Ia3f451d3cd97851f65074408812b1ddc68f67056
---
M src/libosmo-mgcp-client/mgcp_client_pool.c
1 file changed, 18 insertions(+), 4 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/libosmo-mgcp-client/mgcp_client_pool.c b/src/libosmo-mgcp-client/mgcp_client_pool.c
index 4156664..61fb134 100644
--- a/src/libosmo-mgcp-client/mgcp_client_pool.c
+++ b/src/libosmo-mgcp-client/mgcp_client_pool.c
@@ -94,7 +94,7 @@
}
/* Not every pool member may have a functional MGCP client, we will run through the pool once until we meet a
- * pool member that is suitable (has a client, is not blocked, has a low load). */
+ * pool member that is suitable (is not blocked, has a client with a working link, has a low load). */
static struct mgcp_client_pool_member *mgcp_client_pool_pick(struct mgcp_client_pool *pool)
{
struct mgcp_client_pool_member *pool_member;
@@ -103,14 +103,15 @@
llist_for_each_entry(pool_member, &pool->member_list, list) {
n_pool_members++;
- if (pool_member->blocked == false && pool_member->client) {
+ bool conn_up = pool_member->client && pool_member->client->conn_up;
+ if (pool_member->blocked == false && conn_up) {
if (!pool_member_picked)
pool_member_picked = pool_member;
else if (pool_member_picked->refcount > pool_member->refcount)
pool_member_picked = pool_member;
} else {
- LOGPPMGW(pool_member, LOGL_DEBUG, "%s -- MGW %u is unusable (blocked=%u, cli=%u)\n",
- __func__, pool_member->nr, pool_member->blocked, !!pool_member->client);
+ LOGPPMGW(pool_member, LOGL_DEBUG, "%s -- MGW %u is unusable (blocked=%u, cli=%u, link=%u)\n",
+ __func__, pool_member->nr, pool_member->blocked, !!pool_member->client, conn_up);
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33313
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia3f451d3cd97851f65074408812b1ddc68f67056
Gerrit-Change-Number: 33313
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: osmith, dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/33308 )
Change subject: mgcp-client: Add keepalive feature
......................................................................
Patch Set 6:
(1 comment)
Patchset:
PS6:
> Interesting that you chose MAYBE as wording instead of UNKNOWN. […]
unknown sounded more like something unexpected to me, while "maybe" fits better here when displaying (less failure-ish).
If others really think UNKNOWN fits better I can change it, but otherwise I prefer "maybe".
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33308
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I3dc74c78548d017f272da863d5282dc5e0020ca3
Gerrit-Change-Number: 33308
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 21 Jun 2023 10:13:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin, dexter.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/33308 )
Change subject: mgcp-client: Add keepalive feature
......................................................................
Patch Set 6: Code-Review+1
(1 comment)
Patchset:
PS6:
Interesting that you chose MAYBE as wording instead of UNKNOWN. I think the latter is more common in programs that show status of things. But not that important, LGTM!
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33308
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I3dc74c78548d017f272da863d5282dc5e0020ca3
Gerrit-Change-Number: 33308
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 21 Jun 2023 10:09:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment