Make sure haproxy runs post-install

Unconfigured keystone service listening on ports destined for haproxy
race with start of haproxy service.

Change-Id: I9f601344e72bd67738429f82151f9683f5ecf8e4
Closes-Bug: #1648396
This commit is contained in:
Frode Nordahl
2017-02-27 17:33:04 +01:00
parent ad1dd75733
commit 01816c8466
2 changed files with 7 additions and 6 deletions

View File

@@ -47,6 +47,8 @@ from charmhelpers.core.hookenv import (
from charmhelpers.core.host import (
mkdir,
service_pause,
service_stop,
service_start,
service_restart,
)
@@ -168,6 +170,10 @@ def install():
status_set('maintenance', 'Installing apt packages')
apt_update()
apt_install(determine_packages(), fatal=True)
# unconfigured keystone service will prevent start of haproxy in some
# circumstances. make sure haproxy runs. LP #1648396
service_stop('keystone')
service_start('haproxy')
if run_in_apache():
disable_unused_apache_sites()
if not git_install_requested():

View File

@@ -49,12 +49,7 @@ class KeystoneBasicDeployment(OpenStackAmuletDeployment):
"""Deploy the entire test environment."""
super(KeystoneBasicDeployment, self).__init__(series, openstack,
source, stable)
if self.is_liberty_or_newer():
self.keystone_num_units = 3
else:
# issues with starting haproxy when clustered on trusty with
# icehouse and kilo. See LP #1648396
self.keystone_num_units = 1
self.keystone_api_version = 2
self.git = git
self._add_services()