94 Commits

Author SHA1 Message Date
Victoria Martinez de la Cruz
4d36064cba Decouple Manila UI from Manila Devstack plugin
Whereas the bug report associated to this fix is about
Manila UI not working, this fix addresses more than this.

On the first place, it decouples Manila UI from Manila Devstack
plugin. This is a desired change since not every Manila user
needs to work with the UI, and it doesn't make sense to have
Manila UI bits on the Manila code if we can place all Manila UI
related code on the Manila UI repo and, in this case,
Manila UI Devstack plugin. This patch-set removes all the traces
of Manila UI setup from the Manila Devstack plugin.
Manila UI Devstack plugin was added in 457249be7ab3849b3479b96077a411ca37c37a95.

And, secondly, it fixes Manila UI deploy with Devstack. Enabling
manila-ui plugin on Devstack properly sets the UI component for
Manila.

Change-Id: I7a3372371e25c69d3df6d395c703a6412750effd
Closes-Bug: #1570033
2016-12-12 12:43:14 -03:00
Jenkins
ef14ee5905 Merge "[Devstack] Use openstack CLI instead of other clients" 2016-12-02 17:26:46 +00:00
Jenkins
3d135dcbac Merge "[Devstack] Fix DHSS=False setup for Generic driver" 2016-12-02 16:01:16 +00:00
Valeriy Ponomaryov
c549b202d2 [Devstack] Use openstack CLI instead of other clients
Switch manila devstack plugin for usage of only openstack client,
because other CLIs (such as neutron [1]) "are"/"going to be" deprecated
in favor of openstack client.

[1] https://review.openstack.org/#/c/243348/

Change-Id: If06dfc2c79df4628e747ac28d0add8d4a223777c
Closes-Bug: #1644589
2016-12-02 11:42:17 +00:00
Valeriy Ponomaryov
8c5ed29ba6 [Devstack] Fix DHSS=False setup for Generic driver
Recent change to devstack [1] broke our DHSS=False CI job running
generic driver that was depending on ip route from host to
private network. So, to avoid this error use floating ip address
for connection to service Nova VMs from host machine.
Also, fix generation of second export location that should be dedicated
for service needs such as mounting share doing host-assisted
migration.

[1] If45e3fc15c050cfbac11b57c1eaf137dd7ed816f

Change-Id: Ieea992293ae02898741c939da15f0dbb4609d8b0
Closes-Bug: #1644523
Closes-Bug: #1646097
2016-12-02 14:33:56 +03:00
Valeriy Ponomaryov
cb15c82293 [Devstack] Run tempest update in proper time
Recent devstack change [1] changed order of installing things,
where tempest now is installed later than it was. So, run our
tempest updates later too, when tempest is installed.

Closes-Bug: #1646492

[1] I3d98692e69d94756e0034c83a247e05d85177f02

Change-Id: I85ca94455ad0b7882cde70c6ba0091f9f83f39b8
2016-12-01 15:39:48 +02:00
Tom Barron
6a211b7cf5 Fix devstack smb configuration outside ubuntu
Some distros ship with /etc/samba/smb.conf already in
place, without /usr/share/samba/smb.conf.

Only copy /etc/samba/smb.conf from /usr/share/samba/smb.conf
if /usr/share/samba/smb.conf exists.

Change-Id: I22aeed317a94774ff03c1aadf6a65f5edb490837
Fixes-bug: 1645860
2016-11-29 18:05:28 -05:00
vponomaryov
3f2f3f9086 [Devstack] Fix devstack plugin compatibility
Recent devstack commit [1] broke manila devstack plugin compatibility.
So, fix it by removing dependency on deleted env var in the same way
as it is done in devstack [2].

[1] I7c66e1d8d65f562596543ed8ca402dba8c8ea271
[2] I4e5c7e86aefe72fc21c77d423033e9b169318fec

