osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/39893?usp=email )
Change subject: db: flush after changing schema version
......................................................................
db: flush after changing schema version
Flush the cache after changing the version, to make the scenario less
likely that after an unclean shutdown the DB gets restored with the
right table layout but wrong version.
When that happens, osmo-hlr tries to upgrade the database layout again
and fails with errors like "duplicate column name".
Related: SYS#7394
Change-Id: I5943a1cb3447c038c6e7972f68f9656b73a9248b
(cherry picked from commit 1a71e73fdc40ba712ab61a299c9d4a048df539a2)
---
M src/db.c
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/93/39893/1
diff --git a/src/db.c b/src/db.c
index 7b8a415..4ce5aa0 100644
--- a/src/db.c
+++ b/src/db.c
@@ -595,6 +595,7 @@
int rc;
bool has_sqlite_config_sqllog = false;
int version;
+ bool version_changed = false;
LOGP(DDB, LOGL_NOTICE, "using database: %s\n", fname);
LOGP(DDB, LOGL_INFO, "Compiled against SQLite3 lib version %s\n", SQLITE_VERSION);
@@ -672,6 +673,7 @@
goto out_free;
}
version = CURRENT_SCHEMA_VERSION;
+ version_changed = true;
}
LOGP(DDB, LOGL_NOTICE, "Database '%s' has HLR DB schema version %d\n", dbc->fname, version);
@@ -686,6 +688,7 @@
}
LOGP(DDB, LOGL_NOTICE, "Database '%s' has been upgraded to HLR DB schema version %d\n",
dbc->fname, version+1);
+ version_changed = true;
}
if (version != CURRENT_SCHEMA_VERSION) {
@@ -702,6 +705,12 @@
goto out_free;
}
+ /* Flush the cache after changing the version, to make the scenario
+ * less likely that after an unclean shutdown the DB gets restored
+ * with the right table layout but wrong version (SYS#7394). */
+ if (version_changed)
+ sqlite3_db_cacheflush(dbc->db);
+
/* prepare all SQL statements */
for (i = 0; i < ARRAY_SIZE(dbc->stmt); i++) {
rc = sqlite3_prepare_v2(dbc->db, stmt_sql[i], -1,
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/39893?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-hlr
Gerrit-Branch: osmith/1.9.1
Gerrit-Change-Id: I5943a1cb3447c038c6e7972f68f9656b73a9248b
Gerrit-Change-Number: 39893
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Attention is currently required from: dexter, fixeria.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39863?usp=email )
Change subject: saip-tool: add commandline option to edit mandatory services list
......................................................................
Patch Set 3:
(1 comment)
File contrib/saip-tool.py:
https://gerrit.osmocom.org/c/pysim/+/39863/comment/2c73979f_400e49a4?usp=em… :
PS3, Line 106: action
there is a way (I forgot how exactly, maybet he "choices" argument?) to tell the parser which strings are permitted here. Please try to figure out how to get that from the asn1 parser. This way we can
* catch invalid/unsupported input already within argparse
* the user sees which services they can add/remove in --help
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39863?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I120b98d4b0942c26674bc1365c5711101ec95235
Gerrit-Change-Number: 39863
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 02 Apr 2025 07:39:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: dexter, fixeria.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39863?usp=email )
Change subject: saip-tool: add commandline option to edit mandatory services list
......................................................................
Patch Set 3:
(1 comment)
File contrib/saip-tool.py:
https://gerrit.osmocom.org/c/pysim/+/39863/comment/1aeeab4f_0675acba?usp=em… :
PS3, Line 104: set
"set" sounds like it is setting (overwriting) the list. Add/remove however are incremental operations, so I think it's a bit of a misnomer.
I'd suggest to rename to edit-mandatory-service-list, edit-mand-service-list or something like that, or "modify" instead of "edit". or if you think it's too long, {edit,modify}-mand-srv-list?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39863?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I120b98d4b0942c26674bc1365c5711101ec95235
Gerrit-Change-Number: 39863
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 02 Apr 2025 07:37:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39883?usp=email )
Change subject: saip-tool: add ProfileElement class for application PE
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39883?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iaa43036d388fbf1714c53cab1fc21092c4667a21
Gerrit-Change-Number: 39883
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 02 Apr 2025 07:33:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/39892?usp=email )
Change subject: contrib/e1-prbs-test: Note osmo-e1d capability in README
......................................................................
contrib/e1-prbs-test: Note osmo-e1d capability in README
Change-Id: I76b72359267014c7df431699698c5c4e2c0cd53d
---
M contrib/e1-prbs-test/README
1 file changed, 8 insertions(+), 4 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
tnt: Looks good to me, but someone else must approve
diff --git a/contrib/e1-prbs-test/README b/contrib/e1-prbs-test/README
index 903cc39..891fe7f 100644
--- a/contrib/e1-prbs-test/README
+++ b/contrib/e1-prbs-test/README
@@ -1,5 +1,5 @@
-e1-prbs-test - Utility to test for bit errors on E1 lines using DAHDI
-======================================================================
+e1-prbs-test - Utility to test for bit errors on E1 lines
+=========================================================
e1-prbs-test can be used to test for bit errors in E1 transmission
lines. It consists of a sender and a receiver, which should be used
@@ -8,8 +8,9 @@
Transmitter and receiver can be on the same machine, or on different
machines.
-The code currently works directly on DAHDI, so only DAHDI-supported E1
-cards are supported at this point.
+The code currently works directly on DAHDI or via osmo-e1d, so both
+DAHDI-supported E1 interfaces as well as osmo-e1d supported ones
+are supported at this point.
The test works by sending timeslot-specific PRBS sequences of 512 bit
(64byte) length on the transmit side, and by correlating to those PRBS
@@ -25,6 +26,9 @@
The test will run indefinitely.
+For using osmo-e1d, use "e1d:0:0" and "e1d:0:1" for interface 0 line 0 + 1
+instead of the /dev/dahdi/chan/xxx notation.
+
If you'd like to get an interim report, send a SIGHUP to
e1-prbs-test.
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/39892?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I76b72359267014c7df431699698c5c4e2c0cd53d
Gerrit-Change-Number: 39892
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>