2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-20 17:32:15 +00:00
Commit Graph

59 Commits

Author SHA1 Message Date
Daniel Hilst c18e415280 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>
2026-10-14 18:49:02 -03:00
Daniel Hilst 8e9c1e2ab1 fix(xcat-core): mysqlsetup leaves /etc/my.cnf with the label of /tmp
mysqlsetup commented the bind-address line by writing the result to
/tmp/my.cnf and renaming it over the configuration file. A file created in
/tmp takes user_tmp_t, and a rename keeps the type of the file it moves, so
the management node was left with a MySQL configuration that mysqld is denied
read of. The denial survives the command and was seen in three rounds of the
SELinux campaign. The temporary path is also a fixed name in a world writable
directory, written as root.

comment_bind_address now reads the file, substitutes the line and writes the
result back through the same file. Truncating in place keeps the inode, which
is what carries the label, so no relabel is needed afterwards. The candidate
list moves to @BIND_FILES and the resolution order does not change: the
Ubuntu mariadb.conf.d file, then /etc/mysql/my.cnf, then /etc/my.cnf.

mysqlsetup_bind_address_label.t drives the sub against a scratch tree and
asserts the inode survives, that only a line starting with bind is commented,
and that no temporary file is left beside the target. With the rewrite put back
through a renamed file in /tmp, the inode check is the one check of the
thirteen that fails.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-14 16:45:33 -03:00
Vinícius Ferrão 5633b00bfc feat(openeuler): support native database setup 2026-09-14 22:56:00 -03:00
Mark Gurevich a2440a2acc Improve checking for running DB process 2023-02-17 12:20:14 -05:00
Mark Gurevich 6d4c948f44 Syntax fixes 2023-02-15 11:22:30 -05:00
Mark Gurevich 570cda30b4 mysqlsetup enhancements 2023-02-14 13:17:17 -05:00
Mark Gurevich 1a378b341c Fix mysql setup for RH family of OSes 2023-02-08 10:18:12 -05:00
Mark Gurevich d8bb3ea2db Link file for all OSes 2021-05-19 15:30:49 -04:00
Mark Gurevich 63ebc1497b Extract full version information 2021-05-19 14:07:29 -04:00
Mark Gurevich 7b012a8f6e Remove sp1flag from mysqlsetup 2021-04-07 16:37:19 -04:00
Mark Gurevich e4619859c0 Use correct Perl string compare operator 2021-04-02 13:13:27 -04:00
peterwywong 94bb4ca4b8 Revert "Modify mysqlsetup and restorexCATdb to examine DB restoration delay" 2021-03-10 11:33:08 -06:00
Wai Yee Wong 617a4ed557 Modify mysqlsetup and restorexCATdb to examine DB restoration delay 2021-03-01 16:52:37 -05:00
cxhong 1e7453e539 change to symbol links instead force options 2020-03-04 16:02:34 -05:00
cxhong 68f2534b98 Modify mysqlsetup scripts on rhels7.7 2020-03-04 14:19:04 -05:00
cxhong 391678cb87 mysqlsetup support for SLE15 x86_64 system 2020-02-20 13:35:28 -05:00
cxhong 344d640292 fix syntax error 2020-02-19 14:57:50 -05:00
cxhong 250c2abb91 Modify mysqlsetup to support SLE15 2020-02-18 17:06:10 -05:00
GONG Jie 47ecc0e01e Remove trailing spaces in file xCAT-client/bin/mysqlsetup 2017-12-31 23:59:59 +00:00
Yuan Bai 7576e04e24 let mysqlsetup work when using alias IP as MN IP (#5279)
* let mysqlsetup work when using alias IP as MN IP
2018-06-06 15:25:11 +08:00
immarvin 5b882fc24d fix issue [fvt]sles12.2 mysqlsetup -i could not work #2297 2016-12-08 22:21:12 -05:00
cxhong 9181279913 mysqlsetup failed becuase /usr/bin/mysql_install_db is not available (#1702)
* mysqlsetup failed becuase /usr/bin/mysql_install_db is not available

* use variable

* chang "-e" to "-x"
2016-08-17 18:44:19 -05:00
immarvin 45c1dc0f92 fix [FVT]:mysqlsetup -i failed to setup database on sles12 #1413 ;refine the logic to determine hostname of the master 2016-07-28 01:37:28 -04:00
Mark Gurevich fb911143fe perltidy all perl files, part 2 2016-07-21 13:27:40 -04:00
Casandra Qiu 5db2a67553 Add mysql user to localhost account 2016-06-29 13:52:07 -04:00
Casandra Qiu b5842bf905 Support Mariadb on ubuntu 16.04 2016-04-19 14:01:08 -04:00
Patrick Lundgren 1e68e93938 Added flag to check SLES 12 for SP1, run same flow as Ubuntu 2015-11-05 15:29:28 -05:00
GONG Jie f5d79bdaa2 Fix bug#4521 - [FVT] Script "mysqlsetup" assume end user has an empty MySQL/MariaDB root password. Which is not ture on Ubuntu Linux. 2015-03-09 14:39:55 +08:00
Casandra Qiu 69bf4249be Bug#4385 mysqlsetup does not support mariaDB in Ubuntu 2014-11-22 21:24:28 -05:00
lissav 6b040b23f7 fix defect 4343 2014-10-30 08:49:19 -04:00
ligc 49814b311c fix a message typo in *sqlsetup scripts 2013-08-01 16:42:45 +08:00
lissav 0fba751c63 fix incorrect change for starting mysql using startservice, sles/rh different 2014-07-11 08:52:48 -04:00
lissav 59a277bc40 fix incorrect call 2014-06-13 05:48:53 -04:00
immarvin 5d479620a4 repleace the servcie stuff with newly added generic subroutines in xcat-client 2014-06-09 06:40:14 -07:00
lissav 52c35aad8a defect 4154 2014-06-05 09:11:49 -04:00
lissav 7b5aa8aed1 support MariaDB defect 4097 2014-04-29 10:10:45 -04:00
lissav 021b4c69fb fix -L option 2014-03-21 09:57:22 -04:00
lissav f93a5eb28b fix mysqlsetup -u 2014-01-15 06:15:35 -05:00
lissav e87604fd5f defect 3948 2014-01-06 14:58:46 -05:00
lissav ef5ec3c17c Defect 3926, rerun of mysqlsetup -i leaves xcatd stopped 2013-12-02 06:43:41 -05:00
lissav f77e980e2e Defect 3906 2013-11-18 06:51:08 -05:00
xq2005 c9778bf3f7 setup odbc for mysql on debian/ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15571 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-03-19 08:55:04 +00:00
xq2005 029df230d6 use mysql db on debian/ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15570 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-03-19 07:43:30 +00:00
xq2005 d4e79d7a95 use mysql db on debian/ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15565 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-03-19 07:13:05 +00:00
sjing c04a6f979e fix for bug 2832
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14883 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-01-15 06:27:31 +00:00
lissav 1fdcfdb959 fix for defect 3562802
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13670 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-08-30 16:05:33 +00:00
nott a4ee0bb853 fix perl INC path
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13452 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-08-08 17:45:31 +00:00
lissav d970f0b2a7 fixed hardcoded admin id
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12907 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-05-23 13:57:15 +00:00
lissav b1c3e1326a fix defect 3526288
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12769 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-05-17 17:19:13 +00:00
sjing d69ac67df9 the fix for bug 3364300 - not display passwords in xcat commands or logs.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12317 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-24 02:00:50 +00:00