419 Commits

Author SHA1 Message Date
Jorge Niedbalski
82c63b1df4 Allow ramdisk_id, kernel_id to be null on schema
Since is possible to create images with no
ramdisk_id, kernel_id parameters on glance v1,
then the schema-image.json needs to be modified to
allow null, string values for both attributes
and prevent LP #1447193 to happen with a glance v2
client.

APIImpact

Closes-Bug: #1447215
Related-Bug: #1447193

Change-Id: I645c797553ccaa84062f9ad28f2349ae738a0c96
Signed-off-by: Jorge Niedbalski <jorge.niedbalski@canonical.com>
2015-07-23 18:02:07 +00:00
Jenkins
b8e4c90be1 Merge "Correct reference to VC as vCenter" 2015-07-16 02:11:04 +00:00
Eric Brown
c4cbfea8e3 Correct reference to VC as vCenter
VC is an abbreviation commonly used, but incorrect for documentation.
The proper product name is vCenter and not VC.

TrivialFix

Change-Id: I53b883adf44ab749e6803730b2d5855a81dcf95f
2015-07-12 22:27:50 -07:00
Erno Kuvaja
562cb0429f Healthcheck Middleware
Provide healthcheck middleware from oslo_middleware to be able to
disable given nodes from loadbalancer. It's achieved by adding a new
pipeline which depending on existing of the
/etc/glance/healthcheck_disable file can return one of the following
results:

- 200 OK (if file does not exist)
- 503 DISABLED BY FILE (if file exist)

The healthcheck is available under /healthcheck URL, and the whole
mechanism behave similar to the Swift healthcheck system.

implements bp: healthcheck-middleware

Co-Authored-By: Erno Kuvaja <jokke@usr.fi>
Co-Authored-By: Kamil Rykowski <kamil.rykowski@intel.com>

DocImpact

Change-Id: I45f6a8c59ec3040aaf06f8bab46d8001c44dac7a
2015-07-07 11:55:21 +02:00
Jenkins
987f874ac4 Merge "Change default digest_algorithm value to sha256" 2015-07-06 18:44:45 +00:00
Jenkins
3bef5bddcf Merge "VMware: vmware_ostype should be enum" 2015-07-05 23:17:58 +00:00
Ian Cordasco
6ca3951454 Change default digest_algorithm value to sha256
In I9236cc85f4e9881ac1aa35d69bc6761a59c1b6c8 it was promised that the
default for digest_algorithm would change from sha1 to sha256. The sole
purpose of this commit is to upgrade the default to sha256 as promised.

DocImpact
SecurityImpact
Change-Id: I12be91db7b86e335a84c9ebed86dac3ba09051cb
2015-07-02 16:26:56 +00:00
Eric Brown
081af59b1b Adds os_admin_user to common OS image prop metadef
This will add os_admin_user to the list of common properties for
operating systems metadata definition.

Commit I215bb82668df074141397909b58fa9189f46b4da is adding
os_admin_user to the list of image metadata it understands.  As
a result, it's beneficial to also have that property defined
in the metadef.

Change-Id: I7cf70acf3c6a4f801b34d52926c444d05b79fd51
Implements: blueprint libvirt-set-admin-password
2015-06-30 05:40:05 +00:00
Lianhao Lu
68bc487786 Remove unnecessary executable permission
Bunch of glance source code files are marked as executable which is not
appropriate, this patch just 'chmod -x' to all of them.

Closes-Bug: #1468564

Change-Id: Iaa6ba2a4ec31994f528a191e480db202a96f0c67
2015-06-25 09:14:07 +08:00
Jenkins
5769444666 Merge "Add client_socket_timeout option" 2015-06-18 17:01:42 +00:00
Stuart McLaren
19bba346ba Add client_socket_timeout option
Add a parameter to take advantage of the new(ish) eventlet socket timeout
behaviour.  Allows closing idle client connections after a period of
time, eg:

