From e35780649dfbdcea70411e27f5c4fbc97e6f1ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Fri, 12 Dec 2025 08:53:33 +0000 Subject: [PATCH] MDEV-37098 Fix Spider test failures in network-less environments When running tests in environments without a network interface (e.g. Podman container launched with `--network=none`), Spider was not able to retrieve a hardware address to generate a node ID. This triggered a warning in the server log, causing MTR to fail multiple Spider tests due to unexpected warnings and output result mismatches with: [Warning] mariadbd: Can't get hardware address with error 2 Fix this by logging Spider hardware address errors to server log only by setting it as a NOTE. This does not pollute the client output. When`my_gethwaddr` fails, the code zeroes out the address buffer, resulting in a `spider_unique_id` formatted like `-000000000000-PID-`, which is fully valid and emitting warnings was a bit overkill to begin with. --- storage/spider/spd_table.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index b88579009270f..72a6b2ac3b8f5 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -6288,8 +6288,12 @@ int spider_db_init( if (my_gethwaddr((uchar *) addr)) { - my_printf_error(ER_SPIDER_CANT_NUM, ER_SPIDER_CANT_STR1, MYF(ME_WARNING), + my_printf_error(ER_SPIDER_CANT_NUM, ER_SPIDER_CANT_STR1, MYF(ME_NOTE), "get hardware address with error ", errno); + /* + If we can't get the hardware address, we zero it out. + The spider_unique_id will then look like: -000000000000-PID- + */ bzero(addr,6); } spider_unique_id.str = spider_unique_id_buf;