Attention is currently required from: osmith.
pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ci/+/40138?usp=email )
Change subject: ansible: build-hosts: add testenv-coredump-helper
......................................................................
Patch Set 1:
(2 comments)
File ansible/roles/testenv-coredump-helper/files/testenv-coredump-helper.py:
https://gerrit.osmocom.org/c/osmo-ci/+/40138/comment/32eaa762_a7281cee?usp=… :
PS1, Line 4: # OS#6769: simple webserver to make Osmocom related coredumps available in LXCs
I'm really lacking a big chunk of descriptions here regarding what this script does, where it is spected to run (host? lxc?) as most important, *how* it does it.
I see some webs erver being involved for instance, but no mention anywhere on how that's supposed to be working or what are they exactly speaking.
https://gerrit.osmocom.org/c/osmo-ci/+/40138/comment/74bc58ba_f78ef890?usp=… :
PS1, Line 66: # Put coredump into a temporary file and return it
this may be problematic if it ends up in tmpfs, a coredump can be veery large.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/40138?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I7e66c98106b7028a393e3b873e96ae2dcb412c48
Gerrit-Change-Number: 40138
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 24 Apr 2025 12:25:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: fixeria, pespin.
Hello Jenkins Builder, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40140?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: testenv: support fetching coredumps in jenkins
......................................................................
testenv: support fetching coredumps in jenkins
The Osmocom jenkins nodes run inside LXCs. When we get a coredump it
appears on the host, fetch it from there via testenv-coredump-helper,
which gets added to the hosts in the related patch.
Related: osmo-ci I7e66c98106b7028a393e3b873e96ae2dcb412c48
Related: OS#6769
Change-Id: I3784b4cbcef08b26f77b6f6f7a70a830d9c81a18
---
M _testenv/README.md
M _testenv/testenv/coredump.py
2 files changed, 61 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/40140/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40140?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3784b4cbcef08b26f77b6f6f7a70a830d9c81a18
Gerrit-Change-Number: 40140
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40140?usp=email )
Change subject: testenv: support fetching coredumps in jenkins
......................................................................
testenv: support fetching coredumps in jenkins
The Osmocom jenkins nodes run inside LXCs. When we get a coredump it
appears on the host, fetch it from there via testenv-coredump-helper,
which gets added to the hosts in the related patch.
Related: osmo-ci I7e66c98106b7028a393e3b873e96ae2dcb412c48
Related: OS#6769
Change-Id: I3784b4cbcef08b26f77b6f6f7a70a830d9c81a18
---
M _testenv/README.md
M _testenv/testenv/coredump.py
2 files changed, 60 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/40140/1
diff --git a/_testenv/README.md b/_testenv/README.md
index 11cd8bd..66158c4 100644
--- a/_testenv/README.md
+++ b/_testenv/README.md
@@ -215,6 +215,15 @@
available but doesn't work in podman. QEMU runs a bit slower when this is
set.
+* `TESTENV_COREDUMP_FROM_LXC_HOST`:
+ Instead of using coredumpctl to retrieve the coredump, assume testenv is
+ running inside an LXC and try to retrieve the coredump from the LXC host
+ (OS#6769). This is used in jenkins.
+
+* `TESTENV_COREDUMP_FROM_LXC_HOST_IP`:
+ Instead of attempting to automatically detect the LXC host IP, use this IP.
+ This can be set to 127.0.0.1 for testing.
+
## Troubleshooting
### Timeout waiting for RESET-ACK after sending RESET
diff --git a/_testenv/testenv/coredump.py b/_testenv/testenv/coredump.py
index 0d56328..4c0d9d2 100644
--- a/_testenv/testenv/coredump.py
+++ b/_testenv/testenv/coredump.py
@@ -11,9 +11,52 @@
import testenv
import testenv.daemons
import testenv.testdir
+import urllib
+import urllib.request
executable_path = None
+lxc_netdev = "eth0"
+lxc_ip_pattern = "10.0.*"
+lxc_port = 8042
+
+
+def find_lxc_host_ip():
+ cmd = ["ip", "-j", "-o", "-4", "addr", "show", "dev", lxc_netdev]
+ p = testenv.cmd.run(cmd, check=False, no_podman=True, capture_output=True, text=True)
+ ret = json.loads(p.stdout)[0]["addr_info"][0]["local"]
+ if fnmatch.fnmatch(ret, lxc_ip_pattern):
+ ret = ret.split(".")
+ ret = f"{ret[0]}.{ret[1]}.{ret[2]}.1"
+ return ret
+ return None
+
+
+def get_from_coredumpctl_lxc_host():
+ global executable_path
+
+ logging.info("Looking for a coredump on lxc host")
+
+ ip = os.environ.get("TESTENV_COREDUMP_FROM_LXC_HOST_IP") or find_lxc_host_ip()
+ if not ip:
+ logging.warning("Failed to get lxc host ip, can't look for coredump")
+ return
+
+ try:
+ with urllib.request.urlopen(f"http://{ip}:{lxc_port}/core") as response:
+ executable_path = dict(response.getheaders())["X-Executable-Path"]
+ with open(f"{testenv.testdir.testdir}/core", "wb") as h:
+ shutil.copyfileobj(response, h)
+ logging.debug("Coredump found and copied to log dir")
+ except urllib.error.HTTPError as e:
+ executable_path = None
+ if e.code == 404:
+ logging.debug("No coredump found")
+ else:
+ logging.error(f"Unexpected error while attempting to fetch the coredump: {e}")
+ except urllib.error.URLError as e:
+ logging.error(f"Unexpected error while attempting to fetch the coredump: {e}")
+
def executable_is_relevant(exe):
if testenv.args.binary_repo:
@@ -32,7 +75,7 @@
return False
-def get_from_coredumpctl():
+def get_from_coredumpctl_local():
global executable_path
logging.info("Looking for a coredump")
@@ -68,6 +111,13 @@
executable_path = coredump["exe"]
+def get_from_coredumpctl():
+ if os.environ.get("TESTENV_COREDUMP_FROM_LXC_HOST"):
+ get_from_coredumpctl_lxc_host()
+ else:
+ get_from_coredumpctl_local()
+
+
def get_backtrace():
global executable_path
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40140?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3784b4cbcef08b26f77b6f6f7a70a830d9c81a18
Gerrit-Change-Number: 40140
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Attention is currently required from: fixeria.
osmith has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40129?usp=email )
Change subject: start-testsuite: remove workaround for TITAN < 9.0.0
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
File start-testsuite.sh:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40129/comment/cb15f92b_4b98… :
PS1, Line 48:
> This is a good idea, but I am not sure if we should be checking the version here at run-time. […]
Good points!
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40129?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I57eecd6e0ea9e488a2110b029ddc313bd05cd1fa
Gerrit-Change-Number: 40129
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 24 Apr 2025 07:21:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>