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)
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)
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)
* 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)
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)
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)
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)
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)
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)
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)
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
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)
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)
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)
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)
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)
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)
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
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)
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_encodehttps://review.openstack.org/#/c/313521
Change-Id: Ic3eefc2bc28ff202324e7859102b289aac7974d4
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)
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)
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)
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)
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)
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