$ time nc localhost 9292
real    1m0.063s

Setting 'client_socket_timeout = 0' means do not timeout.

DocImpact
Closes-bug: 1371022
Change-Id: I9e7edcbf25ece61dc16b8cd5a8bef5ed9a14e3d6
2015-06-18 14:50:00 +00:00
Mike Fedosin
3cdd5bba7c REST API layer for Artifact Repository
Adds REST API layer for Artifact Repository, binds all other changes
together.

Artifact Repository is run as a part of Glance api.
Requests are routed to /v3/artifacts endpoint on the api port.
API version in version selector is marked as experimental.

Registers artifacts service and a sample Artifact Type in Glance entry
points config.

Implements-blueprint: artifact-repository

FastTrack

Co-Authored-By: Inessa Vasilevskaya <ivasilevskaya@mirantis.com>
Co-Authored-By: Mike Fedosin <mfedosin@mirantis.com>
Co-Authored-By: Alexander Tivelkov <ativelkov@mirantis.com>

Change-Id: Ib6a0d2482208a37aa343a747dfe5f63f9080dd04
2015-06-10 18:49:21 +03:00
Jenkins
42835ab56f Merge "Taskflow engine mode should be parallel in sample conf" 2015-05-25 14:03:57 +00:00
Sabari Kumar Murugesan
5d7bfcb325 Taskflow engine mode should be parallel in sample conf
The default for taskflow engine mode is parallel and the sample
conf needs to be fixed.

Change-Id: I3ef5322473eeb1ca7606ea8bdb4948b86c118e2c
2015-05-12 11:28:43 -07:00
Eric Brown
32dae06780 VMware: vmware_ostype should be enum
The vmware_ostype property is a string property defining the
available operating system types that can be associated with a
VM.  The os types should be a enumeration rather than just a
free form string.

Change-Id: Ifa5d71299c34b4613adf0107eb3fadf25ec3e906
2015-05-11 10:55:18 -07:00
Eric Brown
46eb1581fc VMware: add VirtualVmxnet3 to hw_vif_model
Commit I97147f8e0f749ee76f17569191e45eb520f7c88f added VirtualVmxnet3
to the list of supported network models.  The glance compute metadata
definition should reflect that change.

Change-Id: I0e363233582584d5d7a62477603795a237f49b5c
2015-05-08 17:25:48 +00:00
Jenkins
582f8563e8 Merge "Metadef JSON files need to be updated" 2015-04-24 01:16:29 +00:00
Jenkins
80e46b745a Merge "Plugin types are not exposed to the client." 2015-04-24 01:05:00 +00:00
Jenkins
5c6889e228 Merge "Remove scrubber cleanup logic" 2015-04-23 03:16:03 +00:00
Lakshmi N Sampath
d6d5c501c1 Plugin types are not exposed to the client.
Glance Search clients currently don't have
anyway to know what "types" are available.

Search clients need to know the "type" to
include in the search request for the
particular resource.

Change-Id: I8baed7c5183752b1f52f8050ce321aacec701f1c
Closes-Bug: #1439061
2015-04-16 07:50:48 -07:00
Wayne Okuma
1af8cd5745 Metadef JSON files need to be updated
Since Juno, some new hardware properties have been added to Nova that
should be included in the Kilo versions of the metadef JSON files.

This bug, would add in new properties or objects found in Nova and update
properties or objects if the definitions have changed.
Closes-Bug: 1436877

Change-Id: I582827e666bece539674e4a191963ecf8ebf599f
2015-04-15 20:08:37 -07:00
Jenkins
e7d94536fb Merge "Fix common misspellings" 2015-04-02 02:44:20 +00:00
Lakshmi N Sampath
9911f962a4 Catalog Index Service
Implements: blueprint catalog-index-service

* Glance Index and Search API Implementation
* Tool for indexing metadefinition resources and images from Glance
database into Elasticsearch index

