summaryrefslogtreecommitdiff
path: root/trove/guestagent/datastore/mysql_common/service.py
diff options
context:
space:
mode:
authorDoug Shelley <doug@parelastic.com>2016-05-06 18:14:19 +0000
committerDoug Shelley <doug@parelastic.com>2016-06-02 16:08:10 +0000
commit51b8f3edb90b647b2422eecdcc76d9062ba01530 (patch)
treec338f76873177360d73950d87bb1be4f9dd2897d /trove/guestagent/datastore/mysql_common/service.py
parent2f0a8610ca715d297ed30511ec45dd9ae48542e6 (diff)
downloadtrove-51b8f3edb90b647b2422eecdcc76d9062ba01530.tar.gz
Change service candidates list for MariaDB
For MariaDB 10.1 on CentOS/RHEL, it is using mariadb.service for systemd now instead of mysql.service. This change takes this into account in how the service candidates list is managed. Due to the change to service candidates, the restore and replication strategies needed to change. Basically, now that MariaDB is a full manager, it needs to have its "App" class set properly (this is the restore strategy fix). Replication broke because the replication strategy was using the Mysql manager backup/restore strategy. This was fixed by doing a small re-factor to add properties to the strategy base class to allow for manager specific overrides. Change-Id: I6aed32ebc704174aefe7543699169097532a1b55 Closes-bug: 1579110
Diffstat (limited to 'trove/guestagent/datastore/mysql_common/service.py')
-rw-r--r--trove/guestagent/datastore/mysql_common/service.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/trove/guestagent/datastore/mysql_common/service.py b/trove/guestagent/datastore/mysql_common/service.py
index fa12ee0a..6d34e246 100644
--- a/trove/guestagent/datastore/mysql_common/service.py
+++ b/trove/guestagent/datastore/mysql_common/service.py
@@ -588,9 +588,13 @@ class BaseMySqlApp(object):
return self._keep_alive_connection_cls
@property
+ def service_candidates(self):
+ return ["mysql", "mysqld", "mysql-server"]
+
+ @property
def mysql_service(self):
- MYSQL_SERVICE_CANDIDATES = ["mysql", "mysqld", "mysql-server"]
- return operating_system.service_discovery(MYSQL_SERVICE_CANDIDATES)
+ service_candidates = self.service_candidates
+ return operating_system.service_discovery(service_candidates)
configuration_manager = ConfigurationManager(
MYSQL_CONFIG, MYSQL_OWNER, MYSQL_OWNER, CFG_CODEC, requires_root=True,