7086 Commits

Author SHA1 Message Date
whoami-rajat
ed930ec512 Fix: cinder store test
With change[1], the validation check for volume type during service
startup happens for single store also. (previously only for multi store).
This introduced an additional call to get_cinderclient failing assert
in test_migrate_image_after_upgrade.
Similar code changes can cause future failures on glance gate and the code
changes doesn't exist in glance. To address this, this patch loosens
up the strict checking on call count for every method and just verifies
it was called.

[1] https://review.opendev.org/c/openstack/glance_store/+/774703

Closes-Bug: #1916011
Change-Id: I8852bb02732845c145cca9483b0b33e0a9d73d9e
2021-02-18 14:52:32 +00:00
Zuul
7922092e4a Merge "trivial: Fix a typo in devstack plugin.sh" 2021-02-12 16:04:09 +00:00
Zuul
8db76f3e05 Merge "Remove unused option "owner_is_tenant"" 2021-02-12 06:43:48 +00:00
Lance Bragstad
81f8349cde trivial: Fix a typo in devstack plugin.sh
The enforce scope script should bounce the glance API after setting
configuration values for scope enforcement, not keystone.

Change-Id: Ia6c556be679f9cd81f9920ff33fa089b79afde10
2021-02-11 21:09:14 +00:00
Cyril Roelandt
7839ab0925 Remove unused option "owner_is_tenant"
This option has been deprecated since Rocky.

Change-Id: I8edc957ad50ec28d80a06e76912f4226cea53562
2021-02-11 16:17:10 +01:00
Stephen Finucane
4b884b9e9b Uncap PrettyTable
This is now maintained. We can uncap it.

Change-Id: I7c19e8f24be792ea8672a02c5c02f585a95acd61
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-02-11 12:21:54 +00:00
Zuul
2c893fbd80 Merge "Add devstack plugin script" 2021-02-05 16:34:09 +00:00
whoami-rajat
09b924c9bc Add functional tests for cinder multiple store
This patch adds functional tests for cinder multiple stores[1] legacy
image migration and new image create.
NOTE: This has been proposed separately as it has a dependency on a
glance-store change[2] which will require a new release of glance-store
to reflect changes on the gate.

[1] https://review.opendev.org/#/c/748039
[2] https://review.opendev.org/#/c/750131

Depends-On: https://review.opendev.org/#/c/750131
Change-Id: I2a3a99bd27db1c72d49b36b87e073e0b97fc874d
2021-02-05 08:10:57 -05:00
Zuul
f2452863e7 Merge "[goal] Deprecate the JSON formatted policy file" 2021-02-03 14:45:20 +00:00
Zuul
5eca0f66db Merge "Add policy sample file in doc" 2021-02-02 17:12:25 +00:00
Lance Bragstad
2a120055c6 Add devstack plugin script
This commit adds a devstack/plugin.sh script so that we can invoke it
from devstack. This is useful for deploying glance in particular ways we
need to test, like with new policy defaults for API protection testing.

Change-Id: I28c2d4701750bbd94c3f0ed106569091bea020b3
2021-02-02 04:25:37 +00:00
Ghanshyam Mann
0a9faeece4 Add policy sample file in doc
policy sample file with all the default rules
commented out is missing in glance doc which can be
used for reference or when few rules needs to
be overriden (and keep all other default rule commented
out).

Change-Id: I0cc461f7061358389186ac4751f6e037e1bf6dc7
2021-02-01 12:22:38 -06:00
Ghanshyam Mann
c107629f90 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also convert the ./glance/tests/etc/policy.json to policy.yaml
file. Replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Depends-On: https://review.opendev.org/c/openstack/nova/+/773192
Change-Id: I17d0374dd4223688e5f95253802a4ae87377953a
2021-01-29 15:31:47 -08:00
Dan Smith
314e93abe4 Exclude os_glance namespace from property quota
Now that glance is using properties in the os_glance namespace for
internal purposes, we should exclude the counting of these from the
enforced image property quota.

Change-Id: I5fbe5eb12fd34e054137732a02c4cc5b687e7c77
Related-Bug: #1912001
2021-01-25 12:30:50 -08:00
Dan Smith
0c45de3ed8 Make os_glance namespace reserved
This adds a general mechanism for reserving property names that start
with os_glance. This has been done informally already, but no
enforcement was performed, except for specific keys on update. As a
result, banning these keys from create, for example, was missed and
users are able to set these keys during an POST /images operation.

Depends-On: https://review.opendev.org/c/openstack/nova/+/771234
Change-Id: I31b4dae018d52ead773db25472013d783066ee17
Closes-Bug: #1912001
2021-01-25 12:30:50 -08:00
Dan Smith
07951b095b Update docs and renos for os_glance reservation
This adds some words to the api-ref doc, as well as a release note
about the blanket reservation of os_glance* properties.

