2921 Commits

Author SHA1 Message Date
zengyingzhe
5ea4911794 Fix the broken UT of huawei driver for py34/35
The cause of failing unit tests is a bug in huawei driver.
When huawei driver logins to backend, it reads username/password from
huawei configuration file. If the username/password are configured as
plain text, huawei driver'll encode them and overwrite the encoded text
to the configuration file.

The encoding logic code is like this:
  six.text_type(base64.b64encode("***"))

For py27, this code works fine. However, for py34, this text_type
converting adds some extra words to result unicode string, like
"b'***'"('***' is the actual encoded result string).
Once driver reads the username/password again, it'll get the incorrect
text and then fail while jsonutils.dumps.

All the failed unit tests tried to call login twice, and triggered the
error condition said above.

This patch is just a workaround, because those failed tests actually
no need to login twice, the redundant login calls are removed.

Another patch will be commited to fix the problem thoroughly in huawei
driver.  Bug https://launchpad.net/bugs/1612149 has been raised for
that work, and will also analyze what changed to trigger this issue
only recently.

Change-Id: Ia6bf7bbb9ffb9644085bbdf4f5576f09215a877f
Closes-Bug: #1612149
2016-08-11 15:53:05 +00:00
Jenkins
e7f62b11ef Merge "Updated from global requirements" 2016-08-10 15:52:00 +00:00
Jenkins
4b603499f0 Merge "Fix KeyError on err in unit test" 2016-08-10 12:06:28 +00:00
OpenStack Proposal Bot
1e8e33f521 Updated from global requirements
Change-Id: Ieb20be0f6d05dd43ada90deaee647bd793f823bf
2016-08-10 11:34:27 +00:00
Jenkins
bbe36a9ec1 Merge "Add support for CIFS shares in HNAS driver" 2016-08-10 03:30:51 +00:00
Jenkins
5141448bff Merge "NetApp cDOT vserver deletion fails if no lifs present" 2016-08-09 18:04:49 +00:00
Alyson Rosa
dfb9e587b1 Add support for CIFS shares in HNAS driver
Updating Manila Hitachi HNAS driver to support shares using CIFS protocol.
It accepts 'user' as access type and both rw and ro as access level.

Change-Id: I18fd5afcea6f91d870bbfc256c71a92aad014c91
Implements: blueprint hnas-driver-cifs-support
2016-08-09 10:11:30 -03:00
zhongjun
c17d23a40a Fix KeyError on err in unit test
Add error info in EMCVnxXMLAPIError.

Change-Id: I3cab228d5fd61c1f71662dddde9e36a76f7429d0
Closes-Bug: #1611262
2016-08-09 16:33:21 +08:00
Clinton Knight
bcd2855e8e NetApp cDOT vserver deletion fails if no lifs present
If no LIFs are present on a vserver (such as can happen if an error
occurs during share creation in driver_handles_share_servers=True
mode), the vserver deletion fails due to a recent change. This makes
the deletion path more resilient.

Change-Id: I475b7b00cd5ba6bb111e2002bb8faa49e4878592
Closes-Bug: #1607029
2016-08-05 20:40:56 +00:00
Jenkins
426646ef63 Merge "[Tempest] Fix concurrency in "test_show_share_server" test" 2016-08-05 15:27:53 +00:00
Jenkins
8907c93740 Merge "[ZFSonLinux] Fix replicated snapshot deletion error" 2016-08-04 17:16:33 +00:00
Jenkins
636a7b37e8 Merge "Fix ZFSonLinux driver prerequisites setup" 2016-08-04 15:00:06 +00: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
22b7b10335 Merge "Check for usage of same Cephx ID as manila service" 2016-08-03 19:56:55 +00:00
OpenStack Proposal Bot
e305b117db Updated from global requirements
Change-Id: If063561330e26c7cbf1b77a26006bdb538c60d32
2016-08-03 09:02:25 +00:00
Dustin Schoenbrun
bd21193dec Check for usage of same Cephx ID as manila service
There is an issue that happens when access is granted to a manila share
using the same Cephx ID that Manila uses when it is communicating with
the Ceph backend (e.g. the identity specified by the cephfs_auth_id
configuration option). When a request is made to revoke access to the
share with that Cephx ID, the share will become stuck in the
"deleting" state.

This commit adds logic to the _allow_access method in the CephFS Native
driver that checks to see if the Cephx ID given is the same that Manila
is using for its communication with the Ceph backend. If that is the
case, the creation of the access rule will fail with an error.

APIImpact
DocImpact

Change-Id: Ida89b0061db1c8780a19475510b830d013a5c154
Closes-Bug: #1608592
2016-08-02 12:06:01 -04:00
Rodrigo Barbieri
4c2a69c7e1 Fix share migration test with snapshot support
Test 'test_migrate_share_with_snapshot_v2_5' validates that
share migration returns an error when a share has a snapshot
created, but to do so, it tries to create a snapshot, which
would fail in a backend that does not support snapshot.
This fix adds a validation that skips the test in this situation.

