Commit Graph

9071 Commits

Author SHA1 Message Date
OpenDev Sysadmins a2d0c85491 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:31:39 +00:00
huyang 0e9373ee9b Huawei driver supports front-end qos
There's a parameter in QoS specs named "consumer" and it's default
value is 'back-end'. When "consumer" is set to 'front-end'/'back-end',
it should create a front-end/back-end QoS.

Now Huawei Driver doesn't consider the "consumer" parameter, fix it.

Change-Id: If76b7525b011c2576cfb669a4dc29ee1d6b870de
Closes-bug:#1667875
(cherry picked from commit b268b842bd)
2017-07-20 16:25:53 +08:00
Marc Koderer 8955ba90bc NetApp: Refresh directory before waiting
After image cloning the NFS client cache needs to be refreshed.
This can be accomplished by touching the directory hosting the
cached image file.

See also: https://bugs.launchpad.net/nova/+bug/1617299
Co-Authored-By: Sebastian Schee <sebastian.schee@sap.com>
Co-Authored-By: Goutham Pacha Ravi <gouthampravi@gmail.com>

Closes-bug: #1679716
Change-Id: If392f41f65978721668b53cfab94393f074d24e9
(cherry picked from commit ff6acd62ec)
(cherry picked from commit cd3c1c2c37)
(cherry picked from commit e4d719f646)
2017-05-26 12:31:47 -04:00
Gorka Eguileor 186a0a8a05 NFS Backup: Fix overwritting backups
When using the NFS backup driver if we do multiple backups using the
same container we end up overwriting older backups.

The issue comes from a misunderstanding in the Posix backup driver of
the purpose of the "prefix" metadata used in the ChunkedBackupDriver
base class.

This prefix is for the name of the backup objects to store, but unlike
the prefix for the volumes, here it must be unique as the base driver
will only add numbers to identify the chunk (for the volume we add the
volume id).  Unfortunately the Posix driver just assumed that the prefix
had the same meaning as the prefix for volumes thus making one backups
override one another.

This patch changes the prefix generated by the Posix driver so we have
the following format: "volume_$VOL_ID_$TIMESTAMP_backup_$BACK_ID", thus
allowing multiple backups in the same container.

The new name is backward compatible with existing backups because the
new prefix will only be used on new backups as the prefix for already
existing backups is stored in the DB.

Change-Id: I2903c27633facde6370d95ba0b9e06025ccaef26
Closes-Bug: #1628768
(cherry picked from commit 535e717970)
(cherry picked from commit 640b9dc2b7)
(cherry picked from commit bc1e8d6782)
2017-05-23 16:43:45 +02:00
Jenkins 08e7ada44b Merge "XtremIO: fix the returned value of CG actions" into driverfixes/mitaka 2017-05-01 15:21:33 +00:00
Jenkins 0b4fd7b9dc Merge "XtremIO: allow a cloned volume with larger size" into driverfixes/mitaka 2017-05-01 15:14:55 +00:00
Shay Halsband 63e8d55fb2 XtremIO: fix the returned value of CG actions
- create_consistencygroup_from_src
- create_cgsnapshot
- delete_cgsnapshot

Conflicts:
    cinder/tests/unit/test_emc_xtremio.py
    cinder/volume/drivers/emc/xtremio.py

Change-Id: Ied00d82ee3906e6eb7ad54b043f6137e10e62f14
(cherry picked from commit cb94db1933)
2017-04-19 18:40:53 +03:00
Shay Halsband 9e2099e660 XtremIO: allow a cloned volume with larger size
* In case the new volume is larger than the cloned one,
    resize the cloned volume.
* Added unit test for success and failed resize.

Conflicts:
        cinder/tests/unit/volume/drivers/dell_emc/test_xtremio.py

Co-Authored-By: Xinli Guan <xinli@us.ibm.com>

Change-Id: I2346049c2177a9497750c05c0eb9e7edf8c12c22
Closes-Bug: #1554778
(cherry picked from commit 105e625328)
2017-03-22 12:15:49 -04:00
Zhiteng Huang bc3c22aa3c SolidFire: Handle connect_volume() failure when create vol from image
Currently the _create_image_volume() method in solidfire.py doesn't
catch the exception for initialize_connection() or connect_volume(),
therefore when something wrong happens at this stage, which is as
critial as image conversion, the empty volume created as image cache
wouldn't be deleted.  And that invalid image cache would cause all
consecutive volume creation from same image fail silently.

