Commit Graph

44 Commits

Author SHA1 Message Date
Abhishek Kekane 91f8f16548 [glance-download] Add missing config options to config list
Added missing glance-download plugin config options to the list so
that they will be included in sample configuration files.

Related: blueprint glance-download-import
Change-Id: Ic09acd23ece72b2428979c087971448b4de99b96
2022-08-26 05:48:25 +00:00
Zuul 00f453372c Merge "Immediate caching of an image" 2022-07-19 17:01:13 +00:00
Abhishek Kekane c1a2b9e221 Immediate caching of an image
Till now glance was dependent on periodic job to get image
cached locally and also has dependency on ``cachemanage``
middleware for the same.

This patch removes the periodic job and dependency of
``cachemanage`` middleware and initiates immediate caching
of an image via ``PUT /cache/image_id`` API call.

Co-Author: Dan Smith <dms@danplanet.com>

Implements: blueprint instant-caching
Change-Id: I9ab3f1b7595e22dbb03af95168314352a44eb930
2022-07-19 05:14:38 +00:00
Dharini Chandrasekar 8140abe639 Remove secure_proxy_ssl_header opt from Glance
Glance uses http-proxy-to-wsgi middleware from oslo.middleware in
its pipeline in order to efficiently forward request headers in case
of load balancer style deployments. Hence, the configuration option
``secure_proxy_ssl_header`` was marked as deprecated.

This patch removes the option and the support for it within Glance
to entirely rely on oslo middleware. This will ensure that the related
headers set by oslo.middleware:HTTPProxyToWSGI is never modified in
Glance.

Change-Id: I11d41bb736bbfd90030d88245c11642823e4c400
Closes-Bug: 1673908
2022-07-13 17:31:36 +00:00
Mridula Joshi c9d7ecdb77 Added cli_opts and cache_opts
It is observed that 'cli_opts' and 'cache_opts' from
glance/common/wsgi.py are not picked up by the configgen nor listed
through the functions in glance/opts.py.
This patch adds these options to support configgen to pick all groups
from wsgi.py.

Closes-Bug: #1972666
Change-Id: I81156e32517b03577c09d489b6eb5d19769600a3
2022-05-10 13:45:22 +00:00
Abhishek Kekane 013bdad8b0 Add new config options in sample config generator
Change-Id: I03dbd676c1189507eccaedc0606dda5179ecb77b
2020-07-28 16:06:43 +00:00
Erno Kuvaja 3068096199 Cleanup remove api v1 and registry code
Change-Id: I86a3cbf4374bc2b083ccd86f75b88490b305eaab
2020-07-14 10:38:19 +00:00
Erno Kuvaja 673666cbf4 Deprecation cleanout Registry and related
This patch removes majority of the registry and it's related
endpoints and config options that has been deprecated for
removal in various releases.

Change-Id: I75014bd50bf382efebe56bd89c20ffefbdde25f5
2020-06-30 20:41:30 +01:00
Erno Kuvaja 781da9354f Remove configs and entries for deprecated registry
Including removal of the example conf in docs.
Including glance-registry command entrypoint to eventlet.
Including rpc_controller from wsgi, changed to reject.
Not including the files devstack is depending on.

This change means that glance-registry starts and announces
that it has been removed.
This change means that when ran as wsgi app, all calls to
/rpc endpoint will be rejected.

This will allow devstack to make a graceful transition to
life without the glance registry, which was deprecated in
Newton release.

Change-Id: I7bf3284cba4c38605fb50b3c458e53f896f34086
2020-06-08 21:11:45 +01:00
Erno Kuvaja da29e129fa Revert "Add reserved stores to the sample config file"
This patch introduced double registering of the same
config option groups which fails glance-api start
if reserved stores are actually defined.

The code utilizing these config options has not been
merged which prevented testing to catch this.

Closes-Bug: #1844108

This reverts commit 4265e61bc8.

