Implement 'manage snapshot' feature in ZFSonLinux share driver.
Prerequisites:
- snapshot being managed should exist.
Details:
- snapshot being managed will be renamed by share driver based on
taken ID.
- size for managed snapshot will be taken either from
REST API (--driver_options size=5) or
from its "used" attribute.
Implements BP zfsonlinux-manage-snapshot
DocImpact
Change-Id: If240ecde5676c334d39faaccd5703e93544aaa06
Depends-On: Ifc762a882a78159adacfe168a4edbe824178301a
Added dummy driver for ease of testing and development of REST APIs
and internal manila interfaces.
It can be enabled as backend in the same way as all other share drivers.
But, it does not provide any resources.
Also, update tempest to be able to work with share-networks when
networks are defined via config and not API.
CI hooks are configured to run tempest twice using both available
driver modes. Where DHSS=True mode uses StandAloneNetworkPlugin as
network backend.
Change-Id: I9053dddfc643cb5a6602f15235b91bbaea727dbd
Implements BluePrint dummy-driver
Neutron is using tempest plugins too and it's needed newer changes
in tempest we need to update our commit id.
Change-Id: Ic6621fbad9e5ba932643e0c0fb717b71a1fc5808
Closes-bug: #1599429
Implement 'manage share' feature in ZFSonLinux share driver.
Prerequisites:
- share being managed should exist.
- share being managed should not be part of any replication relations.
- share being managed should not have redefined mountpoint.
Details:
- share being managed will be renamed by share driver based on taken ID.
- share being managed will get "quota" attribute set based on provided
value in API (--driver_options size=5) or it will set quota
to nearest bigger rounded integer of already
used space (2,4 -> 3, 3.6 -> 4).
Implements blueprint zfsonlinux-manage-share
DocImpact
Change-Id: I03eab5e02835fe660dde0020601c02c0136bddeb
Fix small incompatibility that left to be done and bump Tempest version
to unblock our CI jobs.
Also, remove temporary fix [1] that was done for unblocking CI.
[1] I44655c83cc5588c5b94d0fad81162dd0c238b5b4
Change-Id: I12e2652638ba26833f9365f06fa84a98ca24765c
Currently, Manila CI Tempest jobs use deprecated options of Tempest.
Recently, latest version of Tempest dropped them [1].
Manila CI jobs work ok, because they check out specific version of
Tempest. But it will work until first Devstack update for some one
more Tempest feature and then we will be forced to use latest Tempest
again. Switch to supported approach of setting up users in Tempest,
to avoid such sudden blockers.
[1] I8c24cd17f643083dde71ab2bd2a38417c54aeccb
Change-Id: I5b3ebab52ea1401f6f7a116d1260268eb10ebe0c
Closes-Bug: #1586129
Recently merged commit to "neutron-fwaas" project [1] started using
one of Tempest's modules that appeared after version our plugin uses.
So, implement hotfix-workaround until we make all compatibility changes
to latest Tempest in our plugin.
For the moment, we cannot switch to latest Tempest as we already
have incompatibility for it, see bug [2].
[1] https://review.openstack.org/#/c/326150/
[2] https://bugs.launchpad.net/manila/+bug/1586129
Change-Id: I44655c83cc5588c5b94d0fad81162dd0c238b5b4
Closes-Bug: #1589964
Latest Devstack is not compatible with Tempest version
used by Manila after merge of commit [1].
Therefore, bump Tempest's version and fix incompatibilities
with plugin.
[1] I63658b8d8dfa999e0feb79f8f2968f2b32e3ff57
Change-Id: Ib6fb886f8a17ff6419fd75db74f290f821a3d302
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
We are forced to bump version of Tempest because of regular
introduced incompatibility.
Also, add compatibility fixes to Manila plugin for
latest Tempest version.
Change-Id: I13c838c39d99c008d53e544f54dadee01f36fdf2
Closes-Bug: #1568785
Generic driver fails from time to time on Cinder not being able
to schedule shares because of exceeded size limit.
Since we do not use size in API tests at all increase
Cinder oversubscription ratio from 20.0 to 100.0
to make it enough for sure.
Such error appears from time to time and
more often with addon of new Tempest tests that create shares.
TrivialFix
Change-Id: I8a14f806c0235f5a12930eee362a838404cd5c06
With merge of commit [1] all calls of clients in Manila
post_test_hook.sh script fail, because used Devstack's file 'openrc'
does not export env var that contains domain name. That became
required after switch to Keystone v3 API in CI jobs [1].
Note: manilaclient calls should have been worked, as default values are
automatically picked up by Keystone server. But such clients as nova
requires set of domain name explicitly.
[1] Ic211a11308a3295409467efd88bff413482ee58d
Change-Id: Ia1976af058164da8ef9e33296006750aab7b3f50
Closes-Bug: #1559456
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
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
By default, these tests are disabled; 3rd party CI systems
should enable these tests through the
RUN_MANILA_REPLICATION_TESTS environment variable
if their driver supports share replication.
Partially implements: blueprint manila-share-replication
Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>
Co-Authored-By: Andrew Kerr <andrew.kerr@netapp.com>
Change-Id: Idaf3c61600337cc30568b982dfb23948209c1d6e
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
Download of Generic/Windows image for Nova should be disabled for
all other share drivers in CI.
Change-Id: Ib2c952e85dd0a6eb36fe945e0a33950c38dfdfae
Closes-Bug: #1553343
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
tempest_lib was renamed to tempest.lib which causes problems
when running tests because tempest imports plugins from other
projects and crashes.
Closes bug: 1552520
Change-Id: Id7d43dee256856062bd0dadad9c469c1500ee36e
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
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
Fix several issues in scenario test to get them stable again:
- The SSH timeout was set to 80 seconds what is way too low for an
Nova instance to come up in the gate.
- Scenario test access rule cleanup is not necessary, access rules
are deleted when share instance is deleted.
Co-Authored-By: Rodrigo Barbieri <rodrigo.barbieri@fit-tecnologia.org.br>
Closes-bug #1545715
Change-Id: I9f22f0416bb248666fe906e1ca653517054f21b5
Add APIs to support manage and unmanage share snapshots.
Also add support in the Generic driver.
This only supports for DHSS=False driver mode.
Add provider_location column to the share_snapshots table
to save data used to identify the snapshot on the backend.
Also need to bump microversion.
APIImpact
DocImpact
Change-Id: I87a066173c85d969607d132accd9f0e9bd49c235
Implements: blueprint manage-unmanage-snapshot
The post_test_hook.sh script was hardcoding the Tempest concurrency
setting to 8 for DHSS=False test runs. This patch has it honor the
MANILA_TEMPEST_CONCURRENCY environment variable, if it exists.
Change-Id: Ia2f0495560517484ba4d9290ced2c4dc3de6fb34
Closes-bug: 1546150
Manila CI jobs create lots of shares and for Generic driver it means
lots of Cinder volumes. After merge of [1] to Cinder project, we started
having NoValidHostFound errors in Cinder logs, it changed default
oversubscription ratio to 1.0 from 20.0. But Manila CI requires it
be bigger than 1.0, so set it explicitly to Cinder's default value 20.0
that is used by all other driver but not LVM.
[1] I5a214462b573d00d26086512821b4f8cc1db4fc3
Change-Id: If0a6e535b92b1471572e1de98e3b44ab6a2c65c9
Closes-Bug: #1540947
After merge of change [1] to Devstack project Manila Tempest plugin not
compatible anymore with latest Devstack.
So, bump Tempest version to latest and fix compatibility with it.
[1] If66096cde31fedda407e1e6ac6899b196569a454
Change-Id: Idf9a9eabf9c98d090e47207cf89d9e5a5fc0ea97
Closes-Bug: #1539007
Reuse code of old LVM share driver.
LVM Driver is 1st party Manila driver with NFS and CIFS support
and no share server support.
LVM Driver doesn't rely on Neutron, Nova, or Cinder. As such, it
is ideal for testing purposes and, after a period of maturation,
it should be useful in production environments.
Move generic driver's helpers to manila/share/drivers/helpers.py
and reuse them in LVM driver.
Implement 'ro' access, user access, extend_share function for
LVM driver.
Implements bp lvm-driver
Change-Id: Ia46c51ed400dbb0f1d87a758fb165ca711ed3d7c
Use arguments of Devstack hook scripts to configure Manila and Tempest in
CI jobs instead of dependency on names of CI jobs.
Change-Id: I96d8bca54320f4476789c00e1061d4e96b697d05
Depends-On: I521f0419e65e27f22acbc03aaa1f0f997492e8f8
After merge of change [1] to devstack project, preconfigured creds for
Tempest cannot be used anymore. But Manila requires such.
For the moment, latest Tempest interfaces cannot allow us to use
preconfigured creds because of bug #1524717.
So, until this bug fixed, we should workaround Devstack changes and
set legacy opts explicitly.
Also, redefine new Nutron option 'dnsmasq_local_resolv' to 'False' value,
that is 'True' by default and was added in change [2].
Default value causes Nova operations initiated by Manila be very slow.
That leads to breakage of CI.
[1] I65b56ff681d6c27094380693c953fbc3664eceb0
[2] I17a884f467d307432a06f67a9dd93ed2fa6081a3
Change-Id: I516a6c9ab4396b14e3984d5f810210e4fcf7ec85
Related-Bug: #1531049
Closes-Bug: #1530847
Manila CI jobs fail very often exceeding timeout.
So, do several changes to speed up Tempest jobs:
1) Separate NFS and CIFS tests between jobs.
Run NFS jobs on MySQL ones and CIFS on PostgreSQL.
2) Refactor couple of tests removing creation of redundant shares
testing the same things.
3) Increase amount of threads, to minimize probability of
running heavy test suites in one thread.
Change-Id: I6b60db039a96b47386f8ff538d1cb74559691ccc
With the merge of 'Factor up config dependent credential classes' in tempest,
(Change-Id: I351f86f0570070105bbf24f2d904e917feea6e57)
helper methods related to credentials have been moved to
common.credentials_factory module.
manila_tempest_tests need to change accordingly.
Change-Id: I9e5c72279638e07f509a4bfe0174b5ad5ee70b45
Closes-Bug: #1519612
Just rely on the return code from "ping" instead of
parsing it's output when checking the service VM during
the CI run.
Change-Id: I20f144687662a0dda5fdfc0293ab578009658c1b
Manila CI hooks for DHSS=False job with the Generic driver wait for
service instance availability and right after it becomes available
returns control to caller. And caller can run tests with creation of
shares immediately. But, in this case, we can face race conditions when
manila-share service requires some time to inform manila-scheduler.
So, add 'sleep 10' operation to be executed after reaching 'available'
state by service instance.It should be enough to overcome races.
Change-Id: Ie4ae231701edaab319c9012e476d1f63e3806499
Commit [1] moved common logic for CI hooks to separate file, but it
depends on some devstack functions, that should be "sourced" in this
common file. So, this common file works in manila hooks, because they
import devstack functions separately, but it will not work if some other
scripts use it and do not import devstack functions.
[1] I94514405628ab8337d1f4153e431f064614e3596
Change-Id: I919fea046e556d601a7680ea9bac16c1a9b7343c
Closes-Bug: #1519028
Manila contains CI hooks located in "contrib/ci" dir.
Split common logic to separate file to be able to just "source" it and
then use env vars and bash functions in different CI jobs and projects.
Current change allows to do two things:
- Reuse env var "MANILA_TEMPEST_COMMIT" in third-party CIs
- Wait for drivers init in other projects like OpenStack Rally. Where,
for the moment, one of jobs fails because of absense of "waiting".
Usage:
$ source %manila%/contrib/ci/common.sh
$ echo $MANILA_TEMPEST_COMMIT
$ manila_wait_for_drivers_init "/etc/manila/manila.conf"
Change-Id: I94514405628ab8337d1f4153e431f064614e3596
Two reasons to do it:
1) Broken compatibility of old Tempest we use with latest dependencies.
2) Manila Tempest plugin is incompatible with latest Tempest.
Change-Id: Iae5a656b72e774d9d62b52d7ffb63edecbb23ca6
Closes-Bug: #1513105
Our Tempest job "*no-share-servers*" fails after merge of change [1]
The root cause for it is in changed behaviour:
After merge of change [1] share services with driver that use Nova
started verify availability of a Nova VM by its net interface and
do not report its capabilities until it is available.
It takes about 2,5 minutes. During this time scheduler has no available
hosts and we get "no hosts available" errors from it in case of CI that
runs Tempest tests much faster than 2,5 minutes after VM creation.
So, add waiter in post_test_hook.sh script.
[1] I325d6461c4b12f481769bb01f792ef850dba789c
Change-Id: I58d617dd76cf079e5e26bf6a4ddc6b4fba4e20e6
Closes-Bug: #1507605
wating -> waiting
acknowledgement -> acknowledgment
occured -> occurred
Should never get here. If get, then error occurred.
->
Should never get here unless an error occurred.
Change-Id: Ibe89d652e7d76b3d8e6d7549140c50c88144036e
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
This patch addresses issues commented on
change I64b0a3ee77b27278cc294f72702408a27888e0e9
after it was merged, according to bug below.
Closes-bug: #1494000
Change-Id: I9079ea16e0edc359b380705bebba2a7e98446d5c
Use novaclient for creation of keypair instead of openstack client in
devstack plugin, because the latter is not compatible with
nova microversion 2.1
Also, specify explicitly Nova API version in manila wrapper over
novaclient that is used by Generic and Windows drivers.
Also, revert back amount of tempest threads for Ci jobs to avoid job
timeout failures.
Also, fix raise of SnapshotBuildErrorException in Tempest plugin.
Tempest tries to raise exception SnapshotBuildErrorException from wrong
place. It should use "share_exceptions" instead of "exceptions".
Change-Id: Ie9ea9f6d25a13f8cd8f0ccbc73f6fa75cca35e0b
Closes-Bug: #1493008
Closes-Bug: #1493072
This commit adds tempest functional tests for Manila consistency
groups and cgsnapshot objects and actions. By default these tests are
enabled; 3rd party CI systems should disabled these tests through the
RUN_MANILA_CG_TESTS environment variable if their driver does not
support consistency groups.
Partially implements bp manila-consistency-groups
Change-Id: I3297e02ad53c328f0bfe5245fefdb6af80552b4a
The Generic Driver in Manila has no concept of consistency
groups. This patch proposes to implement a loose
consistency group support mechanism for the Generic Driver,
using existing logic to snapshot shares and create shares
from snapshots.
The actions concerning creating and deleting a consistency
group are handled by the API and the Generic Driver does not
need to remember any relevant information persistently.
The actions concerning consistency group snapshots are not
simultaneous, but are rather let to run in succession.
DocImpact
Partially implements bp manila-consistency-groups
Change-Id: Ie5e51205a1154786f9057691aa82bffcafe04de7
Make use of the Tempest plugin interface instead of copying Manila
files into Tempest. This will remove the burden to port Manila
tests onto Tempest master recurrently.
This ports all existing Manila Tempest test to the new structure.
It uses manila_tempest_tests as new top folder for all Tempest
tests. It follow the model of Heat (see [1]).
[1]: https://github.com/openstack/heat/tree/master/heat_integrationtests
Change-Id: Ie5ed64a6777ed1acf8dd56522c26705ae897596d
Partly-implements: bp tempest-plugin-interface
Depends-On: I26dd32b1de8cceeaa6dc674092efec683df71889