From 03fd9715c5d533b5533d0bb108ff54174e86e5c5 Mon Sep 17 00:00:00 2001 From: caoyuan Date: Mon, 30 Apr 2018 23:57:03 +0800 Subject: [PATCH] Remove the deprecate the Glance Registry A spec to Deprecate the Glance Registry Service[0] was accepted in Newton, but it contained the ambiguous statement, "Mark the service as deprecated and ready for removal in the Q release." kolla-ansible disable the glance-registry in Q release[1], and since we are in S now, remove glance-registry is safe. [0]: http://specs.openstack.org/openstack/glance-specs/specs/newton/approved/glance/deprecate-registry.html [1]: https://review.openstack.org/#/c/566804/ Change-Id: I48f794029e97aa6f76bbd500e33f28f51a3f2ac4 --- ansible/group_vars/all.yml | 1 - ansible/inventory/all-in-one | 3 -- ansible/inventory/multinode | 3 -- ansible/roles/glance/defaults/main.yml | 16 +----- ansible/roles/glance/handlers/main.yml | 25 --------- ansible/roles/glance/tasks/config.yml | 4 -- ansible/roles/glance/tasks/deploy.yml | 6 +-- ansible/roles/glance/tasks/precheck.yml | 11 ---- .../glance/templates/glance-registry.conf.j2 | 54 ------------------- .../glance/templates/glance-registry.json.j2 | 24 --------- ansible/roles/haproxy/tasks/precheck.yml | 13 ----- tests/templates/inventory.j2 | 3 -- 12 files changed, 3 insertions(+), 160 deletions(-) delete mode 100644 ansible/roles/glance/templates/glance-registry.conf.j2 delete mode 100644 ansible/roles/glance/templates/glance-registry.json.j2 diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index c6c94284b5..59a93a2af2 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -209,7 +209,6 @@ fluentd_syslog_port: "5140" freezer_api_port: "9090" glance_api_port: "9292" -glance_registry_port: "9191" gnocchi_api_port: "8041" diff --git a/ansible/inventory/all-in-one b/ansible/inventory/all-in-one index 0fd9e7425f..b9db58677e 100644 --- a/ansible/inventory/all-in-one +++ b/ansible/inventory/all-in-one @@ -256,9 +256,6 @@ control [glance-api:children] glance -[glance-registry:children] -glance - # Nova [nova-api:children] nova diff --git a/ansible/inventory/multinode b/ansible/inventory/multinode index 6c23e0b83a..cedfb47ef3 100644 --- a/ansible/inventory/multinode +++ b/ansible/inventory/multinode @@ -275,9 +275,6 @@ control [glance-api:children] glance -[glance-registry:children] -glance - # Nova [nova-api:children] nova diff --git a/ansible/roles/glance/defaults/main.yml b/ansible/roles/glance/defaults/main.yml index 8f1764a43f..b3cc34def2 100644 --- a/ansible/roles/glance/defaults/main.yml +++ b/ansible/roles/glance/defaults/main.yml @@ -36,17 +36,7 @@ glance_services: backend_http_extra: - "timeout server {{ haproxy_glance_api_server_timeout }}" custom_member_list: "{{ haproxy_members.split(';') }}" - glance-registry: - container_name: glance_registry - group: glance-registry - enabled: false - image: "{{ glance_registry_image_full }}" - volumes: - - "{{ node_config_directory }}/glance-registry/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "{{ kolla_dev_repos_directory ~ '/glance/glance:/var/lib/kolla/venv/lib/python2.7/site-packages/glance' if glance_dev_mode | bool else '' }}" - - "kolla_logs:/var/log/kolla/" - dimensions: "{{ glance_registry_dimensions }}" + #################### # HAProxy @@ -105,10 +95,6 @@ haproxy_glance_api_server_timeout: "6h" glance_install_type: "{{ kolla_install_type }}" glance_tag: "{{ openstack_release }}" -glance_registry_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ glance_install_type }}-glance-registry" -glance_registry_tag: "{{ glance_tag }}" -glance_registry_image_full: "{{ glance_registry_image }}:{{ glance_registry_tag }}" - glance_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ glance_install_type }}-glance-api" glance_api_tag: "{{ glance_tag }}" glance_api_image_full: "{{ glance_api_image }}:{{ glance_api_tag }}" diff --git a/ansible/roles/glance/handlers/main.yml b/ansible/roles/glance/handlers/main.yml index ff367fe997..06a3e0a307 100644 --- a/ansible/roles/glance/handlers/main.yml +++ b/ansible/roles/glance/handlers/main.yml @@ -26,28 +26,3 @@ or policy_overwriting.changed | bool or glance_api_container.changed | bool or glance_upgrading | bool - -- name: Restart glance-registry container - vars: - service_name: "glance-registry" - service: "{{ glance_services[service_name] }}" - config_json: "{{ glance_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" - glance_conf: "{{ glance_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" - policy_overwriting: "{{ glance_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" - glance_registry_container: "{{ check_glance_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" - become: true - kolla_docker: - action: "recreate_or_restart_container" - common_options: "{{ docker_common_options }}" - name: "{{ service.container_name }}" - image: "{{ service.image }}" - volumes: "{{ service.volumes|reject('equalto', '')|list }}" - dimensions: "{{ service.dimensions }}" - when: - - kolla_action != "config" - - inventory_hostname in groups[service.group] - - service.enabled | bool - - config_json.changed | bool - or glance_conf.changed | bool - or policy_overwriting.changed | bool - or glance_registry_container.changed | bool diff --git a/ansible/roles/glance/tasks/config.yml b/ansible/roles/glance/tasks/config.yml index e7c459555f..808dc37138 100644 --- a/ansible/roles/glance/tasks/config.yml +++ b/ansible/roles/glance/tasks/config.yml @@ -52,7 +52,6 @@ with_dict: "{{ glance_services }}" notify: - Restart glance-api container - - Restart glance-registry container - name: Copying over glance-*.conf vars: @@ -74,7 +73,6 @@ with_dict: "{{ glance_services }}" notify: - Restart glance-api container - - Restart glance-registry container - name: Copying over glance-swift.conf for glance_api vars: @@ -110,7 +108,6 @@ with_dict: "{{ glance_services }}" notify: - Restart glance-api container - - Restart glance-registry container - name: Check glance containers become: true @@ -130,4 +127,3 @@ with_dict: "{{ glance_services }}" notify: - Restart glance-api container - - Restart glance-registry container diff --git a/ansible/roles/glance/tasks/deploy.yml b/ansible/roles/glance/tasks/deploy.yml index fc2c667e49..e40a5686d3 100644 --- a/ansible/roles/glance/tasks/deploy.yml +++ b/ansible/roles/glance/tasks/deploy.yml @@ -7,8 +7,7 @@ - include_tasks: clone.yml when: - glance_dev_mode | bool - - inventory_hostname in groups['glance-api'] or - inventory_hostname in groups['glance-registry'] + - inventory_hostname in groups['glance-api'] - include_tasks: bootstrap.yml when: inventory_hostname in groups['glance-api'] @@ -17,5 +16,4 @@ meta: flush_handlers - include_tasks: check.yml - when: inventory_hostname in groups['glance-api'] or - inventory_hostname in groups['glance-registry'] + when: inventory_hostname in groups['glance-api'] diff --git a/ansible/roles/glance/tasks/precheck.yml b/ansible/roles/glance/tasks/precheck.yml index b030bcd156..6c0386602b 100644 --- a/ansible/roles/glance/tasks/precheck.yml +++ b/ansible/roles/glance/tasks/precheck.yml @@ -14,14 +14,3 @@ when: - inventory_hostname in groups[glance_services['glance-api']['group']] - container_facts['glance_api'] is not defined - -- name: Checking free port for Glance Registry - wait_for: - host: "{{ api_interface_address }}" - port: "{{ glance_registry_port }}" - connect_timeout: 1 - timeout: 1 - state: stopped - when: - - inventory_hostname in groups[glance_services['glance-registry']['group']] - - container_facts['glance_registry'] is not defined diff --git a/ansible/roles/glance/templates/glance-registry.conf.j2 b/ansible/roles/glance/templates/glance-registry.conf.j2 deleted file mode 100644 index d44095faec..0000000000 --- a/ansible/roles/glance/templates/glance-registry.conf.j2 +++ /dev/null @@ -1,54 +0,0 @@ -[DEFAULT] -debug = {{ glance_logging_debug }} - -# NOTE(elemoine) log_dir alone does not work for Glance -log_file = /var/log/kolla/glance/glance-registry.log - -bind_host = {{ api_interface_address }} -bind_port = {{ glance_registry_port }} -workers = {{ openstack_service_workers }} - -transport_url = {{ rpc_transport_url }} - -[database] -connection = mysql+pymysql://{{ glance_database_user }}:{{ glance_database_password }}@{{ glance_database_address }}/{{ glance_database_name }} -max_retries = -1 - -[keystone_authtoken] -www_authenticate_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }} -auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }} -auth_type = password -project_domain_id = {{ default_project_domain_id }} -user_domain_id = {{ default_user_domain_id }} -project_name = service -username = {{ glance_keystone_user }} -password = {{ glance_keystone_password }} - -memcache_security_strategy = ENCRYPT -memcache_secret_key = {{ memcache_secret_key }} -memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} - -[paste_deploy] -flavor = keystone - -[oslo_messaging_notifications] -transport_url = {{ notify_transport_url }} -{% if glance_enabled_notification_topics %} -driver = messagingv2 -topics = {{ glance_enabled_notification_topics | map(attribute='name') | join(',') }} -{% else %} -driver = noop -{% endif %} - -{% if glance_policy_file is defined %} -[oslo_policy] -policy_file = {{ glance_policy_file }} -{% endif %} - -{% if enable_osprofiler | bool %} -[profiler] -enabled = true -trace_sqlalchemy = true -hmac_keys = {{ osprofiler_secret }} -connection_string = {{ osprofiler_backend_connection_string }} -{% endif %} diff --git a/ansible/roles/glance/templates/glance-registry.json.j2 b/ansible/roles/glance/templates/glance-registry.json.j2 deleted file mode 100644 index 9a1411bfbd..0000000000 --- a/ansible/roles/glance/templates/glance-registry.json.j2 +++ /dev/null @@ -1,24 +0,0 @@ -{ - "command": "glance-registry", - "config_files": [ - { - "source": "{{ container_config_directory }}/glance-registry.conf", - "dest": "/etc/glance/glance-registry.conf", - "owner": "glance", - "perm": "0600" - }{% if glance_policy_file is defined %}, - { - "source": "{{ container_config_directory }}/{{ glance_policy_file }}", - "dest": "/etc/glance/{{ glance_policy_file }}", - "owner": "glance", - "perm": "0600" - }{% endif %} - ], - "permissions": [ - { - "path": "/var/log/kolla/glance", - "owner": "glance:glance", - "recurse": true - } - ] -} diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml index b6024babfb..fe94686c4a 100644 --- a/ansible/roles/haproxy/tasks/precheck.yml +++ b/ansible/roles/haproxy/tasks/precheck.yml @@ -283,19 +283,6 @@ - haproxy_stat.find('glance_api') == -1 - "host_running_haproxy == 'None'" -- name: Checking free port for Glance Registry HAProxy - wait_for: - host: "{{ kolla_internal_vip_address }}" - port: "{{ glance_registry_port }}" - connect_timeout: 1 - timeout: 1 - state: stopped - when: - - enable_glance | bool - - inventory_hostname in groups['haproxy'] - - haproxy_stat.find('glance_registry') == -1 - - "host_running_haproxy == 'None'" - - name: Checking free port for Gnocchi API HAProxy wait_for: host: "{{ kolla_internal_vip_address }}" diff --git a/tests/templates/inventory.j2 b/tests/templates/inventory.j2 index d3e00d0c0d..db42e6a7df 100644 --- a/tests/templates/inventory.j2 +++ b/tests/templates/inventory.j2 @@ -249,9 +249,6 @@ control [glance-api:children] glance -[glance-registry:children] -glance - # Nova [nova-api:children] nova