This change makes simple adjustment of the code to make sure the
errors happen at connecting volume to controler stage is being
covered.

Change-Id: Idd192be86a83dc341431593ab27bed9178cc36d1
Closes-bug: #1663782
(cherry picked from commit 55c1863e1d)
2017-03-04 02:08:35 +00:00
Kushal 9b8b4a8c6a backup of active 3par ISCSI bootable volume fails
1.Backup of ISCSI volume with chap enabled on it, fails
because it choose online copy code path where copy
volume is background process on 3par and we do not
wait for process to complete and setting of any attribute
on cloned volume failed during online copy of data.
This patch ensures it choses non online copy code path
for above scenario.

2.Backup of attached volume fails with snapCPG error
Sometime, during online clone operation, we set snapCPG and
userCPG on cloned volume but when we get cpg of
cloned volume we get an error as these attributes
do not set for cloned volume on 3par.
This patch ensure if cpg is not available for volume
from 3par it will take default value from 'host' attribute
from volume param.

Change-Id: I8dab8fd4e56c38557c46e4ae9a01fb6fead2a2a8
Closes-Bug: #1644238
Closes-Bug: #1646396
(cherry picked from commit 6543c0e13d)
(cherry picked from commit 7e59cad656)
2017-02-07 17:10:41 -08:00
Kushal 125ce98ff7 3par: Corrected the driver version
corrected the driver version from 3.0.19 to 3.0.18.x

Change-Id: Ifc612f558aae801a3d7c4b95b1d9bc48271246eb
Closes-Bug: #1662422
2017-02-06 17:52:56 -08:00
Jenkins a87c18c7aa Merge "3PAR: Fix terminate_connection when failed over" into driverfixes/mitaka 2017-02-02 13:51:08 +00:00
Kushal Wathore 343bf39e60 3PAR: Fix terminate_connection when failed over
Terminate connection will fail when a detach is called on a failed
over volume. This patch allows terminate_connection to succeed in
order to allow reattachments to secondary arrays.

Closes-Bug: #1580691
Change-Id: Ibf91882b94ea5cca51dc7be91ec05179391a9b78
(cherry picked from commit e62ed285f9)
2017-01-23 22:15:38 -08:00
Alex O'Rourke 22888c01ea LeftHand Fix terminate_connection when failed over
Terminate connection will fail when a detach is called on a failed
over volume. This patch allows terminate_connection to succeed in
order to allow reattachments to secondary arrays.

Change-Id: I9057f1c5d6e5716a6283c3b08ddad7bfe4904234
Closes-Bug: #1580693
(cherry picked from commit 6ab5e5234b)
2017-01-24 05:06:52 +00:00
Eric Harney 215d14220c NetApp NFS Cmode: Fix NotFound exception
This should be Cinder's NotFound exception, which is
raised by _get_ip_verify_on_cluster.

Exception.NotFound does not exist.

Change-Id: Id58ab2f68802ca12317369d554d8560d49c9527a
(cherry picked from commit 0125df9c25)
2017-01-10 16:02:41 -05:00
Jon Bernard 5068e76d7f RBD: prevent creation of encrypted volumes
At the moment RBD volume encryption is not supported.  Libvirt needs
support for non-block encryption and nova will need a few changes as
well.  Efforts are underway to resolve this, but in the mean time it's
very confusing to users when we allow them to create encrypted volumes
using volume types as stated in the documentation.  Encryption of the
volume will eventually fail, but allowing this creation creates an
unreasonable expectation.

This patch prevents encrypted volume creation for RBD until support has
landed.  At that time, this patch should be reverted.

