From 095bc436b7237ff3aa03d38d552a1e8a6e4859a7 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 17 Aug 2020 18:03:10 +0300 Subject: [PATCH] Remove nova_api_placement from inventory Since placement is standalone since train, it time we removed nova_api_placement group from inventory and playbooks Change-Id: Ibfab5ce56b36b7b96f8e376aa7f228ad6643cabf (cherry picked from commit 6d8337b327e8be582cef6270b21846b34fe21f0a) --- inventory/env.d/nova.yml | 4 ---- inventory/group_vars/haproxy/haproxy.yml | 3 --- inventory/inventory.ini | 2 -- playbooks/common-playbooks/nova.yml | 2 -- playbooks/os-nova-install.yml | 20 +++++++++----------- tests/test_inventory.py | 1 - 6 files changed, 9 insertions(+), 23 deletions(-) diff --git a/inventory/env.d/nova.yml b/inventory/env.d/nova.yml index a66ea6d9b9..060ce92a46 100644 --- a/inventory/env.d/nova.yml +++ b/inventory/env.d/nova.yml @@ -20,9 +20,6 @@ component_skel: nova_api_os_compute: belongs_to: - nova_all - nova_api_placement: - belongs_to: - - nova_all nova_compute: belongs_to: - nova_all @@ -45,7 +42,6 @@ container_skel: contains: - nova_api_metadata - nova_api_os_compute - - nova_api_placement - nova_conductor - nova_scheduler - nova_console diff --git a/inventory/group_vars/haproxy/haproxy.yml b/inventory/group_vars/haproxy/haproxy.yml index ffec9fd8d3..c119870314 100644 --- a/inventory/group_vars/haproxy/haproxy.yml +++ b/inventory/group_vars/haproxy/haproxy.yml @@ -167,9 +167,6 @@ haproxy_default_services: haproxy_backend_options: - "httpchk GET / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck" haproxy_service_enabled: "{{ groups['placement_all'] is defined and groups['placement_all'] | length > 0 }}" - - service: - haproxy_service_name: nova_api_placement - state: absent - service: haproxy_service_name: nova_console haproxy_backend_nodes: "{{ groups['nova_console'] | default([]) }}" diff --git a/inventory/inventory.ini b/inventory/inventory.ini index 63deccfda7..ca2f88f2cb 100644 --- a/inventory/inventory.ini +++ b/inventory/inventory.ini @@ -198,7 +198,6 @@ neutron_sriov_nic_agent [nova_all:children] nova_api_metadata -nova_api_placement nova_api_os_compute nova_cert nova_compute @@ -206,7 +205,6 @@ nova_conductor nova_console nova_scheduler [nova_api_metadata] -[nova_api_placement] [nova_api_os_compute] [nova_cert] [nova_compute] diff --git a/playbooks/common-playbooks/nova.yml b/playbooks/common-playbooks/nova.yml index 2503b0db4e..41ebabfdce 100644 --- a/playbooks/common-playbooks/nova.yml +++ b/playbooks/common-playbooks/nova.yml @@ -57,7 +57,6 @@ with_items: - "nova_api_metadata" - "nova_api_os_compute" - - "nova_api_placement" - "nova_console" - name: Determine management bridge IP address @@ -159,5 +158,4 @@ with_items: - "nova_api_metadata" - "nova_api_os_compute" - - "nova_api_placement" - "nova_console" diff --git a/playbooks/os-nova-install.yml b/playbooks/os-nova-install.yml index 43dc68d015..1544bc042f 100644 --- a/playbooks/os-nova-install.yml +++ b/playbooks/os-nova-install.yml @@ -16,14 +16,14 @@ - name: Install nova-conductor services import_playbook: common-playbooks/nova.yml vars: - nova_hosts: "nova_conductor:nova_scheduler:nova_api_os_compute:nova_api_placement:nova_api_metadata:nova_console" + nova_hosts: "nova_conductor:nova_scheduler:nova_api_os_compute:nova_api_metadata:nova_console" nova_serial: "{{ nova_conductor_serial | default(['1', '100%']) }}" - name: Install nova compute import_playbook: common-playbooks/nova.yml vars: - nova_hosts: "nova_compute:!nova_conductor:!nova_scheduler:!nova_api_os_compute:!nova_api_placement:!nova_api_metadata:!nova_console" + nova_hosts: "nova_compute:!nova_conductor:!nova_scheduler:!nova_api_os_compute:!nova_api_metadata:!nova_console" nova_serial: "{{ nova_compute_serial | default('100%') }}" @@ -75,11 +75,10 @@ run_once: yes -# Note that the placement API service and the console services do not -# understand how to reload, so they fail when you try to make them do -# so. We therefore restart them instead. +# Note that the console services do not understand how to reload, so they fail +# when you try to make them do so. We therefore restart them instead. - name: Reload all nova services which support a reload to ensure new RPC object version is used - hosts: "nova_all:!nova_api_placement:!nova_console" + hosts: "nova_all:!nova_console" gather_facts: no serial: "{{ nova_serial | default('100%') }}" user: root @@ -101,18 +100,17 @@ # https://bugs.launchpad.net/openstack-ansible/+bug/1715374 # service_action: "restarted" - service_negate: "{{ ['nova-placement-api.service', 'nova-novncproxy.service', 'nova-spicehtml5proxy.service' ] + nova_service_negate | default([]) }}" + service_negate: "{{ ['nova-novncproxy.service', 'nova-spicehtml5proxy.service' ] + nova_service_negate | default([]) }}" when: - "nova_all_software_updated | bool" - "ansible_local['openstack_ansible']['nova']['need_service_restart'] | bool" -# Note that the placement API service and the console services do not -# understand how to reload, so they fail when you try to make them do -# so. We therefore restart them instead. +# Note that the console services do not understand how to reload, so they fail +# when you try to make them do so. We therefore restart them instead. - name: Restart the remaining nova services to ensure new RPC object version is used - hosts: "nova_api_placement:nova_console" + hosts: "nova_console" gather_facts: no serial: "{{ nova_api_serial | default(['1', '100%']) }}" user: root diff --git a/tests/test_inventory.py b/tests/test_inventory.py index c7f1d82e61..b0ac59d8be 100644 --- a/tests/test_inventory.py +++ b/tests/test_inventory.py @@ -399,7 +399,6 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase): 'nova_api_metadata', 'nova_api_os_compute', 'nova_api_container', - 'nova_api_placement', 'nova_compute', 'nova_compute_container', 'nova_conductor',