lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

May 2022

  • 2 participants
  • 1343 discussions
Change in osmo-bsc[master]: smscb: fix meaningless condition in etws_primary_to_bts()
by laforge 13 May '22

13 May '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28088 ) Change subject: smscb: fix meaningless condition in etws_primary_to_bts() ...................................................................... smscb: fix meaningless condition in etws_primary_to_bts() Found by GCC 12.1.0: smscb.c: In function 'etws_primary_to_bts': smscb.c:537:13: warning: the comparison will always evaluate as 'true' for the address of 'warning_sec_info' will never be NULL [-Waddress] 537 | if (wrepl->u.emergency.warning_sec_info) { | ^~~~~ In file included from smscb.c:31: /usr/local/include/osmocom/gsm/cbsp.h:99:33: note: 'warning_sec_info' declared here 99 | uint8_t warning_sec_info[50]; | ^~~~~~~~~~~~~~~~ Indeed, address of &warning_sec_info[0] is always not NULL. Change-Id: Id369bb3676ba279bafc234378fbe21dbc7b0614b --- M src/osmo-bsc/smscb.c 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c index 4c7110f..3a06697 100644 --- a/src/osmo-bsc/smscb.c +++ b/src/osmo-bsc/smscb.c @@ -566,11 +566,9 @@ bes->input.msg_id = wrepl->msg_id; bes->input.serial_nr = wrepl->new_serial_nr; bes->input.warn_type = wrepl->u.emergency.warning_type; - if (wrepl->u.emergency.warning_sec_info) { - bes->input.sec_info = talloc_named_const(bts, ETWS_SEC_INFO_SIZE, "etws_sec_info"); - if (bes->input.sec_info) - memcpy(bes->input.sec_info, wrepl->u.emergency.warning_sec_info, ETWS_SEC_INFO_SIZE); - } + bes->input.sec_info = talloc_named_const(bts, ETWS_SEC_INFO_SIZE, "etws_sec_info"); + if (bes->input.sec_info) + memcpy(bes->input.sec_info, wrepl->u.emergency.warning_sec_info, ETWS_SEC_INFO_SIZE); /* generate the encoded ETWS PN */ gen_etws_primary_notification(bes->primary, bes->input.serial_nr, bes->input.msg_id, -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id369bb3676ba279bafc234378fbe21dbc7b0614b Gerrit-Change-Number: 28088 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: smscb: fix meaningless condition in etws_primary_to_bts()
by laforge 13 May '22

13 May '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28088 ) Change subject: smscb: fix meaningless condition in etws_primary_to_bts() ...................................................................... Patch Set 1: Code-Review+2 (1 comment) Patchset: PS1: > The real bug is likely that libosmocore doesn't provide us with a way to detect if the received/deco […] No, I was wrong. warning_sec_info is present for all emergency messages. so the check is indeed bogus. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id369bb3676ba279bafc234378fbe21dbc7b0614b Gerrit-Change-Number: 28088 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 13 May 2022 06:33:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: smscb: fix meaningless condition in etws_primary_to_bts()
by laforge 13 May '22

13 May '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28088 ) Change subject: smscb: fix meaningless condition in etws_primary_to_bts() ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: The real bug is likely that libosmocore doesn't provide us with a way to detect if the received/decoded CBSP message contained warning_sec_info or not. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id369bb3676ba279bafc234378fbe21dbc7b0614b Gerrit-Change-Number: 28088 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 13 May 2022 06:30:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: abis_nm: run gsm_bts_check_cfg during oml bring up
by laforge 13 May '22

13 May '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28023 ) Change subject: abis_nm: run gsm_bts_check_cfg during oml bring up ...................................................................... abis_nm: run gsm_bts_check_cfg during oml bring up Don't wait until RSL link goes up to check the reported features against the config. Do it in the OML bring up right after the features are reported. Related: SYS#5922, OS#5538 Change-Id: I6b1b4ef3e163528ed186050d848ec089a4315a7c --- M src/osmo-bsc/abis_nm.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index cdb1fa6..a460f3e 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -719,6 +719,12 @@ else rc = parse_attr_resp_info_attr(bts, trx, foh, &tp); + if (gsm_bts_check_cfg(bts) != 0) { + LOGP(DLINP, LOGL_ERROR, "(bts=%u) BTS config invalid, dropping BTS!\n", bts->nr); + ipaccess_drop_oml_deferred(bts); + return -EINVAL; + } + osmo_signal_dispatch(SS_NM, S_NM_GET_ATTR_REP, mb); return rc; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28023 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6b1b4ef3e163528ed186050d848ec089a4315a7c Gerrit-Change-Number: 28023 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: abis_nm: run gsm_bts_check_cfg during oml bring up
by laforge 13 May '22

