Commit Graph

189 Commits

Author SHA1 Message Date
ashrod98 47e7c78f37 Conditional Import for FIPS Compliance
Conditionally Import Parakimo
Separate SSH functions into ssh_utils.py for safe conditional import.

Change-Id: Ia1a3ee69bef76b52e4e6df1e73488c018ac0f3c9
2024-02-06 20:30:39 +00:00
Felipe Rodrigues 6c9d990a8f Add NetApp Active IQ scheduler weigher
Add the new scheduler weigher NetAppAIQWeigher that relies on
the NetApp Acitve IQ software to weigh the hosts. It only
works with NetApp only hosts.

It is also adding a new NetApp specific pool information
called ``netapp_cluster_name`` that contains the name
of the cluster where the pool is located.

Implements: netapp-active-iq-scheduler-weigher
Signed-off-by Felipe Rodrigues <felipefuty01@gmail.com>

Change-Id: I36b08066545afdaa37e053eee319bc9cd489efdc
2023-08-30 08:28:50 -03:00
silvacarloss 0f82690ddd Allow restricting access rules fields and deletion
Access rules rules allow API will now take three additional
parameters:

- lock_visibility: when True, only services, administrators and
  the same user will be able to see the content of ``access_to`` and
  access_key.

- lock_deletion: when True, the access rule will be locked for
  deletion. Only services, administrators or the user that placed
  the lock will be able to drop the access rule.

- lock_reason: a reason for the lock. This parameter should only
  be provided in the presence of at least one of the former
  parameters.

In order to delete an access rule that is currently locked, the
requester will need to specify ``unrestrict=True`` in the request.

In case a service placed the restrictions, only the own service or
the system administrator will be able to release it.

This change also implements filters to the access list API. It is
now possible to filter access rules based on `access_to`,
`access_type`, `access_level` and `access_key`.

DocImpact

Change-Id: Iea422c9d6bc99a81cd88c5f4b7055d6a1cf97fdc
2023-08-24 14:53:06 -03:00
Goutham Pacha Ravi f641577d8a Resource Locks: Support for share deletion lock
Add CRUD APIs for resource locks with support
for preventing deletion of shares (applies to
soft-deletions and unmanage operations as well).

Change-Id: I146bc09e4e8a39797e22458ff6860346e11e592e
Implements: bp/allow-locking-shares-against-deletion
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-08-18 10:47:25 -07:00
zhongjun 0b99fdaa9a Implement share backup
Add share backup feature in Data Copy Service and
Share Service. It will allow the user to create, restore
and delete backups as well as listing backups and showing
the details of a specific backup.

APIImpact
DOCImpact

Change-Id: I7d10cf47864cd21932315375d84dc728ff738f23
Implement: blueprint share-backup
2023-08-10 11:11:42 +00:00
Kiran Pawar 37278df338 Fix duplicate entries in share_server_backend_details
share_server_backend_details_set() add entries in db table without
checking existing entries with given combinaton of share_server_id
and key. This causes duplicate records. Fix it by validating presence
of share server id and key.

Closes-bug: #2024658
Change-Id: I58dcd9716cf95d0d696c13a4c831df787726bcda
2023-06-22 15:01:12 +00:00
haixin b4a0fd9af0 Update micversion to 2.77, support share transfer between project
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
2023-02-17 16:05:01 +08:00
gyh 297fbc00f6 Add Macrosan Manila Driver
Change-Id: I493e8c7d1247e6bd52441fdfdc801f7205541659
2022-08-22 02:57:50 +00:00
Ashley Rodriguez 266c8012e7 Metadata for Share Resource
This change adds metadata controller for Shares resource

APIImpact
Partially-implements: bp/metadata-for-share-resources

Change-Id: I76d26f4ddce7570463efd896b571b1e1a9222ca5
2022-03-04 20:57:48 +00:00
Felipe Rodrigues 2b57d15c64 Add multiple subnets per AZ support
Manila can now configure a share network with multiple subnets
in an availability zone. Also, it can add a new subnet for an
availability that has share servers, which will triger an update
share server allocations.

