382 Commits

Author SHA1 Message Date
Hemanth Makkapati
45003b0209 Wrap text in sample configuration files at 80
By default, the config generator wraps the text in configuration files
at 70. This destroys the formatting of our help text strings.
To preserve the formatting, we wrap it at 80 just like we do for code.

Change-Id: I1a9aff4a4c7ea09a8136b3a26d9c22fb270d6226
2016-08-02 13:58:53 +00:00
Jenkins
3706d23c2c Merge "Add image signature verification metadefs" 2016-07-08 23:55:13 +00:00
Jenkins
5f8fc5f86a Merge "Fix duplicated osprofile config for registry" 2016-07-06 14:26:01 +00:00
Fei Long Wang
d04d3122f8 Fix duplicated osprofile config for registry
Now when generating the config samples of Glance, glance-api.conf,
glance-glare.conf and glance-registry.conf will include duplicated
config options for osprofiler. It's because we're collecting
osprofiler's options at two places: etc/oslo-config-generator and
glance/opts.py. So to remove the duplication and keep consistenty
with the other options format, the patch removes the collecting
from etc/oslo-config-generator.

Change-Id: I45ef0bc8453cb8894dc245b8acf390b9ee0f6bfd
2016-07-06 10:02:30 +12:00
Brianna Poulos
e78ff4a92e Add image signature verification metadefs
Add the properties for signature verification to Glance's
Metadata Definitions Catalog.

These are defined as part of the merged spec at:
http://specs.openstack.org/openstack/glance-specs/specs/mitaka/approved/image-signing-and-verification-support.html

Change-Id: I749a31f67bdf0866e7349afcc60df490794f8736
2016-06-30 14:16:49 +00:00
Niall Bunting
969309ffae Change default policy to admin
From: https://review.openstack.org/#/c/309346/

"
I investigated the behaviour of the policy file when various policies
are removed.

A completely empty policy file will return a 403 Forbidden. As the user
will not match with any of the policies.

However, because glance has the policy ``default: ""``. It means that
any policy that is not explicitly stated in the the policy.json, is
by default usable by any member. I think that the ``default`` option
is a potentially bad thing to have in the policy.json file, due to the
ability to give permissions without explicitly stating it.
"

Therefore we should change ``"default": "",`` to ``"default":
"role:admin",``. To make sure that members don't inherit policies that
they shouldn't in the future. From a operators perspective it should be
more secure to have an opt-in rather than opt-out.

Change-Id: I57f9d4791126360079a941c1ff4cb2bbb86298d5
Closes-Bug: 1593177
2016-06-17 15:38:51 +00:00
Jamie Lennox
b0d0b1d0ba Use http-proxy-to-wsgi middleware from oslo.middleware
The HTTP_X_FORWARDED_PROTO handling fails to handle the case of
redirecting the /v1 request to /v1/ because it is handled purely by
routes and does not enter the glance wsgi code. This means a https
request is redirect to http and fails.

oslo.middleware has middleware for handling the X-Forwarded-Proto header
in a standard way so that services don't have to and so we should use
that instead of our own mechanism.

Leaving the existing header handling around until removal should not be
a problem as the worst that will happen is it overwrites an existing
'https' header value set by the middleware.

Closes-Bug: #1558683
Closes-Bug: #1590608
Change-Id: I481d88020b6e8420ce4b9072dd30ec82fe3fb4f7
2016-06-09 09:52:04 +10:00
Jenkins
8dd23d0b9c Merge "Incorrect title for Outbound Peak" 2016-06-02 05:29:55 +00:00
Niall Bunting
85375d46c7 Incorrect title for Outbound Peak
Changes the title to the correct one.

Change-Id: I6c71cd9a1489e4692cdfce252beda16b6e1c670a
Closes-Bug: 1587944
2016-06-01 16:50:20 +00:00
Jenkins
5be7a50fe0 Merge "Remove redundant store config from registry sample" 2016-06-01 11:30:23 +00:00
Nikhil Komawar
a0bddc9a70 Remove redundant store config from registry sample
Currently, the oslo config generator takes glance_store configs in
consideration while generating sample configs for the registry. Registry
doesn't really need these configs.

This patch removes the store config namespace from the oslo
config generator's setup to avoid regeneration of store section in
registry sample.

Sample configs have been regenerated using `tox -e genconfig` command to
make sure they reflect the change proposed. Only the
glance-registry.conf file has been refreshed as a part of this commit.

Closes-Bug: 1584350