13 May '22
Attention is currently required from: osmith, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28023 ) Change subject: abis_nm: run gsm_bts_check_cfg during oml bring up ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28023 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6b1b4ef3e163528ed186050d848ec089a4315a7c Gerrit-Change-Number: 28023 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 13 May 2022 06:29:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: smscb: Send ETWS PN to BTS if ETWS active before BTS connects
by laforge 13 May '22

13 May '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27971 ) Change subject: smscb: Send ETWS PN to BTS if ETWS active before BTS connects ...................................................................... smscb: Send ETWS PN to BTS if ETWS active before BTS connects Especially during emergencies / natural disasters, it is particularly likely that networks become unreliable and BTSs disconnect and reconnect. If upon reconnect there still is an active ETWS/PWS emergency message active for this BTS, send it to the BTS to ensure it re-starts broadcasting that message until disabled. Change-Id: I175c33297c08e65bdbf38447e697e37f8a64d527 --- M include/osmocom/bsc/smscb.h M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc/smscb.c 3 files changed, 46 insertions(+), 25 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/bsc/smscb.h b/include/osmocom/bsc/smscb.h index 5b0905b..0e157c6 100644 --- a/include/osmocom/bsc/smscb.h +++ b/include/osmocom/bsc/smscb.h @@ -66,3 +66,4 @@ int cbsp_tx_decoded(struct bsc_cbc_link *cbc, struct osmo_cbsp_decoded *decoded); void bts_etws_init(struct gsm_bts *bts); +void bts_etws_bootstrap(struct gsm_bts *bts); diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 8d63183..c6f8b13 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -363,6 +363,10 @@ if (trx->nr == 0 && gsm_bts_get_cbch(trx->bts)) bts_cbch_timer_schedule(trx->bts); + /* Start ETWS/PWS Primary Notification, if active */ + if (trx->nr == 0) + bts_etws_bootstrap(trx->bts); + /* Drop all expired channel requests in the list */ abis_rsl_chan_rqd_queue_flush(trx->bts); } diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c index 8a6a705..4c7110f 100644 --- a/src/osmo-bsc/smscb.c +++ b/src/osmo-bsc/smscb.c @@ -494,13 +494,45 @@ etws_pn_stop(bts, true); } -static int etws_primary_to_bts(struct gsm_bts *bts, const struct osmo_cbsp_write_replace *wrepl) + +/* the actual "execution" part: Send ETWS to all active lchan in the BTS and via PCH */ +static void bts_send_etws(struct gsm_bts *bts) { struct bts_etws_state *bes = &bts->etws; struct gsm_bts_trx *trx; unsigned int count = 0; int i, j; + /* iterate over all lchan in each TS in each TRX of this BTS */ + llist_for_each_entry(trx, &bts->trx_list, list) { + for (i = 0; i < ARRAY_SIZE(trx->ts); i++) { + struct gsm_bts_trx_ts *ts = &trx->ts[i]; + for (j = 0; j < ARRAY_SIZE(ts->lchan); j++) { + struct gsm_lchan *lchan = &ts->lchan[j]; + if (!lchan_may_receive_data(lchan)) + continue; + gsm48_send_rr_app_info(lchan, 0x1, 0x0, bes->primary, + sizeof(bes->primary)); + count++; + } + } + } + + LOG_BTS(bts, DCBS, LOGL_NOTICE, "Sent ETWS Primary Notification via %u dedicated channels\n", + count); + + /* Notify BTS of primary ETWS notification via vendor-specific Abis message */ + if (osmo_bts_has_feature(&bts->features, BTS_FEAT_ETWS_PN)) { + rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, bes->primary, sizeof(bes->primary)); + LOG_BTS(bts, DCBS, LOGL_NOTICE, "Sent ETWS Primary Notification via common channel\n"); + } else + LOG_BTS(bts, DCBS, LOGL_ERROR, "BTS doesn't support RSL command for ETWS PN\n"); +} + +static int etws_primary_to_bts(struct gsm_bts *bts, const struct osmo_cbsp_write_replace *wrepl) +{ + struct bts_etws_state *bes = &bts->etws; + if (bes->active) { /* we were already broadcasting emergency before receiving this WRITE-REPLACE */ @@ -546,30 +578,7 @@ bes->active = true; - /* iterate over all lchan in each TS in each TRX of this BTS */ - llist_for_each_entry(trx, &bts->trx_list, list) { - for (i = 0; i < ARRAY_SIZE(trx->ts); i++) { - struct gsm_bts_trx_ts *ts = &trx->ts[i]; - for (j = 0; j < ARRAY_SIZE(ts->lchan); j++) { - struct gsm_lchan *lchan = &ts->lchan[j]; - if (!lchan_may_receive_data(lchan)) - continue; - gsm48_send_rr_app_info(lchan, 0x1, 0x0, bes->primary, - sizeof(bes->primary)); - count++; - } - } - } - - LOG_BTS(bts, DCBS, LOGL_NOTICE, "Sent ETWS Primary Notification via %u dedicated channels\n", - count); - - /* Notify BTS of primary ETWS notification via vendor-specific Abis message */ - if (osmo_bts_has_feature(&bts->features, BTS_FEAT_ETWS_PN)) { - rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, bes->primary, sizeof(bes->primary)); - LOG_BTS(bts, DCBS, LOGL_NOTICE, "Sent ETWS Primary Notification via common channel\n"); - } else - LOG_BTS(bts, DCBS, LOGL_ERROR, "BTS doesn't support RSL command for ETWS PN\n"); + bts_send_etws(bts); /* start the expiration timer, if any */ if (wrepl->u.emergency.warning_period != 0xffffffff) { @@ -1087,3 +1096,10 @@ bts->etws.active = false; osmo_timer_setup(&bts->etws.timer, etws_pn_cb, bts); } + +/* BSC is bootstrapping a BTS; install any currently active ETWS PN */ +void bts_etws_bootstrap(struct gsm_bts *bts) +{ + if (bts->etws.active) + bts_send_etws(bts); +} -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I175c33297c08e65bdbf38447e697e37f8a64d527 Gerrit-Change-Number: 27971 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: smscb: Send ETWS PN to BTS if ETWS active before BTS connects
by laforge 13 May '22