Change-Id: I351f90a60e4693300cc3d3bbd1183bd8fa6acc9a
Closes-Bug: #1644194
2016-11-23 14:00:33 +02:00
Valeriy Ponomaryov
e77cf5bdaf [Devstack] Create additional custom share types by default
They are useful for case we install several back ends with different
drivers, their modes and capabilities.

New share types have fixed names based on driver modes:
- dhss_true
- dhss_false

It is possible to define their extra specs using following env vars:
- MANILA_DHSS_TRUE_SHARE_TYPE_EXTRA_SPECS
- MANILA_DHSS_FALSE_SHARE_TYPE_EXTRA_SPECS

that defaults to existing following env var:
- MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS

Use case in CI: we are able to use more than one predefined share_type
in tempest and rally tests.

Change-Id: I7278a897bb89f0562e1eda449b725d965cb10566
2016-11-04 19:01:42 +03:00
Valeriy Ponomaryov
5be1e8f3d3 [Grenade] Update devstack and pre_test_hook
Make devstack grenade code use 'newton' as base branch for migration to
master (ocata).
After switch [1] to dummy driver we need to override defaults.
So, update pre_test_hook approach for saving configuration data properly.

[1] I2b698f69a29ef983b13534b2f4d393570be4dac8

Change-Id: Ie5fa0f78b0e3caa06d34a0822a8ed60b69406f9d
Closes-Bug: #1631412
2016-10-17 13:42:26 +03:00
Valeriy Ponomaryov
4c0e763d3e Fix devstack for ubuntu-xenial
for ZFSonLinux and LVM drivers.

Change-Id: I7e6aee341981b8305f993a5b8030b7104dc650b4
Closes-Bug: #1628896
2016-10-05 13:16:53 +03:00
Alexey Ovchinnikov
332cbf253a Fix check for nfsd presence
Check for nfsd has been implemented incorrectly and has
apparently checked nothing. This change fixes that.

Change-Id: I2cc735744fcb588e9945e34de4cd4cc2270078f8
Closes-Bug: 1616061
2016-09-23 16:24:49 +03:00
Alexey Ovchinnikov
a2ce6c0aa3 Make nfs-kernel-server run on a clean host
nfsd refuses to start on a host with empty /etc/exports. This
change adds a workaround for affected first-party drivers.

Change-Id: If62fdc4219ceb02455bc55c717b7f2c7f34b0dca
Closes-Bug: 1616061
2016-09-21 11:26:28 +03:00
Rodrigo Barbieri
053acc8db1 Improve Share Migration tempest tests
Improve coverage by adding tests that validate the share-type
change while also changing the driver mode.

Closes-bug: #1620800

Change-Id: I924c34aa69591754b437d75f43db91d77e73fb07
2016-09-13 13:17:07 -03:00
Rodrigo Barbieri
9639e72692 Share migration Newton improvements
At Austin 2016 summit there were several improvements to
Share migration feature discussed. This patch implements
these changes.

Changes are:
- Added 'Writable' API parameter: user chooses whether share must
remain writable during migration.
- Added 'Preserve Metadata' API parameter: user chooses whether
share must preserve all file metadata on migration.
- Added 'Non-disruptive' API parameter: user chooses whether
migration of share must be performed non-disruptively.
- Removed existing 'Notify', thus removing 1-phase migration
possibility.
- Renamed existing 'Force Host Copy' parameter to 'Force
Host-assisted Migration'.
- Renamed all 'migration_info' and 'migration_get_info' entries to
'connection_info' and 'connection_get_info'.
- Updated driver interfaces with the new API parameters, drivers
must respect them.
- Changed share/api => scheduler RPCAPI back to asynchronous.
- Added optional SHA-256 validation to perform additional check if
bytes were corrupted during copying.
- Added mount options configuration to Data Service so CIFS shares
can be mounted.
- Driver may override _get_access_mapping if supports a different
access_type/protocol combination than what is defined by default.
- Added CIFS share protocol support and 'user' access type
support to Data Service.
- Reset Task State API now allows task_state to be unset using
'None' value.
- Added possibility to change share-network when migrating a share.
- Bumped microversion to 2.22.
- Removed support of all previous versions of Share Migration APIs.