Change-Id: I27c53d281dcd97a30c22a27c4833b24e1ca84f83
2016-05-31 18:05:40 -04:00
Dina Belova
790b01573a Use OSprofiler options consolidated in lib itself
Starting with 1.0.0 osprofiler release options needed for
its workability are consolidated inside osprofiler itself.
Let's use them.

Change-Id: Ib0266e0a6e9bfa99c4bacbdca623ab1211a822eb
2016-05-25 11:33:56 +03:00
Hemanth Makkapati
36936f8bc0 Add store opts to scrubber and cache sample conf
Add missing glance_store opts to sample conf files glance-scrubber.conf
and glance-cache.conf.

Change-Id: I123be151fdda8037e62ba21600e63c45fdc90c8d
Closes-Bug: #1568894
2016-04-11 10:10:32 -05:00
venkatamahesh
54153d79c2 Update the Administrator guide links with new ones
Change-Id: I4ec7cab23ffcd991160ac4930237fa50532724bf
2016-04-06 17:18:30 +05:30
Erno Kuvaja
9ef5ed125c Remove unused enable_v3_api config option
The option was used to enable experimental Artifacts API
that was moved to glance-glare service. This config option
does not do anything and is removed to avoid confusion.

Removed apropriate sections from example config files as well.

Change-Id: Ie84f3f65ec88fd30197758ac319ef5b2f4c313e2
Closes-bug: 1556050
2016-03-11 12:00:55 +00:00
Niall Bunting
1d459fda31 Update the config files
This should be the last time reordering happening by the
configgenerator. In future we should see only actual changes but to get
there we need to do this massive change once more.

Closes-Bug: 1553330
Change-Id: Icca0a94a40ba640ca75e01b5cd0d061dacd334ff
2016-03-09 10:31:57 +00:00
Jenkins
dc74368af3 Merge "Moved CORS middleware configuration into oslo-config-generator" 2016-03-07 19:31:34 +00:00
Jenkins
1f6ff26863 Merge "Deprecate use_user_token parameter" 2016-03-07 19:31:12 +00:00
Mike Fedosin
80fef06497 Deprecate use_user_token parameter
Parameter 'use_user_token' in glance-api.conf
was considered as harmful and not acceptable
for real deployments, because if it's disabled,
it changes system behaviour and allows any regular
user to perform requests with admin credentials.

In functional tests the default value was set
to True to prevent possible failures in the future.

Besides, several admin authN parameters were
deprecated as well, because they are useless without
'use_user_token'.

All required information was added to related
documentation sections, sample config file was
updated as well.

https://wiki.openstack.org/wiki/OSSN/OSSN-0060

Change-Id: Icfef49d787fa58e2af2e60e4fdc96633c5f0c010
Related-bug: #1493448
2016-03-07 17:06:04 +03:00
Michael Krotscheck
7a93458baa Moved CORS middleware configuration into oslo-config-generator
The default values needed for glance's implementation of cors
middleware have been moved from paste.ini into the configuration
hooks provided by oslo.config. Furthermore, these values have been
added to glance's default configuration parsing. This ensures
that if a value remains unset in glance-api.conf, it will be set to use
sane defaults, and that an operator modifying the configuration
file will be presented with a default set of necessary sane headers.

Change-Id: I3c9d267b6224d6c7e5cc2c41cb51fb7e363c4955
Closes-Bug: 1551836
2016-03-02 07:48:05 -08:00
Lin Yang
8a38f9ad5d New metadata definitions from CIM
Adds into the Glance metadata definitions items from the Common
Information Model (CIM) schema, include setting data for processor
allocation, resource allocation, storage allocation and virtual
system, which can be associated with several OpenStack resources
to make them interoperable from a end-user specific perspective.

Implements: blueprint cim-namespace-metadata-definitions

Change-Id: If769bae8fcf1803bb2432537228f9633ad789e58
2016-03-02 12:41:16 +08:00
Jenkins
6c64bc1b6a Merge "Support importing OVA/OVF package to Glance" 2016-02-26 06:07:54 +00:00
Kent Wang
b00048742e Support importing OVA/OVF package to Glance
Supports import of OVA/OVF package to Glance by adding a new task to
the existing Glance import workflow. Automatically extracts single disk
image from OVA tarball and saves it to the Glance image store. It also
parses the included OVF file for interested metadata. Extracted
metadata is included as uploaded image's properties.

To kick off this flow, specify 'ova' as 'container_format' in the
task-create request. Specify interested metadata in the
'ovf-metadata.json' conf file, generally located at /etc/glance. Any
other additional metadata found in the OVF file will be ignored.

