Fix a call to _iscsiadm_update() in which a list was being passed as
the target_iqn connection property. This property is used directly as
an argument to the iscsiadm -T option, so it must be a plain string.
Change-Id: I9c2ff1de1f89fb49dd6c5a90679d5c4238d5476a
Closes-bug: 1838820
1. Sync sphinx dependency with global requirements. It caps python 2 since
sphinx 2.0 no longer supports Python 2.7.
2. Remove unncessary "=="
Change-Id: I2c87490faba283c4d4bcb3fbe386955a49601945
I152fe10ff5a3131950b789d3fd4efa15c554ff09 attempted to ensure LUKS
volumes were formatted using the LUKS v1 header format by using a type
of `luks`. However from cryptsetup 2.1.0 (incorrectly referenced as
2.0.6 in the previous change) this type can actually refer to the newer
LUKS v2 header format in environments where cryptsetup has not complied
with the `--with-default-luks-format=LUKS1` build time configuration
option [1].
This change now explicitly uses the luks1 type when formatting a device
to ensure the correct LUKS v1 header format is used.
[1] https://gitlab.com/cryptsetup/cryptsetup/blob/master/docs/v2.1.0-ReleaseNotes
Closes-Bug: #1834851
Change-Id: I0010e9014c06a3a812d24d9d5ef598425ac5d5d4
This patch relaxes the single-pathed connections and allows them to
complete even when we cannot detect the WWN on the sysfs, just like
multipath connections do.
Closes-Bug: #1834443
Change-Id: Iae5a304329a2b172bc6b7f310623fad18956ae45
In FC environment, when disconnect volume,
if the first path in the loop is failed,
it will lead get scsi wwn to failure.
So I think we need to add path validity check
before get scsi wwn
Change-Id: I9d3a9dac13dcd585330e7b891c61b2626e5aabec
Closes-Bug: 1831621
Previously linuxscsi.extend_volume would always attempt to wait for
multipath devices to appear regardless of multipath actually being used
by the connector.
This change corrects this by passing down the existing use_multipath
attribute from the iSCSI and FC connectors into linuxscsi.extend_volume.
The same attribute is introduced to the NVMe connector to also allow it
to skip this search for multipath devices.
Change-Id: I29d65ae036957f3a63cba93dd330b14e3361a1b9
Closes-bug: #1832247
cryptsetup 2.0.6 has started to default to LUKS v2 or LUKS2 when
formatting volumes. However QEMU currently has no support for v2 and
will fail to open the volume when being used to natively decrypt.
For now we should default the original LUKS encryptor to v1 when
formatting volumes, introducing a new LUKS2 encryptor and encryption
constant in a future change.
Closes-bug: 1831994
Change-Id: I152fe10ff5a3131950b789d3fd4efa15c554ff09
Current FC OS-Brick code only checks for single WWNN to exclude some
HBAs from scanning when we don't receive an initiator_target_map from
the backend.
There are storage arrays,like XtremIO, that due to their architecture
and design have all target ports automatically mapped to LUNs and are
returning the initiator_target_map, but some of those ports may not be
connected to our HBAs, so we end up with another case of bug #1765000.
This patch makes sure that we always check if the target implements
single WWNN, not only when we don't receive the initiator_target_map.
With this we decrease the likelihood of ending with unexpected devices
in our system, because now we will ignore unconnected HBAs (even if
reported in the initiator_target_map) if we are working with single WWNN
target.
Related-Bug: #1765000
Closes-Bug: #1828440
Change-Id: I02c208142f5b342f894666831449243863eccbfe
For some reason the leaked descriptor warning message coming
from LVM is causing Cinder to fail startup and it appears to be
masking out the vg response in vgs calls.
We typically don't hit this, but due to the nature of Kolla and
I guess going through the different processes via the containers
this gets logged every time vgs is called. Eric Harney rightly
pointed out that rather than use exception handling and such
that we should use the LVM env variable mechanism we already have
in place in Cinder.
This was added to the LVM local_dev code in the openstack/cinder repo,
but was not also added to os-brick. The long term goal is to have all of
this handling in os-brick, so this replicates the changes from cinder
done in I85612fa49475beea58d30330c8fe8352a2f91123.
Change-Id: I9d5aaad0e6213535afc1ce071f12190cc6aa02d0
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
W503 has been reversed in current pep8, so we
shouldn't start enforcing this here.
W504 takes the opposite stance of W503.
Neither of these seem worth enforcing in our
code for now, just punt on a strict rule for
this and aim for readable code.
Change-Id: Id38b2629ea22792bbc7b4dce77fa9e7039be140f
Starting with py36, DeprecationWarnings are raised for special
characters in strings that are not being used as valid escape sequences.
This addresses a couple instances we had for string replacement by
changing the replacement strings to be raw strings.
Change-Id: I93291e978aacaf3f639f32174605528f0038f13a
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Add file to the reno documentation build to show release notes for
stable/stein.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.
Change-Id: I54570e4d32416def24d0f73364a3e415085724b3
Sem-Ver: feature
A long time ago the driver was changed to store volume_id
in the nova database and use that. Previously it would use the
volume_name and make a call to get the volume_id.
Both should be supported, but as the code path currently throws
a KeyError it will never reach the backwards compatible code.
This makes sure that the driver works even after an upgrade from Mitaka.
Depends-On: https://review.openstack.org/#/c/643130/
Change-Id: Iab6a3ca6bf92dc5606c7723dc6c62bf07fa1d934
Closes-Bug: #1648629
This reverts commit a7f7abc5b8.
The Cinder ScaleIO driver has been rebranded to VxFlexOS, which is fine.
What shouldn't have happened is that the rebranding made it's way
into os-brick, resulting in a new connector protocol and mapping.
The new VxFlexOS driver in cinder should just use the existing
scaleio connector protocol, as it's not customer/user facing, and
ensures backwards and forwards compatibility.
Change-Id: Ia1e119c16091bbf6ff79e0acea8c1a7c656d6dd1
This reverts commit 6b60614afa.
The Cinder ScaleIO driver has been rebranded to VxFlexOS, which is fine.
What shouldn't have happened is that the rebranding made it's way
into os-brick, resulting in a new connector protocol and mapping.
The new VxFlexOS driver in cinder should just use the existing
scaleio connector protocol, as it's not customer/user facing, and
ensures backwards and forwards compatibility.
Change-Id: Icf7063eb47368cb7b0ffb2e3f5e30903797c7b34
Trailing newline character is present in UUID returned by
_get_system_uuid method. This causes problems when the returned UUID
is not checked for newline. Remove trailing newline before returning
UUID.
Change-Id: Ibe37a14f67ce7452f088d7913a76c6233202ccea
Closes-Bug: #1819062
A long time ago the driver was changed to store volume_id in the
nova database and use that. Previously it would use the volume_name
and make a call to get the volume_id.
Both should be supported, but as the code path currently
throws a KeyError it will never reach the backwardscompatible
code.
This makes sure that the driver works even after an upgrade
from Mitaka.
Change-Id: Ic389e1a8f0f43ef410eee89202fef19d554fce90
Closes-Bug: #1648629
This is a followup to Drop py35 jobs from gate and tox env[1].
[1] https://review.openstack.org/#/c/639387/
Change-Id: I9e27e95a4493d9887a7dd8c7d7c7c5b511277f95
Python 3.5 was the target runtime for the Rocky release. The current
target py3 runtime for Stein is Python 3.6, so there is no reason to
keep testing against the older version.
https://governance.openstack.org/tc/reference/runtimes/stein.html#python-runtime-for-stein
Change-Id: I3a8d2137a1d3158a476a6c23b8a6229b1dfc20f6
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
When ceph auth diasbled, both 'user' and 'keyring' will be 'None',
and the method _check_or_get_keyring_contents must return strings
for ceph conf file writelines() generation.
Change-Id: Ieafd40ace4f50c1a966c9097c5de270c68b0666b
Closes-Bug: #1817271
Dell EMC ScaleIO has been rebranded to VxFlex OS.
To follow this changes "scaleio" protocol renamed to "vxflexos",
"ScaleIOConnector" class renamed to "VxFlexOsConnector".
Old names will continue to work but will be removed in the Train
release.
Change-Id: I3bb1c985c64007c6960b6fa6f4cd893760a9a342
For FC connections there are multiple places where we check the
initiator target map provided by the backend against the port names of
the HBAs on the system.
Currently this check is case sensitive, but some backends are returning
the port names in the initiator target map upper cased, which usually
results in attach failures.
Some of the reasons for the attach failures is that os-brick will not
issue scan requests.
Example from a 3PAR backend from a specific system:
Connector properties:
{
'wwpns': ['10001409dcd71ff6', '10001409dcd71ff7'],
'wwnns': ['20001409dcd71ff6', '20001409dcd71ff7'],
...
}
Connection properties:
{
'initiator_target_map': {
'10001409DCD71FF6': ['20320002AC01E166', '21420002AC01E166'],
'10001409DCD71FF7': ['20410002AC01E166', '21410002AC01E166']
}
...
}
This patch converts to lower case the
initiator_target_map and the target_wwn/target_wwns.
Closes-Bug: #1775677
Change-Id: I12b9535d8a9969356394e406a1ed5ac4a5f1f959
The test test_connect_volume_device_not_valid in
FibreChannelConnectorTestCase was taking over 6 seconds to complete
since the FixedIntervalLoopingCall in the method under test was not
being mocked out, making the test hang until the timeout was reached.
This fixes this and any other connector test case by moving the mocking
with a test fake into the base connector test class setUp call.
Change-Id: I6b174d94b5518d6267c1fa75528a90d95a312419
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>