Change-Id: I0f071a4aea2d6454b71d83055e87d87b9efcc014
(cherry picked from commit 4bf72b0aec)
(cherry picked from commit 5d0a89cc51)
2016-12-22 15:19:10 -05:00
Vijay Ladani 6d7ec769e7 HPE3PAR: handle conflict in iscsi host create
One of the step in creating iSCSI VLUN is to create a host on array.
If there are simultaneous requests comming on 3par array for creating
same host, hpe3parclient creates host for first request and returns
HTTP 409 conflict error for others, with error code 73, message "host
WWN/iSCSI name already used by another host". This was not handled by
3PAR iscsi driver and the HTTP exception would propagate up to volume
manager where it would log it. This patch addresses issue by catching
this exception and reusing the same host.

Closes-Bug: #1642945
(cherry picked from commit 9b0c5c4318)

Change-Id: I102409539c9a691c1816a342163dd049855f57da
2016-12-18 20:43:33 -08:00
Jenkins 16326f9e40 Merge "Fix unit tests for LVM migration with os-brick 1.7.0" into driverfixes/mitaka 2016-12-14 21:35:27 +00:00
Sean McGinnis a73296e65c Fix unit tests for LVM migration with os-brick 1.7.0
Commit a9f50dd3823ea2e9c568a1fdd970e268955dca9f in os-brick 1.7.0
introduced the usage of safe_decode() of the results of CLI commands.
This revealed that two unit tests in Cinder use a mocked "execute"
method of os-brick *without* specifying the return value. This lead
to an exception in the safe_decode() method as it isn't able to
decode MagicMocks:
    TypeError: <class 'mock.mock.MagicMock'> can't be decoded

This change adds return values to the mocked "execute" method which
can be decoded safely.

This change can not be cherry picked from the newton and ocata fixes
(dc84c1de76) due to refactoring of the
test_volume unit test files.

Co-Authored-By: Markus Zoeller <mzoeller@de.ibm.com>

Change-Id: I9b0a6c5be41c471d1a7782f77927ffe3b9652043
Closes-Bug: 1638861
(cherry picked from commit 753a147768)
2016-11-07 23:50:09 +00:00
Doug Hellmann bc258640d6 Update .gitreview for driverfixes/mitaka
Change-Id: I47cb7a5a34f2a86731e7de81c8e9e92f1793d2f0
2016-11-03 15:09:39 -04:00
Jenkins f90114b449 Merge "VMAX driver - Cleanup of Initiator group fails" into stable/mitaka 2016-10-11 19:47:42 +00:00
Jenkins d3bf5d28de Merge "Use constraints for all tox environments" into stable/mitaka 2016-10-10 13:58:44 +00:00
Jenkins 6bff3a2996 Merge "Fix IndexError in volume manager" into stable/mitaka 2016-10-10 13:58:34 +00:00
Jenkins 9144fd73a8 Merge "Mark the v1 API as deprecated" into stable/mitaka 2016-10-10 13:58:24 +00:00
Helen Walsh fe117a7bed VMAX driver - Cleanup of Initiator group fails
When the last volume has been deleted from the Storage
Group and the Masking View has been deleted and the
initiator group is no longer in use, the deletion of
the Initiator group fails. The initiator group is actually
deleted off the array, but the code is throwing up an
error when it uses the now deleted initiator group
name to search for remaining masking views. The
solution is to check if the initiator group has been
deleted by common.terminate_connection before searching
for remaining masking views.

Change-Id: I79559789459f73c4adebf010d84cbeedd25f7f74
Closes-Bug: #1605193
(cherry picked from commit 8e62557f6e)
2016-10-06 15:47:33 +01:00
Zhiteng Huang 5b22d174d6 Fix IndexError in volume manager
A list comprehension in volume manager can raise IndexError due
to unsafe assumption of input.  This change fix it by not assuming
list comprehension always return none empty list.  This also fixes
a snapshot DB call by using OVO.

Change-Id: I83e8ac8dcf9e84b37847d6eb09065d55e843f82e
Closes-bug: #1628340
(cherry picked from commit d96fb9a101)
2016-09-29 19:14:31 +00:00
Sean McGinnis c6adc020a6 Limit memory & CPU when running qemu-img info
It was found that a modified or corrupted image file can cause a DoS
on the host when getting image info with qemu-img.

This uses the newer 'prlimit' parameter for oslo.concurrency execute
to set an address space limit of 1GB and CPU time limit of 2 seconds
when running the qemu-img info command.

