127 Commits

Author SHA1 Message Date
Tom Barron
2793bd5e83 Adjust ssh timeouts
Generic driver jobs are failing because of timeouts when
establishing the initial ssh connection from manila-share
to the service VM.

Bump up the default value of the connection timeout for paramiko
client and also set the banner timeout since the failure occurred
during banner exchange.  Set the two timeouts to the same value
for now.  This ensures that the connection timeout is at least as
long as the banner timeout and there is no current need in manila
to control these independently.

This is more of a workaround than a real fix since a real fix
would remove the delay during banner exchange.  I suspect that
the real fix will need to be in neutron/ovs though.

Change-Id: Ib5e59faaf9667b9cb5e7d4072531b7d6c3d4da39
Partial-bug: #1807216
(cherry picked from commit 7548706b0928f2c23bf27e10d116ceca585660e4)
(cherry picked from commit 8919db0186f8da9f2f492d80c8a3700c3d9367d1)
(cherry picked from commit 2abde73d1e4a91569b2c844632acc10676b11e26)
2019-01-09 15:55:50 +00:00
Goutham Pacha Ravi
2ba3a268e7 Remove logging overrides from plugin.sh
Avoid overwriting the log formatters, reuse
the helper available in Devstack.

Closes-Bug: #1787310
Change-Id: I25eb16ea9a6e3e98de6a7ee349df17438847d601
(cherry picked from commit 9448c3360dd8e2378ec73a3d695bb7b350a32e05)
(cherry picked from commit b1d0067159047ecc0503575af11cd5a4969c286d)
(cherry picked from commit b2b9bf5baf2ab0ebd596f134d3655f63cddd3aa3)
2018-09-21 13:51:08 +00:00
Ben Swartzlander
3755978ef7 Allow 2 or more export IPs for LVM driver
Supporting dual IPv4/IPv6 backends will eventually require
multi-IP support in the first party backends. This change
enables multi-IP support (IPv4-only currently) in the LVM
driver.

Change-Id: Ib3594aa5d7751c829820fce830d87f6ceea6b049
Partial-Implements: blueprint support-ipv6-access
2017-07-18 16:05:27 -04:00
Yuval Brik
65f4a1c564 devstack: clone Manila client only if marked to
Currently, Manila's devstack plugin clone manilaclient. Some projects
depend on Manila but would like to install packaged manilaclient.
Clone the manilaclient only if it was marked to be used from git

Change-Id: Ia8e726b9358f6901c172a31f638a59eba523e0fa
Depends-On: I94d2f143159b60c4f8693e35fe844bc1e411e580
2017-05-03 11:21:01 +03: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
Jenkins
fddb11eb74 Merge "devstack: skip nfs kernel install if nfs-ganesha" 2017-04-08 04:07:20 +00:00
Hongbin Lu
c0c3aa035c Move create_manila_accounts to post-config
In before, Manila devstack plugin create the service endpoint in
"extra" stage. This caused issue of other services that depends
on the manila endpoints that are not yet created. This commit
move the endpoint creation to "post-config" stage, which is the
practice of other OpenStack services

Change-Id: I3adfbf78d0792471a29c7ff979aad1418e6137d4
2017-03-24 21:28:07 -05:00
Tom Barron
ab778b3124 devstack: skip nfs kernel install if nfs-ganesha
is running under systemd since the services are incompatible.
Skip the samba install and startup as well since there is
no current use case for running samba plus nfs-ganesha.

TrivialFix

Change-Id: I6d6fe3a3babe2f7fcd9ca9461785ac413ff4ab2c
2017-03-15 14:40:39 -04:00
Valeriy Ponomaryov
9ea065ebea Enable share groups back
This feature was disabled by default in Ocata.
Now, enable it back to ease further work and updates of this feaure.

