Commit Graph

312 Commits

Author SHA1 Message Date
Andreas Jaeger 2acea23173 Retire repo
This repo was created by accident, use deb-python-os-brick
instead.

Needed-By: I1ac1a06931c8b6dd7c2e73620a0302c29e605f03
Change-Id: I81894aea69b9d09b0977039623c26781093a397a
2017-04-17 19:25:20 +02:00
Jenkins d2b1abfc8f Merge "Fix FC multipath rescan" 2016-08-11 19:14:38 +00:00
Jenkins 398fa8d5ea Merge "RemoteFsClient extend Executor" 2016-08-11 17:43:47 +00:00
Jenkins f38c6c87be Merge "Remove race condition from lvextend" 2016-08-08 20:58:55 +00:00
Jenkins dd56df2ec0 Merge "Add Windows Fibre Channel connector" 2016-08-08 17:16:04 +00:00
Jenkins 05e10f85e2 Merge "Add Windows SMBFS connector" 2016-08-08 17:13:16 +00:00
Walter A. Boring IV 075f12e7d6 RemoteFsClient extend Executor
This patch changes the RemoteFsClient object to be a child
of the Executor.   This enables it to have the same usage of
putils vs. privsep as the rest of os-brick

Change-Id: I89ed43dd87e137b939e141ea6c6c10129763d97a
2016-08-08 07:28:07 -07:00
Lucian Petrut 25453f3a2b Add Windows Fibre Channel connector
This patch adds a Windows Fibre Channel connector.

The patch using Windows os-brick connectors in the Hyper-V
Nova driver: https://review.openstack.org/#/c/273504/

Change-Id: Iec263e5d5803fcceb315e17d16d2b154e0214584
Partial-Implements: blueprint os-brick-windows-support
2016-08-04 23:12:09 +03:00
Lucian Petrut 4045300fa9 Add Windows SMBFS connector
This patch adds a Windows SMBFS connector. Also, a Windows
RemoteFS class is added, being used by this connector, having
a similar interface with the Linux RemoteFS client class.

The patch using Windows os-brick connectors in the Hyper-V
Nova driver: https://review.openstack.org/#/c/273504/

The Windows connector factory function has been removed as it's not
needed anymore.

Change-Id: I0c753a667d58391da7a903d11ab1f4729e68461a
Implements: blueprint os-brick-windows-support
2016-08-04 23:07:01 +03:00
Gorka Eguileor 45184cb9b0 Fix the mocking mess
Our tests' mocking is a little messy, we have tests that start a mocking
but don't stop it, others try to stop it but use a mock object instead
of a patcher object, so they don't stop it, and we keep using stopall to
stop the patchings instead of individual stops, and we've seen in Cinder
that this can be problematic.

This patch fixes these issue, most of them just by using base TestCase
mock_object method, and some calling the right stop method (ie:
VolumeEncryptorTestCase).

Change-Id: I545abfa8749e778e923c37e0b908efc578f70619
2016-08-03 18:40:42 +02:00
Gorka Eguileor 28a4d55a0a Fix FC multipath rescan
Fiber Chanel multipath rescan uses wildcards for the host rescan, 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 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 pollute our environment and will
be recognized as down paths when the storage controller reuses the same
WWID.

This patch narrows the rescan to only rescan for the specific lun
number, and if possible it also filters the rescan by HBA channel and
SCSI target ID.

We only filter by HBA channel and SCSI target ID when we can find this
information, and that is when the FC storage servers implement a single
WWNN for all ports.

Change-Id: Id6ed98d3fb8b4b980de86256dec8eeda84562c98
Closes-Bug: #1608614
2016-08-03 18:23:37 +02:00
Kendall Nelson c5e3d8affb Splitting Out Connectors from connector.py
This is a larger refactor of the connector.py file. The goal is to
simplfy the file by moving the vendor connector classes to their own
files, and keep only the InitiatorConnector in the connector.py file.
The vendor specific connector tests are also split out into their own
files.

Change-Id: I020e75ca8cd8bec2ad1b38f3ade5cc1f63a4fee5
Implements: bp connector-refactor
2016-08-02 15:54:15 -05:00
Nate Potter e1f9a54625 Remove race condition from lvextend
Currently it's possible for extend_volume in lvm to return
from the deactivate_lv call and try to extend the volume before
the lv has actually been deactivated. This patch adds logic to
make sure that the lv is deactivated before returning from
deactivate_lv.

