Pre 1607 release charm-helpers sync
Sync charmhelpers to pick up bug fixes for 1607 release Change-Id: I0dd97efbf8a0d3bb48011798c2494e74bc02926a
This commit is contained in:
parent
e6100d9dd5
commit
616e0161b4
@ -22,6 +22,7 @@
|
|||||||
# Adam Gandelman <adamg@ubuntu.com>
|
# Adam Gandelman <adamg@ubuntu.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from charmhelpers.core.hookenv import (
|
from charmhelpers.core.hookenv import (
|
||||||
@ -72,9 +73,23 @@ def get_ca_cert():
|
|||||||
return ca_cert
|
return ca_cert
|
||||||
|
|
||||||
|
|
||||||
|
def retrieve_ca_cert(cert_file):
|
||||||
|
cert = None
|
||||||
|
if os.path.isfile(cert_file):
|
||||||
|
with open(cert_file, 'r') as crt:
|
||||||
|
cert = crt.read()
|
||||||
|
return cert
|
||||||
|
|
||||||
|
|
||||||
def install_ca_cert(ca_cert):
|
def install_ca_cert(ca_cert):
|
||||||
if ca_cert:
|
if ca_cert:
|
||||||
with open('/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt',
|
cert_file = ('/usr/local/share/ca-certificates/'
|
||||||
'w') as crt:
|
'keystone_juju_ca_cert.crt')
|
||||||
crt.write(ca_cert)
|
old_cert = retrieve_ca_cert(cert_file)
|
||||||
subprocess.check_call(['update-ca-certificates', '--fresh'])
|
if old_cert and old_cert == ca_cert:
|
||||||
|
log("CA cert is the same as installed version", level=INFO)
|
||||||
|
else:
|
||||||
|
log("Installing new CA cert", level=INFO)
|
||||||
|
with open(cert_file, 'w') as crt:
|
||||||
|
crt.write(ca_cert)
|
||||||
|
subprocess.check_call(['update-ca-certificates', '--fresh'])
|
||||||
|
@ -212,6 +212,7 @@ GIT_DEFAULT_REPOS = {
|
|||||||
'glance': 'git://github.com/openstack/glance',
|
'glance': 'git://github.com/openstack/glance',
|
||||||
'horizon': 'git://github.com/openstack/horizon',
|
'horizon': 'git://github.com/openstack/horizon',
|
||||||
'keystone': 'git://github.com/openstack/keystone',
|
'keystone': 'git://github.com/openstack/keystone',
|
||||||
|
'networking-hyperv': 'git://github.com/openstack/networking-hyperv',
|
||||||
'neutron': 'git://github.com/openstack/neutron',
|
'neutron': 'git://github.com/openstack/neutron',
|
||||||
'neutron-fwaas': 'git://github.com/openstack/neutron-fwaas',
|
'neutron-fwaas': 'git://github.com/openstack/neutron-fwaas',
|
||||||
'neutron-lbaas': 'git://github.com/openstack/neutron-lbaas',
|
'neutron-lbaas': 'git://github.com/openstack/neutron-lbaas',
|
||||||
@ -761,6 +762,13 @@ def git_default_repos(projects_yaml):
|
|||||||
if service in ['neutron-api', 'neutron-gateway',
|
if service in ['neutron-api', 'neutron-gateway',
|
||||||
'neutron-openvswitch']:
|
'neutron-openvswitch']:
|
||||||
core_project = 'neutron'
|
core_project = 'neutron'
|
||||||
|
if service == 'neutron-api':
|
||||||
|
repo = {
|
||||||
|
'name': 'networking-hyperv',
|
||||||
|
'repository': GIT_DEFAULT_REPOS['networking-hyperv'],
|
||||||
|
'branch': branch,
|
||||||
|
}
|
||||||
|
repos.append(repo)
|
||||||
for project in ['neutron-fwaas', 'neutron-lbaas',
|
for project in ['neutron-fwaas', 'neutron-lbaas',
|
||||||
'neutron-vpnaas', 'nova']:
|
'neutron-vpnaas', 'nova']:
|
||||||
repo = {
|
repo = {
|
||||||
|
@ -78,11 +78,15 @@ class AmuletDeployment(object):
|
|||||||
|
|
||||||
def _deploy(self):
|
def _deploy(self):
|
||||||
"""Deploy environment and wait for all hooks to finish executing."""
|
"""Deploy environment and wait for all hooks to finish executing."""
|
||||||
|
timeout = int(os.environ.get('AMULET_SETUP_TIMEOUT', 900))
|
||||||
try:
|
try:
|
||||||
self.d.setup(timeout=900)
|
self.d.setup(timeout=timeout)
|
||||||
self.d.sentry.wait(timeout=900)
|
self.d.sentry.wait(timeout=timeout)
|
||||||
except amulet.helpers.TimeoutError:
|
except amulet.helpers.TimeoutError:
|
||||||
amulet.raise_status(amulet.FAIL, msg="Deployment timed out")
|
amulet.raise_status(
|
||||||
|
amulet.FAIL,
|
||||||
|
msg="Deployment timed out ({}s)".format(timeout)
|
||||||
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user