Changes:
- API:
  - Bump version to 2.70.
  - setup share network with multiple subents per az.
  - Block manage server with multiple subnets.
  - Allow add subnet for in-use share servers.
  - `share_network_subnet_id` is dropped from ShareServer view
  - `share_network_subnet_ids` is added in ShareServer view
  - `network_allocation_update_support` is added to ShareServer and
    ShareNetwork views.
  - Add a check operation for share network subnet create.

- DB:
  - Remove `share_network_subnet_id` from share_servers.
  - Create mapping table `share_server_share_network_subnet_mappings`.
  - Fix queries with new db design.
  - Add migration downgrade and upgrade alembic.
  - Add `share_network_subnet_id` to the NetworkAllocations.

- Scheduler:
  - Change `AvailabilityZoneFilter` to take in account if the
    host supports the allocation required by the setup request.

- Manager:
  - Bump RPC API version.
  - `_setup_server` allocating multiple subnets.
  - Modify signature of driver `_setup_server` interface, passing a
    list of `network_info` for each subnet.
  - Share server DB creation to inform a list of subnets and
    create with `network_allocation_update_support`.
  - Implement `check_update_share_server_network_allocations` and
    `update_share_server_network_allocations`.

- Drivers:
  - For legacy compatibility, all drivers implementing `_setup_server`
    consume the first element of the `network_ino`.
  - Dummy Driver:
    - Implement `_setup_server` with new signature as multiple subnet.
    - Modify the `backend_details` to save allocations for all subnets.
    - Report update allocation and share server multiple subnet support.
    - Implement `check_update_share_server_network_allocations` and
      `update_share_server_network_allocations` interfaces.

Signed-off-by: Felipe Rodrigues <felipefuty01@gmail.com>
Co-Authored-By: Andre Beltrami <debeltrami@gmail.com>
Co-Authored-By: Fábio Oliveira <fabioaurelio1269@gmail.com>
Co-Authored-By: Nahim Alves de Souza <nahimsouza@outlook.com>
Co-Authored-By: Caique Mello <caique_mellosbo@hotmail.com>

DocImpact
APIImpact
Partially-Implements: blueprint multiple-share-network-subnets

Change-Id: I7de9de4ae509182e9494bba604979cce03acceec
2022-03-03 02:31:11 +00:00
haixin 7f2b25332a remove usage of six library
remove usage of six library from the following directory:
1:share
2:volume
and some files.

Change-Id: If5bb2976bc54887c74649a00deaeaa71e296aaaa
2022-02-10 02:46:34 +00:00
Felipe Rodrigues 9f3c566a10 [NetApp] Add FlexGroup volume support
The NetApp driver has been working  with FlexVol ONTAP volumes.
The driver does not support scaling FlexVol volumes higher than
100 TiB, which was a theoretical limit for the large namespace that
these containers were meant to handle. ONTAP's Flexgroup volumes
eliminate such limitations. So, added the support for provisioning
share as FlexGroup in the NetApp driver.

The FlexGroup provision is enabled by new option
`netapp_enable_flexgroup`, which will make the driver report a single
pool represeting all aggregates. The selection on which aggregates the
FlexGroup share will reside is up to ONTAP. If the administrator desires
to control that selection through Manila scheduler, it must inform the set
of aggregates that formss FlexGroup pool in the new  option
`netapp_flexgroup_pool`.

Each NetApp pool will report now the capability: `netapp_flexgroup`
informing which type the pool is.

The following operations are allowed with FlexGroup shares (DHSS
True/False and NFS/CIFS):

- Create/Delete share;
- Shrink/Extend share;
- Create/Delete snapshot;
- Revert to snapshot;
- Manage/Unmanage snapshots;
- Create from snapshot;
- Replication[1]
- Manage/Unmanage shares;

The backend with one FlexGroup pool configured will drop the consistent
snapshot support for all pools.

The driver FlexGroup support requires ONTAP version 9.8 or greater.

[1] FlexGroup is limited to one single replica for ONTAP version
lower than 9.9.1.

DocImpact