Change-Id: If5b7129b266ef065642bc7898ce9dcf93722a053
Closes-bug: #1449062
(cherry picked from commit 8547444775)
2016-09-23 17:05:20 +00:00
Jenkins e6f90c767a Merge "VMware: Add volume name in vCenter to conn info" into stable/mitaka 2016-09-23 16:02:01 +00:00
Jenkins 2a3b921702 Merge "Add iscsi port to sf_svip arg if not provided" into stable/mitaka 2016-09-22 17:35:48 +00:00
Vipin Balachandran 98d24ae8aa VMware: Add volume name in vCenter to conn info
The VMware Nova driver uses the volume reference in vCenter
which is passed in the connection info to identify the volume
during attach and detach. If the vCenter inventory is restored
from a backup using backup solutions such as HP data protector,
the volume reference in vCenter may change, but the volume name
(in vCenter) remains the same. This patch adds the volume name
in vCenter to the connection info so that the VMware Nova driver
can use it to identify the volume during detach as a fallback
option.

Change-Id: I0bc2f73a8b50f2b2247531df200c07b4eeb02bf7
Partial-bug: #1593742
(cherry-picked from commit ddabae3ce8)
2016-09-21 17:51:04 +05:30
Jenkins 83294d4f75 Merge "Add xUnknownSliceID to retry list" into stable/mitaka 2016-09-20 17:42:14 +00:00
Jenkins d61d4917e9 Merge "Use utils.convert_str to convert HTTP header values" into stable/mitaka 2016-09-19 16:36:22 +00:00
John Griffith 6ef46d1e66 Add xUnknownSliceID to retry list
Large scale enviornments under extremely heavy traffic can possibly
run into issues when cloning or snapshotting.  This is typically
a result of overlapped commands to the same slice ID and seems to
recover without issue on a retry within a second or two.

Change-Id: I7e8f270bc7b22ffb49102ce83cb9f70b61f975a0
Closes-Bug: #1623618
(cherry picked from commit d22f815816)
2016-09-16 17:32:37 -06:00
John Griffith da77382f32 Add iscsi port to sf_svip arg if not provided
With things like VLAN support it may be necessary for
an admin to specify the sf_svip (IP) address.  The problem
is that when this is specified if the admin forgets to include
the port suffix to the SVIP address it may not work on certain
distros (inparticular RHEL variants).

This patch just adds a simple check when the endpoint is created
to make sure the port suffix is included, if it's not it
automatically adds the default 3260.

NOTE: This is not a backport, the Cheesecake code has an
inadvertent fix (albeit it could be improved) that didn't
merge in Mitaka.

Change-Id: Id2a99ff927d1fb9e40fab10beb0db5e4f302ae70
Closes-Bug: #1619941
2016-09-16 17:31:04 -06:00
Colleen Murphy f4b876e3a6 Mark the v1 API as deprecated
The Volume API spec says that the v1 should be marked as "DEPRECATED"
when querying the version[1]. However, when that API was deprecated in
dce0424d9, it was marked as "SUPPORTED", so there is a conflict between
the spec and the actual behavior. This patch updates the query to match
the documentation. This affects how keystoneauth discovers versions.

[1] http://developer.openstack.org/api-ref-blockstorage-v1.html#listVersionsv1

Change-Id: I0c073fdc3ed1c51662ce06c05911e50efbdbb3a4
(cherry picked from commit e2cf841451)
2016-09-14 20:23:18 +00:00
Jenkins 9aaaf7e2e9 Merge "Fix the password print in cinder-volume.log issue" into stable/mitaka 2016-09-13 18:59:09 +00:00
Jenkins a1b912dfa0 Merge "Dell SC: Add exclude_domain_ip option" into stable/mitaka 2016-09-13 18:59:00 +00:00
Jenkins 2e01165d1e Merge "Fix volume retype from SolidFire" into stable/mitaka 2016-09-13 18:58:51 +00:00
Jenkins 30211b81b6 Merge "add more credentials information to check_is_admin" into stable/mitaka 2016-09-13 16:54:19 +00:00
Jenkins 55debcdfa5 Merge "Fix _is_share_clone_compatible for NetApp NFS storage" into stable/mitaka 2016-09-13 16:42:25 +00:00
Jenkins 741c398152 Merge "Block Device Driver: report pools in volume stats" into stable/mitaka 2016-09-08 21:03:28 +00:00
Ivan Kolodyazhny 23421084a5 Use utils.convert_str to convert HTTP header values
HTTP header values must be a string, Originally fixed with:
 Change the logic of how we encode the response headers to be
  a utf-8 string for pre- and post python3.
 https://review.openstack.org/#/c/286821
 Closes-Bug: #1550951

