This change is a follow-up to a change that merged recently [1].
We are changing the name of the config option to make it similar
to the policy we have defined for updating some metadata that
should only be manipulated by administrators.
[1] https://review.opendev.org/c/openstack/manila/+/909175
Related-Bug: #2050010
Change-Id: I9a8a27f1181b92291f2d4ad5fd9d4483e2dacc50
- A new config option named ``admin_metadata_keys`` was introduced
and we expect it to be set in the DEFAULT section of the manila
configuration file. It is expected that administrators will provide
a list of metadata keys that can only be updated by administrators
through this configuration option.
- Drivers will be able to set metadata while creating shares
through the `get_optional_share_creation_data` driver interface.
Closes-Bug: #2050010
Change-Id: I6412710c7db89747d23033e1a5a6be9de5886b0b
user can create a transfer for a share. will return transfer id
and auth_key. another user can use transfer_id and auth_key to
accept this share. salt of transfer and auth_key compute crypt_hash
by sha1. then compare with crypt_hash in db.
APIImpact
DocImpact
Partially-Implements: blueprint transfer-share-between-project
Change-Id: I8facf9112a6b09e6b7aed9956c0a87fb5f1fc31f
Add support share Recycle Bin, the end user can soft delete
share to Recycle Bin, and can restore the share within 7 days,
otherwise the share will be deleted automatically.
DocImpact
APIImpact
Partially-Implements: blueprint manila-share-support-recycle-bin
Change-Id: Ic838eec5fea890be6513514053329b1d2d86b3ba
Remove manila configuration options
and auth classes that were deprecated
before the Ussuri release.
Change-Id: I148225926cd249a0dd8d1f8c02b22ed06487f405
Manila APIs have had the requirement to include
project_id in the URLs since the very beginning.
This comes from an old assumption that our APIs
would be differentiated per-tenant on the cloud,
and we would allow different kinds of API endpoints
(public, admin, internal, etc). While it is possible
to set up different endpoints against the API
service, the same and complete API is exposed at
each of these endpoints.
We don't _need_ the project_id information that
we receive in the URL for any of our APIs to
function. We rather authorize tenants by gathering
information from the Identity service (Keystone)
and wrapping that into a RequestContext object
that we then rely on to ensure namespace isolation.
Removing the requirement for "project_id" simplifies
our API endpoint structure in the service catalog
as well as provides a way for system scoped users
to interact with manila without having to declare
their project.
In order to make project_id optional in urls, the
possible values of project_id have to be constrained.
This change introduces a new configuration option
so deployers may control that. This configuration
option defaults to accepting UUIDs with and without
dashes.
Since manila can be used in standalone deployments
without the need for Keystone, this change introduces
a noauth middleware that can work without project_id
in the URL paths.
The API version has been incremented to signal this
change to end users. When 2.60 is available, deployments
may drop "project_id" in the service catalog endpoint
for Manila and end users applications can stop needing
it as well (if they don't already rely on the service
catalog for this data).
APIImpact
Implements: bp remove-project-id-from-urls
Change-Id: I5127e150e8a71e621890f30dba6720b3932cf583
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
remove usage of six library from the following directory:
1:common
2:data
3:db
4:message
5:network
6:scheduler
Change-Id: I9db0abf2b0847157074ca6ba84b5451bfe3f20d0
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:
1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.
2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.
Also convert manila/tests/policy.json to manila/tests/policy.yaml
using oslopolicy-convert-json-to-yaml tool and replace
policy.json to policy.yaml ref from doc and tests.
[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html
Change-Id: I3748313912b2527c43c9b16a6ba3e3ccd4cf5221
This option is unused and is likely going to confuse
deployers, especially when using the share usage size
tracking feature with a similarly named option
(share_usage_size_update_interval) [1].
We can remove this option in the Train release.
Closes-Bug: #1813054
[1] https://review.openstack.org/#/c/465055/
Change-Id: Id4585fa887e5bdfd5743dad2c490392ba0401061
The following config option was moved to another place:
- [Default]sqlite_db : Only used for testing so move it to the test
config options. That way, it is not visible in the
manila.conf.sample file
The following config options were removed and are now handled via
oslo.db:
- [Default]sqlite_synchronous : already handled by oslo.db . The new
place is "[database]sqlite_synchronous" but the deprecated
section/names are handled
- [Default]sql_idle_timeout : already handled by oslo.db . The new
place is "[database]connection_recycle_time" but the deprecated
section/names are handled
- [Default]sql_max_retries : already handled by oslo.db . The new
place is "[database]max_retries" but the deprecated
section/names are handled
- [Default]sql_retry_interval : already handled by oslo.db . The new
place is "[database]retry_interval" but the deprecated
section/names are handled
Change-Id: I17e9b69d4ce4b8e624313d05f72d25b3fc2b458c
One of the goals for Pike [1] is to make each API service be able to
run under web servers that support WSGI applications,
such as Apache (+mod-wsgi) and Nginx (+uWSGI).
Do following to address governance requirements:
- Split existing manila/wsgi.py module into 3 modules:
First (manila/wsgi/eventlet_server.py) is used by
eventlet-based WSGI application approach.
Second (manila/wsgi/wsgi.py) is used for WSGI web servers.
And third (manila/wsgi/common.py) is common code for both.
All three are made in cinder-like way to have alike-approach.
- Reuse common code from "oslo_service/wsgi.py" module that
allows us to remove code duplication.
- Delete config opts that are defined by newly reused common code.
- Register new entry point that will be manila wsgi app: "manila-wsgi".
- Fix "manila/api/openstack/wsgi.py" module to be compatible
with str/bytes handling approach used by Apache mod-wsgi plugin using
different python versions (2/3).
- Add web server config template "devstack/apache-manila.template"
- Add devstack support where usage of this feature can be
enabled or disabled using "MANILA_USE_MOD_WSGI" env var.
It is set to "True" by default, because it is requirement for Pike
release - to have it running in all CI jobs.
Disable it only for one CI job that uses dummy driver and tests
various manila core features that are not covered by other CI jobs.
[1] https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi.html
Partially-Implements BluePrint wsgi-web-servers-support
DocImpact
Change-Id: Ibdef3c6810b65a5d6f3611e2d0079c635ee523ab
Some configuration options were accepting both IP addresses
and hostnames. Since there was no specific OSLO opt type to
support this, we were using ``StrOpt``. The change [1] that
added support for ``HostAddressOpt`` type was merged in Ocata
and became available for use with oslo version 3.22.
This patch changes the opt type of configuration options to use
this more relevant opt type - HostAddressOpt.
[1] I77bdb64b7e6e56ce761d76696bc4448a9bd325eb
TrivialFix
Change-Id: I44ba478ff14a6184434dd030efd9b7fa92458c7a
Remove the experimental consistency group APIs and
replace them with the experimental Share Group APIs.
DocImpact
APIImpact
Partially-implements-blueprint: manila-share-groups
Change-Id: I79a80a62ae4e0015d6161edc2b93fd1f9ba69537
Cors has been added setdefaults method, just use it.
Related link:
https://review.openstack.org/#/c/285368/
Change-Id: I26e1ecdf4a92ab55eeb794a0df7ba6a323f9141a
Both options are not used in the code and the help text already
mentioned that the variables will be removed.
Change-Id: I4b90080dde789b772323e1d93d5a08c4d9f342f5
For the moment, building manila configuration sample, we get real
hostname and IP address of host that runs "genconfig" tox job. It
should not be exposed. So, hide it using "sample_default" arg for
appropriate options.
TrivialFix
Change-Id: Id8e5bdbc352229cf6a908a545e23ce62fd162ca4
The os_region_name option appeared 2 places
in manila. This change moves them to the core
options list.
Change-Id: I5477c4e8b7c1523615fa50782d1c41e42e5f4fe6
Closes-bug: 1454590
The default values needed for manila'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 the default initialization procedure. This ensures
that if a value remains unset in the configuration file, it will
fallback to using sane defaults. It also ensures that an operator
modifying the configuration will be presented with that same
set of defaults.
Change-Id: Ie4adc39866a4ee6132eab6a111660218b3e6e5bd
Closes-Bug: #1551836
Added a new service defined as data, whose purpose is to
receive requests, process data operations such as copying,
migration, backup, and send back the response after operation
has been completed.
In this patch the service has no methods, it is empty, the
operation it should perform will be added in subsequent patches.
Implements: blueprint data-copy-service
Change-Id: I31365c8ac4197541af175c82f8f18a3d11740a99
The OpenStack API working group recommends all projects adopt
Nova-style microversions for versioning their REST APIs. This
commit ports the Nova microversion code and docs to Manila.
With this patch, the API version is bumped to 1.1, and the
versions API (which has always returned horribly outdated
values) is the first API that is versioned. The 1.1 version
of the versions API includes the minimum and current API
version values.
Implements bp: manila-rest-api-microversions
Change-Id: Ifa8e394335a4eb3ad21f53a873530aee241c00e8
Make opt 'enabled_share_protocols' expect share protocol names using any case.
Also, remove concatenation of translated messages and make explicit
unicode-transformation or these messages that is required when lazy translation
is enabled. That is case of Manila.
See http://docs.openstack.org/developer/oslo.i18n/usage.html#lazy-translation
Change-Id: Iadf41abd5ac62fcce0c0f63cd9a376a2c6eadd6e
Closes-Bug: #1475668
Sync common code from oslo-incubator. The main reason for it is removal
of usage 'log' module from incubator in manila codebase. Because we already
use another 'log' from library 'oslo_log'.
Head of oslo-incubator code that was used for 'sync' operation was at
following commit:
commit f5646edc61b9653d7ff71ed0177ed77811bbdcd0
Author: Elena Ezhova <eezhova@mirantis.com>
Date: Tue Apr 7 17:46:16 2015 +0300
Additional changes:
- Added explicit registration of 'oslo_log.log' options to all manila scripts
- Module 'manila.openstack.common.log' removed as unused
Change-Id: I5b98d3863329227531fdb94ad7dbf5b3e5c51141
The correct option name is enabled_share_backends.
This change removes the obsolete option and corrects
the documentation to reference the correct name.
Change-Id: I616f6006966f33b261e8ead43bd7757c03797bef
Closes-Bug: #1425237
Manila has used single gigabytes quota for shares and snapshots.
Config opt 'no_snapshot_gb_quota' is set to False by default, that has been
used for enabling/disabling of snapshot gigabytes quota considerations.
Add separate snapshot gigabyte quota and remove opt 'no_snapshot_gb_quota' that
is not needed anymore. To be able to set infinite quota for snapshot gigabytes,
just set value for new config option 'quota_snapshot_gigabytes' to '-1'.
Change-Id: I43cb95ff3d0d3e6191f520b52edb67a0a44e9c2c
Implements BP add-snapshot-gb-quota
Implement possibility to set up default share type for share creation.
If default share type is set up and in case no share type is specified,
a default share type will be provided with the share creation request.
It is useful when we want some specific back end to be used in common
cases instead of weighed back ends.
How to use it:
1) add to manila.conf file following option
default_share_type = some_st_name
to [DEFAULT] group of config.
2) restart manila API service if was started
3) create share type with name "some_st_name"
4) add some extra specs to share type, for example:
share_backend_name = cheap_backend
Implements blueprint default-volume-type
Change-Id: Ief32825360cbb3e7df9149e8980c11c5018f52f7
Define config options 'osapi_max_limit' and 'osapi_share_base_URL' in proper
module to be able to run module "manila.api.common" without import of
module "manila.common.config". Without it all unit test modules that import
"manila.api.common" fail due to not defined mentioned config opts.
Change-Id: I725ab6cc7d777b3384bdd9095c72ecd65079e6cf
Closes-Bug: #1194315
It is useful in case we use share backends that do not implement some share
protocol or want to disable something for some other reason. For the moment,
there is no share driver that supports all share protocols in Manila.
Change-Id: I80a6a7927aa897931a84d310b657d0af06f02823
Closes-Bug: #1403161
The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries. Updating the hacking
rule to include a check to prevent oslo.* import from
creeping back in.
oslo.messaging is the only exception because this package doesn't
currently support non-namespaced imports.
Change-Id: I3987e651bc880c8ffa7c0105df0298679dcd3a43
Change help text from GigaByte to Gigabyte.
Change-Id: Ic8e1f4472812aa501ffa0588b782f9fce5832af4
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Both configuration options are available and used from the [database]
section under the names 'connection' and 'connection_debug'.
Change-Id: I7178ee9fce3b95c887d9b7e5d5564873aae69c88
Both options are leftovers from the initial Cinder fork and are not used
for anything useful.
Also use a sane default for 'state_path' which pointed to $pybasedir and
now points to '/var/lib/manila'.
Change-Id: I95d824cd81c98815fde6c312b0e4fd38fb4c88e9
This parameter was a leftover from the original Cinder fork. But even in
Cinder the parameter has been already removed (see
https://github.com/openstack/cinder/commit/fce28fe9).
Change-Id: I0a030217cde194cbd129c9100f276f4267b001d9
oslo.i18n provides the i18n function that were provided by
oslo-incubator's gettextutils module
Import _ where needed, oslo.i18n deprecated the builtin method.
Closes-Bug: #1382187
Change-Id: I12aa1c725aa4bb52a9aa46e9c3d2b303839de48b
Make help strings consistent:
* Add missing spaces between words
* Capitalize first word of help
* Add "." at end of string
* Improve wording and capitalization
This follows the oslo.config style guide:
http://docs.openstack.org/developer/oslo.config/styleguide.html
Change-Id: I8243909249423b6b58ccda0d800856f46b0953c5
Fix and enable flake8 test H404:
H404 multi line docstring should start without a leading new line
Change-Id: I13dc13bb5e81d65300680df094cde538c7a6f6df
Partial-Bug: #1333290