Add memcache as the coordinator backend
Both the zone and pool manager daemons require a coordination backend to be configured when there is more than one worker. There is almost always more than one worker as the charm user a multiplier based on the number of cpus to configure the number of workes. This change adds the coordinator-memcached relation and makes is compulsory for designate deployments. Change-Id: Ic1b35e33ba9b6f015b199c35ccff64d626c29582
This commit is contained in:
parent
749c65f7d1
commit
9bee68d19d
|
@ -12,6 +12,8 @@ charms:
|
|||
juju deploy mysql
|
||||
juju deploy rabbitmq-server
|
||||
juju deploy keystone
|
||||
juju deploy memcached
|
||||
juju add-relation designate memcached
|
||||
juju add-relation designate mysql
|
||||
juju add-relation designate rabbitmq-server
|
||||
juju add-relation designate keystone
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
includes: ['layer:openstack-api', 'interface:bind-rndc', 'interface:hacluster', 'interface:openstack-ha']
|
||||
includes: ['layer:openstack-api', 'interface:bind-rndc', 'interface:hacluster', 'interface:openstack-ha', 'interface:memcache']
|
||||
options:
|
||||
basic:
|
||||
use_venv: True
|
||||
|
|
|
@ -243,6 +243,7 @@ class DesignateAdapters(openstack_adapters.OpenStackAPIRelationAdapters):
|
|||
'shared_db': DesignateDBAdapter,
|
||||
'cluster': openstack_adapters.PeerHARelationAdapter,
|
||||
'dns_backend': BindRNDCRelationAdapter,
|
||||
'coordinator_memcached': openstack_adapters.MemcacheRelationAdapter,
|
||||
}
|
||||
|
||||
|
||||
|
@ -268,7 +269,8 @@ class DesignateCharm(openstack_charm.HAOpenStackCharm):
|
|||
}
|
||||
}
|
||||
|
||||
required_relations = ['shared-db', 'amqp', 'identity-service', ]
|
||||
required_relations = ['shared-db', 'amqp', 'identity-service',
|
||||
'coordinator-memcached']
|
||||
|
||||
restart_map = {
|
||||
'/etc/default/openstack': services,
|
||||
|
|
|
@ -28,6 +28,8 @@ requires:
|
|||
ha:
|
||||
interface: hacluster
|
||||
scope: container
|
||||
coordinator-memcached:
|
||||
interface: memcache
|
||||
peers:
|
||||
cluster:
|
||||
interface: openstack-ha
|
||||
|
|
|
@ -32,6 +32,7 @@ COMPLETE_INTERFACE_STATES = [
|
|||
'shared-db.available',
|
||||
'identity-service.available',
|
||||
'amqp.available',
|
||||
'coordinator-memcached.available',
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -377,8 +377,9 @@ connection = {{ shared_db.designate_uri }}
|
|||
## Coordination
|
||||
########################
|
||||
[coordination]
|
||||
# URL for the coordination backend to use.
|
||||
#backend_url = kazoo://127.0.0.1/
|
||||
{% if coordinator_memcached.url -%}
|
||||
backend_url = {{ coordinator_memcached.url }}
|
||||
{%- endif %}
|
||||
|
||||
########################
|
||||
## Hook Points
|
||||
|
|
|
@ -50,7 +50,7 @@ class DesignateBasicDeployment(amulet_deployment.OpenStackAmuletDeployment):
|
|||
self._deploy()
|
||||
|
||||
u.log.info('Waiting on extended status checks...')
|
||||
exclude_services = ['mongodb']
|
||||
exclude_services = ['mongodb', 'memcached']
|
||||
self._auto_wait_for_status(exclude_services=exclude_services)
|
||||
|
||||
self.d.sentry.wait()
|
||||
|
@ -68,6 +68,7 @@ class DesignateBasicDeployment(amulet_deployment.OpenStackAmuletDeployment):
|
|||
{'name': 'percona-cluster', 'constraints': {'mem': '3072M'}},
|
||||
{'name': 'rabbitmq-server'},
|
||||
{'name': 'keystone'},
|
||||
{'name': 'memcached', 'location': 'cs:memcached'},
|
||||
{'name': 'designate-bind'}
|
||||
]
|
||||
|
||||
|
@ -78,6 +79,7 @@ class DesignateBasicDeployment(amulet_deployment.OpenStackAmuletDeployment):
|
|||
|
||||
no_origin = [
|
||||
'designate-bind',
|
||||
'memcached',
|
||||
]
|
||||
|
||||
super(DesignateBasicDeployment, self)._add_services(this_service,
|
||||
|
@ -93,6 +95,7 @@ class DesignateBasicDeployment(amulet_deployment.OpenStackAmuletDeployment):
|
|||
'designate:identity-service': 'keystone:identity-service',
|
||||
'keystone:shared-db': 'percona-cluster:shared-db',
|
||||
'designate:dns-backend': 'designate-bind:dns-backend',
|
||||
'designate:coordinator-memcached': 'memcached:cache',
|
||||
}
|
||||
super(DesignateBasicDeployment, self)._add_relations(relations)
|
||||
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -13,7 +13,7 @@ setenv = VIRTUAL_ENV={envdir}
|
|||
LAYER_PATH={toxinidir}/layers
|
||||
INTERFACE_PATH={toxinidir}/interfaces
|
||||
JUJU_REPOSITORY={toxinidir}/build
|
||||
passenv = http_proxy https_proxy
|
||||
passenv = http_proxy https_proxy USER
|
||||
install_command =
|
||||
pip install {opts} {packages}
|
||||
deps =
|
||||
|
|
|
@ -15,6 +15,7 @@ class TestRegisteredHooks(test_utils.TestRegisteredHooks):
|
|||
'dns-config.available',
|
||||
'shared-db.available',
|
||||
'identity-service.available',
|
||||
'coordinator-memcached.available',
|
||||
'amqp.available')
|
||||
hook_set = {
|
||||
'when': {
|
||||
|
|
Loading…
Reference in New Issue