Skip to content
/ server Public

Commit 586f197

Browse files
ottokgkodinov
authored andcommitted
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.
1 parent 0ac1c08 commit 586f197

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

storage/spider/spd_table.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6288,8 +6288,12 @@ int spider_db_init(
62886288

62896289
if (my_gethwaddr((uchar *) addr))
62906290
{
6291-
my_printf_error(ER_SPIDER_CANT_NUM, ER_SPIDER_CANT_STR1, MYF(ME_WARNING),
6291+
my_printf_error(ER_SPIDER_CANT_NUM, ER_SPIDER_CANT_STR1, MYF(ME_NOTE),
62926292
"get hardware address with error ", errno);
6293+
/*
6294+
If we can't get the hardware address, we zero it out.
6295+
The spider_unique_id will then look like: -000000000000-PID-
6296+
*/
62936297
bzero(addr,6);
62946298
}
62956299
spider_unique_id.str = spider_unique_id_buf;

0 commit comments

Comments
 (0)