Change-Id: Ib57b55ce77df1b8e6481057014f2e9f6d743e34d
2017-03-14 16:51:12 +02:00
Tom Barron
af7ac539aa Start NFS and SMB services on fedora platforms
after installing them in the devstack plugin.

Change-Id: Idddbcdf8750a041aa79943f9950c20c4d9d35502
Closes-Bug: #1670434
2017-03-06 12:18:25 -05:00
vponomaryov
e79cf7bf33 Fix 3 CI breakages
1) Increase default RAM value in manila flavor to be able
   to use manila service image with new 64bit architecture.
2) Fix test requirement on "hacking" lib to avoid pep8 breakage.
3) Fix unstable maprfs driver unit test that depends on local hostnames
   and IPs.

Change-Id: Ib36113e33e3616984be5864fbaf73c1fc5d7a315
Closes-Bug: #1669412
Closes-Bug: #1659162
2017-03-02 18:22:40 +02:00
Thomas Bechtold
29203938a0 Fix syntax in devstack plugin
Shell syntax is "else", not "else:". This fixes:

/opt/stack/manila/devstack/plugin.sh: line 647: else:: command not found

Change-Id: I1742a71a3c637c4224c15e670862bf1b47d4a95f
2017-02-23 06:48:29 -05:00
Tom Barron
010354b3e1 Enable devstack deploy of container driver on Fedora
Change-Id: I31bf07ca46efb6858f78146c29372aad54347138
2017-02-14 18:44:49 +00:00
Valeriy Ponomaryov
0d30c50a60 [Grenade] Add test with creation of share snapshot
Extend test coverage for 'upgrade' devstack logic (grenade) by
adding new test that creates share snapshot.

Change-Id: I2610fe744123eab2b3fc6ed74ed191e38cecb92e
2017-02-09 18:27:26 +00:00
Valeriy Ponomaryov
f3218a1d42 [Grenade] Switch base to stable/ocata
We should test two neighbour branches in grenade job.
So, after branching of stable/ocata we should use it as base
for testing of manila migration to current master branch (Pike-dev).

Also, update existing code to be consistent with newer microversion.

Change-Id: Id78c30e2000186958a2eb8f6fd727042d9b31862
2017-02-09 14:50:39 +00:00
Jenkins
7c2c97d725 Merge "Disable share groups APIs by default" 2017-02-07 00:42:03 +00:00
Valeriy Ponomaryov
8ac4f0a913 Disable share groups APIs by default
as of Ocata because feature has not been completed.
Revert this change back in Pike.

Change-Id: Ibe2f7fba436e298b720a492594579d64b2e81a47
Closes-Bug: #1661639
2017-02-06 14:11:27 +02:00
Tom Barron
a05b5a3ae9 Fix devstack manila nfs install for fedora
nfs-utils-lib is obsolete and the functionality
we needed from it for the generic driver has been
pulled into nfs-utils package.

Change-Id: I7ff864391cbe0dc7775a84c90b83a9e830785e2b
Closes-bug: #1650941
2017-02-06 04:53:59 -05:00
Jenkins
40a030bf5d Merge "Enable host-assisted migration in ZFSOnLinux CI" 2017-02-02 16:02:48 +00:00
Valeriy Ponomaryov
8cfb1e2189 Fix setup of DHSS=False mode for generic driver
By moving creation of Nova VMs to later step when Nova configuration
is fully completed. In our case, after merge of [1] we are able
to create Nova VMs only in "test-config" section because latest Nova
step that is required for creation of VMs is performed in the end
of "post-extra" section.

[1] I8742071b55f018f864f5a382de20075a5b444a79

Change-Id: Ib941a5551fe340b39719e3c0e701067ce83bac02
Closes-Bug: #1660304
2017-01-31 18:08:46 +03:00
Rodrigo Barbieri
31ea6a3c14 Enable host-assisted migration in ZFSOnLinux CI
ZFSOnLinux CI is able to run host-assisted migration tests,
so enable them.

TrivialFix