That code was changed:
 Use utils.convert_str to convert HTTP header values
 This patch removes duplicate code between wsgi.py and utils.py modules.
 https://review.openstack.org/#/c/304462

and then fixed:
 Use to_utf8() instead of safe_encode() in convert_str()
 safe_encode() convert string using locale [1]. To avoid possible confuses
 we should use to_utf8() method instead.
 [1] https://wiki.openstack.org/wiki/Python3#safe_encode
 https://review.openstack.org/#/c/313521

Change-Id: Ic3eefc2bc28ff202324e7859102b289aac7974d4
2016-09-08 13:23:45 -06:00
Tom Swanson 235594652b Dell SC: Add exclude_domain_ip option
If a domain iscsi portal should NOT be returned this allows
the user to specify that. Otherwise all domains are returned.

DocImpact
Closes-Bug: #1616499
Change-Id: Iaec89db402acb759304ea1d3fbb239ee73e4340e
(cherry-picked from commit 5fe72f8fb4)
2016-09-07 10:40:06 -05:00
Nitin Madhok de954d04c2 Fixes consistency snapshot creation
This fixes the bug where creation of consistency snapshot would pass
even if the volume is in error state. Also adding unit test to
ensure that the creation of consistency snapshot fails when
volume is in error status.

Made minor changes to unit test for cherry-pick to mitaka.

Closes-Bug: #1592451

Change-Id: I482a7e01f32d72196568348225eb3c77a432a539
Signed-off-by: Nitin Madhok <nmadhok@g.clemson.edu>
(cherry-picked from commit fb3a51a2b4)
2016-09-07 15:25:46 +01:00
Ivan Kolodyazhny 3140f75085 Block Device Driver: report pools in volume stats
Block Device Driver doesn't support pools so it will
report only one pool like LVM implementation.

Change-Id: I7be456c8076c672586a9b9b6aa5425d3a1476b19
Closes-Bug: #1592980
(cherry picked from commit 948ac4ab45)
2016-09-07 10:12:35 +00:00
huananhuawei 3a589db713 Fix the password print in cinder-volume.log issue
In cinder.conf replication_device may contains replication
remote device password,and in cinder.volume.driver secret
is not set 'true' for replication_device, So when start cinder
volume service,replication remote device sensitive information
will print in cinder volume log, it will cause some security
problems.

This commit fixes that by setting secret=true for replication_device
in cinder.volume.driver.

Change-Id: I710b557768ca3df0303d70b43b3c74247eed6b24
Closes-Bug: #1617534
(cherry picked from commit 033284a419)
2016-09-07 03:04:09 +00:00
Ryosuke Mizuno e44f016656 add more credentials information to check_is_admin
Currently, It can specify only user_id when checking admin.
Add more information for checking admin because it is not enough
in multi-domain configuration.

Change-Id: I5e3d6b88e8286b50bc0641163fadf27199fb4a55
closes-bug: 1619597
(cherry picked from commit eb6ed41a54)
2016-09-06 23:50:03 +00:00
OpenStack Proposal Bot 2a7da4f627 Updated from global requirements
Change-Id: I7669c5bb20e15fc731523e6fd30daefee2bb6749
2016-09-06 09:15:44 +00:00
Raunak Kumar 0ea086e113 Add support for force backup for Nimble Storage
Add capability to support backup of an in-use volume

DocImpact
Implements: blueprint nimble-add-force-backup

(cherry picked from commit 1f7f45e34a)
Change-Id: I913570ac77951957f01b79b1851642ed99c38f51
2016-08-30 09:22:32 -07:00
Jenkins b13dddac23 Merge "Imported Translations from Zanata" into stable/mitaka 2016-08-25 01:53:27 +00:00