This patch provides the ability to 'deactivate' an image by
providing two new API calls and a new image status 'deactivated'.
Attempting to download a deactivated image will result in a
403 'Forbidden' return code. Also, image locations won't be visible
for deactivated images unless the user is admin.
All other image operations should remain unaffected.
The two new API calls are:
- POST /images/{image_id}/actions/deactivate
- POST /images/{image_id}/actions/reactivate
DocImpact
UpgradeImpact
Change-Id: I32b7cc7ce8404457a87c8c05041aa2a30152b930
Implements: bp deactivate-image
As per the config option docstring, the option was supposed to have been
removed back in Juno. Removing now.
DocImpact
Change-Id: If2ac2fd38cc1ea5e3ed3d4fdb8eb97e13bcb93c8
This patch adds a task for image conversion. It uses `qemu-img` to
convert images. This tool has support for several image formats.
The current implementation converts images if and only if the operator
has configured glance to do so. That is, the `convert_to_format` option
has been set.
There are few things about this patch that should be improved by
follow-up patches. The first one is the fact that it relies on the
entry_points order for task execution. Although this works, it is not
the most flexible/controllable way to do it. The second thing is that it
relies on the aforementioned configuration option to enable/disable the
task (as in, it becomes a non-op). There should be an explicit way to
enable/disable tasks.
Since both things mentioned in the previous paragraph affect the task
management in general, I've decided to leave the fix for a follow-up
patch.
DocImpact
SecurityImpact
Partially-implements blueprint: new-upload-workflow
Partially-implements blueprint: basic-import-conversion
Change-Id: I0196a6f327c0147f897ae051ee60a8cb11b8fd40
This code enables new syntax for sorting output with multiple
keys and directions based on API Working group sorting
guidelines.
Example:
/v2/images/detail?sort=name:desc,size:asc
python-glanceclient support will be added in separate commit.
Implements: blueprint glance-sorting-enhancements
DocImpact
APIImpact
Change-Id: Ie4ccfefa0492a3ac94cc7e22201f2f2be5c1cdbb
Extend rest images api v2 with multiple sort directions support.
Example:
/v2/images/detail?sort_key=name&sort_dir=asc&sort_key=size&sort_dir=desc
Changed database api which now can take sort_dir param as a list.
python-glanceclient support will be added in separate commit.
Implements-blueprint: glance-sorting-enhancements
DocImpact
APIImpact
Change-Id: Ib43b53abfba7cb5789d916a014376cf38fc5245b
Currently there is no way to upgrade metadata definitions to the
newest set. This change extends existing command:
glance-manage db load_metadefs.
The extension allows user to merge metadata definitions that are
stored in files with data that exists in database. By default it
prefers existing data over new (--merge), but it can be combined
with other options to change this logic. Use --prefer_new flag so
it will prefer new data over existing data in database or
--overwrite so it will drop every namespace (and attached
resources) found in both, database and file.
By default glance-manage db load_metadefs works the same way it
worked before extension. To enable new logic user needs to
provide at least --merge option (or combine it with other two
options)
Implements: blueprint metadefs-upgrade-by-json-file
Change-Id: I55fa6640142db5110deb88d9ecd8507e7f533c58
Adds a basic architecture description section
to the Glance Developer guide.
Change-Id: I782490bb8757cd67d83057176f8e3eeffa007b84
Co-Authored-By: Mike Fedosin <mfedosin@mirantis.com>
Co-Authored-By: Olena Logvinova <ologvinova@mirantis.com>
Co-Authored-By: Alexander Adamov <aadamov@mirantis.com>
Metadefinition resources - namespaces, objects, properties, tags and
resource types - don't provide any notification events when certain
operations are performed on them. This patch includes following events
that will be triggered when necessary:
* metadef_namespace.create - namespace has been created
* metadef_namespace.update - namespace has been updated
* metadef_namespace.delete - namespace has been deleted
* metadef_namespace.delete_properties - all properties have been removed
from namespace
* metadef_namespace.delete_objects - all objects have been removed from
namespace
* metadef_namespace.delete_tags - all tags have been removed from
namespace
* metadef_object.create - object has been created
* metadef_object.update - object has been updated
* metadef_object.delete - object has been deleted
* metadef_property.create - property has been created
* metadef_property.update - property has been updated
* metadef_property.delete - property has been deleted
* metadef_tag.create - tag has been created
* metadef_tag.update - tag has been updated
* metadef_tag.delete - tag has been deleted
* metadef_resource_type.create - resource type has been added to
namespace
* metadef_resource_type.delete - resource type has been removed from
namespace
Additionally new configuration option has been added to allow for
disabling either individual or group of notifications.
DocImpact
UpgradeImpact
Depends-On: Iaa771ead0114e3941667b1e07ff32472d2f77afd
Change-Id: Ie1635793d80188f8f7a07aea91b9f0842900ffa6
Implements: blueprint metadefs-notifications
The patch adds the necessary configuration options defined in the
multiple datastore spec for VMware Store backend.
Approved Spec:
I16229da839ab7f147c36d5857e2269999e8215d7
Implementation:
I176f1143cd2d9b0a01a0f4f4256e7ac7d9b09afd
blueprint vmware-store-multiple-datastores
Depends-On: I4a52347cdbc238a3cb36a67d453591d0f8576a39
UpgradeImpact
DocImpact
Change-Id: Ic459b3b579d2b02e9abd9655ea2eb3e99fddcfcd
The descriptions of some of the configuration options had been updated
in the sample config, but not in the declaration of the oslo.config
option. This patch maintains parity between the two places these are
currently defined, so that when we switch to only generating the config
files, there isn't a loss of information.
Change-Id: I634c03ac89a0f78cf86992490eb44d2db7a90352
This patch adds a first step towards image introspection. The patch adds
a set of tasks to correctly import an image from an external source (old
copy-from) and then introspect the image.
The implementation keeps these 2 implementations separate by considering
the import process a top-level task and the introspection step an
optionally available task that may/may not succeed.
The implementation uses stevedore to load both, import and optional
flows, and chains them using linear and unordered flows where needed.
DocImpact
Co-Authored: Erno Kuvaja <jokke@hp.com>
Partially-implements blueprint: new-upload-workflow
Partially-implements blueprint: introspection-of-images
Change-Id: I9e7505d4e84aabf9d71e03c360514ac824ea84de
This patch is work for glance, and the main change on glance_store side
is change Iedf0d4f829e46ca64c3f4fc6a7dfee54d9b0605b .
This change works with glance_store v0.1.11 at least.
Implements: blueprint store-capabilities
Depends-On: I5055b837e94fdee7e01cc94f8bdb89bada34f77b
Change-Id: Ibbc85b6bc2ea98c564d316db2874d7df5aac32a6
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Add the ability to dynamically change configuration settings of a running
glance server with no impact to service.
A running glance server consists of a parent/master process and one or
more child/worker processes.
On receipt of a SIGHUP signal the master process will:
* reload the configuration
* send a SIGHUP to the original workers
* start (a potentially different number of) new workers with the new
configuration
* its listening socket will *not* be closed
On receipt of a SIGHUP signal each original worker process will:
* close the listening socket so as not to accept new requests
* complete any in-flight requests
* complete async requests (V1 create with copy-from option and V2 task api)
* exit
This approach is based on nginx's behaviour and avoids some of the
disadvantages of the current oslo Launcher reload:
* Race conditions: Launcher does not shutdown eventlet cleanly, existing
requests can fail.
* If all workers are busy (likely if #workers is small) there can be a
lengthy delay when new requests are not processed.
* Long lived pre-SIGHUP idle client connections can stall request
processing indefinitely.
* Not all parameters can be changed, eg number of workers.
* The wsgi pipeline cannot be changed, eg to enable caching.
Change-Id: I73875c654410f207e3efdb2932147cf26d75b3f1
Partially implements: bp sighup-conf-reload
Added 'operators' to metadef jsons and property schema.
With the new section end-user knows which multivalue
operators are suitable for given property.
Implements: blueprint metadata-multivalue-operators-support
DocImpact
APIImpact
Change-Id: I0219bfaacfdc084200deb83d7806800c34f9aa6d
We added the eventlet executor waiting for taskflow to land and be ready
for us to consume it. Now that we have it, it's time to remove the
eventlet executor in favor of taskflow's parallel executors.
DocImpact
UpgradeImpact
Partially-implements blueprint: new-upload-workflow
Change-Id: I220a14b2a92949772d5322c9947c42e892cfdbfa