Change-Id: I66578bad361867d1f698e39ceef07d94038c30c2
2017-01-31 09:02:05 -02:00
Jenkins
604a95f0a6 Merge "Make LVM export IP configurable" 2017-01-29 03:58:40 +00:00
Jenkins
6957d20442 Merge "Fix Generic driver DHSS=False setup" 2017-01-29 02:48:04 +00:00
Jenkins
eeaa99ef1f Merge "Revert "[Devstack] Workaround osclient breakage"" 2017-01-28 05:39:26 +00:00
vponomaryov
0f96b433e6 Fix Generic driver DHSS=False setup
Nova API started having bug where it does not list servers that really
exist. So, avoid this bug in manila parsing answer of "create" command
instead of doing second request with name of VM to get its ID.

Change-Id: Ice8e297e9055df6eec83d2c8f4b9932ad52a612f
Related-Bug: #1659391
2017-01-26 17:11:27 +02:00
Ben Swartzlander
436d9aa687 Make LVM export IP configurable
Change-Id: I0d67c9c2a774f19a20db8e4b3b8745e55d796148
2017-01-25 23:26:42 -05:00
Valeriy Ponomaryov
32708bda48 Revert "[Devstack] Workaround osclient breakage"
This reverts commit 10b14bb50e95d2a30bba4e4c37a7de9c4b564691.

Change-Id: I1cbc33a4b76e5ab8a65db86ed00b0ccba579d5d9
2017-01-25 18:36:58 +00:00
Jenkins
47507ee873 Merge "Fix devstack plugin to not depend on private network" 2017-01-25 16:25:35 +00:00
Ben Swartzlander
912360e807 Fix devstack plugin to not depend on private network
A private network is only needed in the devstack plugin in the
case of generic driver, dhss=false. Therefore we move the command
that depends on it into the loop so things don't break when the
network doesn't exist if it's not needed.

Change-Id: If8074e6b7ce5d42430666f23484167d6a7262be5
2017-01-24 09:57:34 -05:00
Andrew Kerr
1002642674 [Tempest] Add functional tests for share groups feature
Add functional tempest tests to new 'share group' feature [1].

[1] I79a80a62ae4e0015d6161edc2b93fd1f9ba69537

Co-Authored-By: Andrew Kerr <andrew.kerr@netapp.com>
Co-Authored-By: Valeriy Ponomaryov <vponomaryov@mirantis.com>
Partially-implements-blueprint: manila-share-groups
Depends-On: I8e29baed62355fc31caeec9c7a66eaebfcbdf184
Change-Id: I820eb959082995d961b1be992e4b2d1d1a985c1c
2017-01-23 19:30:33 +00:00
vponomaryov
10b14bb50e [Devstack] Workaround osclient breakage
Creation of security group using openstack client is broken. So,
use nova client for it temporary while 'related' bug is not fixed.

Change-Id: I51b5be5157bd49d5835b30eaa8b6b0e7185cabdf
Related-Bug: #1652317
2016-12-23 17:33:20 +02:00
vponomaryov
3ede2d1c48 [Grenade] Do not run tempest tests
Since tempest is not used in manila grenade logic skip run of its
tests.

Change-Id: I6c45448ec286fe6c365b4e9edcce56501e5c87bd
Closes-Bug: #1650482
2016-12-21 11:16:22 +02:00
Alexey Ovchinnikov
c19dbbd2e6 Enable scenario tests for LVM and ZFSonLinux drivers
In addition to functional tests.

Also, make some corrections to scenario tests code to make it work
with shares located on localhost.

Co-Authored-By: Alexey Ovchinnikov <aovchinnikov@mirantis.com>
Co-Authored-By: Valeriy Ponomaryov <vponomaryov@mirantis.com>
Change-Id: Ice61a7593f5e4e443cffbe78ecd71d683a9c274e
2016-12-13 12:53:03 +00:00
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