APIImpact
DocImpact

Implements: blueprint newton-migration-improvements
Change-Id: Ief49a46c86ed3c22d3b31021aff86a9ce0ecbe3b
2016-08-31 12:38:14 -03:00
Jenkins
27b9ce2d81 Merge "Clarify grenade failure message" 2016-08-28 19:27:54 +00:00
Rodrigo Barbieri
088747cb77 Fix connectivity problem in Scenario job
In Scenario job, tests consist of VMs mounting shares
provided by share servers.

Admin network is used by share migration tests and is
by default used in other tests as well. Previously it
used the same network address range as tenant networks
(used by VMs) and there was no conflict.

Recently some unknown change broke connectivity between
VMs and share server in scenario job. It seems as there
is now a conflict between those network addresses ranges.
This patch changes the admin network address range,
removing the existing conflict.

Closes-bug: #1616115

Change-Id: I5bdb70cae4eab2930f3f559a621643ad732909bb
2016-08-26 20:43:12 -04:00
Alexey Ovchinnikov
0ca6707992 Clarify grenade failure message
This patch changes wording in an error message to make it
clearer.

TrivialFix

Change-Id: I15fe8f8c1c4273665ea59f93a007c5680b652458
2016-08-26 10:32:52 +03:00
Marc Koderer
78e10bc060 Add neutron driver for binding
Add new neutron plugin which enables port bind actions for network
fabrics. This driver waits until all ports are in state "active"
and sets the binding host flag. Default vNIC type is set to
"baremetal" in order to benefit from the code already in place for
Ironic. It's also possible to switch to 'normal' which assumes an
neutron agent in place.

The feature can be tested using the docker driver.

DocImpact

Co-Authored-By: Daniel Gonzalez <daniel@gonzalez-nothnagel.de>
Partially-Implements: bp manila-hpb-support

Change-Id: I3156d7468d48f84f1b46885780a2426f9b99a387
2016-08-17 15:20:11 +02:00
Jenkins
2f047eb25a Merge "Container driver" 2016-08-15 21:04:11 +00:00
Alexey Ovchinnikov
ddf960a2d9 Container driver
This driver exploits a Docker container as a share server instead
of a virtual machine. The container acts as a CIFS server
and shares logical volume attached to it. The volume gets created
simultaneously to the container on a host in a volume group
specified by the user.

DocImpact
Change-Id: I711813a2022d765ab7a70ed670e34f68f9cf1399
Implements: blueprint manila-container-driver
2016-08-15 16:30:23 +03:00
Valeriy Ponomaryov
88fb70f92b Fix ZFSonLinux driver prerequisites setup
We call "apt-get upgrade" to apply changes related to ppa
of ZFS on linux. But "grub"-related packaged started making
dialog that hangs forever in case of automatic setup.
So, exclude "grub" related packages from update as redundant
for unblocking ZFSonLinux driver prerequisites setup.

Change-Id: Ibb94604710b0d4199825e770194655653c26bf89
Closes-Bug: #1609696
2016-08-04 13:28:37 +03:00
Jenkins
85e930bca5 Merge "Add Grenade support to Manila" 2016-05-05 19:06:33 +00:00
Jenkins
946945ebaf Merge "[Devstack] Set proper driver mode for ZFSonLinux driver" 2016-05-02 15:09:23 +00:00
vponomaryov
7999280fb9 Add Grenade support to Manila
Grenade is an OpenStack test harness to exercise the upgrade
process between releases. It uses DevStack to perform an initial
OpenStack install and as a reference for the final configuration.