Change-Id: Iaf338d29673e68a15d37fdda81add552e4175634
2019-09-19 12:40:34 +01:00
Brian Rosmaita 4265e61bc8 Add reserved stores to the sample config file
Since we know the names of the reserved stores, we can add them
to the config file to make it easier for operators to configure
these things.

Includes deprecation of the 'work_dir' and 'node_staging_uri'
options.

Change-Id: I992cf468f9ce156ba51b1dd025459939acd8dce0
2019-08-06 10:45:43 -04:00
Zuul c66d377a71 Merge "Provision to add new config options in sample config file" 2018-11-20 06:14:01 +00:00
Abhishek Kekane e8a0ba0fc7 Provision to add new config options in sample config file
In Rocky we have added support for multiple backend as a EXPERIMENTAL
feature. However configuration options related to multiple backend
are not generated in sample config file due to some issue. We have
added below 2 new config options for multiple backend.

1. enabled_backneds (added in glance)
2. default_backend (added in glance_store)

Made provision to add all the above options to sample config
file.

Depends-On: https://review.openstack.org/#/c/603331/
Change-Id: Iff3db9fe31243e5b9610742c796fdca84c698bcf
Closes-Bug: #1793057
2018-09-18 10:20:43 +00:00
Corey Bryant c58e5e02af Rename async package to async_
In Python 3.7, "async" is a keyword. To prevent it from
conflicting, rename the async package to async_.

Change-Id: I1eaf87eedb86679d9ca9323aac05f0770c33efea
Closes-Bug: #1781617
2018-08-07 14:42:14 -04:00
Brian Rosmaita 156ba81c2f Fix config group not found error
Two parts to this fix:

* add a call to oslo.config.cfg.import_group so that the function
  that checks a uri against the configured white/blacklists can
  access them
* move the location where these options are defined into the
  module's __init__ so that they can be imported without causing a
  circular import (which happens if you import them from their
  current location)

Change-Id: I6363faba0c4cbe75e6e4d0cbf0209a62c10474ef
Closes-bug: #1750205
2018-02-18 14:18:29 -05:00
Erno Kuvaja 1591f573ae URI filtering for web-download
Implement URI filtering to prevent port scanning with the web-download
Image import method.

Closes-Bug: #1748512

Change-Id: Ide5ace8979bb12239c99a312747b3151c1e64ce8
2018-02-15 15:36:28 +00:00
Erno Kuvaja 33e5e30004 Fix bad usage of extend in list_image_import_opts
This change does not explode the list every time the
list_image_import_opts is called like 225a3396 did.

Change-Id: I865bface3b373e6f92bdbefa544d1fefa9da6990
Closes-Bug: #1748399
2018-02-09 14:41:14 +00:00
Erno Kuvaja 850bb916a2 Revert "Fix wrong usage of extend in list_image_import_opts"
This change will duplicate the entries for each run of the list
function.

This reverts commit 225a33967e.

Change-Id: I5be8c5d0e9c83cde64470eeaa27fc62bf393f300
2018-02-09 14:37:43 +00:00
yatin 225a33967e Fix wrong usage of extend in list_image_import_opts
Review https://review.openstack.org/#/c/541740/ wrongly
used "extend" method in image_import_opts, this patch
fixes it.

Change-Id: I00375575d601ea6d970bb93c3f01f35c034976a2
Closes-Bug: #1748399
2018-02-09 09:26:06 +00:00
Erno Kuvaja 824badc189 Decouple Image Import Plugin Opts
This change decouples Image Import Plugin Options from glance/opts.py
so that the deployer who wishes to add 3rd party plugin does not
need to inject the details to the file that is cluttered with all
Glance internal details.

Change-Id: Idc31dbb673efae224c97d2cafa4afa053e049c76
Closes-Bug: #1747926
2018-02-08 10:06:15 +00:00
bhagyashris f5ae04b9f3 Implementation of Inject metadata properties
Implements the spec Inject metadata properties automatically
to non-admin images