Depends-On: If525e97a5d456d6ddebb4bf9bc8ff6190c95a555
Depends-On: I646f782c3e2be5ac799254f08a248a22cb9e0358
Implements: bp netapp-flexgroup-support
Change-Id: I4f68a9bb33be85f9a22e0be4ccf673647e713459
Signed-off-by: Felipe Rodrigues <felipefuty01@gmail.com>
2021-09-08 15:47:15 -03:00
Chuan Miao 7e7ec7337c Add Share Affinity/Anti-Affinity Scheduler Filters
This patch implements hard affinity and anti-affinity filter for
manila scheduler. Users can specify affinity/anti-affinity share
ids to the field "share.scheduler_hints.same_host" or
"share.scheduler_hints.different_host" in the request payload
when creating a manila share. The scheduler_hints are stored as
share metadata. The filter properties are populated from this
metadata during share migration and so filters will be applied
for share migration as well.

Both fields can be a single share UUID or multiple uuids
separated by comma. For example,

`{
    "share": {
        "scheduler_hints": {
            "same_host": "share_uuid_1,share_uuid_2",
            "different_host": "share_uuid_3"
        }
    }
}`

Implements: bp/affinity-antiaffinity-filter

Change-Id: Ic42d8a0c1d22e77ae64e0ca014607b28fd336467
Co-authored-by: Maurice Escher <maurice.escher@sap.com>
2021-09-03 08:58:46 +02:00
Zuul 36672dcec6 Merge "Add exception for insufficient privileges when using security services" 2021-03-26 01:25:19 +00:00
Ratnakaram Rajesh 643083eefa Support host assisted share migration for Zadara manila driver
Closes-Bug: #1917980

Change-Id: I66371e6a8a1650ffebe5ffe482cde52660ccc000
2021-03-25 17:17:34 +02:00
Eduardo Santos 3d65f46d3e Add exception for insufficient privileges when using security services
When trying to create a share using a security
service while having insufficient privileges or
providing wrong credentials, manila raises a
generic user message that provides little
information to the end user on what exactly went
wrong.
Added a driver-agnostic exception for when this
happens, accompanied with a user message to
provide more useful information to end users.

Partial-Bug: #1900755
Change-Id: I2b0bc5c0715c225cd5b38b55fb3967ff7fc86fa8
2021-03-25 14:45:53 +00:00
debeltrami 2bc27c5678 Add security service update for in-use share networks
This patch implements the update of security service's association
with in-use share networks. The following changes were added:

 - New share network APIs: `share_network_security_service_update`
 and `share_network_reset_state`.

 - A new `status` attribute was added to share network model to
 identify when it's in a modification state, called 'network_change'.
 Other supported status that were added: 'active' and 'error'.

 - New 'security_service_update_support' property was added to both
 share server and share network models, to identify when this resources
 are able to process security service update for in-use share networks.

 - New driver interface was added to support update of security service's
 configuration of a given share server.

DocImpact
APIImpact
Partially Implements: bp add-security-service-in-use-share-networks

Co-Authored-By: Carlos Eduardo <ces.eduardo98@gmail.com>
Co-Authored-By: Douglas Viroel <viroel@gmail.com>
Co-Authored-By: Andre Beltrami <debeltrami@gmail.com>

Change-Id: I129a794dfd2d179fa2b9a2fed050459d6f00b0de
2021-03-12 18:37:45 -03:00
Zuul 0a2ae6ff51 Merge "Add config option to set per_share_size_limit." 2021-03-12 05:07:37 +00:00
Zuul 8523d323e7 Merge "Adding Zadara Manila driver" 2021-03-09 17:44:03 +00:00
kpdev 0045293942 Add config option to set per_share_size_limit.
This feature allows admin to set share size limit for a project.
The defaults will either come from the default values
set in the quota configuration option or via manila.conf
if the user has configured default values for quotas there.

The quota_per_share_gigabytes defaults to -1["No Limit"] always
unless changed in manila.conf by admin.

Closes-Bug: #1811943

