Various fixes for deploy from source
* Add arping to base install packages * Install nova configs * Drop neutron-lbaas-agent in Newton * Add symlinks to pip installed nova-rootwrap, nova-rootwrap-daemon and neutron-ns-metadata-proxy Change-Id: I1edf8324644430e07dab9333e666d1760195f5e5
This commit is contained in:
parent
cd9f61d465
commit
9c67db390c
@ -169,6 +169,7 @@ LEGACY_RES_MAP = ['res_monitor']
|
||||
L3HA_PACKAGES = ['keepalived', 'conntrack']
|
||||
|
||||
BASE_GIT_PACKAGES = [
|
||||
'arping',
|
||||
'dnsmasq',
|
||||
'libffi-dev',
|
||||
'libssl-dev',
|
||||
@ -945,14 +946,19 @@ def git_pre_install():
|
||||
|
||||
def git_post_install(projects_yaml):
|
||||
"""Perform post-install setup."""
|
||||
src_etc = os.path.join(git_src_dir(projects_yaml, 'neutron'), 'etc')
|
||||
etc_neutron = os.path.join(git_src_dir(projects_yaml, 'neutron'), 'etc')
|
||||
etc_nova = os.path.join(git_src_dir(projects_yaml, 'nova'), 'etc/nova')
|
||||
configs = [
|
||||
{'src': src_etc,
|
||||
{'src': etc_neutron,
|
||||
'dest': '/etc/neutron'},
|
||||
{'src': os.path.join(src_etc, 'neutron/plugins'),
|
||||
{'src': os.path.join(etc_neutron, 'neutron/plugins'),
|
||||
'dest': '/etc/neutron/plugins'},
|
||||
{'src': os.path.join(src_etc, 'neutron/rootwrap.d'),
|
||||
{'src': os.path.join(etc_neutron, 'neutron/rootwrap.d'),
|
||||
'dest': '/etc/neutron/rootwrap.d'},
|
||||
{'src': etc_nova,
|
||||
'dest': '/etc/nova'},
|
||||
{'src': os.path.join(etc_nova, 'rootwrap.d'),
|
||||
'dest': '/etc/nova/rootwrap.d'},
|
||||
]
|
||||
|
||||
for c in configs:
|
||||
@ -962,11 +968,20 @@ def git_post_install(projects_yaml):
|
||||
|
||||
# NOTE(coreycb): Need to find better solution than bin symlinks.
|
||||
symlinks = [
|
||||
{'src': os.path.join(git_pip_venv_dir(projects_yaml),
|
||||
'bin/neutron-ns-metadata-proxy'),
|
||||
'link': '/usr/local/bin/neutron-ns-metadata-proxy'},
|
||||
{'src': os.path.join(git_pip_venv_dir(projects_yaml),
|
||||
'bin/neutron-rootwrap'),
|
||||
'link': '/usr/local/bin/neutron-rootwrap'},
|
||||
{'src': '/usr/local/bin/neutron-rootwrap',
|
||||
'link': '/usr/bin/neutron-rootwrap'},
|
||||
{'src': os.path.join(git_pip_venv_dir(projects_yaml),
|
||||
'bin/nova-rootwrap'),
|
||||
'link': '/usr/local/bin/nova-rootwrap'},
|
||||
{'src': os.path.join(git_pip_venv_dir(projects_yaml),
|
||||
'bin/nova-rootwrap-daemon'),
|
||||
'link': '/usr/local/bin/nova-rootwrap-daemon'},
|
||||
]
|
||||
|
||||
for s in symlinks:
|
||||
@ -990,13 +1005,15 @@ def git_post_install(projects_yaml):
|
||||
if lsb_release()['DISTRIB_RELEASE'] >= '15.10':
|
||||
templates_dir = os.path.join(charm_dir(), 'templates/git')
|
||||
daemons = ['neutron-dhcp-agent', 'neutron-l3-agent',
|
||||
'neutron-lbaas-agent', 'neutron-lbaasv2-agent',
|
||||
'neutron-lbaasv2-agent',
|
||||
'neutron-linuxbridge-agent', 'neutron-linuxbridge-cleanup',
|
||||
'neutron-macvtap-agent', 'neutron-metadata-agent',
|
||||
'neutron-metering-agent', 'neutron-openvswitch-agent',
|
||||
'neutron-ovs-cleanup', 'neutron-server',
|
||||
'neutron-sriov-nic-agent', 'neutron-vpn-agent',
|
||||
'nova-api-metadata']
|
||||
if os_release('neutron-common') <= 'mitaka':
|
||||
daemons.append('neutron-lbaas-agent')
|
||||
for daemon in daemons:
|
||||
neutron_context = {
|
||||
'daemon_path': os.path.join(bin_dir, daemon),
|
||||
|
@ -1265,7 +1265,7 @@ class TestNeutronAgentReallocation(CharmTestCase):
|
||||
projects_yaml = openstack_origin_git
|
||||
join.return_value = 'joined-string'
|
||||
self.lsb_release.return_value = {'DISTRIB_RELEASE': '15.10'}
|
||||
self.os_release.return_value = 'xenial'
|
||||
self.os_release.return_value = 'newton'
|
||||
neutron_utils.git_post_install(projects_yaml)
|
||||
|
||||
expected = [
|
||||
@ -1290,9 +1290,6 @@ class TestNeutronAgentReallocation(CharmTestCase):
|
||||
call('git/neutron-l3-agent.init.in.template',
|
||||
'joined-string', {'daemon_path': 'joined-string'},
|
||||
perms=420),
|
||||
call('git/neutron-lbaas-agent.init.in.template',
|
||||
'joined-string', {'daemon_path': 'joined-string'},
|
||||
perms=420),
|
||||
call('git/neutron-lbaasv2-agent.init.in.template',
|
||||
'joined-string', {'daemon_path': 'joined-string'},
|
||||
perms=420),
|
||||
|
Loading…
x
Reference in New Issue
Block a user