| Summary: | "Script failed" for mariadb popup during upgrade mga8->9 | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Morgan Leijström <fri> |
| Component: | Installer | Assignee: | QA Team <qa-bugs> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | High | CC: | bequimao.de, davidwhodgins, mageia |
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | CVE: | ||
| Status comment: | |||
| Attachments: | compressed report.bug | ||
|
Morgan Leijström
2023-07-18 11:53:45 CEST
Priority:
Normal =>
High Created attachment 13925 [details]
compressed report.bug
Ulrich Beckmann
2023-07-18 19:43:51 CEST
CC:
(none) =>
bequimao.de Assigning to the registered maintainer for mariadb. Looks like the simplest solution is to add the command "true" at the end of the preinstall scriptlet so force the return code to be zero so that it works whether mariadb is currently running or not. CC:
(none) =>
davidwhodgins yeah, that is buggy / broken packaging... it assumes passwordless write access to databases The database must have a clean shutdown, because there might be incompatible changes of the redo logs. Otherwise the database might be destroyed. I saw many crashes of the user owned Akonadi database in the forums. During an upgrade the script must not assume the service is running or can be started as an upgrade using the classic iso does not allow it. Database servers such as mariadb may or may not have a password and may be for user level usage or system level usage (or both from one server). /usr/share/doc/mariadb/README.urpmi strongly encourages setting a password to protect the database, especially when used for web applications. akonadi may use a postgresql or SQLite database, and mariadb is used by web applications, not just kde/akonadi. Ensuring a clean shutdown of any database can only be done by the users. Clear instructions on how to do a clean shutdown must be given to the users for upgrading using an iso. For users upgrading using mgaapplet, that can be handled by a script, but only if the database service is already running, with each type of database backend handled appropriately. Note that any such script should be part of akonadi, so it doesn't break things for apache/php. > Clear instructions on how to do a clean shutdown must be given to the users for upgrading using an iso. I did a normal shutdown, from plasma launch menu. Normal shutdowns are not clean? > For users upgrading using mgaapplet, that can be handled by a script, > but only if the database service is already running, > with each type of database backend handled appropriately. And we also need instructions for CLI; urpmi and dnf... Setting for errata; explain the error popup if we do not fix it Maybe for release notes, if we can add not too complicated instructions. -If we fix it: neither above :) Keywords:
(none) =>
FOR_ERRATA8
Morgan Leijström
2023-07-18 23:39:05 CEST
Keywords:
FOR_ERRATA8 =>
FOR_ERRATA9 There is no prein script in mariadb package. I don't know where this comes from. Maybe this is a rpm-macro? argh. I hate systems that name things differently. there is no simple solution to that. It would be best integrated into mysql_upgrade. but most setups fail to install tz info which results in faulty time values. We assume, that root is able to use/write the system database which should be true. But I think it must be moved to the post section - pre is wrong. (In reply to Marc Krämer from comment #11) > argh. I hate systems that name things differently. > > there is no simple solution to that. It would be best integrated into > mysql_upgrade. but most setups fail to install tz info which results in > faulty time values. > We assume, that root is able to use/write the system database which should > be true. you cant assume that, as any security minded admin will lock down mariadb, making the script fail... Also, this part is not really correct: %pre common-core # enable plugins if [ -f %{_sysconfdir}/my.cnf ]; then perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf # switch to federatedx provider perl -pi -e "s|;ha_federated\.so$|;ha_federatedx\.so|g" %{_sysconfdir}/my.cnf fi if a sysadmin disables any of those, this will quietly re-enable them causing behaviour change on a working customized setup... Keep in mind. The mysql root user is not the same as the linux root user. The may (should) have different passwords. The unhashed password is not available anywhere on the system. It is not available to any scripts, let alone rpm scriplets. I really hate those blaming sessions. That perl code is written by "alien"; I've never touched it. And it is really OLD. Maybe it is incorrect, but no one ever complained. And even this bug was introduced by the end of march. So I guess most people have a .my.cnf file which connects to the database. The idea with this script was, to make timezone data available to mariadb, which we do for almost all other package. I guess most people forget about this, as I did. And mariadb really makes wrong computations on timestamp data, if timezones are not available. So I thought it would be best to include this in our installation/update process. Everyone makes mistakes - but anyway not setting the data is a mistake too. I could include a hint after the installation - but to be honest, who really reads those hints after updating 2000 packages from mga8 -> 9? its not a blaming session... this tend to happend in bugreports when rpm scripts fails, then people start looking closer at the scripts in the affected packages, and point out the issues they see... no blaming, just pointing out issues that should be looked at / fixed some way... the pointed perl scripts don't have any effect, as the my.cnf file is almost empty, because of the configuration directory /etc/my.cnf.d removed the perl scripts and the timezone script. Changed the readme file. New package can be moved. Confirming it installs cleanly of the m8 version and that mysqld.service starts ok.
Please ask for a freeze push in the dev ml.
# urpmi --auto-select
To satisfy dependencies, the following packages are going to be installed:
Package Version Release Arch
(medium "Core Release (distrib1)")
lib64mariadb3 10.11.4 1.mga9 x86_64
lib64mariadbd19 10.11.4 1.mga9 x86_64
lib64unixODBC2 2.3.11 1.mga9 x86_64
mariadb 10.11.4 1.mga9 x86_64
mariadb-client 10.11.4 1.mga9 x86_64
mariadb-common 10.11.4 1.mga9 x86_64
mariadb-common-core 10.11.4 1.mga9 x86_64
mariadb-connect 10.11.4 1.mga9 x86_64
mariadb-core 10.11.4 1.mga9 x86_64
mariadb-extra 10.11.4 1.mga9 x86_64
38MB of additional disk space will be used.
28MB of packages will be retrieved.
Proceed with the installation of the 10 packages? (Y/n)
http://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/lib64mariadbd19-10.11.4-1.mga9.x86_64.rpm
http://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/mariadb-connect-10.11.4-1.mga9.x86_64.rpm
http://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/mariadb-core-10.11.4-1.mga9.x86_64.rpm
http://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/mariadb-common-10.11.4-1.mga9.x86_64.rpm
http://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/mariadb-10.11.4-1.mga9.x86_64.rpm
http://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/lib64mariadb3-10.11.4-1.mga9.x86_64.rpm
http://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/lib64unixODBC2-2.3.11-1.mga9.x86_64.rpm
http://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/mariadb-common-core-10.11.4-1.mga9.x86_64.rpm
http://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/mariadb-client-10.11.4-1.mga9.x86_64.rpm
http://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/mariadb-extra-10.11.4-1.mga9.x86_64.rpm
installing mariadb-connect-10.11.4-1.mga9.x86_64.rpm mariadb-core-10.11.4-1.mga9.x86_64.rpm lib64mariadbd19-10.11.4-1.mga9.x86_64.rpm mariadb-10.11.4-1.mga9.x86_64.rpm mariadb-common-10.11.4-1.mga9.x86_64.rpm lib64mariadb3-10.11.4-1.mga9.x86_64.rpm mariadb-extra-10.11.4-1.mga9.x86_64.rpm lib64unixODBC2-2.3.11-1.mga9.x86_64.rpm mariadb-client-10.11.4-1.mga9.x86_64.rpm mariadb-common-core-10.11.4-1.mga9.x86_64.rpm from /var/cache/urpmi/rpms
Preparing... #########################################################################################################################################################################################################
1/10: lib64unixODBC2 #########################################################################################################################################################################################################
2/10: lib64mariadb3 #########################################################################################################################################################################################################
3/10: mariadb-client #########################################################################################################################################################################################################
4/10: mariadb-common #########################################################################################################################################################################################################
5/10: mariadb-common-core #########################################################################################################################################################################################################
6/10: mariadb-core #########################################################################################################################################################################################################
7/10: mariadb-extra #########################################################################################################################################################################################################
8/10: mariadb #########################################################################################################################################################################################################
9/10: mariadb-connect #########################################################################################################################################################################################################
10/10: lib64mariadbd19 #########################################################################################################################################################################################################
1/9: removing mariadb-10.5.21-1.mga8.x86_64
#########################################################################################################################################################################################################
2/9: removing mariadb-core-10.5.21-1.mga8.x86_64
#########################################################################################################################################################################################################
3/9: removing mariadb-extra-10.5.21-1.mga8.x86_64
#########################################################################################################################################################################################################
4/9: removing mariadb-connect-10.5.21-1.mga8.x86_64
#########################################################################################################################################################################################################
5/9: removing mariadb-common-core-10.5.21-1.mga8.x86_64
#########################################################################################################################################################################################################
6/9: removing mariadb-common-10.5.21-1.mga8.x86_64
#########################################################################################################################################################################################################
7/9: removing mariadb-client-10.5.21-1.mga8.x86_64
#########################################################################################################################################################################################################
8/9: removing lib64mariadb3-10.5.21-1.mga8.x86_64
#########################################################################################################################################################################################################
9/9: removing lib64mariadbd19-10.5.21-1.mga8.x86_64
#########################################################################################################################################################################################################
----------------------------------------------------------------------
More information on package mariadb-10.11.4-1.mga9.x86_64
NOTE: MariaDB is installed without root password, it is recommended to set the
root password with the following command as soon as possible:
# mysql_secure_installation
press enter at each question except the new root password.
The initscript used to start mysql has been reverted to use the one shipped
by MariaDB. This means the following changes:
* The generation of the initial system mysql database is now done when mysql
is started from the initscript and only if the /var/lib/mysql/mysql
directory is empty (mysql_install_db). Previousely this was quite hidden and
silently done at (rpm) install time. As a consequence to this change you may
have to perform some manual tasks to upgrade the mysql system database and
such. So, doing something like this might help you:
systemctl stop mysqld.service
TMPDIR=/var/tmp mysql_install_db
systemctl start mysqld.service
mysql_upgrade --skip-write-binlog
The mysql-common-core package ships with a default /etc/my.cnf file that is
based on the my-medium.cnf file that comes with the source code.
On install you should run the following command, on upgrade this is done automatically:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -D mysql
----------------------------------------------------------------------
Sorry, ignore comment 20 as that was installing while m9 was running, and picked up the release version. Will retest doing a full upgrade. Just realized. It can not be tested properly while it's in qa testing. Will test that it's working in an m9 install, but the upgrade portion can not be tested until it's pushed to core release, as the classical installer doesn't allow using core updates testing, and testing while doing an upgrade using urpmi doesn't test the problem properly. Confirmed mysqld.service is working ok using phpmyadmin with # rpm -qa|grep mariadb|sort lib64mariadb3-10.11.4-2.mga9 lib64mariadbd19-10.11.4-2.mga9 mariadb-10.11.4-2.mga9 mariadb-client-10.11.4-2.mga9 mariadb-common-10.11.4-2.mga9 mariadb-common-core-10.11.4-2.mga9 mariadb-connect-10.11.4-2.mga9 mariadb-core-10.11.4-2.mga9 mariadb-extra-10.11.4-2.mga9 So ask for the freeze push, and then an upgrade can be testing using the classical installer. except for the popup, the error would be thrown the same way. I think we are in freeze phase, so it must be pushed here. Freeze pushes for cauldron are still handled in the dev ml, not via bug reports. Some testing (usually by the packager) is required in advance, but not to the same level as on a stable release. I thought the purpose of this update was to fix the script failed message. If not, then this update must be rejected, and m9 will remain on hold until it is fixed. it was removed. If it is tested here, why not pushed via qa? I don't get it. With a stable release, each update is handled by an advisory such as https://svnweb.mageia.org/advisories/31997.adv?revision=14824&view=markup The srpm list in the advisory is used by the script that pushes updates to move the srpm and associated rpm packages from updates testing to updates. In cauldron, even in the freeze period the updates are move from the updates testing repos to the release repos, based on a request in the dev ml. When the final iso images are created, normally it only includes packages from the release repos. As https://svnweb.mageia.org/packages/cauldron/mariadb/current/SPECS/mariadb.spec?revision=1961318&view=markup#l915 is still trying to install the tz data into the mysql database, which will fail during an upgrade due to being in a chroot, and will fail during install of a normal update in a stable release if the admin has followed the readme to create a mysql password for the mysql root user. An update must not assume the service is running or ready to be started. The proper way to handle getting the tz data installed is to inform the user it's needed, and tell them what commands are needed so that they can manually install the tz data, after the login to mysql with the proper password. If it's needed for a per user copy of mysqld, then the admin must be informed that they need to inform all users, not just the one who installed the update. Once the final iso images pass testing, then cauldron is forked and a new stable release is created. Only then do updates start getting moved from updates testing to the updates repos. Until then packages are moved from updates testing to release. that is really nonsense. Ok. Then I wait until release. (In reply to Dave Hodgins from comment #27) > With a stable release, each update is handled by an advisory such as > https://svnweb.mageia.org/advisories/31997.adv?revision=14824&view=markup > > The srpm list in the advisory is used by the script that pushes updates to > move the srpm and associated rpm packages from updates testing to updates. > > In cauldron, even in the freeze period the updates are move from the > updates testing repos to the release repos, based on a request in the dev ml. > > When the final iso images are created, normally it only includes packages > from > the release repos. > > As > https://svnweb.mageia.org/packages/cauldron/mariadb/current/SPECS/mariadb. > spec?revision=1961318&view=markup#l915 > is still trying to install the tz data into the mysql database, which will > fail during an upgrade due to being in a chroot, and will fail during > install of a normal update in a stable release if the admin has followed > the readme to create a mysql password for the mysql root user. > > An update must not assume the service is running or ready to be started. > The proper way to handle getting the tz data installed is to inform the user > it's needed, and tell them what commands are needed so that they can manually > install the tz data, after the login to mysql with the proper password. > > If it's needed for a per user copy of mysqld, then the admin must be > informed that they need to inform all users, not just the one who installed > the update. the update uses rev 1964111 Free push requested on the dev ml moved to release ~1 week ago Resolution:
(none) =>
FIXED Removed from errata Keywords:
IN_ERRATA9 =>
(none) |
__Description of problem: Upgrading using netinstaller, graphical interface, a popup: ERROR: 'script' failed for mariadb-10.11.4-1.mga9.x86_64 Upgrade finished successfully, system working. I have never installed or configured mariadb manually on that system __Version: Per 2023-07-12 a fully updated mga8-64 plasma 64 bit, upgraded using latest nonfree netinstaller. __How reproducible: At least one other tester, from QA list 2023-07-14 kl. 17:27, Herman Viaene: > As in previous tests with rc1 and last beta, I get an error on installing mariadb during the upgrade. The package is updated successfully after finishing the upgade OK and rebooting. > Problem mentioned in the riseup pad. I have a .fsa backup of the M8 on which the upgrade was run. __Some lines from report.bug: . . * trans: scheduling update of mariadb-core-10.11.4-1.mga9.x86_64 (id=29197, file=/mnt/var/cache/urpmi/rpms/mariadb-core-10.11.4-1.mga9.x86_64.rpm) . . * urpmi error: ERROR: 'script' failed for mariadb-10.11.4-1.mga9.x86_64 * mariadb not installed, %prein(mariadb-10.11.4-1.mga9.x86_64) scriptlet failed, exit status 1 . . created transaction for installing on /mnt (remove=0, install=0, upgrade=48) mariadb-client-10.11.4-1.mga9.x86_64 mariadb-common-10.11.4-1.mga9.x86_64 mariadb-common-core-10.11.4-1.mga9.x86_64 . . mariadb-extra-10.11.4-1.mga9.x86_64 mariadb-core-10.11.4-1.mga9.x86_64 . . Running in chroot, ignoring command 'is-active' ERROR 2002 (HY000): Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (2) %prein(mariadb-10.11.4-1.mga9.x86_64) scriptlet failed, exit status 1 <<<<<<<<<<<<<<<<< mariadb-10.11.4-1.mga9.x86_64 mariadb-10.11.4-1.mga9.x86_64: install failed <<<<<<<<<<<<<<<<<< . . mariadb-10.5.21-1.mga8.x86_64: erase skipped <<<<<<<<<<<<<<<< . . * selecting packages task-x11 . . * found 2 packages to install: mariadb-10.11.4-1.mga9.x86_64, sound-scripts-0.62-23.mga9.noarch * installing packages . . * found 2 packages to install: mariadb-10.11.4-1.mga9.x86_64, sound-scripts-0.62-23.mga9.noarch * install::pkgs::install /mnt * install::pkgs::install the following: mariadb sound-scripts * opened /mnt/root/drakx/install.log * rpm transactions start * scheduled sets of transactions: * chrooted db version used by librpm is at least as good as non-rooted one * transactions done, now trying to close still opened fd; exit code=0 * closing install.log file And checking the installed system, mariadb-10.11.4-1.mga9 is installed, and no mariadb mga8 packages. So it seems the install/update trigged by task-x11 saves the situation. For another desktop, i suppose that might not happen. - but I suppose next normal update would fix that. Question here is why %prein(mariadb-10.11.4-1.mga9.x86_64) scriptlet failed. The result is a bad looking error popup message.