Univention Bugzilla – Full Text Bug Listing |
Summary: | Make mysql startup timeout configureable via UCR | ||
---|---|---|---|
Product: | UCS | Reporter: | Erik Damrose <damrose> |
Component: | MySQL | Assignee: | Julia Bremer <bremer> |
Status: | CLOSED FIXED | QA Contact: | Erik Damrose <damrose> |
Severity: | normal | ||
Priority: | P5 | CC: | gulden, requate, s.anders |
Version: | UCS 4.4 | ||
Target Milestone: | UCS 4.4-0-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
What kind of report is it?: | Bug Report | What type of bug is this?: | 5: Major Usability: Impairs usability in key scenarios |
Who will be affected by this bug?: | 1: Will affect a very few installed domains | How will those affected feel about the bug?: | 3: A User would likely not purchase the product |
User Pain: | 0.086 | 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: |
Description
Erik Damrose
2018-04-27 12:19:45 CEST
Happens on a second system. The system was booted during the night, when a backup on VMware "eats" hard disk IO performance. Ok, MYSQLD_STARTUP_TIMEOUT is evaluated in /xetc/init.d/mysql but there is also a native systemd service file: root@jb5700mc:~# ls -ld /etc/systemd/system/mysql.service \ /lib/systemd/system/mariadb.service lrwxrwxrwx 1 root root 35 Aug 7 19:26 /etc/systemd/system/mysql.service -> /lib/systemd/system/mariadb.service -rw-r--r-- 1 root root 4505 Aug 10 2017 /lib/systemd/system/mariadb.service So, I'm not sure yet, that and adjustment of the TIMEOUT variable will change anything for the systemd behaviour. The second question I have is about how we should introduce the UCR adjustable value for MYSQLD_STARTUP_TIMEOUT into the defaults file. Since univention-mysql was not installed in your case, we would have to patch the upstream package directly? Successful build Package: univention-mariadb Version: 2.0.0-4A~4.4.0.201903131631 Branch: ucs_4.4-0 Scope: errata4.4-0 b1aaf6707f Bug #46901: Version bump 0edc1d9ab1 Bug #46901: Fix typo 38559867ea Bug #46901: mariadb startup timeout now configurable via ucr a367fed1bd Bug #46901: YAML Since MariaDB uses systemd to start the service, I created a new config file under /lib/systemd/system/mariadb.service.d You can now set the systemd option TimeoutStartSec via the ucr-variable mariadb/startup/timeout. The implementation looks very good, also, thanks for the detailed documentation. OK: Systemd service file OK: UCRv mariadb/startup/timeout + documentation OK: Default value of 90 OK: Test of timeout (i adjusted /etc/mysql/debian-start for my test) OK: Yaml Reopen: One small issue: The systemd config is not updated on package installation, the following warning is shown: Warning: mariadb.service changed on disk. Run 'systemctl daemon-reload' to reload units. Apparently one has to reload the service manually in the postinst. In a short test i tried adding the systemd debhelper to debian/rules, but it did not work. It seems the mysql init script prevents the debhelper from being added. Even the mariadb-server postinst has a note before a manual reload: "# Modified dh_systemd_start snippet that's not added automatically due /etc/init.d/mysql" So we should add the following to univention-mariadb.postinst, before the service restart command: systemctl --system daemon-reload >/dev/null Successful build Package: univention-mariadb Version: 2.0.0-5A~4.4.0.201903191553 Branch: ucs_4.4-0 Scope: errata4.4-0 2cf00085d7 Bug #46901: Yaml 6865da53cf Bug #46901: Make system daemon-reload in postinst of mariadb I added the line you suggested to the postinst. Thanks, works great. I slightly adapted the yaml file, one line was longer than the allowed length, commit 046cf14 Verified |