Skip to content

Commit 733226d

Browse files
committed
Fix: PACK mysql, now mariadb for paths
1 parent 47f8389 commit 733226d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

opsbro/cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ def one_loop(self, command_args):
791791
f(*cmd_args, **cmd_opts.__dict__)
792792
except TypeError as exp:
793793
logger.debug('Cannot launch function: %s' % str(traceback.format_exc()))
794-
err = 'Bad arguments'
794+
err = f'Bad arguments {traceback.format_exc()}'
795795
self.print_fatal_error(err)
796796
self._print_help_from_cli_entry(entry)
797797
sys.exit(2)

test/test_pack_mysql.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@ MYDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
77
# Fix: centos do not have mysqld on the PATH
88
export PATH=/usr/libexec/:$PATH
99

10+
11+
PLUGIN_DIR=/usr/lib/mysql/plugin/ # debian
12+
if [ ! -d $PLUGIN_DIR ]; then
13+
PLUGIN_DIR=/usr/lib64/mariadb/plugin # fedora
14+
fi
15+
16+
1017
# Start mysql
1118
# NOTE: /tmp because we are launched for debian & centos, so cannot have the same directories
12-
mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mariadb/plugin --log-error=/tmp/mariadb.log --pid-file=/tmp/mariadb.pid --socket=/var/lib/mysql/mysql.sock --user=mysql &
19+
mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=$PLUGIN_DIR --log-error=/tmp/mariadb.log --pid-file=/tmp/mariadb.pid --socket=/var/lib/mysql/mysql.sock --user=mysql &
1320
sleep 10
1421
# Set root account available (set socket because debian try network)
1522
/usr/bin/mysqladmin --socket=/var/lib/mysql/mysql.sock -u root password 'secret'

0 commit comments

Comments
 (0)