Add support of it to Manila project, doing following changes:
- Add all required scripts for 'grenade' job, such as following:
-- settings
-- shutdown.sh
-- upgrade.sh
- Add optional 'resources.sh' script that performs functional
  tests using bash and manilaclient. List of scenarios:
-- 1. create and delete share setting metadata and access rule
-- 2. attach security service to share network
-- 3. update quotas
-- 4. create private share type and add access for project

Note following:
- Tempest is not used by design.
- Manilaclient is used of stable version - version of 'base' devstack,
  which is 'stable/mitaka'. It also means that used API microversion
  is latest for that branch.

Change-Id: I7d7e0c50933776ca1a710bcf069abb0282b821ac
Depends-On: I4232382d3c944666bbf0916a3f285b84f6ff9d64
Implements blueprint grenade
2016-04-22 12:46:37 +03:00
Valeriy Ponomaryov
95dd3dc90c [Devstack] Set proper driver mode for ZFSonLinux driver
Set opt "driver_handles_share_servers" to "False" value if
ZFSonLinux share driver is enabled.

Change-Id: Ia4b8abedd18e5002a3068beb3732d26ec21b35df
Closes-Bug: #1560126
2016-04-21 15:09:15 +03:00
vponomaryov
d706a595ea Make devstack functions support grenade
'grenade' test job runs two versions of devstack - 'base' and 'target'.
And all devstack functions should be error-proof running more than one
time - 'grenade' needs twice. Therefore, make lots of devstack
functions check for results of previous runs such as presence of
resources that are going to be created.

Change-Id: I4232382d3c944666bbf0916a3f285b84f6ff9d64
2016-04-19 12:23:50 +03:00
Jenkins
3e77d58eb6 Merge "Remove Devstack workaround for Neutron" 2016-04-07 22:58:02 +00:00
Valeriy Ponomaryov
692bd3ea03 Fix creation of Neutron network in Devstack
Manila Devstack plugin creates admin network for Generic driver
using env var "TENANT_ID". And after its removal in Devstack
Manila fails to create Neutron network and fails on migration
tests that use results of this network creation.

Make Manila get ID of required project calling 'openstack client'
to avoid such error.

Change-Id: I43b18b2d2f2e69a150cd3e29ac84426550a6e40d
Closes-Bug: #1566826
2016-04-07 12:13:46 +03:00
Valeriy Ponomaryov
466aef9523 Remove Devstack workaround for Neutron
Feature of Neutron DNS resolvers was disabled as
unsupported by manila-service-image.
Enable it, since, it is supported now [1].

[1] Icf7f189d621e9686c4bb449b5770b83e4bd072ee

Change-Id: I667c811c752864d6d7f239e2dfd4597e8ac98cb1
2016-04-05 15:06:13 +03:00
Thomas Bechtold
67dd3f1f58 Use install_package when preparing LVM driver installation
Use the install_package function from devstack instead of
calling the different package managers from distros.
Also support installation on SUSE based systems.

Change-Id: I575769aa972d7e123e79d0955d4618c09f1559d3
2016-03-31 07:32:51 +02:00
Yogesh
7bf4f0262e Add tests to ensure snapshots across replicas
Related-Bug: #1546303
Depends-On: Ia4cd2a36e31418e7a3d1c218080caa632755fe16
Depends-On: Id318a4adc0faf64a4bef57252aa2f0d9083b82b1
Change-Id: I269225b976efe13b2cbb9e0648d541a063df70e5
2016-03-19 11:53:02 +00:00
Marc Koderer
7fc492ea79 Fix keystone v3 issues for all clients
This fix basically ports nova fix https://review.openstack.org/#/c/136931/
plus additional bug fixing to Manila. It creates a common class to get
used for all clients (neutron, nova, cinder).

Idea is to create an auth session and pass this to the client object
instead of let the client do that. The auth session will be created by
a config group which means the configuration for the clients needed to be
heavily reworked. Patch is also backward compatible with old options but
flag them as deprecated.

