6838 Commits

Author SHA1 Message Date
Zuul
2d21685ee4 Merge "Remove all references to sheepdog" 2020-04-07 04:05:36 +00:00
Sean McGinnis
d021dcc88d
Update uWSGI doc definition names
An update appears to have now made Sphinx definition titles case
insensitive, causing errors in our Apache wsgi docs where we define 'uwsgi'
the protocol and 'uWSGI' the project.

This change gets around those errors by appending 'protocol' and
'project' respectively to make the entries unique.

Change-Id: I7c1d57cf3181945c69397f870465f693b67efca2
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-06 11:30:20 -05:00
Zuul
53df9ade64 Merge "Use application_url in API version document" 2020-04-06 07:08:24 +00:00
Zuul
6d2c55bc76 Merge "Update hacking and reenable local checks" 2020-04-03 10:49:24 +00:00
Cyril Roelandt
772bae36ea Remove all references to sheepdog
The sheepdog driver has recently been removed from glance_store.

Change-Id: I58f0d20cadfae7a7df8b5dce6d8d4c66eaa2a148
2020-04-02 15:39:57 -05:00
Zuul
907e9dfad4 Merge "Reminder: show_multiple_locations still deprecated" 2020-04-02 19:34:03 +00:00
Andreas Jaeger
89df136bc4 Update hacking and reenable local checks
Update to hacking 3.0.

Enable local hacking checks again, newer flake has a different
interface.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Unbreak docs:
Don't build apidocs for hacking - blacklist in doc/source/conf.py.

Change-Id: Ib230d72be9f0288d77cecd2c5ee0ff7aa91fc086
2020-04-02 18:00:44 +02:00
Corey Bryant
90146b62c7 Monkey patch original current_thread _active
Monkey patch the original current_thread to use the up-to-date _active
global variable. This solution is based on that documented at:
https://github.com/eventlet/eventlet/issues/592

Change-Id: I95a8d8cf02a0cb923418c0b5655442b8d7bc6b08
Closes-Bug: #1863021
2020-03-30 15:14:36 -04:00
Zuul
2143060833 Merge "Raise hacking to latest 2.0.0 release" 2020-03-30 14:50:31 +00:00
Andreas Jaeger
176d24de94 Cleanup old cruft
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Update requirements: Remove sphinx, it's not needed for testing, add
  pygments which is really needed.
- Update doc/requirements: Remove python 2.7 support
- tox.ini: Remove testing of po files, the infra scripts do this since
  a long time
- Update conf.py, no need to import openstackdocstheme anymore.

Change-Id: I9d030eb450f2c7ae74c25b7564a01b8785503e5e
2020-03-28 08:18:01 +01:00
Dirk Mueller
595c1b17ff
Raise hacking to latest 2.0.0 release
We were capped at a very old version of hacking. Hacking itself caps the
various linters it uses to remain consistent, so our pep8 job was not
checking quite a bit that current versions have added.

This raises that limit to the latest to get up to the level of other
projects and addresses the errors the updated linters uncovered.

Change-Id: I89a9d73fbd59606a649e26077acebc5c42873d67
Co-authored-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-03-27 14:11:08 -05:00
Zuul
2d80135f9b Merge "Add decompression import plugin" 2020-03-27 08:12:43 +00:00
Erno Kuvaja
e0c5440819 Add decompression import plugin
Supported compression formats initially are:
* zip
* gzip
* lha/lzh _if_ lhafile is installed

Change-Id: Id125ebb5e8a9b22a8797d3158e60451d80bfaa14
2020-03-26 15:44:59 +00:00
Brian Rosmaita
170a4035da Deprecate allow_additional_image_properties
Change-Id: I1c602e3817e0e89a6f7ebbf79adc1156d0b8a1aa
Implements: bp deprecate-allow-custom-props
2020-03-25 16:48:56 -04:00
Khuong Luu
30ece7aa28 Remove usages of SSL related config options in utils
SSL support was removed by [1] which resulted in removal of some
SSL related config options, but two config options 'key_file' and
'cert_file' are still used in utils.stash_conf_values() which is called
in reload functionality. When SIGHUP is sent to the parent process,
this usage causes it to crash and its children processes become orphaned,
which then causes the reload test to be stale (fail).

This change also includes:
- Remove 2 attributes and the decorator that help to skip this test
  (self.diable, self.disabled_message, and @skip_if_disabled)

[1] https://review.opendev.org/#/c/697969/5/glance/common/wsgi.py

Change-Id: I361c9d0b53a67b1cc60f0f3012e22accdcc46055
Closes-Bug: #1855708
2020-03-17 22:38:09 -07:00
Erno Kuvaja
f267bd6cde Add possibility to delete image from single store
This change introduces new 'v2/stores/<store_id>/<image_id>'
endpoint that accepts 'DELETE' method request. Once successful
the request will delete the image <image_id>'s location that
matches the store <store_id>. If the store is not read-only
or return image in use exception the image data will be
deleted. In the case of read-only store, the location will
be removed and if the image in use is raised, the call will
fail.

bp: delete-from-store

Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>

