commit 54a4b4e426648d4aa7cf5bdaacee1c7f3c644f73 Author: Dmitriy Rabotyagov Date: Tue Oct 6 17:23:06 2020 +0300 Remove glance_registry from inventory Glance registry has been completely removed in ussuri, so it's time to clean it up from the integrated repo. Change-Id: I9b7c5ebe93df9c9ba3a8be9a9acd590fbb18c5f7 diff --git a/doc/source/reference/configuration/using-overrides.rst b/doc/source/reference/configuration/using-overrides.rst index 6f3ca39..39e2dbe 100644 --- a/doc/source/reference/configuration/using-overrides.rst +++ b/doc/source/reference/configuration/using-overrides.rst @@ -227,8 +227,6 @@ Image service (glance): * glance_glance_api_conf_overrides * glance_glance_cache_conf_overrides * glance_glance_manage_conf_overrides - * glance_glance_registry_paste_ini_overrides - * glance_glance_registry_conf_overrides * glance_glance_scrubber_conf_overrides * glance_glance_scheme_json_overrides * glance_policy_overrides diff --git a/inventory/env.d/glance.yml b/inventory/env.d/glance.yml index 5e14c89..a1c4924 100644 --- a/inventory/env.d/glance.yml +++ b/inventory/env.d/glance.yml @@ -17,9 +17,6 @@ component_skel: glance_api: belongs_to: - glance_all - glance_registry: - belongs_to: - - glance_all container_skel: @@ -29,7 +26,6 @@ container_skel: - os-infra_containers contains: - glance_api - - glance_registry properties: container_fs_size: 12G diff --git a/inventory/group_vars/haproxy/haproxy.yml b/inventory/group_vars/haproxy/haproxy.yml index 4617a3e..d9e2b4a 100644 --- a/inventory/group_vars/haproxy/haproxy.yml +++ b/inventory/group_vars/haproxy/haproxy.yml @@ -28,7 +28,6 @@ haproxy_whitelist_networks: - 10.0.0.0/8 haproxy_galera_whitelist_networks: "{{ haproxy_whitelist_networks }}" -haproxy_glance_registry_whitelist_networks: "{{ haproxy_whitelist_networks }}" haproxy_keystone_admin_whitelist_networks: "{{ haproxy_whitelist_networks }}" haproxy_nova_metadata_whitelist_networks: "{{ haproxy_whitelist_networks }}" haproxy_rabbitmq_management_whitelist_networks: "{{ haproxy_whitelist_networks }}" @@ -83,21 +82,6 @@ haproxy_default_services: - "httpchk GET / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck" haproxy_service_enabled: "{{ groups['glance_api'] is defined and groups['glance_api'] | length > 0 }}" - service: - haproxy_service_name: glance_registry - haproxy_backend_nodes: "{{ groups['glance_registry'] | default([]) }}" - haproxy_ssl: "{{ haproxy_ssl }}" - haproxy_ssl_all_vips: "{{ haproxy_ssl_all_vips }}" - haproxy_port: 9191 - haproxy_balance_type: http - haproxy_backend_options: - - "httpchk GET / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck" - haproxy_whitelist_networks: "{{ haproxy_glance_registry_whitelist_networks }}" - haproxy_service_enabled: >- - {{ groups['glance_registry'] is defined and - groups['glance_registry'] | length > 0 and - (glance_enable_v2_registry | default(False)) | bool and - (glance_enable_v1_api | default(False)) | bool }} - - service: haproxy_service_name: gnocchi haproxy_backend_nodes: "{{ groups['gnocchi_all'] | default([]) }}" haproxy_port: 8041 diff --git a/inventory/inventory.ini b/inventory/inventory.ini index 52363a0..19be9f2 100644 --- a/inventory/inventory.ini +++ b/inventory/inventory.ini @@ -94,9 +94,7 @@ cinder_volume [glance_all:children] glance_api -glance_registry [glance_api] -[glance_registry] [gnocchi_all:children] gnocchi_api diff --git a/playbooks/common-playbooks/glance.yml b/playbooks/common-playbooks/glance.yml deleted file mode 100644 index 61e0629..0000000 --- a/playbooks/common-playbooks/glance.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- -# Copyright 2017, Rackspace US, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -- name: Gather glance facts - hosts: "{{ glance_hosts }}" - gather_facts: "{{ osa_gather_facts | default(True) }}" - tags: - - always - -- name: Install glance services - hosts: "{{ glance_hosts }}" - serial: "{{ glance_serial }}" - gather_facts: false - user: root - environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "../defaults/repo_packages/openstack_services.yml" - - "../defaults/{{ install_method }}_install.yml" - tags: - - glance - pre_tasks: - # In order to ensure that any container, software or - # config file changes which causes a container/service - # restart do not cause an unexpected outage, we drain - # the load balancer back end for this container. - - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml - vars: - haproxy_backend: glance_api-back - haproxy_state: disabled - when: - - "'glance_api' in group_names" - - "groups['glance_api'] | length > 1" - - - name: Configure container (non-nfs) - include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - vars: - list_of_bind_mounts: "{{ glance_container_bind_mounts }}" - when: - - not is_metal - - glance_default_store == "file" - - (glance_nfs_client is not defined) or (glance_nfs_client | length == 0) - - - name: Configure container (nfs) - include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - when: - - not is_metal - - (glance_default_store != "file") or (glance_nfs_client is defined) - - - include_tasks: ../common-tasks/unbound-clients.yml - when: - - hostvars['localhost']['resolvconf_enabled'] | bool - - roles: - - role: "os_glance" - - role: "system_crontab_coordination" - tags: - - crontab - - post_tasks: - # Now that container changes are done, we can set - # the load balancer back end for this container - # to available again. - - include_tasks: ../common-tasks/haproxy-endpoint-manage.yml - vars: - haproxy_backend: glance_api-back - haproxy_state: enabled - when: - - "'glance_api' in group_names" - - "groups['glance_api'] | length > 1" diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index fb4a23b..47b7b6a 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -13,19 +13,73 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install glance API services - include: common-playbooks/glance.yml - vars: - glance_hosts: "glance_api" - glance_serial: "{{ glance_api_serial | default(['1', '100%']) }}" +- name: Gather glance facts + hosts: "glance_all" + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install glance services + hosts: "glance_all" + serial: "{{ glance_api_serial | default(['1', '100%']) }}" + gather_facts: false + user: root + environment: "{{ deployment_environment_variables | default({}) }}" + vars_files: + - "defaults/repo_packages/openstack_services.yml" + - "defaults/{{ install_method }}_install.yml" + tags: + - glance + pre_tasks: + # In order to ensure that any container, software or + # config file changes which causes a container/service + # restart do not cause an unexpected outage, we drain + # the load balancer back end for this container. + - include_tasks: common-tasks/haproxy-endpoint-manage.yml + vars: + haproxy_backend: glance_api-back + haproxy_state: disabled + when: + - "'glance_api' in group_names" + - "groups['glance_api'] | length > 1" + + - name: Configure container (non-nfs) + include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + vars: + list_of_bind_mounts: "{{ glance_container_bind_mounts }}" + when: + - not is_metal + - glance_default_store == "file" + - (glance_nfs_client is not defined) or (glance_nfs_client | length == 0) + - name: Configure container (nfs) + include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" + when: + - not is_metal + - (glance_default_store != "file") or (glance_nfs_client is defined) + - include_tasks: common-tasks/unbound-clients.yml + when: + - hostvars['localhost']['resolvconf_enabled'] | bool + + roles: + - role: "os_glance" + - role: "system_crontab_coordination" + tags: + - crontab + + post_tasks: + # Now that container changes are done, we can set + # the load balancer back end for this container + # to available again. + - include_tasks: common-tasks/haproxy-endpoint-manage.yml + vars: + haproxy_backend: glance_api-back + haproxy_state: enabled + when: + - "'glance_api' in group_names" + - "groups['glance_api'] | length > 1" -- name: Install glance registry services - include: common-playbooks/glance.yml - vars: - glance_hosts: "glance_registry:!glance_api" - glance_serial: "{{ glance_registry_serial | default(['1', '100%']) }}" @@ -79,7 +133,7 @@ - name: Restart glance API to ensure new RPC object version is used - hosts: glance_api + hosts: glance_all gather_facts: no serial: "{{ glance_api_serial | default(['1','100%']) }}" user: root diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index f36c2b4..2dc44a6 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -65,7 +65,6 @@ cinder_osapi_volume_workers_max: 2 glance_api_threads_max: 2 glance_api_threads: 1 glance_api_workers: 1 -glance_registry_workers: 1 glance_wsgi_threads: 1 glance_wsgi_processes_max: 2 glance_wsgi_processes: 2 diff --git a/tests/test_inventory.py b/tests/test_inventory.py index 0f488a5..17bd9c3 100644 --- a/tests/test_inventory.py +++ b/tests/test_inventory.py @@ -226,7 +226,6 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase): 'glance_all', 'glance_api', 'glance_container', - 'glance_registry', 'gnocchi_all', 'gnocchi_api', 'gnocchi_container',