Bug 45876 - MySQL / MariaDB in UCS 4.3
MySQL / MariaDB in UCS 4.3
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: MySQL
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Erik Damrose
Jürn Brodersen
: interim-1
Depends on:
Blocks: 45915
  Show dependency treegraph
 
Reported: 2017-12-15 10:49 CET by Erik Damrose
Modified: 2018-03-14 14:37 CET (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Damrose univentionstaff 2017-12-15 10:49:21 CET
Debian stretch does not ship with mysql. Instead, mariadb is used. This bug is used to implement the transition to mariadb.
Comment 1 Erik Damrose univentionstaff 2017-12-15 14:45:44 CET
UCS uses a similar approach as debian. The univention-mysql package will be reduced to depend on the new package univention-mariadb, which handles the specific UCS handling of the service. By keeping u-mysql, the amount of code and dependency changes is kept to a minimum, e.g. for the app center.

[4.3-0 b64bbd7] Bug #45876: Add univention-mariadb 1.0.0-1A~4.3.0.201712151436
* Adapts the mysql.secret creation, which was previously a patch in the mysql-server source package
* Provides UCR interface to configure server settings

Currently, some settings are still using the name mysql. The rationale is that in debian the mariadb-server is still referenced as mysql in many ways, so we keep using the name, too. E.g. the binary is still called mysqld, config files are in /etc/mysql, ...
Comment 2 Erik Damrose univentionstaff 2017-12-15 16:13:32 CET
5c402b75 Adapt univention-mysql, only depend on univention-mariadb
univention-mysql 5.0.1-1A~4.3.0.201712151608
Comment 3 Erik Damrose univentionstaff 2017-12-18 10:50:33 CET
package is currently unmaintained, waiting for the next dvd build to move it to maintained.

QA Notes:
* Upgrade from 4.2 with installed u-mysql should work and install u-mariadb in the process. Mysql login after the update should work
* new installation of u-mysql in 4.3 should work and install u-mariadb. A mysql.secret should be created, no passwordless login to mysql should be possible as root.
Comment 4 Erik Damrose univentionstaff 2017-12-19 09:48:10 CET
(In reply to Erik Damrose from comment #3)
> package is currently unmaintained, waiting for the next dvd build to move it
> to maintained.
After a dvd build yesterday the packages are now maintained
Comment 5 Stefan Gohmann univentionstaff 2017-12-20 06:43:24 CET
Please add a changelog entry
Comment 6 Erik Damrose univentionstaff 2017-12-20 09:19:04 CET
ddd448d2 changelog
Comment 7 Dirk Wiesenthal univentionstaff 2017-12-22 13:57:38 CET
univention-app install wordpress

does not really work. The mysql/mariadb integration works:
 * univention-mysql -> univention-mariadb is installed
 * database "wordpress" is created
 * user "wordpress" is created

But the App quits:
MySQL Connection Error: (2002) Connection refused
Warning: mysqli::mysqli(): (HY000/2002): Connection refused in - on line 22

The reason is (presumably, I did not check further) that mariadb uses sockets for communication. The App Center needs TCP connections for all users.

Currently, this works:
mysql -p$(cat /etc/mysql.secret) --port 1
Comment 8 Erik Damrose univentionstaff 2018-01-16 11:12:29 CET
I thought i had checked that the configfile configured by our UCR template is read, but apparently not... mariadb configfiles have to end with the suffix .cnf

Now mysqld listens on 0.0.0.0:3306 (previously on 127.0.0.1), wordpress installation works

c9551881 Modify configfile to correct filename suffix '.cnf'
univention-mariadb 1.0.1-1A~4.3.0.201801161042
Comment 9 Philipp Hahn univentionstaff 2018-01-18 09:39:35 CET
f5480e1 Bug #45876 doc: spelling +MariaDB
Comment 10 Jürn Brodersen univentionstaff 2018-01-31 11:57:24 CET
The description for the "mariadb/autostart" ucr key still has Mysql in it.
Comment 11 Erik Damrose univentionstaff 2018-01-31 12:17:07 CET
Additionally, we have to make the UCRv work again. We had a patch against mysql-5.5 which enforced the autostart setting
Comment 12 Jürn Brodersen univentionstaff 2018-02-06 10:08:23 CET
(In reply to Erik Damrose from comment #11)
> Additionally, we have to make the UCRv work again. We had a patch against
> mysql-5.5 which enforced the autostart setting

I just tested that and it already works :)
Comment 13 Erik Damrose univentionstaff 2018-02-07 16:17:30 CET
Fixed in c6dbe561
Package: univention-mariadb
Version: 1.0.1-2A~4.3.0.201802071615
Comment 14 Jürn Brodersen univentionstaff 2018-02-08 16:27:58 CET
(In reply to Erik Damrose from comment #13)
> Fixed in c6dbe561
> Package: univention-mariadb
> Version: 1.0.1-2A~4.3.0.201802071615

What I tested:
Install univention-mariadb on 4.3 -> OK
Install univention-mysql on 4.2 with multiple apps -> upgrade to 4.3 -> OK
mariadb/autostart=no -> service is masked -> no autostart -> OK
changelog -> separate bug 45915

Ok -> Verified
Comment 15 Stefan Gohmann univentionstaff 2018-03-14 14:37:55 CET
UCS 4.3 has been released:
 https://docs.software-univention.de/release-notes-4.3-0-en.html
 https://docs.software-univention.de/release-notes-4.3-0-de.html

If this error occurs again, please use "Clone This Bug".