Change-Id: I0cd6f35296a647fdb1f2cb44a688b34c0382c556
Related-Bug: #1912001
2021-01-25 12:30:50 -08:00
Abhishek Kekane
03bf00ee3b Change database migration version to wallaby
Change-Id: I5c57696827719d752879cb11044d9e969c853411
2021-01-25 12:30:50 -08:00
Zuul
cbc8519554 Merge "Fix a typo in functional helper class" 2021-01-22 15:38:19 +00:00
Zuul
4edcfda42c Merge "Move some helper functions to base class" 2021-01-22 15:37:51 +00:00
Zuul
a7f0e44699 Merge "Fix upgrade checks for sheepdog" 2021-01-19 15:41:21 +00:00
Cyril Roelandt
c7236a0897 Fix upgrade checks for sheepdog
When either CONF.enabled_backends or CONF.glance_store.stores is set to
None (which may happen if they are not actually specified in the config
file), a TypeError is raised. Fix this and add tests.

Change-Id: I670f6db96998c8a2cec5d16fbca9f01857b866da
Closes-Bug: #1911700
2021-01-14 16:47:50 +01:00
Dan Smith
4d9c7b573e Fix a typo in functional helper class
This was a typo (by me) in the original implementation, but since
nothing was testing DELETE calls, it was never noticed.

Change-Id: I81f9d0a53493a1b9793bdaae082093f30df6e032
2021-01-13 09:51:22 -08:00
Dan Smith
f32d39230d Move some helper functions to base class
The ImageImportLocking test class has some useful helper functions
that are general enough to be used elsewhere. This moves those
to the SynchronousAPIBase test class.

Change-Id: Idbc6ab16ecac2eb9c83c58432f98414d68e16a52
2021-01-11 17:23:15 -08:00
wangzihao
c98c3965a8 Update version of doc8
The doc8 lib supports Py36 starting from version 0.8.1

Change-Id: Ib92ccbc2407e9825e446bb3c69d29f7841467434
2021-01-06 15:39:52 +08:00
OpenStack Proposal Bot
73742be999 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I5925b70c85f0a9c23c1df9f57f4a79a835e0bd67
2020-12-20 06:26:50 +00:00
Zuul
e2cbac36f1 Merge "[Doc] Remove description about v1 api and glance-registry" 2020-12-17 17:42:57 +00:00
Takashi Kajinami
81c6d4d678 [Doc] Remove description about v1 api and glance-registry
Image v1 API and glance-registry has been removed from Glance.
This patch removes all descriptions about these 2 items, since they
are no longer available.

Change-Id: Ic72921523f73dcae5e9c443a55edecb710b2d251
2020-12-17 17:26:06 +09:00
Ade Lee
8027d90710 Replace md5 with oslo version
md5 is not an approved algorithm in FIPS mode, and trying to
instantiate a hashlib.md5() will fail when the system is running in
FIPS mode.

md5 is allowed when in a non-security context.  There is a plan to
add a keyword parameter (usedforsecurity) to hashlib.md5() to annotate
whether or not the instance is being used in a security context.

In the case where it is not, the instantiation of md5 will be allowed.
See https://bugs.python.org/issue9216 for more details.

Some downstream python versions already support this parameter.  To
support these versions, a new encapsulation of md5() has been added to
oslo_utils.  See https://review.opendev.org/#/c/750031/

This patch is to replace the instances of hashlib.md5() with this new
encapsulation, adding an annotation indicating whether the usage is
a security context or not.

Reviewers need to pay particular attention as to whether the keyword
parameter (usedforsecurity) is set correctly.

It looks like the usage of md5() here is solely to determine a checksum
of an image.

With this patch and the dependent patch for glance_store, all the
unit and functional tests pass on a FIPS enabled system.

Depends-On: https://review.opendev.org/#/c/756157
Depends-On: https://review.opendev.org/#/c/760160
Change-Id: I3b6d78d9792d4655bf0f4989cf82aced3f27491b
2020-12-15 10:43:19 -05:00
Zuul
c0e54c0aa0 Merge "Add Python3 wallaby unit tests" 2020-12-15 14:03:48 +00:00
Zuul
a540572ccb Merge "Update master for stable/victoria" 2020-12-15 14:02:14 +00:00
Zuul
65c8da3051 Merge "Imported Translations from Zanata" 2020-12-15 06:35:45 +00:00
Zuul
89cb7f60fe Merge "Run nova-ceph-multistore only when tempest is ran" 2020-12-15 05:35:53 +00:00
Erno Kuvaja
795dad7633 Bump lower_constraints and requirements
This is to unblock the stuck gate due to the lower_constraints
job failing.