Change-Id: I6c27d032dea094c7bf5a30b02100170e265588d9
Co-Authored-By: Lakshmi N Sampath <lakshmi.sampath@hp.com>
Co-Authored-By: Kamil Rykowski <kamil.rykowski@intel.com>
Co-Authored-By: Travis Tripp <travis.tripp@hp.com>
Co-Authored-By: Wayne Okuma <wayne.okuma@hp.com>
Co-Authored-By: Steve McLellan <steve.mclellan@hp.com>
2015-03-26 10:12:27 -07:00
Martin Kletzander
ab8ddcdadd Fix common misspellings
Wikipedia's list of common misspellings [1] has a machine-readable
version.  This patch fixes those misspellings mentioned in the list
which don't have multiple right variants (as e.g. "accension", which can
be both "accession" and "ascension"), such misspellings are left
untouched.  The list of changes was manually re-checked for false
positives.

[1] https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines

Change-Id: I6f549eb78998ead9b2f1a04e196e65b3f08f1be7
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-03-20 15:21:33 +01:00
Ian Cordasco
cb7d5a4795 Use graduated oslo.policy
This change:

- Adds oslo.policy to the requirements list
- Accounts for changes in Enforcer initialization
- Accounts for changes to config options
- Removes incubated version of oslo.policy
- Updates the in-tree etc/config files

UpgradeImpact

Partially Implements Blueprint: graduate-policy
Change-Id: I5acb1e0f809098991f05ca3b6d78d4d88d98f2db
2015-03-17 23:50:02 -05:00
Zhi Yan Liu
7258e403df Remove scrubber cleanup logic
From Havana version glance was enhanced to be able to clean
pending-delete images up based on their location status db recorded [0].
So from the release, we don't really need two separated clean up logics
in scrubber internal any more - one logic to deal with booking file and
db, other one to handle db duplicately which I'm going to remove here.

[0]
https://wiki.openstack.org/wiki/ReleaseNotes/Havana#Multiple_Image_Locations

Change-Id: I6a1b42f4557d1822f049b2c88ce9f2c00d5c6483
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2015-03-16 20:39:56 +08:00
Jenkins
fb7697f13c Merge "Remove deprecated option db_enforce_mysql_charset" 2015-03-16 11:37:55 +00:00
Eddie Sheffield
b000c85b7f Add ability to deactivate an image
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
2015-03-13 14:21:11 -04:00
Flavio Percoco
efeb69f903 Remove deprecated option db_enforce_mysql_charset
As per the config option docstring, the option was supposed to have been
removed back in Juno. Removing now.

DocImpact

Change-Id: If2ac2fd38cc1ea5e3ed3d4fdb8eb97e13bcb93c8
2015-03-13 09:15:44 -05:00
Louis Taylor
0acff569e0 Move to graduated oslo.log module
This removes the log module from the oslo incubator directory.

Change-Id: Ib017cc2777e27c58b376c3138c9fba614783cc34
2015-03-12 11:48:24 +00:00
Jenkins
f5360bbd6e Merge "Fix typo in configuration file" 2015-03-11 21:46:37 +00:00
Jenkins
3e7b0a0bbc Merge "Update config and docs for multiple datastores support" 2015-03-11 19:16:38 +00:00
Cindy Pallares
077094292e Fix typo in configuration file
Change-Id: Ie654857994901089eaad542631ef3378a6cb1d9d
2015-03-11 11:06:18 -05:00
Jenkins
b92b5b14d8 Merge "Notifications for metadefinition resources" 2015-03-11 15:45:38 +00:00
Jenkins
07712bbf3f Merge "Glance Image Introspection" 2015-03-11 15:26:50 +00:00
Kamil Rykowski
fd547e3717 Notifications for metadefinition resources
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
2015-03-11 11:14:57 +01:00
Jenkins
030250ed64 Merge "Add operators to provide multivalue support" 2015-03-11 06:57:54 +00:00
Sabari Kumar Murugesan
96fb31d745 Update config and docs for multiple datastores support
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
2015-03-10 20:04:41 +00:00
Flavio Percoco
5dd82abb74 Glance Image Introspection
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
2015-03-10 11:01:18 -04:30
Jenkins
72aa63553b Merge "Eventlet green threads not released back to pool" 2015-03-09 22:35:21 +00:00
Pawel Koniszewski
473ac5fff6 Add operators to provide multivalue support
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
2015-03-08 16:42:30 +00:00
Flavio Percoco
ae3135e1d6 Remove the eventlet executor
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
2015-03-06 17:33:56 -04:30
Stuart McLaren
92d6a35732 Unbreak python-swiftclient gate
Need to correct how swift_store_endpoint is defaulted.

