From 914fd48924eb9b856922c8ae0a83252ae344f0a7 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Tue, 30 Oct 2018 16:17:18 -0700 Subject: [PATCH] Fix issues with nova distro install on Ubuntu The Ubuntu nova-api and nova-spiceproxy distro packages create services with names differing from the OSA's defaults. Set default init overrides for these services which provide these names as aliases. The nova-compute-kvm package creates a nova-compute.conf file setting libvirt.virt_type=kvm which overrides anything in nova.conf. Remove it. Depends-On: https://review.openstack.org/#/c/614888 Change-Id: I0bf038930fde4790bcc8f9dbbacd236901c94346 --- defaults/main.yml | 4 ++-- tasks/nova_post_install.yml | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 630bf1a3..6742c52f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -495,7 +495,7 @@ nova_services: nova-api-os-compute: group: nova_api_os_compute service_name: nova-api-os-compute - init_config_overrides: "{{ nova_api_os_compute_init_overrides }}" + init_config_overrides: "{{ {'Install': {'Alias': 'nova-api.service'}} | combine(nova_api_os_compute_init_overrides) }}" start_order: 4 execstarts: "{{ nova_uwsgi_bin }}/uwsgi --autoload --ini /etc/uwsgi/nova-api-os-compute.ini" execreloads: "{{ nova_uwsgi_bin }}/uwsgi --reload /var/run/nova-api-os-compute/nova-api-os-compute.pid" @@ -544,7 +544,7 @@ nova_services: nova-spicehtml5proxy: group: nova_console service_name: nova-spicehtml5proxy - init_config_overrides: "{{ nova_spicehtml5proxy_init_overrides }}" + init_config_overrides: "{{ {'Install': {'Alias': 'nova-spiceproxy.service'}} | combine(nova_spicehtml5proxy_init_overrides) }}" condition: "{{ nova_console_type == 'spice' }}" start_order: 5 execstarts: "{{ nova_bin }}/nova-spicehtml5proxy" diff --git a/tasks/nova_post_install.yml b/tasks/nova_post_install.yml index 0f8b1c58..9225fecb 100644 --- a/tasks/nova_post_install.yml +++ b/tasks/nova_post_install.yml @@ -77,6 +77,17 @@ - nova-config - nova-post-install +- name: Remove nova-compute config + file: + path: /etc/nova/nova-compute.conf + state: absent + notify: + - Manage LB + - Restart nova services + tags: + - nova-config + - nova-post-install + - name: Drop sudoers file template: src: "sudoers.j2"