Change-Id: Icd6b04266ac2de83747b99295cb3538967922d65
Closes-bug: #1608293
2016-08-02 10:54:36 -03:00
Jenkins
00f8908984 Merge "Replaces httplib with requests lib in Quobyte RPC layer" 2016-08-01 18:08:47 +00:00
Valeriy Ponomaryov
0fa609e2f2 [Tempest] Fix concurrency in "test_show_share_server" test
In test "test_show_share_server" that is located in
"manila_tempest_tests/tests/api/admin/test_share_servers.py" module
we can (rarely) face concurrency issue, when first share_server from
list of share servers gets deleted between "taking list of servers" call and
"getting its first element". It can be any share server of any concurrent test.
So, fix it by usage of share server that is being hold by its class and will
always exist while this test runs.

Change-Id: I7675a201bcd1eb33f1214ba9837f28a5295f54fc
Closes-Bug: #1608600
2016-08-01 19:59:24 +03:00
Jenkins
930a3fb921 Merge "Add snapshot instances admin APIs" 2016-08-01 16:39:18 +00:00
Valeriy Ponomaryov
839ba23018 [ZFSonLinux] Fix replicated snapshot deletion error
Commit [1] implemented bug when deletion of replicated snapshots
may fail if active replica deleted not as last among all snapshot
replicas. It was caused by deletion of private data of snapshot,
only by active replica.
So, make that data be deleted only in the end of driver method
that deletes replicated snapshots.

[1] If240ecde5676c334d39faaccd5703e93544aaa06

Change-Id: Ic2b7b7daf0ba5db8eb7166969413b590b27effb5
Closes-Bug: #1607765
2016-08-01 18:48:57 +03:00
Jenkins
d6637a43b8 Merge "Fix race condition in tempest test" 2016-07-31 16:45:41 +00:00
Jenkins
56c0d2eb19 Merge "Huawei: Support reporting disk type of pool" 2016-07-31 03:27:16 +00:00
Jenkins
367d54335e Merge "Add EMC Unity Driver for Manila" 2016-07-30 04:16:56 +00:00
Valeriy Ponomaryov
d5e8b8d9e8 Fix race condition in tempest test
Test "test_create_get_delete_share" located in
"manila_tempest_tests/tests/api/test_shares.py" assumes
that share is created not so fast and has "creating" status.
But it can be "available" in case of really fast creation
as in case of "dummy" driver.

Change-Id: Ie8a01e9352da47ff6e47ad8baeb5409282d3305c
Closes-Bug: #1607723
2016-07-29 13:20:08 +03:00
Silvan Kaiser
b75ab85582 Replaces httplib with requests lib in Quobyte RPC layer
Simplifies the Manila Quobyte drivers rpc layer by using
requests library instead of httplib. This reduces overall
complexity and fixes randomly occurring rpc send issues.

Closes-Bug: #1560345

Change-Id: I4cc602722ece3761331bb3fa1c6bce2bbd35c78f
2016-07-29 08:27:30 +02:00
Jay Xu
86383ff900 Add EMC Unity Driver for Manila
EMC Unity arrays are capable of support manila.
Add a new Unity plugin in manila which allows user to create NFS/CIFS
share with a Unity backend.

The plugin should support following APIs:

* connect: Connect to the Unity Storage.
* check_for_setup_error: No implementation.
* create_share: Create a share and export it based on the protocol used
  (NFS or CIFS).
* create_share_from_snapshot: Create a share from a snapshot - clone a
  snapshot.
* delete_share: Delete a share.
* extend_share: Extend the maximum size of a share.
* create_snapshot: Create a snapshot for the specified share.
* delete_snapshot: Delete the snapshot of the share.
* allow_access: Allow access of a user/host to a share.
* deny_access: Remove the access of a user/host to the share.
* ensure_share: Check whether share exists or not.
* update_share_stats: Retrieve share related statistics from Unity.
* get_network_allocatins_number: Returns number of network allocations
  for creating VIFs.
* setup_server: Set up and configures share server with given network
  parameters.
* teardown_server: Tear down the share server.

DocImpact
Co-Authored-By: Cedric Zhuang <cedric.zhuang@emc.com>
Change-Id: Ic520539341fa19ec5c6c6b85c3c1dcecf70e5141
Implements: blueprint emc-unity-manila-support
2016-07-28 23:13:29 -07:00
zhongjun
8a487bf95d Add snapshot instances admin APIs
Add new API entry points for share snapshot instances:
- share-snapshot-instance-list
- share-snapshot-instance-show
- share-snapshot-instance-reset-status

APIImpact
DocImpact

Implements: blueprint snapshot-instances
Change-Id: Ica1e81012f19926e0f1ba9cd6d8eecc5fbbf40b5
2016-07-29 11:21:35 +08:00
Jenkins
e6aa51a006 Merge "TrivialFix: Fix a wrong order bug in resource_cleanup()" 2016-07-28 14:07:25 +00:00
Sam Wan
26de94a0e0 TrivialFix: Fix a wrong order bug in resource_cleanup()
Super class resource_cleanup method should be called
after class resource cleanup method(s).