DocImpact

Change-Id: Ic211a11308a3295409467efd88bff413482ee58d
Closes-bug: #1555093
2016-03-18 14:42:33 +01:00
Alexey Ovchinnikov
5dfbef4f95 Revert "LXC/LXD driver"
This reverts commit 466a19f18f12cb77b45aa7c7a272fae7c45c4c93.
Also this reverts commit 4f74b224fad7bf9ca665d70a66c79c98cf8d5674.

Manila has decided to remove LXD from the Mitaka release.
http://lists.openstack.org/pipermail/openstack-dev/2016-March/089522.html

Change-Id: I3c4b15e8c9d92c874be754205b0b981151809cc1
2016-03-16 18:48:17 +04:00
Jenkins
4f803cae03 Merge "Fix manila devstack plugin for keystone v3 usage" 2016-03-11 18:53:14 +00:00
Jenkins
cdab09b822 Merge "Set proper image name for tempest" 2016-03-10 07:59:58 +00:00
Jenkins
e3b4639edb Merge "Remove nsenter dependency" 2016-03-10 04:28:31 +00:00
Jenkins
7270c852da Merge "Run ZfsOnLinux gate tests with SSH enabled" 2016-03-09 23:32:52 +00:00
Valeriy Ponomaryov
2358f9137e Set proper image name for tempest
Commit [1] changed link to service image and its name.
But tempest config option is not updated and refers to
old nonexistent image name.
It leads to impossibility to create Nova VMs in scenario CI job.

[1] I391119cf08949974efc469b8669d5e4120170c0d

Change-Id: I912ecd61556e8a0ff3a82f7b70a47cbfcc490d22
Closes-Bug: #1555189
2016-03-09 17:57:17 +02:00
Ben Swartzlander
fad7709ed2 Remove nsenter dependency
Rather complex logic was added to ZFS driver to cope with
mount-namespace-related problems caused by neutron. A better
solution is to ensure mounts (and unmount) propagate to
namespaces.

Closes-Bug: 1552552
Change-Id: Id952cb110c0187021a46ed5de02308b10ddf1239
2016-03-09 10:37:50 -05:00
Ben Swartzlander
7d3fc0ed7f Run ZfsOnLinux gate tests with SSH enabled
SSH is required for replication to work in the ZfsOnLinux
driver, but the gate defaults to disabling it. Make it
configurable and make sure to preinstall host key.

Change-Id: Iece2ad2e966fafe3ab4d63c82d062830ac9f3170
Closes-Bug: 1552244
2016-03-08 10:50:05 -05:00
Jenkins
1ec8a79443 Merge "Use official location for service image" 2016-03-08 07:19:17 +00:00
Marc Koderer
fd449f1b34 Fix manila devstack plugin for keystone v3 usage
A devstack run with a keystone v3 only setup (ENABLE_IDENTITY_V2=False)
fails currently.

Partial-bug: #1553082
Change-Id: Ie8885d2c2f4d82d9894f4ca233153184125c20f2
2016-03-07 14:18:29 +01:00
Ben Swartzlander
bfea3f42a8 Use official location for service image
Download manila service image from official tarballs site
instead of github.

Change-Id: I391119cf08949974efc469b8669d5e4120170c0d
Closes-Bug: 1553259
2016-03-05 01:30:44 -05:00
Ben Swartzlander
1279dd9a6e Allow devstack plugin to work without Cinder
The current devstack plugin has a hidden dependency on
Cinder, even for drivers that don't require Cinder (such
as LVM). This patch tries to eliminate that dependency.

Also avoid editing cinder.conf when Cinder isn't present.

Closes-Bug: 1553351
Change-Id: Iea2a83fc54412c18401e589ea0706ae95214ab9d
2016-03-04 15:33:34 -05:00
Rodrigo Barbieri
cae5a0152c Move Share Migration code to Data Service
Removed functionality of Share Migration relying on Manila Share
Service node, moved code to Data Service node for copy phase.