Currently this is an admin only feature and only supports upload of
single disk images. Also currently we will only be supporting extracting
properties from CIM_ProcessorAllocationSettingData.

Co-Authored-By: Jakub Jasek <jakubx.jasek@intel.com>
Co-Authored-By: Deepti Ramakrishna <deepti.ramakrishna@intel.com>
Change-Id: I4c9c9566895c2426f26d2750c8e2a23b39468fb1
Implements: blueprint ovf-lite
2016-02-24 14:35:19 -08:00
Kirill Zaitsev
f880351fd8 Include version number into glare factory path in paste
Change-Id: I7cdfa81fdf29a26f510bce6804678a343c1fe428
Closes-Bug: #1544964
2016-02-12 16:11:20 +03:00
Jenkins
67a07d893a Merge "Move Glance Artifact Repository API to separate endpoint" 2016-02-11 02:14:23 +00:00
Jenkins
41138f939f Merge "Add metadefs for Cinder volume type configuration" 2016-02-10 19:48:10 +00:00
Alexander Tivelkov
b974a63660 Move Glance Artifact Repository API to separate endpoint
EXPERIMENTAL Glance v3 API has been removed in favor of standalone API
(EXPERIMENTAL Artifacts API of v0.1).
This patch introduces a new process entry point to run on a different
port (9494 by default), with its own configuration file and a paste
config.

A controller stub for old /v3 api remains in the glnace.api package for
the compatibility with existing paste configuration which may reference
it. This stub returns a 301 redirects to glare endpoint if it is present
or 410 errors otherwise.

To reuse  the existing version_negotiation middleware some refactoring
has been made.

Implements blueprint: move-v3-to-glare

Change-Id: I5b7bd4cdcc5f2a40fc4a5f74bcc422fd700c4fb0
2016-02-10 18:34:55 +03:00
Travis Tripp
33ae05ee86 Change Metadefs OS::Nova::Instance to OS::Nova::Server
The metadata definitions in etc/metadefs allow each namespace to be associated
with a resource type in OpenStack. Now that Horizon is supporting adding
metadata to instances (just got in during the mitaka cycle - so unrealeased),
I realized that we used OS::Nova::Instance instead of OS::Nova::Server in
Glance. This doesn’t align with Heat [0] or Searchlight [1].

There are a couple of metadef files that have OS::Nova::Instance that need to
change to OS::Nova::Server. I see also that OS::Nova:Instance is in one of
the db scripts. That script simply adds some initial "resource types" to the
database. [3]. It should be noted that there is no hard dependency on that
resource type to be in the DB script. You can add new resource types at any
time via API or JSON files and they are automatically added.

I'm not sure if the change to the db script needs to be done in a different
patch or not, but that can easily be accommodated.

See bug for additional links.

Change-Id: I196ce1d9a62a61027ccd444b17a30b2c018d9c84
Closes-Bug: 1537903
2016-02-02 15:05:22 -07:00
Jenkins
16c883b6c9 Merge "Make the task's API admin only by default" 2016-01-29 05:41:21 +00:00
Flavio Percoco
8f0d6ea9c5 Make the task's API admin only by default
One of the goals of this spec is to improve the image import process and
allow for other background operations to be executed when the image data
is added. This supersedes the need of the task endpoint that we'll
slowly deprecate. As part of this spec, we should make it admin only and
warn deployers that this API is going to be deprecated.

MitakaPriority
DocImpact: Tasks API is now admin only. Deployments depending on this
    API need to make sure they make it accessible for non-admins.
Closes-bug: #1527716
Partially-blueprint: image-import-refactor
Change-Id: I28cb69ea730ae58b9aed1dd43b68305dbbf132c1
2016-01-28 19:26:09 +00:00
Karol Stepniewski
19aed25f5b Add storage_policy VMware driver option for flavors
https://review.openstack.org/#/c/68421/ added support for
storage_policy in flavor extra_specs. This patch adds missing property
in glance metadef for VMware driver options for flavors.

Change-Id: I2f42e51676701d1427a62d5765141e4e586f52f1
2016-01-26 09:13:26 -08:00
Jenkins
aa62cb4137 Merge "Add properties_target to Instance SW metadefs" 2016-01-25 17:26:02 +00:00
Jenkins
16c42f304f Merge "Add missing CPU features to Glance Metadata Catalog" 2016-01-25 01:40:57 +00:00
Travis Tripp
28becd1aad Add properties_target to Instance SW metadefs
There are several metadata definitions for software that are
associated with Nova instances (OS::Nova::Instance) which should
have their properties target set to "metadata".

