If a 'keyring' key is found in the connection info passed to
connect_volume() use its value as the path to the keyring instead of the
default location (/etc/ceph/<cluster>.client.<user>.keyring).
This allows services such as cinder's RBD and Ceph backup drivers to
make use of a custom keyring path that an admin has defined.
Change-Id: Ib1230d3e40f56371567e1aead40db59667bad295
Closes-bug: #1668304
iSCSI multipath rescan uses iscsiadm --rescan option for nodes and
sessions, which can end up recreating devices that had just been removed
if there's a race condition between the removal of a SCSI device and the
connection of a volume.
The race condition happens if a rescan done when attaching happens right
between us removing the path and removing the exported lun, because the
rescan will add not only the new path we are attaching, but the old path
we are removing, since the lun still hasn't been removed.
This would leave orphaned devices that unnecessarily pollute our
environment,
This patch narrows the rescan to only rescan for the specific target id,
channel, and lun number if we can find this information.
When we cannot find this information we do the scan as we were doing it
before.
Closes-Bug: #1664032
Change-Id: I1b3bd34db260165a6ea9ca061f946d6dfcf8553f
When flushing a multipath we are ignoring map in use transient error, so
we log a warning that the flush has not been successful and that we have
received an exit code 1 and we continue to remove the individual paths.
This error is usually transient and a simple retry will succeed in
flushing the multipath.
Failure to retry will leave an empty multipath in our system.
Closes-Bug: #1663936
Change-Id: I710792bd707ad933ef60d11d25f530dddfb6fb2f
When we are using friendly names for multipath the multipaths are not
getting flushed, which may lead to data loss on slow connections and
multipath entries with no actual paths.
This happens in both iSCSI and FC connections, and it is due to the
flush being requested on the WWN instead of the actual name of the
device.
So when we are not using friendly names the WWN and the device name are
the same and our call to multipath -f will successfully flush remaining
data, but when we are using friendly names they will not match, and the
call to multipath -f will silently fail (return code 0) and the flush
will not actually go through. When the flush doesn't happen, if there is
remaining data, then the multipath will stay once the individual paths
have been removed.
Closes-Bug: #1663925
Change-Id: Ib93d945a5b5fca57bcac4e176d62d1412b95f2da
The change 916cfaf "Introduce encryption provider constants"
intended to issue deprecation messages for encryptors that
are no longer going to be supported in Pike, and continue
loading the current os_brick encryptors instead.
However, since it removed the "'LuksEncryptor' in provider"
style checks, any config values that were not explicitly listed
in LEGACY_PROVIDER_CLASS_TO_FORMAT_MAP will not be translated.
This results in a configuration using a provider of
"nova.volume.encryptors.luks.LuksEncryptor" to attempt to
import this module directly into Cinder when previously it
would use the os_brick encryptor. This is generally wrong
and causes a number of problems.
Closes-Bug: #1658755
Change-Id: I3ec6e3fe919bc03d158da04a18fb8b651002ed52
Now that there is a passing gate job, we can claim
support for Python 3.5 in the classifier.
This patch also adds the convenience py35 venv.
Change-Id: Ic3967cf2461add370a03cd15e71087664b9ec1d7
This fix solves a LUN attachment error for Ubuntu on s390 host setups. Fiber
Channel requires a path for discovery of new devices, and Ubuntu uses a
different format than previously assumed. This can be solved by simply adding
the Ubuntu-style path to the list of possible paths, since they get quietly
dropped if they lead nowhere in FibreChannelConnector._get_possible_volume_paths
anyways.
Change-Id: I0b07572903263122213f2ea5dc42151a7b69d99f
Closes-Bug: #1655047
These constants detail the supported encryption formats and their
associated in tree encryption provider implementations.
The use of out of tree and direct use of these in tree implementations
is now deprecated and will be blocked in the Pike release of os-brick.
Change-Id: Ic155bd29d46059832cce970bf60375e7e472eca6
Partial-bug: #1639293
At present oslo_debug_helper assumes that the importable directory
is os-brick and fails unless overriden with :
$ tox -e debug -- -t os_brick
Change-Id: Ic8dd164d8515dd58b4456699e5ed114815ff8c4f
The Hyper-V Nova driver will pass os-brick the device rescan
interval. This change indends to honor this for the Windows
connectors.
Other connectors use either a fixed rescan interval, either a
exponentially growing interval. If needed, this patch can be
updated so that other connectors may use this argument as well.
Change-Id: I3d6b4ed2ac27269241420ca03ec7075a977e86e8
The following file(s) added utf-8 encoding but never used. So we can
remove them at all.
os_brick/tests/base.py
os_brick/tests/remotefs/test_remotefs.py
os_brick/tests/test_brick.py
Change-Id: Icf7275285e2024fbfd577e95a5d88a50734858bb
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove os-brick.
Finally, it also adds libxml2 and libxslt to bindep.txt for use when
building lxml that is now required by oslo.vmware.
Change-Id: I3fbe4acbdf0281c91801ff7d09de6e9043915939
This patch removes the initial call to _rescan_iscsi() prior to calling
get_potential_volume_paths, because _rescan_iscsi is called inside.
Change-Id: I9e668efaf5995e6bcef994d7cfa765546648cf8e
Removed some functionally superfluous code in functions calling
LinuxFibreChannel.get_fc_hbas. Relies on said function to return
an iterable.
Change-Id: I404a3bda8bea42401b8f98d7685a176081267415
This ensures that if a failure occurs with any of the linuxrbd calls,
the temp config file is still removed.
This also gives it a prefix so it is identifiable.
Change-Id: Ief3d907092e77c48a531a6ae78b10c58cc6db56c
This patch adds support for the bindep python package. This enables os-brick
to specify binary package requirements for operations.
Change-Id: Iab5e923101855622c33df85899401c48a668ee15