This commit adds new task '_InjectImageMetadata' to inject
the metadata properties automatically to non-admin images
at the time of creation of images using newly introduce
'image-import' api in v2.

DocImpact

Implements: I6a7ed31d5fae677cbbc9a6f6053f79d3e9326561
Change-Id: I98be97c42f23b60a72d520aad5f6078a96372c59
2018-01-19 12:11:31 +05:30
Zuul bcb19c35e7 Merge "Scrubber refactor" 2018-01-12 09:43:14 +00:00
wangxiyuan d886d6d7e7 Scrubber refactor
The glance-scrubber utility is used by administrators
for the offline deletion of images when the Glance
option `delayed_delete` is enabled.  The refactoring in
this patch eliminates a dependency on the Glance
Registry v1 client. Further, after this change, the
glance-scrubber does not use the deprecated Glance
Registry at all. Instead, like the glance-manage tool,
it now visits the Glance database directly.

bp: scrubber-refactor
Change-Id: I26f570b85617200880543b7114730a1ac76d3fb1
2018-01-11 10:04:16 +08:00
Erno Kuvaja 1231fb5f6e Add hooks for Image Import plugins
This change adds hooks for pulling in plugins for
Interoperable Image Import taksflow. Boilerplate Noop
plugin is provided as an example and for testing.

Change-Id: If14c7dc4f38360006f9cb350fbba54fa2f33be61
2018-01-09 21:13:15 +00:00
Brian Rosmaita 4b8026714f Glare-ectomy
Glare became a separate project during Newton.  The code was copied
out of the Glance tree, but remained in the Glance repository.  It
is no longer being maintained, and that has begun to cause some
problems, for example, blocking a recent stevedore upper constraints
change; see I141b17f9dd2acebe2b23f8fc93206e23bc70b568

This patch removes the Glare code from the Glance repository.  It
includes Alembic database migration scripts, in both the all-in-one
and E-M-C format.  It also includes release notes.

Implements: blueprint glare-ectomy
Change-Id: I3026ca6287a65ab5287bf3843f2a9d756ce15139
2017-03-01 21:46:52 +00:00
Thomas Bechtold ec51162d87 Add registry_client_opts to glance-cache.conf.sample
The glance-cache service also uses the registry client so
also add the configuration options related to the client.

Closes-Bug: #1614591
Change-Id: I22de15ca5ce4550617c648c88f350e50f4ba27ea
2016-08-18 17:37:44 +02:00
zhengyao1 6db15efcbe Glance tasks lost configuration item conversion_format
Glance convert task will use configuration item conversion_format.
But the configuration item cann't be auto-generated. So this patch
fix it.

Change-Id: I6a5d2f6d2de68d7643e7b36e82f7fdd14546a82b
Closes-Bug: #1533949
2016-06-30 11:35:43 +08:00
Alfredo Moralejo e067242d4f Fix import of profiler options
In _artifacts_opts list, profiler options was incorrectly imported and
generation of config file etc/oslo-config-generator/glance-glare.conf failed.

This patch import profile opts correctly in _artifacts_opts.

Change-Id: Ia42259d1b644fb977311dd37a2acb08ca69e0dee
2016-05-30 06:42:13 -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
Jamie Lennox c41729e88b Add wsgi options to the sample options
The secure_proxy_ssl_header option does not show up in the sample config
files because it is not listed in the api and registry list_opts
functions.

Closes-Bug: #1568723
Change-Id: Ie332236d6e11e0cb63114bc1c68c3a8691f1f1ae
2016-04-11 17:28:25 +10:00
Cyril Roelandt dc9aefada3 Include registry_client_* options in glance-scrubber.conf
These options are useful but were not included in the sample
configuration file generated by "tox -egenconfig".