The ability to add metadata to an instance leveraging these
definitions at launch time was recently added to horizon. In
a follow up discussion, somebody asked about using the metadata
definitions to also choose nova scheduler hints at launch time,
without confusing the two intended purposes of the metadata.
This raised our awareness that we don't have properties_target
set to "metadata" (rather than "scheduler hints") for
OS::Nova::Instance on the software metadata definition files.

This patch adds "properties_target": "metadata" to those files.

Change-Id: I247226ad78762d1d2add3bb39b1e780b93f36370
Closes-Bug: 1536849
2016-01-21 17:29:48 -07:00
Mitsuhiro Tanino
44629deb81 Add metadefs for Cinder volume type configuration
The following Cinder patch adds support to specify Cinder volume type
via cinder_img_volume_type parameter in glance properties on image
metadata. The property should be added in the Metadata Definitions
catalog.

https://review.openstack.org/#/c/258649/

DocImpact: Add cinder_img_volume_type to Image service property
           keys list at CLI reference.
           http://docs.openstack.org/cli-reference/glance.html
Change-Id: I3bbb20fdf153e12b7461fa9ea9fa172a8d603093
Depends-On: I62f02d817d84d3a7b651db36d7297299b1af2fe3
2016-01-19 11:41:56 -05:00
kairat_kushaev
5814440bb9 Enhance description of instance-uuid option for image-create
Current description of instance-uuid may confuse users because
they may think that instance-uuid can serve as basis for image
but it just stores instance-uuid as image-metadata. So we need
to enhance the description in glanceclient.

Change-Id: I534709bdce588806178912fdd57fdf25bcca0449
Closes-Bug: #1496822
2016-01-18 15:14:15 +03:00
Boris Pavlovic
ca5cdb59e1 Fix the wrong options in glance-api and glance-registry confs
OSprofiler arguments do not have "profiler" group which makes
these config files wrong.

However they are used by DevStack, so this patch updates them
using:

   tox -e genconfig

Change-Id: Ia18ec3e7b2e94d0a0ba6cb8562a0b457fb5ef406
2016-01-12 16:54:29 -08:00
Dina Belova
3bdb51e947 Do not use api-paste.ini osprofiler options
Starting with opsrofiler 0.3.1 release there is no need to set HMAC_KEYS
and ENABLED arguments in the glance-api-paste.ini and
glance-registry-paste.ini files, this can be set in glance-api.conf and
glance-registry.conf configuration files.

DocImpact
Change-Id: I068504913c93be0f506262930eadc2e40879ce0f
2016-01-11 17:55:10 +03:00
NAO NISHIJIMA
788e8ad69b Add missing CPU features to Glance Metadata Catalog
This patch adds missing CPU features to Glance Metadata Catalog.
CPU features based on linux v4.4-rc4 kernel source code in
arch/x86/include/asm/cpufeature.h and picked up Intel&AMD vender.

Change-Id: I8c622172dbc1f7d80e606278064bea6f5bcb4c8f
Closes-Bug: #1409071
2015-12-10 10:44:03 +09:00
Michael Krotscheck
761751064b Added CORS support to Glance
This adds the CORS support middleware to Glance, allowing a deployer
to optionally configure rules under which a javascript client may
break the single-origin policy and access the API directly.

For Glance, the paste.ini method of deploying the middleware was
chosen, because it needs to be able to annotate responses created
by keystonemiddleware. If the middleware were explicitly included
as in the previous patch, keystone would reject the request before
the cross-domain headers could be annotated, resulting in an
error response that was unreadable by the user agent.

A special consideration has been made to accomodate Glance's
nonstandard configuration files, by using 'glance-api' as the
value of oslo_config_project in paste.ini. This is to trigger
automatic oslo configuration loading for paste-loaded middleware,
in order to ensure that it finds glance-api.conf rather than
glance.conf.

DocImpact: Add link to CORS configuration in Admin Guide
OpenStack CrossProject Spec:
   http://specs.openstack.org/openstack/openstack-specs/specs/cors-support.html
Oslo_Middleware Docs:
   http://docs.openstack.org/developer/oslo.middleware/cors.html
OpenStack Cloud Admin Guide:
   http://docs.openstack.org/admin-guide-cloud/cross_project_cors.html

Change-Id: Icf5fb91a0b9e6736e70314c72c1c99c5f170ba53
2015-12-04 08:41:20 -08:00
Dave McNally
f666e5f5e6 Add the Docker container format
A Docker image is a tar archive typically containing a container
filesystem. In order to use the nova-docker compute driver nova and boot
docker instances glance support of the docker container format is
required.