Change-Id: Ida126c8c419b8bf4d2a194f061a0809d52b47ab8
2021-03-09 11:58:17 +01:00
Ratnakaram Rajesh 4705a7d520 Adding Zadara Manila driver
Implements: blueprint zadara-manila-driver

Change-Id: Iae0eaf8b37d5eecc352af6546fd0cfa4cadab497
2021-03-06 10:02:09 +02:00
Goutham Pacha Ravi da3ab2cf45 [Native CephFS] Add messages for async ACL ops
Access rules added to CephFS shares can fail
at the driver, or by the ceph volume client library.
Since the share manager can supply rule changes to
the driver in batches, the driver has to gracefully
handle individual rule failures.

Further some of the causes of the access rule
failures can be remedied by end users, therefore
asynchronous user messages would be a good vehicle
to register user faults that can be examined and
corrected.

Related-Bug: #1904015
[1] https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-27781

Change-Id: I3882fe5b1ad4a6cc71c13ea70fd6aea10430c42e
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-01-27 19:46:51 -08:00
Douglas Viroel 4bcf21eaf1 [NetApp] Add support for share server migration
This patch adds support for share server migration between NetApp
ONTAP drivers. This operation is now supported for migrating a share
server and all its resources between two different clusters.
Share server migration relies on ONTAP features available only in
versions equal and greater than ``9.4``. Also, in order to have share
server migration working across ONTAP clusters, they must be peered in
advance.
At this moment, share server migration doesn't support migrate a share
server without disrupting the access to shares, since the export locations
are updated at the migration complete phase.
The driver doesn't support changing security services while changing the
destination share network. This functionality can be added in the future.

Co-Authored-By: Andre Beltrami <debeltrami@gmail.com>

Implements: bp netapp-share-server-migration
Depends-On: Ic0751027d2c3f1ef7ab0f7836baff3070a230cfd
Change-Id: Idfac890c034cf8cbb65abf685ab6cab5ef13a4b1
Signed-off-by: Douglas Viroel <viroel@gmail.com>
2020-09-11 16:24:24 -03:00
Douglas Viroel 39efc2bde8 Add share server migration
This patch adds support for migration of share servers. This
migration is performed using a two-phase approach. Administrators
are now able to request the migration of a share server within and
across backends, with the possibility of chooosing a different share
network for the destination share server.

- A new field called `task_state` was added to the share server
  model in order to help the administrator to track the share server
  migration steps. A new field called `source_share_server_id` was
  added to link destination and source share servers.

- A new periodic task was added to track migration of share servers
  and its resources.

- Two new states were added: `server_migrating` and
  `server_migrating_to` to represent that share migration is in
  progress.

- When performing the server migration, manila will not go to the
  scheduler, instead it will provide a request spec to drivers
  during migration check driver call. It'll be up to the driver
  validate if there is free space to handle the share server.