Change-Id: I1cb45026489a96a283b82e8e7efc9975c181fceb
2020-03-13 14:46:13 +00:00
Abhishek Kekane
d6a56f7c10 Community Goal: Project PTL & Contrib Docs Update
This patch standardizes the CONTRIBUTING.rst file and adds the
required doc/source/contributor/contributing.rst

Change-Id: I3f7ee29094085f1abefacd75f44a16fb7e679a82
Story: #2007236
Task: #38523
2020-03-11 06:09:47 +00:00
Andrii Ostapenko
c7ddabb15f Remove policy.json from setup.cfg
python setup.py install fails due to https://review.opendev.org/#/c/694387
unable to copy missing file.

Change-Id: Ib02387c4be70581df64cf5009750b4f30ae30159
2020-03-05 23:23:58 -06:00
Zuul
5569caa5c1 Merge "Amend tempest-irrelevant-files to avoid false positives" 2020-03-05 17:40:38 +00:00
Zuul
dd1975bd3e Merge "Remove empty policy.json" 2020-03-05 17:40:36 +00:00
Brian Rosmaita
d9f75852e0 Reminder: show_multiple_locations still deprecated
To avoid confusion about the status of this deprecated config option,
add a release note making clear that it has not yet been removed.

Change-Id: If043c416391e4c4d7089f628e50fc1b881c6d3af
2020-03-02 14:47:24 -05:00
Brian Rosmaita
0a29d31c13 Correct reference to 2 import methods
We now have 3.

Change-Id: I276cead53ef4315881fda3659874f33084cae7ab
2020-02-26 17:35:27 -05:00
Zuul
f46fe24616 Merge "Use devstack ceph plugin python3 job" 2020-02-24 17:27:17 +00:00
Zuul
2f91ae61d2 Merge "Multiple import fails if "all_stores" specified as "true"" 2020-02-24 17:27:16 +00:00
Russell Tweed
517ff4fbe4 Document os_admin_user in Useful Image Properties
Add documentation of the os_admin_user property to the Useful Image Properties guide.

Change-Id: I10e1e738aeacc708350993f05d373eaa1293fd27
Closes-Bug: 1850412
2020-02-21 11:22:44 +00:00
Zuul
2456c7d000 Merge "Use default cors config also when run as wsgi app" 2020-02-19 13:58:43 +00:00
Abhishek Kekane
d7de7ccbd6 Multiple import fails if "all_stores" specified as "true"
Newly added multiple import fails if user passes "all_stores" as "true"
in the request. The reason is if all_stores is specified then we are getting
stores using CONF.enabled_backends and unfortunately we are injecting
reserved stores 'os_glance_staging_store' and 'os_glance_tasks_store'
runtime. As a result import job tries to import the image in the
'os_glance_staging_store' store as well where it fails as that image
is already staged in this staging store.

Made a provision to exclude available reserved stores if "all_stores"
is specified.

Change-Id: If2616c275a969cdad5649e2cb0851275e5d0c7d2
Closes-Bug: #1863879
2020-02-19 12:03:58 +00:00
Ghanshyam Mann
1a6c91ac4d Use devstack ceph plugin python3 job
devstack-plugin-ceph-tempest job is py2 job and
not supposed to run on master gate. We need to use
its py3 version- devstack-plugin-ceph-tempest-py3

Change-Id: Iff8c7349d2e7040bb31f146bdd119ccb6b098ec0
2020-02-18 20:52:41 -06:00
Dr. Jens Harbott
9181935d6c Amend tempest-irrelevant-files to avoid false positives
Both setup.cfg and files in etc/ can be relevant for devstack based
runs, as the recent breakage [0] has shown. Don't ignore them when
deciding whether to run tempest-based jobs.

[0] https://review.opendev.org/707759

Change-Id: I19c4e7d8dba4f9f8f0f3efa2a37245a7510cd052
2020-02-14 10:16:35 +00:00
Ian Wienand
0035ab2538 Revert "Remove all example configs for deprecated registry"
This reverts commit 2a28696de9e18a3866631507739944ceb3460872.

Devstack still references a number of these files; revert until
devstack incorporates removal.

Change-Id: I1e90ceee1f87291668e447f180f37bb809763836
2020-02-14 14:30:44 +11:00
Erno Kuvaja
2a28696de9 Remove all example configs for deprecated registry
Including removal if the example conf in docs.

Change-Id: I00c77b8f7001d8fa0fde4083c2ee88c370c14a09
2020-02-13 15:33:50 +00:00
Zuul
f80a88faea Merge "Configure Glance TCP socket after the store initialization" 2020-02-13 14:25:13 +00:00
Zuul
f57d0453fa Merge "Refresh Glance example configs for Ussuri milestone 2" 2020-02-13 14:05:26 +00:00
Zuul
518b9cc5cb Merge "Copy existing image in multiple stores" 2020-02-13 14:05:25 +00:00
Abhishek Kekane
1ec86b668c Refresh Glance example configs for Ussuri milestone 2
Change-Id: Iac910e2c0a745d53464712b8714191c4275857c2
2020-02-12 06:10:07 +00:00
Abhishek Kekane
348bff6c49 Unit tests fails with oslo.config 7.0
Glance unit tests fails using oslo.config 7.0 while parsing
command line options. In oslo.config 7.0 default value of for
'required' option is changed to None from False. This 'required'
option is used to specify whether positional arguments are
required or not. As glance replicator command line tool is using
some positional arguments which are not always required causing
problems for running unit tests.

