From 4277c1a1a486320eba696b473bb2b8428da95e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Fri, 5 Aug 2022 16:01:46 +0200 Subject: [PATCH] Do not enable nova_legacy service by default Change-Id: Ic89097fdc72d4fa11754201ed6e388bf79ca40b6 --- ansible/roles/nova/defaults/main.yml | 3 +++ ansible/roles/service-ks-register/tasks/main.yml | 2 ++ .../notes/disable-nova-legacy-service-2571d7a4bf30e08f.yaml | 6 ++++++ 3 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/disable-nova-legacy-service-2571d7a4bf30e08f.yaml diff --git a/ansible/roles/nova/defaults/main.yml b/ansible/roles/nova/defaults/main.yml index 42817bfd6b..b6a23e2f9d 100644 --- a/ansible/roles/nova/defaults/main.yml +++ b/ansible/roles/nova/defaults/main.yml @@ -212,6 +212,8 @@ nova_superconductor_workers: "{{ openstack_service_workers }}" nova_metadata_api_workers: "{{ openstack_service_workers }}" nova_scheduler_workers: "{{ openstack_service_workers }}" +nova_enable_nova_legacy_service: false + #################### # Keystone #################### @@ -222,6 +224,7 @@ nova_ks_services: endpoints: - {'interface': 'internal', 'url': '{{ nova_legacy_internal_endpoint }}'} - {'interface': 'public', 'url': '{{ nova_legacy_public_endpoint }}'} + enabled: "{{ nova_enable_nova_legacy_service | bool }}" - name: "nova" type: "compute" description: "OpenStack Compute Service" diff --git a/ansible/roles/service-ks-register/tasks/main.yml b/ansible/roles/service-ks-register/tasks/main.yml index fdf3605766..e96bf2b5ca 100644 --- a/ansible/roles/service-ks-register/tasks/main.yml +++ b/ansible/roles/service-ks-register/tasks/main.yml @@ -20,6 +20,7 @@ until: service_ks_register_result is success retries: "{{ service_ks_register_retries }}" delay: "{{ service_ks_register_delay }}" + when: item.enabled | default(True) | bool - name: "{{ project_name }} | Creating endpoints" kolla_toolbox: @@ -45,6 +46,7 @@ until: service_ks_register_result is success retries: "{{ service_ks_register_retries }}" delay: "{{ service_ks_register_delay }}" + when: item.0.enabled | default(True) | bool - name: "{{ project_name }} | Creating projects" kolla_toolbox: diff --git a/releasenotes/notes/disable-nova-legacy-service-2571d7a4bf30e08f.yaml b/releasenotes/notes/disable-nova-legacy-service-2571d7a4bf30e08f.yaml new file mode 100644 index 0000000000..659be8e594 --- /dev/null +++ b/releasenotes/notes/disable-nova-legacy-service-2571d7a4bf30e08f.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The Nova legacy service and its endpoints are no longer advertised by + default. To revert to the old behaviour, please set + ``nova_enable_nova_legacy_service: true`` in ``globals.yml``.