mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-22 18:32:13 +00:00
fix(xcat-core): mysqlsetup cannot find a configuration file to rewrite
The candidate list of comment_bind_address was assigned by a top-level statement below the main flow's exit, so the statement never ran. The list was empty, the fallback index read undef, and mysqlsetup -i failed with "cannot read : No such file or directory" on every MySQL cluster. The service node install stops there. A BEGIN block now fills the list at compile time. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -791,11 +791,17 @@ sub fixinstalldir
|
||||
# The candidate configuration files, in the order mysqlsetup reads them. On
|
||||
# Ubuntu 16.04 the bind-address line is in mariadb.conf.d/50-server.cnf, and on
|
||||
# SLE15 it is in /etc/my.cnf. The last one is the fallback.
|
||||
our @BIND_FILES = (
|
||||
"/etc/mysql/mariadb.conf.d/50-server.cnf",
|
||||
"/etc/mysql/my.cnf",
|
||||
"/etc/my.cnf",
|
||||
);
|
||||
# BEGIN, because the main flow exits above this line: a plain assignment here
|
||||
# never runs, and the list is empty when comment_bind_address reads it.
|
||||
our @BIND_FILES;
|
||||
|
||||
BEGIN {
|
||||
@BIND_FILES = (
|
||||
"/etc/mysql/mariadb.conf.d/50-server.cnf",
|
||||
"/etc/mysql/my.cnf",
|
||||
"/etc/my.cnf",
|
||||
);
|
||||
}
|
||||
|
||||
sub comment_bind_address
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user