diff --git a/defaults/main.yml b/defaults/main.yml index 372a8bd5..02706348 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -86,8 +86,6 @@ glance_show_multiple_locations: "{{ glance_default_store == 'rbd' }}" ## API options -# The v1 API is deprecated and scheduled for removal in Queens. -glance_enable_v1_api: False glance_enable_v2_api: True # The v2 API does not require the registry service. # The registry service is scheduled for removal in the S cycle. @@ -259,24 +257,16 @@ glance_services: init_config_overrides: "{{ glance_api_init_overrides }}" start_order: 1 wsgi_overrides: "{{ glance_api_uwsgi_ini_overrides }}" - wsgi_app: "{{ not glance_enable_v1_api }}" + wsgi_app: True wsgi_name: glance-wsgi-api uwsgi_bind_address: "{{ glance_api_bind_address }}" uwsgi_port: "{{ glance_api_service_port }}" - execstarts: >- - {{ glance_enable_v1_api | ternary( - glance_bin ~ '/glance-api', - glance_uwsgi_bin ~ '/uwsgi --autoload --ini /etc/uwsgi/glance-api.ini') - }} - execreloads: >- - {{ glance_enable_v1_api | ternary( - '/bin/kill -HUP $MAINPID', - glance_uwsgi_bin ~ '/uwsgi --reload /var/run/glance-api/glance-api.pid') - }} + execstarts: "{{ glance_uwsgi_bin }}/uwsgi --autoload --ini /etc/uwsgi/glance-api.ini" + execreloads: "{{ glance_uwsgi_bin }}/uwsgi --reload /var/run/glance-api/glance-api.pid" glance-registry: group: glance_registry service_name: glance-registry - condition: "{{ glance_enable_v1_api | bool or glance_enable_v2_registry | bool }}" + condition: "{{ glance_enable_v2_registry | bool }}" init_config_overrides: "{{ glance_registry_init_overrides }}" start_order: 2 execstarts: "{{ _glance_bin }}/glance-registry" diff --git a/releasenotes/notes/remove-v1-api-4c66f43c4f8404b6.yaml b/releasenotes/notes/remove-v1-api-4c66f43c4f8404b6.yaml new file mode 100644 index 00000000..d6409bf7 --- /dev/null +++ b/releasenotes/notes/remove-v1-api-4c66f43c4f8404b6.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The glance v1 API is now removed upstream and the deployment code is now + removed from this glance ansible role. The variable ``glance_enable_v1_api`` + is removed. diff --git a/templates/glance-api-paste.ini.j2 b/templates/glance-api-paste.ini.j2 index bc9a57db..d2f10722 100644 --- a/templates/glance-api-paste.ini.j2 +++ b/templates/glance-api-paste.ini.j2 @@ -37,15 +37,11 @@ pipeline = cors healthcheck http_proxy_to_wsgi versionnegotiation osprofiler con [composite:rootapp] paste.composite_factory = glance.api:root_app_factory /: apiversions -/v1: apiv1app /v2: apiv2app [app:apiversions] paste.app_factory = glance.api.versions:create_resource -[app:apiv1app] -paste.app_factory = glance.api.v1.router:API.factory - [app:apiv2app] paste.app_factory = glance.api.v2.router:API.factory diff --git a/templates/glance-api.conf.j2 b/templates/glance-api.conf.j2 index 0971aa21..a8f0ff78 100644 --- a/templates/glance-api.conf.j2 +++ b/templates/glance-api.conf.j2 @@ -17,8 +17,6 @@ registry_port = {{ glance_registry_service_port }} registry_client_protocol = {{ glance_service_registry_proto }} cinder_catalog_info = volume:cinder:internalURL -enable_v1_api = {{ glance_enable_v1_api | bool }} -enable_v1_registry = {{ glance_enable_v1_api | bool }} enable_v2_api = {{ glance_enable_v2_api | bool }} enable_v2_registry = {{ glance_enable_v2_registry | bool }} diff --git a/templates/glance-registry.conf.j2 b/templates/glance-registry.conf.j2 index 592fad25..f650a803 100644 --- a/templates/glance-registry.conf.j2 +++ b/templates/glance-registry.conf.j2 @@ -14,8 +14,6 @@ workers = {{ glance_registry_workers | default(glance_api_threads) }} api_limit_max = 1000 limit_param_default = 25 -enable_v1_api = {{ glance_enable_v1_api | bool }} -enable_v1_registry = {{ glance_enable_v1_api | bool }} enable_v2_api = {{ glance_enable_v2_api | bool }} enable_v2_registry = {{ glance_enable_v2_registry | bool }} diff --git a/tests/os_glance-overrides.yml b/tests/os_glance-overrides.yml index b1f457e8..c160bcaa 100644 --- a/tests/os_glance-overrides.yml +++ b/tests/os_glance-overrides.yml @@ -18,6 +18,5 @@ tempest_run: yes tempest_test_whitelist: - tempest.api.image -tempest_image_api_v1_enabled: "{{ glance_enable_v1_api | default(False) }}" +tempest_image_api_v1_enabled: False tempest_image_api_v2_enabled: "{{ glance_enable_v2_api | default(True) }}" - diff --git a/tox.ini b/tox.ini index 5f7826d1..64c40f6d 100644 --- a/tox.ini +++ b/tox.ini @@ -105,14 +105,6 @@ commands = bash -c "{toxinidir}/tests/test-glance-upgrades.sh" -[testenv:v1_api_enabled] -setenv = - {[testenv]setenv} - ANSIBLE_PARAMETERS=-e glance_enable_v1_api=yes -commands = - bash -c "{toxinidir}/tests/common/test-ansible-functional.sh" - - [testenv:v2_registry_enabled] setenv = {[testenv]setenv} diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 0dca8ff8..553e4342 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -13,13 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- job: - name: openstack-ansible-v1_api_enabled - parent: openstack-ansible-functional - nodeset: ubuntu-xenial - vars: - tox_env: v1_api_enabled - - job: name: openstack-ansible-v2_registry_enabled parent: openstack-ansible-functional diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index bfcb5bfa..0314cc07 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -19,7 +19,6 @@ jobs: - openstack-ansible-nfs_glance - openstack-ansible-upgrade-ubuntu-xenial - - openstack-ansible-v1_api_enabled - openstack-ansible-v2_registry_enabled - openstack-ansible-glance-ssl-nv - openstack-ansible-functional-distro_install-ubuntu-xenial @@ -32,5 +31,4 @@ jobs: - openstack-ansible-nfs_glance - openstack-ansible-upgrade-ubuntu-xenial - - openstack-ansible-v1_api_enabled - openstack-ansible-v2_registry_enabled