[MDEV-30002] Gitlab-CI: mysql-test-run fails on main.bad_startup_options Created: 2022-11-11  Updated: 2022-11-29  Resolved: 2022-11-29

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.6.11
Fix Version/s: 10.3.39

Type: Bug Priority: Minor
Reporter: Otto Kekäläinen Assignee: Andrew Hutchings
Resolution: Fixed Votes: 0
Labels: beginner-friendly


 Description   

After syncing latest 10.6 branch head to https://salsa.debian.org/otto/mariadb-server/-/commits/10.6 I noticed that the .gitlab-ci.yml based CI job mysq-test-run failed on:

main.bad_startup_options                 w2 [ fail ]
        Test ended at 2022-11-11 20:50:46
CURRENT_TEST: main.bad_startup_options
2022-11-11 20:50:42 0 [Note] /usr/sbin/mariadbd (server 10.6.12-MariaDB-log) starting as process 11336 ...
/usr/sbin/mariadbd: Please consult the Knowledge Base to find out how to run mysqld as root!
2022-11-11 20:50:42 0 [ERROR] Aborting
Can't open file /usr/share/mysql-test/var/tmp/2/errorlog.err: No such file or directory at /usr/share/mysql-test/var/2/tmpoEpwpn line 8.
mysqltest: In included file "./include/search_pattern_in_file.inc": 
included from /usr/share/mysql-test/main/bad_startup_options.test at line 17:
At line 54: command "perl" failed with error: 2  my_errno: 175  errno: 175
 - saving '/usr/share/mysql-test/var/2/log/main.bad_startup_options/' to '/usr/share/mysql-test/var/log/main.bad_startup_options/'

This is a new test added in October 2022 in https://github.com/MariaDB/server/commit/32158be720b85a3ae0e0eeebe1277c36f86dca38 and all stable branches.

It seems to fail when it runs --exec $MYSQLD --defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --ssl-cert=bad --log-error=$errorlog if I read the log correctly.

There are many tests that run some variation of --exec $MYSQLD or --exec $MYSQLD_CMD or --exec $MYSQLD_BOOTSTRAP_CMD, closest one is in wsrep-recover-step.inc. Perhaps there is just something minor wrong with the parameters, so the command does not run correctly in all circumstances?

Anyway, issue is easy to reproduce (visible in CI) and probably newcomer friendly to fix.

I am aware that MariaDB Foundation does not have resources to maintain Gitlab-CI. Instead of closing this bug report as a won't fix, please keep it open and wait for external contributions in case some of the Gitlab-CI users (Debian, Fedora etc)



 Comments   
Comment by Daniel Black [ 2022-11-14 ]

Its because the test is being run as root.

-- source include/not_as_root.inc should be added to this test. And/Or, salsa could run its tests not as root.

Comment by Otto Kekäläinen [ 2022-11-14 ]

Thanks for the insight! I labelled this beginner-friendly - please don't rush to fix this (you probably aren't anyway) and instead keep it open for some time for potential new contributors to pick up.

Comment by Otto Kekäläinen [ 2022-11-25 ]

A fix for this has been submitted at https://github.com/MariaDB/server/pull/2344

Generated at Thu Feb 08 10:12:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.