Change-Id: Ifd55c44fef4e2187052d77084dc9c0fa9c9a0d16
2020-12-14 21:39:58 +00:00
Erno Kuvaja
e26f9b40d8 Run nova-ceph-multistore only when tempest is ran
Change-Id: I4e5af52caedb78ace15d84c8a84acad2dc8490fa
2020-12-14 17:16:21 +00:00
OpenStack Proposal Bot
ac2036fd7d Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I6051be3d52956f13e66564f4f5bafa838b66bd7d
2020-12-11 06:31:37 +00:00
Brian Rosmaita
f102b74a28 Remove 'admin_role' option
This option was deprecated in the Ussuri release by change
I0f61f85a0aaa4f68e345fa08fbb6b039d3d32587 and it is now eligible
for removal following the standard OpenStack deprecation policy.

Change-Id: I78ec79f97bfdcc39772448296140f8d8f35adea1
2020-11-24 20:31:21 -05:00
whoami-rajat
1344c45772 Adding gate job for glance cinder store
Depends-On: https://review.opendev.org/743800
Change-Id: Ib192550182008754644b74636ede0d85bbcc4faf
2020-10-05 09:54:38 -04:00
OpenStack Proposal Bot
45749c30c1 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I3bede3dd6f6896c06202203fab252f01394dd102
2020-10-04 06:28:58 +00:00
Zuul
9fc9148564 Merge "Bump Images API version to 2.11" 2020-10-02 06:29:53 +00:00
Erno Kuvaja
0e3d274915 Bump Images API version to 2.11
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>

Change-Id: I1e200c47f20ec6945981dbd92f859cfec234e42d
related-bug: #1897773
2020-09-29 17:47:45 -04:00
Dan Smith
b49c042467 Adjust jobs for devstack WSGI mode default
Devstack is switching the default glance operational model back to pure-WSGI
mode for parity with the rest of the services. This adjusts our jobs to fit
with that so that we're testing the default, but also the standalone case.
After this change, we end up with the following for the vanilla devstack
jobs:

 - The "-import" job, which takes the devstack default of WSGI mode,
   with all the tweaks required for import to be enabled. It configures
   import conversion to raw, metadata injection, and confirms that with a
   post-run check for that metadata.
 - The "-import-standalone" job, which inherits all the behaviors from
   the job above, but configures glance in standalone mode.

Depends-On: https://review.opendev.org/#/c/742884
Change-Id: Ia3fb8aba83bbd7a1399aef136ce8857b14d08435
2020-09-29 06:43:27 -07:00
452fba2a59 Add Python3 wallaby unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for wallaby.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Ia7c16cc554aa740bc51bb32713fe1189ad50b8c7
2020-09-24 09:13:54 +00:00
f2a90803aa Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: Ic5e63e7094f931e7ba21becdb8e785a761ebc822
Sem-Ver: feature
2020-09-24 09:13:48 +00:00
Abhishek Kekane
6504588aaa Victoria RC-1 release notes
Change-Id: I91bb8614f47c0283c88b96ca10e8280655d2d1fb
2020-09-23 12:46:20 +00:00
Zuul
d7c033bf21 Merge "Do not use OSC in infra playbook" 2020-09-23 10:16:08 +00:00
Victor Coutellier
922c2ed5ad Fix cleaning of web-download image import
If import flow fail before reaching the end it never execute
the _DeleteFromFS task and the node_staging_uri is never cleaned up.

Implement the revert() function of the _WebDownload task to remove the
temporary file.

Change-Id: I6dd6a6e2a95a5bd17a80b6256852bb9fac5fa339
Co-Authored-By: Grégoire Unbekandt <gregoire.unbekandt@gmail.com>
Co-Authored-By: Abhishek Kekane <akekane@redhat.com>
Closes-Bug: #1795950
2020-09-22 20:31:30 +02:00
Erno Kuvaja
df0495676e Do not use OSC in infra playbook
Using the supported glanceclient instead.

Change-Id: I373467d2cdefb2301a949c9236f445dbbc641a2a
2020-09-22 18:07:39 +01:00
Grégoire Unbekandt
68c202d38b Image import "web-download" check downloaded size
If the downloaded data size is different from the expected one, the
task "web-download" in the image import process will now fail.

Change-Id: Ie260486d795a6f4af1632f6f3708abc92fb47a3a
Closes-Bug: #1895663
2020-09-22 14:04:15 +00:00
Zuul
ab151973bd Merge "Run the nova-ceph-multistore job against glance" 2020-09-18 15:50:12 +00:00
Stephen Finucane
54a2231f17 docs: Remove cruft from 'conf.py'
Change-Id: Ie44453b647ce78a26246b8293794ebdec68fd120
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-09-17 17:21:55 +01:00