Added documentation and modified api-ref documents to
reflect multiple stores support changes.
Related to blueprint multi-store
Change-Id: I932297df8149968d31a5367a9ca71a5629045445
Made provision for multi-store support. Added new config option
'enabled_backends' which will be a comma separated Key:Value pair
of store identifier and store type.
DocImpact
Depends-On: https://review.openstack.org/573648
Implements: blueprint multi-store
Change-Id: I9cfa066bdce51619a78ce86a8b1f1f8d05e5bfb6
Added new boolean column "os_hidden" in images table. Images where
"os_hidden" = True will be omitted from the image list presented
to the user. This will apply to all image visibilities. However,
the images will continue to be discoverable. User can use
filter "os_hidden=true" in GET v2/images call to see all hidden
images.
Implements: blueprint hidden-images
Change-Id: If8f02ca94fdb8e1ac7a81853cd392988900172d1
There were some recent changes to oslo.policy that include specific
type checks of the ``creds`` parameter passed to the ``enforce()``
method:
https://review.openstack.org/#/c/578995/
The above change allows consuming projects to pass instances
of oslo_context.context.RequestContext to the policy enforcer, as
opposed to building a dictionary instance from scratch multiple
different ways across projects.
The glance unit tests were failing with the new version of
oslo.policy (1.38.0) because they were passing in a Mock instance
which failed the new, more strict, type check.
This commit converts the setUp class of the tests to use an instance
of glance.context.RequestContext, which subclasses RequestContext
from oslo.context. It also sets the user_id and project_id attributes
of the context object to override authorization checks.
This should allow glance to pass with newer versions of oslo.policy.
Change-Id: I0a69bc9565d57fd6ad8484abc5fce0e8dd45f9f2
Closes-Bug: 1781976
Required traits on the image allow specifying a server to be
built only on compute nodes which express those traits. The
Nova Scheduler has been updated to look at the image trait
properties when selecting compute nodes.
Updating the documentation for glance to explain the same.
Documentation is similar to flavor required traits documentation available
here: https://docs.openstack.org/nova/latest/user/flavors.html#extra-specs
Change-Id: I716821abf44238eecc9c4a1d198d8a31b87dedce
Implements: blueprint glance-image-traits
This change removes option to configure Images API v1
This change removes Images API v1 endpoints from the router
This change removes all v1 tests
This change removes the v1 dependant glance-cache-manage command
This change does not remove all v1 codebase. Further cleanup and
decoupling will be needed.
Change-Id: Ia086230cc8c92f7b7dfd5b001923110d5bc55d4d
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Ic9645685e0f9ae25b0b2b754b11e34d8aef41829
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
The cmp() built-in is no longer available under python 3 and the
__cmp__ method is not used. Remove __cmp__ and __ne__ and add a __lt__
method and use the functools.total_ordering decorator to provide all
of the rich comparison methods for StoreLocations.
Change-Id: Iae1d0c27bd82a42c80fc98f87c9b85edef527c51
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Updates the Glance Administration Guide and adds a release note.
Depends-on: https://review.openstack.org/#/c/579507/
Change-Id: I87343b67614da8dea3a09b10456f4bfc0042ed0e
The `glance manage purge-images-table` is supposed to be used
only if really required due to OSSN-0075. And the advice is
not to purge any freshly deleted rows due to the possible
ID collision of still in use images. This change increases
the default of "age_in_days" to 180 from it's original 30 to
stress this out. User can still define smaller age if they
must.
Change-Id: Idb13288b72b31940a357fc9b11db2d6bcd396261
Modified the current ``glance-manage db purge`` command to eliminate images
table from purging the records. Added new command
``glance-manage db purge_images_table`` to purge the records from images
table.
DocImpact
SecurityImpact
Change-Id: Ie6641659b54543ed9f96c393d664e52a26bfaf6a
Implements: blueprint mitigate-ossn-0075
This change prevents taskflow creation during image import in cases
we know for sure that the image activation won't be successful.
The change follows the Glance principles of failing early and tries
to provide as meaningful error messages to the end user as possible.
Co-authored-by: Abhishek Kekane <akekane@redhat.com>
Closes-bug: 1758943
Change-Id: Iaee2781d07f4c0afd4f886f0b30b523bd47f1058
Nova's libvirt driver has changed[*] the default source from /dev/random
to /dev/urandom:
"Since libvirt 1.3.4, any RNG (Random Number Generator) device path
(that returns random numbers when read!) is accepted. However, the
recommended source of entropy is `/dev/urandom` (it is non-blocking;
and doesn't have the same limitations of `dev/random`, which is a
legacy interface)."
Update the relevant Glance documentation to reflect that.
[*] https://git.openstack.org/cgit/openstack/nova/commit/?id=814bfd93
Change-Id: I656b5c244b98202f3c8d019d0bbeddc4e7c0314a
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
At the weekly Glance meeting on 2018-05-17 it was agreed that the
Release CPL will monitor the periodic "tips" test jobs and report
on their status at the weekly meeting. This patch updates the
appropriate section of the Glance Contributor's Guide.
Change-Id: Ieeab3e3a42b8197f8b0544e97748ffdb8f620f13
Instead of doing two separate test runs, use the group_regex option to
stestr to group tests that cannot be run in parallel into the same
worker.
Change-Id: I3d69d5c72d69484f4e1c9c0b11122d0cf3703d60
Related-Bug: #1768077
Curly quotes(Chinese punctuation) usually input from Chinese input method.
When read from english context, it makes some confusion.
Change-Id: I9b8830179fb98f3a6bef479bbaa12df70311269a
Under python 3 the linter does not like line endings with \r\n so
replace them with just \n.
Change-Id: I6728ee3fc39a5b22ca06fcd9055872271ab79a53
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Blacklist the two currently skipped functional-py35 tests and
include them in a new non-voting job so that their failure is
obvious instead of hidden.
Change-Id: Ice8e114c6590b25f3ec79fbe4c06efaa245706c0
Partial-bug: #1769006
Convert actual output to a string before checking it so that we
avoid a mismatch error.
Change-Id: Id106583c113a9d8c7d0aa6bc6e6468ad75e77b0d
Closes-bug: #1775071
Add jobs to the periodic queue that run the glance unit and
functional tests against the master of various libraries we
consume so that we don't have to wait for a release to detect
a change that could be problematic.
The dependency is needed for the *glance_store-tips jobs to
be processed properly.
Change-Id: I0385646991140debc06ea27a194a6e7f6f749e6b
Depends-On: https://review.openstack.org/#/c/571005/
Add a statement about the current state of Glance Python 3.5
support to the install docs.
Change-Id: I2cb2e05f81c22c00aad55d3b8a1d3463ced6cf28
Partial-bug: #1769006
ImageSizeLimitExceeded exception block [1] is unreachable in upload because
it is caught at [2] and raised StorageQuotaFull exception from there. The
problem here is that we have nested usage of the limiting reader.
To make it correct changed the limiting reader to accept
exception class as parameter so that we can pass the StorageQuotaFull
in case LimitingReader is used for quota check and ImageSizeExceeded exception
if it is used for image size cap check.
[1] fd16fa4f25/glance/api/v2/image_data.py (L230)
[2] fd16fa4f25/glance/quota/__init__.py (L305)
Closes-Bug: #1734832
Change-Id: I5a419b763bee7f983c2a94c6f3a2245281e86743
Replace the known exception tuple with a map of exception classes
to error codes to preserve backward compatibility of exit codes.
Also change the code to handle unknown members of the Exception
hierarchy without breaking.
Co-authored-by: jiangpch <jiangpengcheng@navercorp.com>
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>
Closes-Bug: #1726213
Change-Id: Iabfc2ded45a576a18bdb30a6c3ada8b9799a3196