Added required=False to these positional arguments to fix this
issue.

Co-authored-by: Stephen Finucane <sfinucan@redhat.com>
Co-authored-by: Abhishek Kekane <akekane@redhat.com>

Change-Id: I3d048010c5c3a62adba0315d3d6c9bb3c051a8e2
2020-02-12 06:00:17 +00:00
Abhishek Kekane
1754c9e2b0 Copy existing image in multiple stores
Added new import method 'copy-image' which will copy existing image into
specified list of stores. Introduced additional task which will serve
as internal plugin which will allow copying existing image into staging
area and then this data will be uploaded to specified stores via regula
import flow.

NOTE: This new import method 'copy-image' is only supported if multiple
stores are enabled in deployment.

APIImpact
Implements: blueprint copy-existing-image
Change-Id: I13eaab7ab013f44ce18465bdbdbe8052942570ff
2020-02-12 05:32:46 +00:00
Zuul
40ee49b217 Merge "Remove registry related functional and unit tests" 2020-02-11 10:27:38 +00:00
Grégoire Unbekandt
92492cf504 Add ability to import image into multi-stores
The import image api now supports a list of stores to import data into.
This list can be specified through a new "stores" field that has been
added to the request body.
During import stage, Glance iterates overs this list and send the data
to each store one by one.
If an invalid backend is requested by the user, an exception is raised.
If an errors occurs during verify, already pushed data is removed and
image state is unchanged.

Change-Id: Id3ac19488c0a693d7042be4a3c83f3b9f12313d0
Implements: blueprint import-multi-stores
2020-02-10 09:39:01 +01:00
Vlad Gusev
33626369e5 Use application_url in API version document
This handles the possible vhost in Glance API path correctly
(like https://cloud.example.com/image) contrary to host_url.

Change-Id: If86d805ddc46944e3aa2785aa5d775fe15b8468c
Closes-Bug: #1823703
2020-02-06 12:57:56 +00:00
Vlad Gusev
d9902c26a1 Configure Glance TCP socket after the store initialization
When multiple stores are being used with rbd backend, Glance tries
to get fsid of the cluster using rados library.
If even one of the rbd backends is unavailable, glance-api wsgi fails
to start properly, but continue listening on the TCP socket and is not
responding at any request until the timeout.

This change moves socket configuration after the store initialization
to make sure that failed Glance API process will not be
considered as up by the haproxy TCP check.

Change-Id: I4298bb835ec60b79a0010e52318ada19eb24ad80
Related-Bug: #1861723
2020-02-03 22:19:38 +03:00
Alan Bishop
8649fdc2a2 Ensure store ID parsed from URI is properly encoded
Ensure the store ID parsed from a request URI is unicode. This fixes
a py27 issue that allowed an incorrectly encoded value to be added to
the image's metadata.

Support for py27 is dropped in Ussuri, but this fix is required on
earlier releases that do support py27.

Closes-Bug: #1861501
Change-Id: I5a1c61430879a910e7b6c79effba538431959d56
2020-01-31 06:45:19 -08:00
Radosław Piliszek
9a6fcc2ea5 Use default cors config also when run as wsgi app
This fixes Glance CORS behind uWSGI as used in devstack.

Change-Id: If82d9b396afd87c65e035868b595ff5683cb19f6
Closes-bug: #1861334
2020-01-29 21:29:54 +01:00
Zuul
26c5c8dff6 Merge "Remove OS::Compute::Trust metadef" 2020-01-28 05:42:34 +00:00
Zuul
903e85fdd3 Merge "fix properties' missing underline for VirtCPUTopology" 2020-01-28 05:31:28 +00:00
Zane Bitter
5bffac0186 Remove empty policy.json
Supplying a policy.json file is no longer necessary.

Change-Id: I33b84c4d68e8077271447bcbdea4b7052eb01204
Depends-On: https://review.opendev.org/694386
2020-01-16 17:15:36 -05:00
Zuul
2291fe673e Merge "Fix string interpolation to delay by logging" 2020-01-10 06:51:32 +00:00
Zuul
6daf59a4bf Merge "doc: Clean up unnecessary left vertical lines" 2020-01-10 03:56:24 +00:00
weiweigu
4889dc1814 Fix string interpolation to delay by logging
String interpolation should be delayed to be handled
by the logging code, rather than being done
at the point of the logging call.

See the oslo i18n guideline.

* http://docs.openstack.org/developer/oslo.i18n/guidelines.html

Change-Id: I400a38a61e1ed6288296e8572218c7642795cbd4
Closes-Bug: #1596829
2020-01-09 08:53:55 -06:00
Zuul
c632586ef3 Merge "Move policy defaults into code" 2020-01-09 14:00:55 +00:00