Improve MariaDB upgrade
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@@ -8,6 +8,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
|
|
||||||
### v3.9.x - [Unreleased]
|
### v3.9.x - [Unreleased]
|
||||||
|
|
||||||
|
#### Added
|
||||||
|
|
||||||
|
- MariaDB 10.5 support (installed by default)
|
||||||
|
- Upgrade to MariaDB 10.5 with `wo stack migrate --mariadb`
|
||||||
|
|
||||||
|
#### Fixed
|
||||||
|
|
||||||
|
- Useless php-cli version removal
|
||||||
|
- Redis 6.0.6 not installed on Ubuntu 20.04 LTS
|
||||||
|
|
||||||
### v3.12.4 - 2020-10-14
|
### v3.12.4 - 2020-10-14
|
||||||
|
|
||||||
#### Changed
|
#### Changed
|
||||||
|
|||||||
@@ -42,23 +42,26 @@ class WOStackMigrateController(CementBaseController):
|
|||||||
wo_mysql_old_repo):
|
wo_mysql_old_repo):
|
||||||
WORepo.remove(self, repo_url=wo_mysql_old_repo)
|
WORepo.remove(self, repo_url=wo_mysql_old_repo)
|
||||||
# Add MariaDB repo
|
# Add MariaDB repo
|
||||||
Log.info(self, "Adding repository for MariaDB, please wait...")
|
|
||||||
pre_pref(self, WOVar.wo_mysql)
|
pre_pref(self, WOVar.wo_mysql)
|
||||||
|
|
||||||
# Install MariaDB
|
# Install MariaDB
|
||||||
|
|
||||||
Log.info(self, "Updating apt-cache, hang on...")
|
Log.wait(self, "Updating apt-cache ")
|
||||||
WOAptGet.update(self)
|
WOAptGet.update(self)
|
||||||
Log.info(self, "Installing MariaDB, hang on...")
|
Log.valide(self, "Updating apt-cache ")
|
||||||
|
Log.wait(self, "Upgrading MariaDB ")
|
||||||
WOAptGet.remove(self, ["mariadb-server"])
|
WOAptGet.remove(self, ["mariadb-server"])
|
||||||
WOAptGet.auto_remove(self)
|
WOAptGet.auto_remove(self)
|
||||||
WOAptGet.install(self, WOVar.wo_mysql)
|
WOAptGet.install(self, WOVar.wo_mysql)
|
||||||
post_pref(self, WOVar.wo_mysql, [])
|
Log.valide(self, "Upgrading MariaDB ")
|
||||||
WOShellExec.cmd_exec(self, 'systemctl daemon-reload')
|
|
||||||
WOFileUtils.mvfile(
|
WOFileUtils.mvfile(
|
||||||
self, '/etc/mysql/my.cnf', '/etc/mysql/my.cnf.old')
|
self, '/etc/mysql/my.cnf', '/etc/mysql/my.cnf.old')
|
||||||
WOFileUtils.create_symlink(
|
WOFileUtils.create_symlink(
|
||||||
self, ['/etc/mysql/mariadb.cnf', '/etc/mysql/my.cnf'])
|
self, ['/etc/mysql/mariadb.cnf', '/etc/mysql/my.cnf'])
|
||||||
|
WOShellExec.cmd_exec(self, 'systemctl daemon-reload')
|
||||||
|
post_pref(self, WOVar.wo_mysql, [])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@expose(hide=True)
|
@expose(hide=True)
|
||||||
def default(self):
|
def default(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user