diff --git a/ansible/roles/neutron/templates/metadata_agent.ini.j2 b/ansible/roles/neutron/templates/metadata_agent.ini.j2 index cce556950e..39ee0e4bc9 100644 --- a/ansible/roles/neutron/templates/metadata_agent.ini.j2 +++ b/ansible/roles/neutron/templates/metadata_agent.ini.j2 @@ -10,17 +10,3 @@ user_domain_id = default project_name = service username = neutron password = {{ neutron_keystone_password }} - -nova_url = http://{{ kolla_internal_address }}:{{ nova_api_port }}/v2 -notify_nova_on_port_data_changes = True -notify_nova_on_port_status_change = True - -[nova] -auth_url = http://{{ kolla_internal_address }}:{{ keystone_admin_port }} -auth_plugin = password -project_domain_id = default -user_domain_id = default -region_name = {{ openstack_region_name }} -project_name = service -username = nova -password = {{ nova_keystone_password }} diff --git a/ansible/roles/neutron/templates/neutron.conf.j2 b/ansible/roles/neutron/templates/neutron.conf.j2 index 8c9961fd64..7d0313d1f2 100644 --- a/ansible/roles/neutron/templates/neutron.conf.j2 +++ b/ansible/roles/neutron/templates/neutron.conf.j2 @@ -15,6 +15,21 @@ allow_overlapping_ips = true core_plugin = ml2 service_plugins = router + +nova_url = http://{{ kolla_internal_address }}:{{ nova_api_port }}/v2 +notify_nova_on_port_data_changes = True +notify_nova_on_port_status_change = True + +[nova] +auth_url = http://{{ kolla_internal_address }}:{{ keystone_admin_port }} +auth_plugin = password +project_domain_id = default +user_domain_id = default +region_name = {{ openstack_region_name }} +project_name = service +username = nova +password = {{ nova_keystone_password }} + [oslo_messaging_rabbit] rabbit_host = {{ kolla_internal_address }} rabbit_userid = {{ rabbitmq_user }} diff --git a/ansible/roles/nova/tasks/start.yml b/ansible/roles/nova/tasks/start.yml index 1d1c92356f..ebe17a16e4 100644 --- a/ansible/roles/nova/tasks/start.yml +++ b/ansible/roles/nova/tasks/start.yml @@ -10,6 +10,7 @@ container_volumes: - "/run:/run" - "/lib/modules:/lib/modules:ro" + - "/var/lib/nova/instances" when: inventory_hostname in groups['compute'] - include: ../../start.yml @@ -70,8 +71,11 @@ KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" container_image: "{{ docker_nova_compute_image_full }}" container_name: "nova_compute" + container_privileged: "True" container_volumes: - "{{ node_config_directory }}/nova-compute/:/opt/kolla/nova-compute/:ro" - "/run:/run" - "/lib/modules:/lib/modules:ro" + container_volumes_from: + - "nova_libvirt" when: inventory_hostname in groups['compute'] diff --git a/docker/centos/binary/nova/nova-compute/Dockerfile b/docker/centos/binary/nova/nova-compute/Dockerfile index 6cdd27fbe3..754704ba54 100644 --- a/docker/centos/binary/nova/nova-compute/Dockerfile +++ b/docker/centos/binary/nova/nova-compute/Dockerfile @@ -2,6 +2,7 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-nova-compute \ + openvswitch \ sysfsutils && yum clean all COPY config-nova-compute.sh /opt/kolla/config-nova-compute.sh diff --git a/docker/common/neutron/neutron-server/config-external.sh b/docker/common/neutron/neutron-server/config-external.sh index c8558ecca3..574923067f 100755 --- a/docker/common/neutron/neutron-server/config-external.sh +++ b/docker/common/neutron/neutron-server/config-external.sh @@ -9,8 +9,7 @@ if [[ -f "$SOURCE" ]]; then chmod 0644 $TARGET fi -# TODO(SamYaple): Remove this from neutron-server once bootstrap is understood -SOURCE="/opt/kolla/neutron-openvswitch-agent/ml2_conf.ini" +SOURCE="/opt/kolla/neutron-server/ml2_conf.ini" TARGET="/etc/neutron/plugins/ml2/ml2_conf.ini" OWNER="neutron" diff --git a/docker/common/neutron/neutron-server/start.sh b/docker/common/neutron/neutron-server/start.sh index 7df950e57e..97317c05bd 100755 --- a/docker/common/neutron/neutron-server/start.sh +++ b/docker/common/neutron/neutron-server/start.sh @@ -2,7 +2,7 @@ set -o errexit CMD="/usr/bin/neutron-server" -ARGS="--config-file /etc/neutron/neutron.conf" +ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini" # Loading common functions. source /opt/kolla/kolla-common.sh diff --git a/docker/common/nova/nova-libvirt/start.sh b/docker/common/nova/nova-libvirt/start.sh index 00d7046d1c..58ad58cb04 100755 --- a/docker/common/nova/nova-libvirt/start.sh +++ b/docker/common/nova/nova-libvirt/start.sh @@ -10,4 +10,12 @@ source /opt/kolla/kolla-common.sh # Config-internal script exec out of this function, it does not return here. set_configs +# TODO(SamYaple): Unify this with config-internal. Tweak libvirt.conf rather +# than change permissions. +# Fix permissions for libvirt +if [[ -c /dev/kvm ]]; then + chmod 660 /dev/kvm + chown root:kvm /dev/kvm +fi + exec $CMD $ARGS