Change-Id: I5c3671043df6e7474acdfcce342d655ac215a461
Closes-bug: #1495560
2016-08-01 20:08:07 +00:00
Jenkins cc47d81feb Merge "ScaleIO to get volume name from connection properties" 2016-08-01 11:42:45 +00:00
Jenkins 1696667a02 Merge "Local attach feature in RBD connector" 2016-07-30 19:26:32 +00:00
Jenkins 046d2bbcf6 Merge "Mock write and read operations to filesystem" 2016-07-29 17:58:37 +00:00
OpenStack Proposal Bot 920880e289 Updated from global requirements
Change-Id: Iad9d018454da899f378a641d160ac6b66652b8e7
2016-07-29 02:33:32 +00:00
Ivan Kolodyazhny 921ca671b7 Mock write and read operations to filesystem
Change-Id: I7b9ad7d3632c3ec870016c09359afc9c6b646a21
Closes-Bug: #1607322
2016-07-28 14:31:24 +03:00
Jenkins 92e451fc0c Merge "Remove useless info logging in check_valid_device" 2016-07-27 09:53:02 +00:00
Ivan Kolodyazhny 7a3b7961d3 Local attach feature in RBD connector
We use RBD kernel module to attach and detach volumes locally without
Nova.

Change-Id: Iab9b62115f61e334c35003d55a47375cb2eee684
2016-07-26 18:37:14 +00:00
Shilpa Jagannath 9aee7c2972 Remove useless info logging in check_valid_device
In the method 'check_valid_device' of class BaseLinuxConnector(),the
actual return value of 'info' from the try block is not captured as a
ProcessExecutionError exception but is simply logged with the initial
assignment 'None'. It is not necessary to have 'info' logged as 'None'.

Change-Id: Ia67727c5741695130e487d4532b85b6206bc05b7
2016-07-26 09:23:04 +00:00
Matan Sabag 1b4aee13c6 ScaleIO to get volume name from connection properties
Currently ScaleIO is doing a HTTP request to find out what is the
volume id. This change will take it from the connection properties.
It is more accurate and saves time.

Change-Id: Id5d9445c7028141c37ce514476e501502cb8a25b
2016-07-24 07:47:47 +00:00
Jenkins cde2644a91 Merge "Fix wrong path used in iscsi "multipath -l"" 2016-07-24 01:17:44 +00:00
Jenkins 5593380106 Merge "Add ignore for . directories" 2016-07-22 20:16:53 +00:00
Walter A. Boring IV 94eae1857b Add ignore for . directories
This adds a global ignore for all .* directories
and whitelists known . files that we want.

Change-Id: I9b57a28b80cbb059c68a96a848c26d4fa2fc75f7
2016-07-22 17:02:41 +00:00
Jenkins 3ee1b9a0aa Merge "Upgrade tox to 2.0" 2016-07-14 21:02:08 +00:00
Jenkins d5fe51cb54 Merge "Add trace facility" 2016-07-13 01:21:21 +00:00
Walter A. Boring IV c5f31a1a4f Upgrade tox to 2.0
Several projects have set the minimum tox version to 2.0.
This patch updates tox.ini to set the minimum required tox version
to 2.0

Change-Id: Id88e63d953d99aeebfd909ce3fae6295ddb461e1
2016-07-12 15:05:20 -07:00
Jenkins 174da6817d Merge "Remove unused LOG to keep code clean" 2016-07-12 21:30:07 +00:00
Walter A. Boring IV 64fbe4d3dc Add trace facility
This patch adds the utils.trace decorator that also exists in Cinder.
This allows for generic tracing of method calls for the common
connect_volume and disconnect_volume methods for connectors.

Change-Id: Ic82950e15a5edfeb95d6e4c80847cfba01e2bf2d
2016-07-12 13:12:34 -07:00
Jenkins 6c95f19bfa Merge "Fix string interpolation to delayed to be handled by the logging code" 2016-07-12 13:23:12 +00:00
Jenkins 1613e4fbad Merge "Fix argument order for assertEqual to (expected, observed)" 2016-07-12 11:26:41 +00:00
Jenkins e27431cfb7 Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2016-07-12 11:26:31 +00:00
weiweigu e2506d1199 Fix string interpolation to delayed to be handled by the logging code
String interpolation should be delayed to be handled by the logging
code, rather than being done at the point of the logging call.
See the oslo i18n guideline.
* http://docs.openstack.org/developer/oslo.i18n/guidelines.html