Change-Id: Ic56c49c6ca0066a97dcffc6b068dba7320728984
2016-07-27 20:24:16 -04:00
Jenkins
20adb836c3 Merge "Add interface port configuration in EMC VNX driver" 2016-07-27 20:51:37 +00:00
Jenkins
200f2b02fb Merge "Add retry in VNX driver when DB lock error happened" 2016-07-27 19:51:39 +00:00
Jenkins
60a32f13f8 Merge "NetApp: Report hybrid aggregates in share stats" 2016-07-27 17:38:54 +00:00
Jenkins
c2889dfff0 Merge "[ZFSonLinux] Add 'manage snapshot' feature support" 2016-07-27 14:19:02 +00:00
Jenkins
cbb5a1306e Merge "Minor optimization and formatting corrections in Quobyte driver" 2016-07-27 12:56:38 +00:00
Valeriy Ponomaryov
d953baefcb [ZFSonLinux] Add 'manage snapshot' feature support
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
2016-07-27 10:51:31 +03:00
Silvan Kaiser
aa1268ded3 Minor optimization and formatting corrections in Quobyte driver
Removes a superfluous rpc and improves readability of method calls
with complex parameters (see
http://docs.openstack.org/developer/hacking/#calling-methods ).
Closes-Bug: #1498882
Closes-Bug: #1548227

Change-Id: I12585f213acb6f55a6e2eb1646455d79abeba930
2016-07-27 09:07:06 +02:00
Jenkins
9928ba0190 Merge "Fix devref README and remove Makefile" 2016-07-26 21:07:10 +00:00
Jenkins
71a720e466 Merge "[ZFSonLinux] Add 'manage share' feature support" 2016-07-26 20:08:29 +00:00
Jenkins
4e9f52022f Merge "Add share manage/unmanage of Oracle ZFSSA driver" 2016-07-26 18:11:19 +00:00
Jenkins
accc7c6de5 Merge "Remove "host" from driver private data" 2016-07-26 17:37:28 +00:00
Jenkins
6c6d721cf1 Merge "Migrate API reference into tree" 2016-07-26 14:46:46 +00:00
Jenkins
07f508aa90 Merge "share/access: allow maintenance mode to be triggered" 2016-07-26 13:20:44 +00:00
Tina Tang
72650b54af Add retry in VNX driver when DB lock error happened
A DB lock error may be returned for provisioning operation due
to the DB lock on the array was acquired by other operations. This
patch add retry logic in the driver when this error happened.

Change-Id: Ief378bbaff969875ca29c5f3491d01e773ef44b7
Closes-Bug: #1604699
2016-07-26 07:15:51 +00:00
Accela Zhao
cd078020f6 Remove "host" from driver private data
The "host" field in driver private data related db and api is not
used and no longer needed. This patches removes it.

Change-Id: Ifd0b290b2992f6b0792250b86466d9329dfd08a7
Partially-Implements: blueprint driver-private-storage
2016-07-26 14:57:34 +08:00
Clinton Knight
4c4ee90854 NetApp: Report hybrid aggregates in share stats
NetApp cDOT controllers can mix SSDs and spinning disks
in the same aggregate, where the SSDs are used for a
cache.  This commit reports the hybrid aggregate attribute
as well as the aggregate name to the scheduler for each
pool for use in extra specs matching.

Implements: blueprint netapp-report-cdot-hybrid-aggrs-manila
Change-Id: Iaa0bcd79789449f977b48f1de2adf997c936db61
2016-07-25 22:16:00 +00:00
Jenkins
729c75cdc5 Merge "Add dummy driver" 2016-07-25 19:05:52 +00:00
Ramana Raja
8da0cb6f2f share/access: allow maintenance mode to be triggered
... by preserving the error state of the share
instance's ``access_rules_status``.

Closes-Bug: #1605203

Change-Id: Ib0b01ee4b52e6c05d36484bdf3faa1b4db4b849a
2016-07-25 22:19:02 +05:30
Daniel Gonzalez
3e86e3deac Migrate API reference into tree
The API Documentation team has requires [1] that
projects maintain their api-reference in-tree and
build it to the developer.openstack.org website.

This version of the API reference uses os-api-ref
and compiles API documentation close to that of
the OpenStack compute service (nova).

Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>

[0] http://lists.openstack.org/pipermail/openstack-dev/2016-May/093765.html

Implements: bp move-manila-api-reference-in-tree
Change-Id: I67bb3354162d6e0e00fa2788edde864cc14920ee
2016-07-25 15:55:00 +00:00
Goutham Pacha Ravi
d0e31ca6e1 Fix devref README and remove Makefile
The tox/Sphinx job does not use this makefile and
the README refers to some unrelated/cookiecutter
information.

TrivialFix

Change-Id: Ic9dc7818dd5f0e2a6d2f691046f6c1fb30cf0cd0
Co-Authored-By: Sean McGinnis <sean_mcginnis@dell.com>
2016-07-25 02:21:10 +00:00