The "Scaling backup service" patch [1] in Cinder (merged a couple of days
ago) uses os-brick to perform a local attach volume. It revealed that the
support for Scality SOFS in os-brick was broken. (we did have a CI in
Cinder but the os-brick code path was not fully exercised until [1] merged).
This patch addresses this issue. The patch introduces a new class called
`ScalityRemoteFsClient` which inherits from `RemoteFsClient`. We can't
strictly use the `RemoteFsClient` because how to mount Scality FS is
a bit different from other FS.
Note that without this patch, the Scality Cinder driver is broken, more
precisely cinder backup is broken. So I would appreciate if we can merge
that for Mitaka (which needs another minor/micro(?) release of os-brick)
[1] https://review.openstack.org/#/c/262395/
Change-Id: Icfa09b124d252d1d6b07d9cff8c63c7c0d65cc30
A __init__.py file was missing. Also fix a unit test which failed
with 'TypeError: _patch_object() takes at least 2 arguments (1 given)'
Change-Id: I92e36ca1978d497f42573b61b6b1b03bbbd35f23
No need to actually wait in unit tests. This patch decreases the unit
tests run time by about 24 seconds.
Change-Id: I502e15e0fd2d8238f6b6b7089eb38d4d7b55114b
This fixes the logic in how we set the multipath_id in the device_info.
If the returned multipath_id is None, we didn't find a multipath device
and we don't set the multipath_id. This is exactly what we do for FC.
Change-Id: Ic1f598da59ccda634b765d65706e02d1a4caff30
Closes-Bug: #1547539
This patch is to add sheepdog connection in os-brick.
Most of codes are referred from sheepdog in volume drivers.
Change-Id: I358e66e11ba1c44741fdaed41eb7eb66706f92fb
The multipath -ll output is logged at debug level but by
default debug level logging is disabled. If we fail to parse
the output of multipath -ll to get the device map, we should
include the command output in the warning message since INFO+
logging is enabled by default.
Change-Id: Ib66c254e6eb4394382fc928d833a3a1818336b9b
Closes-Bug: #1546773
In the refactoring of the multipath discovery code from the FC connector
we missed a class member in FC getting migrated into the base class.
This resulted in the original path not existing in the base class and
in turn breaking iSCSI multipath.
Change-Id: I7492fdf0d6d4ec6a17a937d88895449f946a1c3c
Closes-Bug: #1545198
This patch addresses the issue where lun id's values are larger
than 255 and are being kept as integers. This causes the volume and
search paths to be malformed and volumes can't be found. This patch
adds two functions to linuxscsi.py to process the lun id's; they can
process both a single lun id and a list of them. If a lun id has a
value larger than 255 it is converted to hex. This patch also modifies
the necessary unit tests and adds ones to cover the new main function.
Change-Id: Ib0b2f239a8152275de9ea66fa99a286dfbe53d57
Closes-bug: #1493350
The paths returned from the InitiatorConnector's
get_all_available_volumes function had a typo
where one of the forward slashes was missing.
Example:
/dev/disk/by-pathfake-ip-lun0
This patch revises the way the paths are queried so that the
forward slash is included.
Example:
/dev/disk/by-path/fake-ip-lun0
Closes-Bug: #1543238
Change-Id: I7eea70a32549c9d18820a5ce2155ecf93250158e
When failed to execute "multipath -l" in find_multipath_device,
raise an exception instead of printing warning only.
Change-Id: I593b49d1637c7077e51a2db343e5b1eec3053536
Closes-Bug: #1519363
This patch continues work on making the connect_volume methods
more efficient. Using multipath -l to find the available multipath
devices can take a lot of time listing all of the potential
devices. Previously, the FC connector had been modified to skip
the use of multipath -l.
This patch takes the FC code and makes it into a generic method to
be used in the ISCSI connector and the FC connector and updates tests.
I also fixed argument order in assertEquals() in the
test_connect_volume_with_multipath() function.
Closes-Bug: #1487169
Change-Id: If480df7c17a6f1c2ecebc0e00f5938d3056776fd
This patch adds strip() call to the return value
of the blockdevice call to fetch the size. Sometimes we get a newline
after the size value.
Change-Id: I5917c0ad1a94b9d8ca6a41b278f9156193198a1d
Closes-Bug: #1535913
This commit adds the os-brick connector for the
ITRI DISCO cinder driver
This commit also includes the ITRI DISCO connector unit test.
The cinder driver itself has been commited in cinder but not merged yet.
( ref : https://review.openstack.org/#/c/253356/ )
I first commit this connector, then the part in nova
( ref : https://review.openstack.org/#/c/253353/ )
finally I committed the connector in cinder
Note that the patch for nova requires this commit to be merged
to pass the unit test.
Change-Id: I81036a58ab334a7e047f7fa5486c11fd19d24b8f
Implements: blueprint disco-driver-cinder
This patch adds the new extend_volume API to the connector objects.
The purpose of this patch is to add the ability to notify the host
kernel when an attached volume has been resized. This allows both
raw device paths and multipath devices to get new sizes on the fly
without detaching and then reattaching to the host.
Cinder Spec:
https://review.openstack.org/#/c/243730/
To manually test:
Use the brick_resize.py tool here:
https://github.com/WaltHP/diediedie/blob/master/diediedie/brick_resize.py
sample brick.conf to output debug logging for the brick_resize.py tool
https://gist.github.com/WaltHP/e9b71e0ea1b1d9097762
After a successful resize, find the virt domain name
then run
virsh blockresize <domain name> <path to raw device> <new size>
for example,
blockresize instance-00000007 /dev/disk/by-id/dm-uuid-mpath-350002ace1dda383d 3145728
Implements blueprint: brick-extend-attached-volume
Change-Id: I19858dd47afe3bdb3dd25c1dfead732a804cdee2
This patch adds the local LVM control code from Cinder into os-brick.
Nova has it's own copy of code that does basically the same thing.
This patch is the first step to migrating both Cinder and Nova to using
the same exact code for managing local lvm volume groups and volumes.
This is NOT a replacement for the Cinder lvm volume driver, but the
low level lvm management code.
Change-Id: I80a1ac859b9f3aa50262a8d0db750a00cb3e2dc4
implements blueprint: local-dev-lvm-to-os-brick
assertFalse() is a weaker assertion than assertEqual(False, xxx),
because the former will allow None while the latter will not.
assertEqual is correct choice in a fair number of cases.
This reverts commit 7f00e710cf.
Change-Id: I115964b3f8fa0fa6d1bb5787b70a61a14b254348
There was another unit test that was failing when
/dev/disk/by-path exists on the system, due to a missing
expected scsi_id command.
This is another follow up fix as well as :
https://review.openstack.org/#/c/243338/
Change-Id: I7fb3a9bd035dbd9add496868d2c9da91f30c01fd
Closes-Bug: #1514611
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).
Change-Id: If598c33fb3f72d828dc9e5184e83833d87fecf99
Closes-Bug:#1512207
7ee5a43a75 changed how
the command was logged so it would mask any passwords,
but is not substituting the variables in the command string,
so this actually just shows up as python code in the logs.
Replace the comma with % to properly substitute the variables
before masking passwords and logging.
Change-Id: I7dd730165142e0f7790eca64b8de3e321e0a3183
Closes-Bug: #1531572
OpenStack projects are no longer being tested under Python 2.6, so
remove the trove classifier implying that this project supports 2.6.
Change-Id: I9047beded251de0083bf6b6d48688e40872437d1