This patch adds the Docker container format to the Glance configuration.

DocImpact: Docs will need to be updated to indicate that the docker
container_format is now one of the default container formats supported
by Glance.

UpgradeImpact: Adds 'docker' to the default list of container_formats.
Operators will no longer need to configure specifically to use docker
containers.

Closes-Bug: #1519402
Change-Id: Ifa206686086232a5599e7bc27a852bc5f3186ebc
2015-12-01 16:42:51 +00:00
Olena Logvinova
0c966a602d [docs] Update description of Glance-Swift conf options
This patch:

1. Updates the description of 4 deprecated options:
   * swift_store_auth_version
   * swift_store_auth_address
   * swift_store_user
   * swift_store_key
2. Adds a new sub-section: Configuring Swift configuration file.

Co-Authored-By: Mike Fedosin <mfedosin@mirantis.com>
Co-Authored-By: Olena Logvinova <ologvinova@mirantis.com>

Change-Id: I41baa2343cf92d819a4a64a2e269e1cb2e3be3f4
Closes-Bug: #1426813
Closes-Bug: #1509349
2015-11-20 18:22:43 +02:00
wangxiyuan
a378d420e0 Typo fix
Add the missing blanks.

Change-Id: I7f29575591cac1df26d6dba3f4e246bff097e149
2015-10-20 03:56:47 +00:00
Jenkins
c02ae75b84 Merge "Add _member_ to property-protections-roles.conf.sample" 2015-10-18 22:22:53 +00:00
Deepti Ramakrishna
db400cdb23 Fix incorrect Glance image metadata description
For each image, when user clicks on Edit Image --> Update Metadata, the list
of various available metadata categories and properties is displayed in a
pop-up window. For each category and property, a user-friendly description is
displayed at the bottom of the pop-up.

The description for "Common Operating System Properties" category says - "When
adding an image to Glance, you may specify some common image properties that
may prove useful to consumers of your image." This is too generic and seems
like a copy-paste of the description from glance-common-image-props.json that
the author later failed to update.

Fixing this to show a more meaningful message.

Change-Id: I5477b1702932e07ab1fd499204d3ff1348abba3b
Closes-Bug: #1483063
2015-10-16 11:18:00 -07:00
Waldemar Znoinski
3e35dd0033 Add Large pages meta definition
This metadef enables Guest Memory backing namespace
and large pagesize property in Nova::Flavor,
Glance::Image, Cinder::Volume(image)
resource types metadata

Change-Id: I6566622a026d80115993cce1b5dc29878bcef0b7
Closes-Bug: #1476732
2015-09-29 22:33:32 +00:00
Erno Kuvaja
b1d2d938d2 Return missing authtoken options
Example configs were missing keystone_authtoken section after moving
to generated config files. This change returns that to generation.

Closes-Bug: #1500361

Change-Id: I6ee82c38061d483cea7254d155d9a72436880e84
2015-09-28 12:08:06 +00:00
Erno Kuvaja
fa30891cf6 Update Glance example configs to reflect Liberty
Adding taskflow_executor_opts into the opts so they will be included.

Closes-bug: #1496012

Depends-On: I52ebf810f4699826baa2bdf91d28e24d902cf950
Change-Id: I9c0988a70f691482258f5f3ba9a5cf5601a81ddf
2015-09-23 22:25:43 +00:00
Hemanth Makkapati
843d43355a Scrub images in parallel
Prior to this change, images were being scrubbed serially while
the image locations, if multiple, were being scrubbed parallely.
For the general case, this may not achieve much performance gain as
the number of images is likely to be more than the number of image
locations per image. Hence, this change attempts to parallelize
image scrubbing while leaving image locations to be scrubbed
serially.

Also, though eventlet greenpool was being used, greening the world
wasn't done. As is, it's unlikely to achieve the intended gains. So,
this change also monkey patches essential python modules.

Finally, this change also makes the pool size configurable. This
offers the flexibility to choose between serial or parallel
scrubbing. Also, parallel scrubbing can be regulated to a desired
level by altering the pool size.

DocImpact
Implements: blueprint scrub-images-in-parallel
Change-Id: I5f18a70cd427e2c1e19a6bddeff317a46396eecc
2015-09-15 11:49:16 -05:00
Takeaki Matsumoto
c288ff994d Add _member_ to property-protections-roles.conf.sample
The present default role of Keystone is _member_.
This change add _member_ to sample conf.

DocImpact
Change-Id: I4dbbbe53c491288a8596d828799a0dac253a1552
2015-09-11 12:44:08 +00:00