- A new API called `share-server-migration-check' was added to
  check the feasibility of a migration, before actually triggering
  the start operation.

APIImpact
DocImpact
Partially Implements: bp share-server-migration

Co-Authored-By: Andre Beltrami <debeltrami@gmail.com>
Co-Authored-By: Carlos Eduardo <ces.eduardo98@gmail.com>
Co-Authored-By: Felipe Rodrigues <felipefuty01@gmail.com>

Change-Id: Ic0751027d2c3f1ef7ab0f7836baff3070a230cfd
Signed-off-by: Douglas Viroel <viroel@gmail.com>
2020-09-10 08:52:08 -03:00
Zuul 57d9880b74 Merge "Prevent share type deletion if linked to group types" 2020-04-14 19:01:02 +00:00
silvacarloss dceced6d6e Add new quota for share replicas
This patch adds new quotas for share replicas and replica sizes.
This quotas can be related to either tenants and users or tenants
and share types. Now, when creating a share replica, manila will
check if there are resources available for that specific request.

Partially-Implements: bp limit-share-replicas-per-share
Change-Id: I8ba7bc6f167c28d6c169b2187d0e1bda7cad3f69
2020-04-06 13:17:30 +00:00
Goutham Pacha Ravi 470bab7c71 Prevent share type deletion if linked to group types
Share types can be associated with share group
types. This relationship needs to be dropped in
case share types are to be deleted, or we'll be
leaving behind dead references in the database.
Share groups cannot exist without share group
types, and hence we don't need to check on existing
groups when deleting share types; checking for
existing group types will suffice.

Change-Id: Id86a93f1923a493cefe73e2d90d5094005b42ae4
Closes-Bug: #1699836
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-04-05 16:32:52 -07:00
Andreas Jaeger 3fdd9983e0 Hacking: Fix W605
Fix:
W605 invalid escape sequence

This is the final change I plan for hacking, the remaining problems
need further investigation by manila team and decision whether and how
to solve them.

Change-Id: I73d73e044eaaf412bf7ace358a3f07c8d269d6cf
2020-04-01 14:38:14 +02:00
silvacarloss 14d3e268a0 Add share network with multiple subnets
This patch adds the possibility to create share networks with
multiple subnets in Manila. It also updates the share server api
to receive "share_network_subnet_id" instead of "share_network_id".

Each share network subnet must be associated with only one
availability zone. Each share network must have a single default
share network subnet.

DocImpact
APIImpact
Depends-On: I13bb48e7c03e16c26946ccf9d48e80592391a3d1
Partially-implements: bp share-network-multiple-subnets
Change-Id: Id8814a8b26c9b9dcb1fe71d0d7e9b79e8b8a9210
Closes-Bug: #1588144
Co-Authored-By: lseki <luciomitsuru.seki@fit-tecnologia.org.br>
Co-Authored-By: dviroel <viroel@gmail.com>
2019-09-13 11:27:18 -03:00
haixin 01e89ae26b Add update share-type API to Share Types
Currently, only the name and description and public access of share-type
is set when the share-type is created, and not allowed to be edited
after the share-type is created. We can only set extra spec for share-type.
But not name or description or public access for share-type.

Co-Authored-By: Brin Zhang <zhangbailin@inspur.com>
APIImpact

Implements: blueprint update-share-type-name-or-description
Change-Id: I4c7bdd601d48b40c01639b5089d4bff259a7b3af
2019-09-10 14:43:07 -07:00
Zuul 7273bfb534 Merge "Add Infortrend Manila Driver" 2019-08-08 14:04:35 +00:00
Kuirong.Chen 266972ab91 Add Infortrend Manila Driver
This driver supports NFS and CIFS shares.

The following operations are supported:
 - Create a share.
 - Delete a share.
 - Allow share access.
 - Deny share access.
 - Manage a share.
 - Unmanage a share.
 - Extend a share.
 - Shrink a share.

DocImpact
Implements: blueprint infortrend-support-manila-driver

Change-Id: Ib1adbd8f7f55805387b126851dbb0ff50cfbcd75
2019-08-02 17:58:16 +08:00
Helen Walsh 6995b9f975 Manila PowerMax - rebrand from VMAX to PowerMax
Rebrand from VMAX to PowerMax includes change tags, directory structure,
file names and documentation.

Implements: blueprint powermax-rebrand-manila

Change-Id: Ie9ba5939b223d7061a3b2707ee9ef899f1fe7f66
2019-07-19 12:19:30 +01:00
Rodrigo Barbieri d877b61c5e Add manage/unmanage of shares in DHSS=True
This patch adds Manage/Unmanage of share servers in
Manila. It also updates the Manage Share API to accept
a "share_server_id" parameter, and updates Unmanage
of Share and Snapshots API to allow unmanaging of
shares and snapshots in DHSS=True.

Managed share servers are not deleted automatically
by manila, and if a single share is unmanaged in
DHSS=True, the respective share server will not be
deleted automatically as well.

Managing share servers require that the driver
implements 2 functions:
- get_share_server_network_info: obtain IPs from
  share server.
- manage_server: perform required operations to
  manage and return dict of backend_details.

Unmanaging share servers require that the driver
overrides unmanage_server function.

The IPs obtained from the backend are validated
by the Network plugin, so ports with the exact
IPs must exist in the subnet and admin subnet
associated with the share network specified
when managing the share server (unless
StandaloneNetworkPlugin is used).

It is recommended to rename the backend resource
if possible when managing the share server, to
prevent issues with re-managing a share server
that has already been managed.

This patch bumps the API microversion to 2.49.

APIImpact
DocImpact

Depends-On: I17c74b2aa242918188eeff368232c762a4b31093
Partially-implements: bp manage-unmanage-with-share-servers
Change-Id: I108961e7436ba13550ef2b8f02079c6e599a6166
2019-03-05 16:03:29 -03:00
zhongjun2 0957b33e9b Support metadata for access rule resource
Now only share have metadata property.
We should support it for access rule as well.

DocImpact

Needed-By: https://review.openstack.org/#/c/579534
Needed-By: https://review.openstack.org/#/c/571366

Change-Id: I2f2b3325a09e5af7f7c4e4fa3443259fb69f9771
Implements: bp metadata-for-access-rule
2018-07-20 23:31:48 +08:00
Ramana Raja add46c036b ganesha: store exports and export counter in RADOS
Allow the ganesha driver to store ganesha exports
and export counter as Ceph RADOS objects. This enables
highly available(HA) Ganesha servers in manila deployments
to store their config in a HA storage.

Implements: blueprint ganesha-ha-rados
Change-Id: Ia51156055fa10d0661e662c9c998829864f1a204
2017-12-08 10:33:44 +05:30
Dustin Schoenbrun bbb14264cb Add exception for no default share type configured
There is a particular scenario when creating a new Manila share,
whether through creating a new share or managing an existing one, where
if no share type was explicitly specified and no default share type was
configured the error message would not substitute the share type ID into
the exception message. This is because, in this case, there was no share
type ID to substitute into the string.

This patch creates a new exception for explicitly handling the case
where there is no default share type and no share type is explicitly
given. It gives an appropriate error message about there not being a
default share type and that there was no share type explicitly given as
well as what would need to be done to remedy the situation.

Change-Id: I068b55d4b77dc24b53fe93d870bb84e1aef661a5
Closes-Bug: #1700346
2017-08-02 15:27:53 -04:00
Valeriy Ponomaryov 256b5c84ba Add share groups and share group snapshots quotas
"Quota" APIs now will return two new following keys:

- 'share_groups'
- 'share_group_snapshots'

For user and project, but not share type.
Default values can be configured using following config options:

- 'quota_share_groups'
- 'quota_share_group_snapshots'

APIImpact
DocImpact
Implements BluePrint add-share-groups-quota
Change-Id: I397a8e886226cb22fa50abdf2a4a938bb04c655d
2017-07-26 11:32:43 +03:00
Valeriy Ponomaryov 05c42ecf70 Add quotas per share type
With this feature it will be possible to set quotas per share type
for all existing quota resources. It is useful for deployments with
multiple backends that are accessible via different share types.

Also, fix one of existing DB migrations that hangs on PostgreSQL.

APIImpact
DocImpact
Implements blueprint support-quotas-per-share-type
Change-Id: I8472418c2eb363cf5a76c672c7fdea72f21e4f63
2017-07-19 17:29:04 +03:00
Alex Meade dd630c3929 User Messages
For quite some time, OpenStack services have wanted to be able to send
messages to API end users (by user I do not mean the operator, but the
user that is interacting with the client).

This patch implements basic user messages with the following APIs.
GET /messages
GET /messages/<message_id>
DELETE /messages/<message_id>

Implements the basic /messages resource and tempest tests
The patch is aligned with related cinder patch where possible:
I8a635a07ed6ff93ccb71df8c404c927d1ecef005

DocImpact
APIImpact

Needed-By: I5ffb840a271c518f62ee1accfd8e20a97f45594d
Needed-By: I9ce096eebda3249687268e361b7141dea4032b57
Needed-By: Ic7d25a144905a39c56ababe8bd666b01bc0d0aef

Partially-implements: blueprint user-messages
Co-Authored-By: Jan Provaznik <jprovazn@redhat.com>
Change-Id: Ia0cc524e0bfb2ca5e495e575e17e9911c746690b
2017-07-13 13:05:57 +02:00
Valeriy Ponomaryov 16bfc82962 Add possibility to run 'manila-api' with wsgi web servers
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
2017-04-10 12:49:20 +03:00
yfzhao 8dd6cd5850 Remove log translations in others 5/5
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.
This is the 5/5 commit.
Old commit will be abandoned: https://review.openstack.org/#/c/447822/

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Ifebf6bf1ab8280c3ad3c573ae3772624bf47b461
Depends-On: I9fd264a443c634465b8548067f86ac14c1a51faa
Partial-Bug: #1674542
2017-04-08 02:19:02 +00:00
Rodrigo Barbieri 4daea8d7cc HNAS: Fix concurrency creating/deleting snapshots
When attempting to create or delete empty folders in HNAS,
respective to snapshot creation and deletion, there can
be context changes due to concurrent requests received by
HNAS.

The result of the failed command is an error that the
operation cannot be completed in the current filesystem if
the context change switched to another EVS. In case the
context switch changed only the filesystem within the same
EVS, the operation may be run in the wrong filesystem,
although, those operations are harmless.

Closes-bug: #1662615
Change-Id: I3439f8ab2dd967a438eac575172e4b96e897b46c
2017-02-10 08:33:08 -02:00
Alyson Rosa 2295151784 HNAS: Fix concurrency error when managing snapshots
During manage snapshot operation, if HNAS is already running a command
'path-to-object-number' it may cause concurrency issues, since HNAS
can run only one 'path-to-object-number' command at a time.

Fixing it by adding a retry when this message is returned.

Change-Id: If0f0b2d6f7e4ba3203d10c549181a3d31113624e
Closes-bug: #1660288
2017-01-31 09:45:09 -02:00
Valeriy Ponomaryov ba5384f865 Fix creation of share group types using share type names
Before it was possible to create share group types mapping them to
share types using only share type IDs and when we were providing its
names we were getting DB error and HTTP 500 as a response.

Fix it by properly looking for share type by both its unique values -
ID and name. Also, raise proper 404 error when nothing is found.

Add functional tests covering this case.

Change-Id: I216f935383a87f6d679c431bc46cfa8977a6d8ab
Depends-On: Ic555d241f98d0fa027897c69a7115d1be88f6c96
Closes-Bug: #1659625
2017-01-27 20:21:42 +02:00
tpsilva 1f1932eb92 Add mountable snapshots support to HNAS driver
This patch adds Mountable Snapshots support in HNAS driver. Also,
updates feature table in share_back_ends_feature_support_mapping.rst
adding mountable snapshot column.

Implements: bp hnas-mountable-snapshots
Change-Id: I5e2294d218595a7ef28261333ab34d8bcde94ff1
2017-01-25 15:19:34 -02:00
Jenkins eeeb648cc3 Merge "Add mountable snapshots support" 2017-01-25 00:07:49 +00:00
tpsilva 8d71932c69 Add mountable snapshots support
This new feature gives the user the ability to allow and
deny access to the snapshots, so that they could be mounted in
read-only mode to retrieve files.

APIImpact
DocImpact

Co-Authored-By: Rodrigo Barbieri <rodrigo.barbieri@fit-tecnologia.org.br>
Co-Authored-By: Alyson Rosa <alyson.rosa@fit-tecnologia.org.br>
Co-Authored-By: Miriam Yumi <miriam.peixoto@fit-tecnologia.org.br>

Partially-implements: blueprint manila-mountable-snapshots
Change-Id: I65f398a05f82eef31ec317d70dfa101483b44b30
2017-01-24 17:26:45 -02:00
Jenkins 83b8f19851 Merge "VMAX manila plugin - Support for VMAX in Manila" 2017-01-24 18:08:38 +00:00
xing-yang 1b0042f052 VMAX manila plugin - Support for VMAX in Manila
VMAX plugin is the plugin which manages the VMAX to
provide shared filesystems using the Dell EMC manila
driver framework.

DocImpact
Change-Id: I0b69f013443217f2053bbbfdec36dff226664b34
Implements: blueprint vmax-manila-support
2017-01-24 13:34:00 +00:00