[MDEV-11949] Debian upgrade fails, stops the database every time i run apt-get install. massive downtimes on server. Created: 2017-01-31 Updated: 2017-04-29 Resolved: 2017-04-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Debian |
| Affects Version/s: | 10.1.21 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | robert andersson | Assignee: | Sergey Vojtovich |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux gimli 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux |
||
| Description |
|
TLDR: The debian package install script is causing me hours of downtime. The problem started when we upgraded from 10.1.20 to 10.1.21 After 2 hours the upgrade seems to have failed with this message:
After that error i was able to start mariadb and it worked fine.. Fast forward to today ..
The script then proceeds to stop my mariadb,, stopping my mariadb takes 1 hour roughly,, this is 1 hour of unscheduled downtime... here's some logs from today havoc..
notice how it's shutting down "Waiting for page_cleaner to finish flushing of buffer pool" .. yet debian tries to start new instances at the same time.. because the script is too stupid to realize it's in the process of shutting down .... PLEASE make the install script understand that some databases takes hours to shut down and prompt for shutdown before just doing it!! You can read about yesterdays upgrade havoc in the comments here https://github.com/MariaDB/server/commit/ab1e6fefd869242d962cb91a006f37bb9ad534a7 |
| Comments |
| Comment by robert andersson [ 2017-01-31 ] |
|
This time the setup succeeded and now everything is fine. I still think that there should be a prompt before shutting down, starting. The reason the upgrade failed was because my systemd service file was overwritten by the installer, and i have set ProtectHome=false so after the upgrade failed i changed the system mysql.service file back to have ProtectHome=false and today when i ran apt-get upgrade it redid the entire upgrade procedure (2 hour downtime again..) and this time it suceeded because it managed to start the db after the upgrade because this time it did not replace the mysql.service file. |
| Comment by Otto Kekäläinen [ 2017-02-02 ] |
|
This does not solve your issue, but keep in mind that you cannot edit system files that are replace on every update. If you want to customize a systemd service, either add files to /etc/systemd/system/mariadb.service.d/ or disable the mariadb.service completely and write your own my-db.service and start/stop the server using that. Also, if you have a very big and critical system, maybe you should consider getting a support contract to have a dedicated DB admn who takes care of this to avoid downtime? https://mariadb.org/about/service-providers/ |
| Comment by robert andersson [ 2017-02-03 ] |
|
@otto thanks, i will look into making the systemd script better. |
| Comment by OndÅ™ej Surý (Inactive) [ 2017-04-29 ] |
|
robertz The correct way how to change the systemd units is to use overrides. systemctl edit <unit> will create a one for you. Also as usual, the ArchLinux wiki has a more comprehensible documentation: https://wiki.archlinux.org/index.php/systemd#Editing_provided_units I believe there's no bug on the MariaDB packages side, as direct editing of systemd units were never supported. |