Change-Id: I410acf693d8b7b1677a7f5b1749d9c1a48aaf177
Closes-Bug: #1596829
2016-07-12 09:14:03 +00:00
Jenkins 9f1f150085 Merge "Disconnect multipath iscsi may logout session" 2016-07-12 06:07:27 +00:00
yuyafei 2fa8f65991 Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to have more
clear messages in case of failure.

Change-Id: I3699fca674c9d97b09308155fbc92aaed929d87f
Closes-Bug:#1280522
2016-07-12 11:21:12 +08:00
Peter Wang 30f4fc763e Fix wrong path used in iscsi "multipath -l"
When iSCSI multipath device path was not found via LUN wwn,
os-brick would use device path like below:
/dev/disk/by-path/ip-192.168.3.52:3260-iscsi-iqn.1992-04.com.emc:cx.apm00153906536.b5-lun-155
to detch multipath id via 'multipath -l'.
This causes error: "can't get udev device"

This fix will use path like '/dev/sda' to discover mpath id.

Change-Id: I1177d846a9f6f28b2276aae2ff91af9d4ea5849e
Closes-bug: #1585940
2016-07-11 22:32:27 +00:00
OpenStack Proposal Bot 3979749f79 Updated from global requirements
Change-Id: Id23a69b42337cf8a8a5b1e031e14f0c60dd9ccdd
2016-07-09 19:25:26 +00:00
yuyafei 14df0c7721 Remove unused LOG to keep code clean
TrivialFix

Change-Id: I2dde2430011a777bffc1f0d25886784c9ed04b68
2016-07-09 10:17:48 +08:00
Jenkins c7d7145229 Merge "Fix multipath iSCSI encrypted volume attach failure" 2016-07-07 21:54:59 +00:00
lisali 9d2bb5e15d Fix multipath iSCSI encrypted volume attach failure
This is to copy fix of bug 1439869 from Nova to os-brick.

Currently iSCSI volume attachment fails if iscsi_use_multipath is
set to True. This is because the encryptor requests cryptsetup
to create the symlink to the LUKS device with the same name of
the device-mapper multipath device. To avoid the name collision,
this patch adds the 'crypt-' prefix to the symlink.

Change-Id: Ia001204df9b14f635ab998590e8add119c1aec23
Closes-Bug: #1439869
2016-07-07 15:30:31 +08:00
OpenStack Proposal Bot 02eda08243 Updated from global requirements
Change-Id: Ifb1a249edea7067df206e56f16bfeb076823eb3b
2016-07-06 08:49:23 +00:00
Walter A. Boring IV 528472dd4b release note for windows iSCSI
This patch adds a release note for the Windows iSCSI
patch that has already landed.

Change-Id: I829c42f825b80df7f6934d4a5ae69ace2f79cf92
2016-07-05 15:23:05 -07:00
Jenkins 8bf860729e Merge "Add Windows iSCSI connector" 2016-07-04 10:18:15 +00:00
Jenkins e26644e2f9 Merge "Make code line length less than 79 characters" 2016-06-24 22:35:38 +00:00
Lucian Petrut 585445eecf Add Windows iSCSI connector
This patch adds a Windows iSCSI connector while the following
changes will add SMBFS and Fibre Channel connectors as well.

os-win is added as a requirement, as well as ddt. Note that
both are in the global requirements list. os-win is under OpenStack
governance and already being used by multiple OpenStack projects
such as Nova and Cinder.

The patch using Windows os-brick connectors in the Hyper-V
Nova driver: https://review.openstack.org/#/c/273504/

Change-Id: I19dfc8dd2e9e8a1b17675b55c63de903804480e4
Partial-Implements: blueprint os-brick-windows-support
2016-06-22 10:45:48 -07:00
Jenkins f359ecc3f7 Merge "Replace ip with portal to express more accurately" 2016-06-22 10:31:30 +00:00
yuyafei 5343bf0211 Make code line length less than 79 characters
Lines should be wrapped at 79 characters.

TrivialFix

Change-Id: Ic18dec35c2471e14a9e01d949345bcb7ab4c093b
2016-06-22 01:26:45 +00:00
OpenStack Proposal Bot 76c979c270 Updated from global requirements
Change-Id: I82deefc83a0b9727f689240aef6a5ecb0cbbbccc
2016-06-21 18:04:00 +00:00
yuyafei 5049929b48 Replace ip with portal to express more accurately
TrivialFix

Change-Id: I7a1cacd77d580d888366fbc8fde2cb78a924a4d0
2016-06-21 21:12:45 +08:00