Change-Id: I257b5cefd259c629445a09dc0373d1ad6bda24f1
Closes-Bug: #1548825
2016-02-24 00:25:47 +01: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
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
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
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
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
Louis Taylor d759a6fd1a Move from oslo.config to oslo_config
oslo_config was moved out of the oslo namespace in oslo.config>=1.6.0.

Related-to: blueprint drop-namespace-packages

Change-Id: I30ecbf8f9de77496fcb643c7ad9738d79ad359f0
2015-01-12 14:34:22 +00:00
Zhi Yan Liu 882049a613 Using oslo.concurrency lib
Replace processutils and lockutils modules of oslo-incubator with
oslo.concurrency lib.

Change-Id: Ic1af8753a70f1aada22efe8132e48cbc16e14f3f
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-12-17 13:20:54 +08:00
Zhi Yan Liu bdc4951d29 Update glance.openstack.common.policy and cleanup
1. Sync glance.openstack.common.policy up to latest
version from oslo-inc.

2. Clean useless modules which depended by policy
module and pinned gettextutils module there. For
latter one, we are going to use glance.i18n instead.
 * jsonutils
 * strutils

docImpact

Closes-bug: #1288178
Closes-bug: #1387973
Partial-bug: #1381870
Change-Id: I84511ab1ee600e618985448dfbfbdc26cb130370
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-12-01 15:08:58 +08:00
James Carey 3f2a56ae65 Move from using _ builtin to using glance.i18n _
The builtin _ should not longer be used.  Instead _
should be explicitly assigned from glance.i18n.

This patch does the following:
  (1) adds these explict assignments to any
      glance file that was missing them,
  (2) removes the defintion of _ as a builtin from
      tox.ini so that a pep8 failure will occur
      if _ is not defined,
  (3) removes calls to install().

This removes the last direct use of gettextutils by glance.
The indirect uses, via openstack/common, will be removed
in the next sync with oslo.

Change-Id: Ie54e8a67e747e022cc01022dfad35d89686bdfc4
2014-11-21 18:51:19 +00:00
Zhi Yan Liu 8cf3d38246 Complete the change of adding public_endpoint option
Change-Id: I8190b102ab827a4cf4c23f0f350fae051c1d33f0
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-10-23 13:15:01 +08:00
Julien Danjou fadbef8511 hacking: upgrade to 0.9.x serie
Change-Id: I252758fd633662de9659a402c5e3d7e3ce1fae0f
2014-10-06 14:41:03 +02:00
Zhi Yan Liu 819f28a0b8 Enabling separated sample config file generation
As a common approach most projects used now and Oslo preferred, this
change enabled sample configuration file generation mechanism for
each Glance services.

This change, as an enhancement, allows generating separated sample
configuration files for each Glance major services, e.g.:

    etc/glance-api.conf.sample
    etc/glance-cache.conf.sample
    etc/glance-manage.conf.sample
    etc/glance-registry.conf.sample
    etc/glance-scrubber.conf.sample

It is different than I94d486d6686815c45705a7a9b00fb26062e1eb63
which only supports generating an unified sample configuration
file to including all Glance available options.

This mechanism  not only can help auditing by packager, milestone
maintainer or developer as a function (testenv) of tox, but also
those separated configuration files could make deployment be easy.
And it helps keeping sample configuration files be update with
code change.

The change added "genconfigs" function as a tox testenv (-egenconfigs),
and it dependes on oslo-config-generator function of oslo.config.

The change doesn't introduce those sample files Glance repo, so
next step is to investigate if we can generate them in gate
automatically when a change was merged.

Related-Change-Id: I15686708fc9460948a58cfea3d18dae40ba1fda9
Related-Change-Id: Iae31856d5886ee78786972d80c7c103c3460a2b3
Related-Change-Id: I76043b08e2872867e5af2a5ac902e4d092fda5c8
Closes-Bug: #1300546
Closes-Bug: #1361963

Change-Id: Ibe03a3fe80b96ca32acb1a6bea7e38e6075951bb
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-09-17 13:19:00 +08:00