Currently:

swift_store_endpoint = None

will initialize it as a string, which would cause a 'ClientException:
Unsupported scheme' exception to be raised by head-of-tree swiftclient.

This was breaking the swiftclient gate (gate-tempest-dsvm-neutron-src-python-swiftclient).

Change-Id: I1044632683203f17543fd5a98ebf36b3004c5ad0
Closes-bug: 1424754
2015-02-23 17:30:39 +00:00
abhishekkekane
16a821e00d Eventlet green threads not released back to pool
Presently, the wsgi server allows persist connections. Hence even after
the response is sent to the client, it doesn't close the client socket
connection. Because of this problem, the green thread is not released
back to the pool.

In order to close the client socket connection explicitly after the
response is sent and read successfully by the client, you simply have to
set keepalive to False when you create a wsgi server.

DocImpact:
Added http_keepalive option (default=True).

SecurityImpact

Closes-Bug: #1361360
Change-Id: I93aaca24935a4f3096210233097dd6b8c5440176
2015-02-20 11:37:00 +00:00
Jenkins
cd60a24a7d Merge "Add swift_store_cacert to config files and docs" 2015-02-12 13:54:39 +00:00
Jenkins
803c54051b Merge "Add detail description of image_cache_max_size" 2015-02-12 11:35:45 +00:00
Jenkins
713eaf1031 Merge "Add latest swift options in glance-cache.conf" 2015-02-09 18:26:59 +00:00
Yusuke Ide
4f64c00547 Add detail description of image_cache_max_size
The description of 'image_cache_max_size' was ambiguous. There was not
the certainty that the 'image_cache_max_size' parameter was about the
aggregate size of the cache or a per image limit.
The 'image_cache_max_size' is an upper limit beyond which pruner,
if running, starts cleaning the images cache.
Hence added detail description of 'image_cache_max_size' in document
and configuration file.

Bug: #1411813
Change-Id: Ide8e087db544aeea1990bac92c97cb9ca9f0b522
2015-02-07 09:00:47 +09:00
Jenkins
5a1ddb4044 Merge "Add Support for TaskFlow Executor" 2015-02-06 07:58:09 +00:00
Arnaud Legendre
a39debfd55 Add Support for TaskFlow Executor
This patch adds support for a new task executor. This executor
leverages the taskflow library which is responsible for dispatching
the tasks.

The taskflow executor provides basic serial execution of the
tasks and uses eventlet by default. The execution mode is configurable
to have parallel execution in which case it is possible to also
configure the number of workers running at the same time.

TaskFlow wiki: https://wiki.openstack.org/wiki/TaskFlow

partially implements bp async-glance-workers
partially implements bp taskflow-integration

DocImpact
UpgradeImpact

Co-Authored by: Arnaud Legendre <arnaudleg@gmail.com>
Co-Authored by: Flavio Percoco <flaper87@gmail.com>
Co-Authored by: Nikhil Komawar <nikhil.komawar@rackspace.com>

Change-Id: Ie31e64f8fee7f9fe7336cde50d5db89577c4f76d
2015-02-05 15:29:39 -05:00