Guarantee executable OCF mysql_monitor file
Closes-Bug: #1890470 Change-Id: Iee0aa8b1ae0f364d01d30a61381af222a264b090
This commit is contained in:
parent
f2916a4f09
commit
7eddd6074d
|
@ -205,6 +205,7 @@ def install():
|
||||||
apt_update(fatal=True)
|
apt_update(fatal=True)
|
||||||
|
|
||||||
install_percona_xtradb_cluster()
|
install_percona_xtradb_cluster()
|
||||||
|
install_mysql_ocf()
|
||||||
|
|
||||||
|
|
||||||
def render_config(hosts=None):
|
def render_config(hosts=None):
|
||||||
|
@ -935,6 +936,7 @@ def shared_db_changed(relation_id=None, unit=None):
|
||||||
|
|
||||||
@hooks.hook('ha-relation-joined')
|
@hooks.hook('ha-relation-joined')
|
||||||
def ha_relation_joined(relation_id=None):
|
def ha_relation_joined(relation_id=None):
|
||||||
|
install_mysql_ocf()
|
||||||
sstpsswd = sst_password()
|
sstpsswd = sst_password()
|
||||||
_relation_data = {
|
_relation_data = {
|
||||||
'resources': {
|
'resources': {
|
||||||
|
@ -969,6 +971,7 @@ def ha_relation_joined(relation_id=None):
|
||||||
|
|
||||||
@hooks.hook('ha-relation-changed')
|
@hooks.hook('ha-relation-changed')
|
||||||
def ha_relation_changed():
|
def ha_relation_changed():
|
||||||
|
install_mysql_ocf()
|
||||||
update_client_db_relations()
|
update_client_db_relations()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -442,6 +442,8 @@ def install_mysql_ocf():
|
||||||
else:
|
else:
|
||||||
log("'{}' already exists, skipping"
|
log("'{}' already exists, skipping"
|
||||||
.format(dest_file), level='INFO')
|
.format(dest_file), level='INFO')
|
||||||
|
# Always set to executable
|
||||||
|
os.chmod(dest_file, 0o755)
|
||||||
|
|
||||||
|
|
||||||
def get_wsrep_value(key):
|
def get_wsrep_value(key):
|
||||||
|
|
|
@ -51,7 +51,8 @@ TO_PATCH = ['log', 'config',
|
||||||
'peer_retrieve_by_prefix',
|
'peer_retrieve_by_prefix',
|
||||||
'client_node_is_ready',
|
'client_node_is_ready',
|
||||||
'relation_set',
|
'relation_set',
|
||||||
'relation_get']
|
'relation_get',
|
||||||
|
'install_mysql_ocf']
|
||||||
|
|
||||||
|
|
||||||
class TestSharedDBRelation(CharmTestCase):
|
class TestSharedDBRelation(CharmTestCase):
|
||||||
|
|
Loading…
Reference in New Issue