Added parameter 'notify' and share/api methods for future
implementation (see dependent patches).

Added new copy operation statuses, in order to implement future
API calls to obtain progress and cancel migration.

Added possibility of 2-phase migration for driver migration and
generic (fallback) migration.

Added admin export location support and removed approach of
replacing IP with config parameter.

Added Admin-only API entry points to:
- Migration Cancel (only during copying)
- Reset Task State field
- Migration Get Progress (only during copying)
- Migration Complete (2nd phase migration)
- Notify parameter on Migrate Share

APIImpact
DocImpact

Implements: blueprint data-service-migration
Change-Id: I1d65aac2f36942cd70eb214be561d59a15a4ba26
2016-03-03 09:34:29 -03:00
Igor Malinovskiy
4f74b224fa LXC/LXD driver
This driver exploits a container as a share server instead
of a virtual machine. The container acts as a NFS/CIFS server
and shares logical volume attached to it. The volume gets created
simultaneously to the container  on a host in a volume group
specified by the user. Currently NFS is limited to v3 since the
only userspace NFS server that works in a container out of the box
seems to be unfs3. Later it will be replaced with nfs-ganesha.

Co-Authored-By: Alexey Ovchinnikov <aovchinnikov@mirantis.com>

Implements: blueprint lxc-driver

Depends-On: Ib1896997f2e7a505b5bf8ec0c9e5ee35942f79a6

Change-Id: Iea73bd34b94919d77ebe17cf054dde1f580384be
2016-03-02 18:55:22 +04:00
Rodrigo Barbieri
eaaa86f1f4 Introduced Data Service
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
2016-03-01 17:13:51 -03:00
Rodrigo Barbieri
447f2b1656 Implement admin network in generic driver
Implemented admin network support in generic driver
by creating extra ports in service instance.
In order to implement admin export location, Admin must
specify admin_network_id and admin_subnet_id
in driver configuration in manila.conf to create ports
between host and network of choice.

Possible scenarios are covered by this change:
*1: service network.
*2: service network and tenant network.
*3: service network and admin network.
*4: tenant network and admin network.

Admin network and tenant network configurations have
higher priority than service network. If both are
present, service network is not used.

Only admin network export locations are
is_admin_only = True.

Included additional admin_only export location
when creating shares and creating shares from
snapshots.

Removed deprecated 'service_ip' property of
server backend details.

Implements: blueprint admin-network-generic-driver
Change-Id: I8d8694ac3d83aa12a756112dfefebd7e17e32383
2016-03-01 17:08:38 -03:00
Valeriy Ponomaryov
312cd3321a Add ZFSonLinux share driver
Add support for ZFS (on Linux) filesystem.

Following features are supported:
- Create/delete share
- Create/delete snapshot
- Create share from snapshot
- Extend/shrink share
- Update NFS IP-based access rules using new interface.
(SMB support planned for future).
- create/delete/update/promote share replica

ZFS-related notes:
- Any amount of ZFS zpools can be used by share driver.
- Allowed to configure default options for ZFS datasets that are used
for share creation.
- Any amount of nested datasets is allowed to be used.
- All share replicas are read-only.
- All share replicas are synched periodically, not continuously.
So, status 'in_sync' means latest sync was successful.
Time range between syncs equals to value of
config global opt 'replica_state_update_interval'.

Driver-related notes:
- Able to use remote ZFSonLinux storage as well as local.

Other made changes:
- updated driver private data DB methods removing filtering by host
  as redundant operation. Replication requires some common metadata
  storage and filtering by host breaks it. It is safe to do so, because
  if driver gets some ID of entity then it is allowed to read its info
  too.

Implements bp zfsonlinux-driver
DocImpact
Change-Id: I3ddd3767184e4843037de0ac75ff18dce709b6dc
2016-03-01 13:34:18 +02:00