13 May '22
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27971 ) Change subject: smscb: Send ETWS PN to BTS if ETWS active before BTS connects ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I175c33297c08e65bdbf38447e697e37f8a64d527 Gerrit-Change-Number: 27971 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Fri, 13 May 2022 06:26:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-abis[master]: input/ipaccess: Avoid extra poll() call when e1i_ts tx queue becomes ...
by laforge 13 May '22

13 May '22
Attention is currently required from: pespin, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/28071 ) Change subject: input/ipaccess: Avoid extra poll() call when e1i_ts tx queue becomes empty ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/28071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I0e5da5d1342f352d0e2bca9ee39c768bccb2c8d5 Gerrit-Change-Number: 28071 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 13 May 2022 06:25:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ci[master]: New osmocom-obs-worker role for our OBS workers
by laforge 13 May '22

13 May '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/28087 ) Change subject: New osmocom-obs-worker role for our OBS workers ...................................................................... New osmocom-obs-worker role for our OBS workers Related: OS#5556 Change-Id: I7a6d82e89e3a840739f71b90cdebe89bf8383c4a --- M ansible/hosts A ansible/roles/osmocom-obs-worker/files/obs-ca.crt A ansible/roles/osmocom-obs-worker/files/obs.conf A ansible/roles/osmocom-obs-worker/tasks/main.yml A ansible/roles/osmocom-obs-worker/tasks/obs.yml A ansible/roles/osmocom-obs-worker/tasks/openvpn.yml A ansible/roles/osmocom-obs-worker/templates/obs-server A ansible/setup-obs-worker.yml A ansible/vars/Suse-15.yml 9 files changed, 585 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ansible/hosts b/ansible/hosts index ef0d055..f9ed7a2 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -20,3 +20,7 @@ [simtester] simtest ansible_host=10.9.25.80 + +[obs-workers] +build3-obsworker1 ansible_host=2a01:4f8:212:3762::1:2 obs_worker_instances=8 obs_worker_jobs=8 +epyc1-obsworker1 ansible_host=2a02:8106:13:1e34:581e:abff:fe43:da45 obs_worker_instances=2 obs_worker_jobs=4 obs_vm_type=emulator:armv7l diff --git a/ansible/roles/osmocom-obs-worker/files/obs-ca.crt b/ansible/roles/osmocom-obs-worker/files/obs-ca.crt new file mode 100644 index 0000000..271d168 --- /dev/null +++ b/ansible/roles/osmocom-obs-worker/files/obs-ca.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDSzCCAjOgAwIBAgIUcLDeyxhcMpcccZ1i7AIKqvwTJ2gwDQYJKoZIhvcNAQEL +BQAwFjEUMBIGA1UEAwwLRWFzeS1SU0EgQ0EwHhcNMjIwNTEwMDkzMjQwWhcNNDIw +NTA1MDkzMjQwWjAWMRQwEgYDVQQDDAtFYXN5LVJTQSBDQTCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBALUsvHoy4oqpOHuzyoIG3qyoTGQW8Zpse7RaYAWJ +CLgcAGelXWrOhPy40xAWHpLzAnAIxYR4ZSlD2Ebaj08esz4VQs2CKQ0mJEVZA7oq +84YO3WK02HzoYFLee4ySvI967FCn6BwVZQVdz/A8wOIlAbe7Hmucx6dNLTLTR+Pw +YwHMSdnj+OlC2oX2UO+ZIR7jFbSYp7jGF9V8zk74NoAFAuv5rs1UeP01ZF9xgXll +KHUajaUKMKs+6KTo4d2l9ha45LHcoAuDUURzf4GMvO7zVVGw4mFwy/YsPoLV5+vX +YT4GqkBgk9iZXirgTk6xCkiP0NUw5UNhtarUDKvR/U8wLw8CAwEAAaOBkDCBjTAd +BgNVHQ4EFgQUHdDZVpUSwtRrSKp+PuMRK12TlQYwUQYDVR0jBEowSIAUHdDZVpUS +wtRrSKp+PuMRK12TlQahGqQYMBYxFDASBgNVBAMMC0Vhc3ktUlNBIENBghRwsN7L +GFwylxxxnWLsAgqq/BMnaDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjANBgkq +hkiG9w0BAQsFAAOCAQEAPGqIfE172P1NaQGRIHdsRJRot9NnJzZih3q9m+T/YIE8 +8T3uoxhEsMPLzP19w8wAbRy+CjpLwTuYO44kOIVLYhFdx3BTVRhw+YU2RH4PSttE +JDVyYTFPGzjxwprpfui1aGom8u0oPL5MeutMWrPH6qVlIv7JGR3EbDG0iYwE5MZJ +6kW8VW6o5fL02uT+75vNkHTipLUO6S4l6h9NrrgR0ijZ5dhyKC0FZnLnowtMCXXl +2rfHSnGKjMGcq8Jlrwo6eMVPbZM6rrU/tvrjJkqESZY0jMktd0fV903XJ6+X4U9U +stu/HUtKUQC8d3wua1PuI1uPvpr8AQDcf5LuA/STHg== +-----END CERTIFICATE----- diff --git a/ansible/roles/osmocom-obs-worker/files/obs.conf b/ansible/roles/osmocom-obs-worker/files/obs.conf new file mode 100644 index 0000000..7dc2a84 --- /dev/null +++ b/ansible/roles/osmocom-obs-worker/files/obs.conf @@ -0,0 +1,15 @@ +client +remote 2a01:4f8:201:344a::1:4 1194 +ca "/etc/openvpn/obs-ca.crt" +cert "/etc/openvpn/obs.crt" +key "/etc/openvpn/obs.key" +comp-lzo yes +cipher AES-256-CBC +dev tun +proto udp6 +nobind +auth-nocache +script-security 2 +persist-key +persist-tun +remote-cert-tls server diff --git a/ansible/roles/osmocom-obs-worker/tasks/main.yml b/ansible/roles/osmocom-obs-worker/tasks/main.yml new file mode 100644 index 0000000..b350163 --- /dev/null +++ b/ansible/roles/osmocom-obs-worker/tasks/main.yml @@ -0,0 +1,8 @@ +--- + +- name: install OBS + include_tasks: obs.yml + +- name: install openvpn + include_tasks: openvpn.yml + diff --git a/ansible/roles/osmocom-obs-worker/tasks/obs.yml b/ansible/roles/osmocom-obs-worker/tasks/obs.yml new file mode 100644 index 0000000..08367ac --- /dev/null +++ b/ansible/roles/osmocom-obs-worker/tasks/obs.yml @@ -0,0 +1,52 @@ +- name: add OBS rpm repository + zypper_repository: + repo: https://download.opensuse.org/repositories/OBS:/Server:/2.10/15.3/OBS:Serve… + autorefresh: yes + auto_import_keys: yes + +- name: install obs-worker + zypper: + name: + - obs-worker + +- name: Make sure an entry in /etc/hosts exists + lineinfile: + path: /etc/hosts + regexp: "^172.16.31.1" + line: "172.16.31.1 obs-backend.osmocom.org obs obs.osmocom.org" + state: present + +- name: Create /srv/obs/cache + file: + path: /srv/obs/cache + owner: obsrun + group: obsrun + recurse: yes + +- name: generate obs-server config file + template: + src: obs-server + dest: /etc/sysconfig/obs-server + +- name: install lxc + when: obs_vm_type == "lxc" + zypper: + name: + - lxc + +- name: install qemu + when: obs_vm_type != "lxc" + zypper: + name: + - qemu-arm + +- name: install qemu-arm + when: obs_vm_type == "emulator:armv7l" or obs_vm_type == "emulator:aarch64" + zypper: + name: + - qemu-arm + +- name: ensure the systemd service is installed + systemd: + name: obsworker.service + enabled: yes diff --git a/ansible/roles/osmocom-obs-worker/tasks/openvpn.yml b/ansible/roles/osmocom-obs-worker/tasks/openvpn.yml new file mode 100644 index 0000000..da53fa5 --- /dev/null +++ b/ansible/roles/osmocom-obs-worker/tasks/openvpn.yml @@ -0,0 +1,21 @@ +- name: Install openvpn + zypper: + name: + - openvpn + +- name: copy openvpn config + copy: + src: obs.conf + dest: /etc/openvpn/ + mode: 0600 + +- name: copy openvpn CA certificate + copy: + src: obs-ca.crt + dest: /etc/openvpn/ + mode: 0600 + +- name: ensure the systemd service is installed + systemd: + name: openvpn(a)obs.service + enabled: yes diff --git a/ansible/roles/osmocom-obs-worker/templates/obs-server b/ansible/roles/osmocom-obs-worker/templates/obs-server new file mode 100644 index 0000000..f042cd1 --- /dev/null +++ b/ansible/roles/osmocom-obs-worker/templates/obs-server @@ -0,0 +1,442 @@ +# +# NOTE: all these options can be also declared in /etc/buildhost.config on each worker differently. +# + +## Path: Applications/OBS +## Description: The OBS backend code directory +## Type: string +## Default: "" +## Config: OBS +# +# An empty dir will lead to the fall back directory, typically /usr/lib/obs/server/ +# +OBS_BACKENDCODE_DIR="" + +## Path: Applications/OBS +## Description: The base for OBS communication directory +## Type: string +## Default: "" +## Config: OBS +# +# An empty dir will lead to the fall back directory, typically /srv/obs/run +# +OBS_RUN_DIR="" + +## Path: Applications/OBS +## Description: The base for OBS logging directory +## Type: string +## Default: "" +## Config: OBS +# +# An empty dir will lead to the fall back directory, typically /srv/obs/log +# +OBS_LOG_DIR="" + +## Path: Applications/OBS +## Description: The base directory for OBS +## Type: string +## Default: "" +## Config: OBS +# +# An empty dir will lead to the fall back directory, typically /srv/obs +# +OBS_BASE_DIR="" + +## Path: Applications/OBS +## Description: Automatically setup api and webui for OBS server, be warned, this will replace config files ! +## Type: ("yes" | "no") +## Default: "no" +## Config: OBS +# +# This is usally only enabled on the OBS Appliance +# +OBS_API_AUTOSETUP="no" +# +# NOTE: all these options can be also declared in /etc/buildhost.config on each worker differently. +# + +## Path: Applications/OBS +## Description: define source server host to be used +## Type: string +## Default: "" +## Config: OBS +# +# An empty setting will point to localhost:5352 by default +# +OBS_SRC_SERVER="obs-backend.osmocom.org:5352" + +## Path: Applications/OBS +## Description: define repository server host to be used +## Type: string +## Default: "" +## Config: OBS +# +# An empty setting will point to localhost:5252 by default +# +OBS_REPO_SERVERS="obs-backend.osmocom.org:5252" + +## Path: Applications/OBS +## Description: define number of build instances +## Type: integer +## Default: 0 +## Config: OBS +# +# 0 instances will automatically use the number of CPU's +# +OBS_WORKER_INSTANCES="{{obs_worker_instances}}" + +## Path: Applications/OBS +## Description: define names of build instances for z/VM +## Type: string +## Default: "" +## Config: OBS +# +# The names of the workers as defined in z/VM. These must have two minidisks +# assigned, and have a secondary console configured to the local machine: +# 0150 is the root device +# 0250 is the swap device +# +#OBS_WORKER_INSTANCE_NAMES="LINUX075 LINUX076 LINUX077" +OBS_WORKER_INSTANCE_NAMES="" + +## Path: Applications/OBS +## Description: The base directory, where sub directories for each worker will get created +## Type: string +## Default: "" +## Config: OBS +# +# +OBS_WORKER_DIRECTORY="" + +## Path: Applications/OBS +## Description: The base for port numbers used by worker instances +## Type: integer +## Default: "0" +## Config: OBS +# +# 0 means let the operating system assign a port number +# +OBS_WORKER_PORTBASE="0" + +## Path: Applications/OBS +## Description: Number of parallel compile jobs per worker +## Type: integer +## Default: "1" +## Config: OBS +# +# this maps usually to "make -j1" during build +# +OBS_WORKER_JOBS="{{obs_worker_jobs}}" + +## Path: Applications/OBS +## Description: Run in test mode (build results will be ignore, no job blocking) +## Type: ("yes" | "") +## Default: "" +## Config: OBS +# +OBS_WORKER_TEST_MODE="" + +## Path: Applications/OBS +## Description: define one or more labels for the build host. +## Type: string +## Default: "" +## Config: OBS +# +# A label can be used to build specific packages only on dedicated hosts. +# For example for benchmarking. +# +OBS_WORKER_HOSTLABELS="" + +## Path: Applications/OBS +## Description: can be used to define a security level of the worker +## Type: string +## Default: "" +## Config: OBS +# +# This will extend the hostlabels and can be used to limit the workers +# to the hosts which have all security fixes deployed. +# +OBS_WORKER_SECURITY_LEVEL="" + +## Path: Applications/OBS +## Description: Register in SLP server +## Type: ("yes" | "no") +## Default: "yes" +## Config: OBS +# +# +OBS_USE_SLP="yes" + +## Path: Applications/OBS +## Description: Use a common cache directory for downloaded packages +## Type: string +## Default: "" +## Config: OBS +# +# Enable caching requires a given directory here. Be warned, content will be +# removed there ! +# +OBS_CACHE_DIR="/srv/obs/cache" + +## Path: Applications/OBS +## Description: Defines the package cache size +## Type: size in MB +## Default: "" +## Config: OBS +# +# Set the size to 50% of the maximum usable size of this partition +# +OBS_CACHE_SIZE="100000" + +## Path: Applications/OBS +## Description: Defines the nice level of running workers +## Type: integer +## Default: 18 +## Config: OBS +# +# Nicenesses range from -20 (most favorable scheduling) to 19 (least +# favorable). +# Default to 18 as some testsuites depend on being able to switch to +# one priority below (19) _and_ having changed the numeric level +# (so going from 19->19 makes them fail). +# +OBS_WORKER_NICE_LEVEL=18 + +## Path: Applications/OBS +## Description: Set used VM type by worker +## Type: ("auto" | "xen" | "kvm" | "lxc" | "zvm" | "emulator:$arch" | "emulator:$arch:$script" | "none" | "openstack") +## Default: "auto" +## Config: OBS +# +# +OBS_VM_TYPE="{{obs_vm_type}}" + +## Path: Applications/OBS +## Description: Set kernel used by worker (kvm) +## Type: ("none" | "/boot/vmlinuz" | "/foo/bar/vmlinuz) +## Default: "none" +## Config: OBS +# +# For z/VM this is normally /boot/image +# +OBS_VM_KERNEL="none" + +## Path: Applications/OBS +## Description: Set initrd used by worker (kvm) +## Type: ("none" | "/boot/initrd" | "/foo/bar/initrd-foo) +## Default: "none" +## Config: OBS +# +# for KVM, you have to create with (example for openSUSE 11.2): +# +# export rootfstype="ext4" +# mkinitrd -d /dev/null -m "ext4 binfmt_misc virtio_pci virtio_blk" -k vmlinuz-2.6.31.12-0.2-default -i initrd-2.6.31.12-0.2-default-obs_worker +# +# a working initrd file which includes virtio and binfmt_misc for OBS in order to work fine +# +# for z/VM, the build script will create a initrd at the given location if +# it does not yet exist. +# +OBS_VM_INITRD="none" + +## Path: Applications/OBS +## Description: Autosetup for XEN/KVM/TMPFS disk (root) - Filesize in MB +## Type: integer +## Default: "4096" +## Config: OBS +# +# +OBS_VM_DISK_AUTOSETUP_ROOT_FILESIZE="4096" + +## Path: Applications/OBS +## Description: Autosetup for XEN/KVM disk (swap) - Filesize in MB +## Type: integer +## Default: "1024" +## Config: OBS +# +# +OBS_VM_DISK_AUTOSETUP_SWAP_FILESIZE="1024" + +## Path: Applications/OBS +## Description: Default filesystem to use for autosetup. +## Type: ("ext2" | "ext3" | "ext4" | "reiserfs" | "btrfs" | "xfs") +## Default: "ext3" +## Config: OBS +# +# +# Buildflag vmfstype may overwrite this for a specific job. +OBS_VM_DISK_AUTOSETUP_FILESYSTEM="ext3" + +## Path: Applications/OBS +## Description: Filesystem mount options to use for autosetup +## Type: string +## Default: "" +## Config: OBS +# +# +OBS_VM_DISK_AUTOSETUP_MOUNT_OPTIONS="" + +## Path: Applications/OBS +## Description: Enable build in memory +## Type: ("yes" | "") +## Default: "" +## Config: OBS +# +# WARNING: this requires much memory! +# +OBS_VM_USE_TMPFS="yes" + +## Path: Applications/OBS +## Description: Specify custom options for VM handler +## Type: string +## Default: "" +## Config: OBS +# +# Can be used to workaround problems with VM handler and should not be needed usually +# +OBS_VM_CUSTOM_OPTION="" + +## Path: Applications/OBS +## Description: Memory allocated for each VM (512) if not set +## Type: integer +## Default: "" +## Config: OBS +# +# +OBS_INSTANCE_MEMORY="" + +## Path: Applications/OBS +## Description: Enable storage auto configuration +## Type: ("yes" | "") +## Default: "" +## Config: OBS +# +# WARNING: this may destroy data on your hard disk ! +# This is usually only used on mass deployed worker instances +# +OBS_STORAGE_AUTOSETUP="" + +## Path: Applications/OBS +## Description: Setup LVM via obsstoragesetup +## Type: ("take_all" | "use_obs_vg" | "none") +## Default: "use_obs_vg" +## Config: OBS +# +# take_all: WARNING: all LVM partitions will be used and all data erased ! +# use_obs_vg: A lvm volume group named "OBS" will be re-setup for the workers. +# +OBS_SETUP_WORKER_PARTITIONS="use_obs_vg" + +## Path: Applications/OBS +## Description: Size in MB when creating LVM partition for cache partition +## Type: integer +## Default: "" +## Config: OBS +# +# +OBS_WORKER_CACHE_SIZE="" + +## Path: Applications/OBS +## Description: Size in MB when creating LVM partition for each worker root partition +## Type: integer +## Default: "" +## Config: OBS +# +# +OBS_WORKER_ROOT_SIZE="" + +## Path: Applications/OBS +## Description: Size in MB when creating LVM partition for each worker swap partition +## Type: integer +## Default: "" +## Config: OBS +# +# +OBS_WORKER_SWAP_SIZE="" + +## Path: Applications/OBS +## Description: URL to a proxy service for caching binaries used by worker +## Type: string +## Default: "" +## Config: OBS +# +# +OBS_WORKER_BINARIES_PROXY="" + +## Path: Applications/OBS +## Description: URL to a ssh pub key to allow root user login +## Type: string +## Default: "" +## Config: OBS +# +# This is usually used on mass (PXE) deployed workers) +# +OBS_ROOT_SSHD_KEY_URL="" + +## Path: Applications/OBS +## Description: URL to a script to be downloaded and executed +## Type: string +## Default: "" +## Config: OBS +# +# This is a hook for doing special things in your setup at boot time +# +OBS_WORKER_SCRIPT_URL="" + +## Path: Applications/OBS +## Description: If chroot/lxc is used for build, empty it after build is finished +## Type: ("yes" | "") +## Default: "" +## Config: OBS +# +# +OBS_WORKER_CLEANUP_CHROOT="" + +##Path: Application/OBS +## Description: wipes the build environment of the worker after the build +## Type: ("yes" | "") +## Default: "" +## Config: OBS +# +# +OBS_WORKER_WIPE_AFTER_BUILD="" + +##Path: Application/OBS +## Description: name or id of openstack instance that controls the worker (building) instances +## Type: ("yes" | "") +## Default: "" +## Config: OBS +# +# +OBS_WORKER_CONTROL_INSTANCE="" + +##Path: Application/OBS +## Description: name or id flavor to create openstack worker (building) instance +## Type: ("yes" | "") +## Default: "" +## Config: OBS +# +# +OBS_WORKER_OS_FLAVOR="" + +##Path: Application/OBS +## Description: openstack environment variables. Only used when OBS_VM_TYPE=openstack +## Type: ("yes" | "") +## Default: "" +## Config: OBS +# +# +OS_AUTH_URL="" + +OS_PROJECT_ID="" +OS_PROJECT_NAME="" +OS_USER_DOMAIN_NAME="" +OS_USERNAME="" +OS_PASSWORD="" +OS_REGION_NAME="" + +OBS_WORKER_PREFIX="" + +OBS_OPENSTACK_DISK_SIZE="" +OBS_OPENSTACK_SWAP_SIZE="" +OBS_OPENSTACK_MEMORY_SIZE="" diff --git a/ansible/setup-obs-worker.yml b/ansible/setup-obs-worker.yml new file mode 100644 index 0000000..c742a19 --- /dev/null +++ b/ansible/setup-obs-worker.yml @@ -0,0 +1,21 @@ +--- +- name: setup OBS worker + hosts: obs-workers + user: root + vars_files: + - "vars/{{ ansible_facts['os_family'] }}-{{ ansible_facts['distribution_major_version']}}.yml" + tasks: + - name: install common utilities + zypper: + name: + - vim + - tmux + - screen + - tcpdump + - strace + - ltrace + + roles: + - name: osmocom-obs-worker + tags: + - obs-worker diff --git a/ansible/vars/Suse-15.yml b/ansible/vars/Suse-15.yml new file mode 100644 index 0000000..0cf00c2 --- /dev/null +++ b/ansible/vars/Suse-15.yml @@ -0,0 +1,2 @@ +--- +obs_distro: fixme -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/28087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I7a6d82e89e3a840739f71b90cdebe89bf8383c4a Gerrit-Change-Number: 28087 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: New osmocom-obs-worker role for our OBS workers
by laforge 13 May '22

13 May '22
laforge has removed a vote from this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/28087 ) Change subject: New osmocom-obs-worker role for our OBS workers ...................................................................... Removed Verified-1 by Jenkins Builder (1000002) -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/28087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I7a6d82e89e3a840739f71b90cdebe89bf8383c4a Gerrit-Change-Number: 28087 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: deleteVote
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • ...
  • 135
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.