1139 Commits

Author SHA1 Message Date
Ade Lee
1425a834dd Replace md5 with oslo version
md5 is not an approved algorithm in FIPS mode, and trying to
instantiate a hashlib.md5() will fail when the system is running in
FIPS mode.

md5 is allowed when in a non-security context.  There is a plan to
add a keyword parameter (usedforsecurity) to hashlib.md5() to annotate
whether or not the instance is being used in a security context.

In the case where it is not, the instantiation of md5 will be allowed.
See https://bugs.python.org/issue9216 for more details.

Some downstream python versions already support this parameter.  To
support these versions, a new encapsulation of md5() has been added to
oslo_utils.  See https://review.opendev.org/#/c/750031/

This patch is to replace the instances of hashlib.md5() with this new
encapsulation, adding an annotation indicating whether the usage is
a security context or not.

In this case, we use md5 in a single case, when creating an identifier
for a mount point.

Change-Id: I08226895818185337425ebffc2464db05f3969c9
Depends-On: https://review.opendev.org/#/c/760160
2020-10-29 15:39:01 -04:00
Zuul
ddcd4c9d16 Merge "Revert "Keep barbican integration job running on Bionic"" 2020-10-07 15:37:12 +00:00
Tushar Trambak Gite
8cec940ce5 Revert "Keep barbican integration job running on Bionic"
This reverts commit 70a8924eb3844fab0a28cc5852131b0d2ad6c4fb.
Barbican DB issue is fixed by https://review.opendev.org/#/c/753699/4

Change-Id: I45db575d8fbdd8aea0e47bac0269b9f2250151ab
2020-10-06 06:57:02 +00:00
Gorka Eguileor
1432c369fb FC: Fix not flushing on detach
When doing multipathed Fibre Channel we may end up not flushing the
volume when disconnecting it if didn't find a multipath when doing
the connection.

The issue is caused by the `connect_volume` call returning a real path
instead of a symlink and us passing the wrong device_info to the
_remove_devices method, which makes the disconnect code incorrectly
identify when a multipath was used to decide whether to do a flush or
not.

This patch fixes these things in order to flush the individual path when
necessary.

Closes-Bug: #1897787
Change-Id: Ie3266c81b3c6bb5a2c213a12410539d404d1febe
2020-10-01 12:29:50 +02:00
Zuul
165c8017e4 Merge "Keep barbican integration job running on Bionic" 2020-09-23 16:24:16 +00:00
Ghanshyam Mann
70a8924eb3 Keep barbican integration job running on Bionic
keeping os-brick-src-tempest-lvm-lio-barbican job running on bionic nodeset till
https://storyboard.openstack.org/#!/story/2007732 is fixed
otherwise base devstack jobs switching to Focal will block
the gate.

Change-Id: I482ac98bc56f0e3cfb8b767f47649da11ed1afab
Story: #2007865
Task: #40179
2020-09-22 14:28:59 +00:00
Gorka Eguileor
18fc838ea3 Update the OSSN-0085 note
Update existing node in the RBD connector about the removal of the
keyring data in the connection info to note that the code should not be
removed, since it is used by cinderlib.

Related-Bug: #738216
Change-Id: I1f76045b677833bb155978e1a166e63d53dc2aba
2020-09-17 13:42:13 +02:00
Zuul
8192331a24 Merge "Add Python3 wallaby unit tests" 2020-09-14 10:54:47 +00:00
tushargite96
070ab479c9 Stop configuring install_command in tox.
It turns out that this is the the default value provided by tox:

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

So we can remove the line and simply use the default value.

Change-Id: I93b6aea505bc0b4e3e91229e7a2f35a8c01db6d7
2020-09-09 09:59:57 +05:30
Brian Rosmaita
c6ad4d864c New fix for rbd connector to work with ceph octopus
Found while testing cinder-backup with ceph on Ubuntu Focal, which
installs ceph Octopus.  Octopus apparently enforces the requirement
that the config file contain a '[global]' section for general
requirements.  The '[global]' section goes back at least to ceph
Hammer [0], so we will simply add it to the temporary ceph config
file that os-brick generates in the RBDConnector class.

[0] https://docs.ceph.com/docs/hammer/rados/configuration/mon-config-ref/

Co-authored-by: Alex Kavanagh <alex@ajkavanagh.co.uk>
Co-authored-by: Ivan Kolodyazhny <e0ne@e0ne.info>

Change-Id: I86eb31535d990291945de5d9846b1a03157ec2cf
Closes-bug: #1865754
2020-09-08 12:09:49 -04:00
Brian Rosmaita
c54c41a1fd Revert "Fix for rbd connector to work with ceph octopus"
This reverts commit 3e831480c29c07128f36ae67c44c25177b3d9f36.

This change introduced a heavyweight bindep to os-brick.  We will
replace it with a more lightweight fix.

Change-Id: I9eff1d0d8bab7aaf060d2c009bed2be65d212c04
Partial-bug: #1865754
2020-09-08 11:30:55 -04:00
50aef21d85 Add Python3 wallaby unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for wallaby.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I32f600401bc5d1d2b7d32901b905ec4a44cce0ed
2020-09-02 16:43:44 +00:00
81a0019d0d Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: I7eba32adc5897940ceb712561ee40327e0f2418f
Sem-Ver: feature
2020-09-02 16:43:42 +00:00
Zuul
c5015cbd8a Merge "Fix for rbd connector to work with ceph octopus" 2020-09-02 14:14:31 +00:00
Alex Kavanagh
3e831480c2 Fix for rbd connector to work with ceph octopus
Found whilst testing cinder-backup with ceph on Ubuntu focal and
OpenStack Ussuri.  Focal installs Ceph Octopus, and, as the linked bug
shows, Octopus has slightly changed its requirements to need a
[global] ini heading at the beginning of the config file that is
generated within the RBDConnector() class.

Includes code to resolve which version of ceph is installed as a client
to only change octopus and later.

It also fixes cinder Ceph backup driver.

Includes release note for the change.

Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Change-Id: Ie8011fc83bc41edd2768ade6d42d737b4598ca2d
Closes-Bug: #1865754
2020-09-01 17:29:20 +01:00
Zuul
8da92bfb3b Merge "Add volume local cache support to os-brick" 2020-08-31 19:49:31 +00:00
Zuul
47cf8fbff1 Merge "Add doc linting to pep8 target" 2020-08-26 16:09:39 +00:00
Zuul
e540015535 Merge "Add note about removed cinder feature" 2020-08-26 15:46:53 +00:00
Zuul
3fda19d12a Merge "Remove the HGST connector" 2020-08-26 14:24:21 +00:00
Zuul
993e49d5fa Merge "Remove CORAID AOE connector" 2020-08-26 13:57:58 +00:00
Liang Fang
abd97bb2eb Add volume local cache support to os-brick
Try to leverage cache software, such as Open CAS, use high performance
disk or persistent memory as the cache in compute node locally for low
performance volume that allocated by cinder from remote backend storage.

open-cas: https://open-cas.github.io/
Nova Spec: https://review.opendev.org/#/c/689070/
Cinder Spec: https://review.opendev.org/#/c/684556/

Change-Id: Ib120047a65ecbb4ae0f060640d59f3f759a1cade
Signed-off-by: Liang Fang <liang.a.fang@intel.com>
2020-08-26 14:37:15 +08:00
Zuul
e3f694ac13 Merge "RBD: Implement volume extension" 2020-08-26 04:41:22 +00:00
Zuul
fa7c8fc1f1 Merge "RBD: Fix check_valid_device" 2020-08-25 23:28:16 +00:00
Sean McGinnis
360154bbf9 Remove CORAID AOE connector
The CORAID driver was removed many cycles ago. This cleans up os-brick
and removes the unused connector.

Depends-on: https://review.opendev.org/745393

Change-Id: I45ac41509f8fec9eb8f57aa03bcfb439a361b561
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-08-25 16:41:54 -04:00
Zuul
ff57ac837d Merge "RBD: Support non OpenStack usage" 2020-08-25 18:30:40 +00:00
Zuul
55fd7ede4a Merge "Remove the ITRI DISCO connector" 2020-08-25 18:19:08 +00:00
Zuul
f1b92330ce Merge "Remove DRBD connector" 2020-08-25 16:59:19 +00:00
Zuul
0e1d2f712e Merge "Remove Veritas Hyperscale connector" 2020-08-25 16:59:18 +00:00
Zuul
5640077d02 Merge "Add code coverage job" 2020-08-24 23:04:27 +00:00
Zuul
6fc62d1d9b Merge "Fix a typo in the explanatory note" 2020-08-24 20:39:03 +00:00
Brian Rosmaita
0649a7fbaf Add note about removed cinder feature
Prior to victoria, cinder had an option to pass the content of the
keyring file as a connection property, thereby causing the situation
documented in OSSN-0085.  Add a comment in the code indicating that
this field is not passed by cinder from the victoria release onwards.

Partially-implements: bp rbd-remove-option-causing-ossn-0085
Change-Id: I4a8793753c2504f8e594f92ae7069994c2d000ad
2020-08-21 17:50:38 -04:00
fuzihao
6672ea0023 Fix pygments style
Change-Id: I74a1dd674ddf7ff0225fca6dcff86dcd353c856f
2020-08-20 18:51:21 +00:00
Brian Rosmaita
4a13aa8159 Add code coverage job
Can be useful to reviewers.

Change-Id: I73b6c1e5be85c8debf1d5eb1adb1ef38ff421d07
2020-08-20 11:53:43 -04:00
Zuul
9107a46b69 Merge "Add release note for scaleio connector upgrade" 2020-08-17 17:25:42 +00:00
Zuul
d792537776 Merge "Leverage the iSCSI mpath to get the WWN" 2020-08-17 16:45:57 +00:00
Zuul
af23af9e21 Merge "ScaleIO: Connection info backward compatibility" 2020-08-17 16:20:46 +00:00
Brian Rosmaita
7ca8e56d50 Add release note for scaleio connector upgrade
Change I6f01a178616b74ed9a86876ca46e7e46eb360518 needs to be
backported and included in a new os-brick release in all releaseable
stable branches, so add a release note saying what it does.

Change-Id: Ib98043358d51426ca650104ad59a7e09911ee8e9
2020-08-17 11:36:44 -04:00
zhaoleilc
4412b262b0 Fix a typo in the explanatory note
This patch changes 'Handles single wwwn' to
'Handles single wwn'. The wwn stands for world
wide name.

Change-Id: Ia512cf12dfe9cac76f7fcaad9819a90896892454
2020-08-16 12:55:52 +08:00
Zuul
a5246f9a17 Merge "bindep: remind people to sync the dependencies with devstack" 2020-08-14 15:42:00 +00:00
Gorka Eguileor
0cdd9bbbe2 Leverage the iSCSI mpath to get the WWN
Now that we search the multipath device even if we haven't been able to
find the WWN in the sysfs we can leverage the multipath daemon
information on sysfs to get the WWN.

Pass the mpath to "get_sysfs_wwn" method where we check the sysfs to get
the WWN.

Change-Id: Id1905bc174b8f2f3a345664d8a0a05284ca69927
2020-08-13 22:10:09 -04:00
Zuul
6974808cb5 Merge "iSCSI detect multipath DM with no WWN" 2020-08-13 23:08:39 +00:00
Luigi Toscano
e83b028099 bindep: remind people to sync the dependencies with devstack
When os-brick is installed from pip, there is no way right now
for devstack to know which dependencies are needed.
So far we have been duplicating them, but at least make it clear
that the dependency must be added to devstack as well.

Change-Id: Ic2a42bae8e957986a71b11598f943a84267deb18
2020-08-14 00:50:08 +02:00
Zuul
d1e978e6ea Merge "Improve WWN detection" 2020-08-13 19:01:43 +00:00
Gorka Eguileor
5450483082 ScaleIO: Connection info backward compatibility
When we fixed bug 1823200 in Change-ID
Iab54c515fe7be252df52b1a0503a251779805759 we made the ScaleIO connector
incompatible with the old connection properties dictionary as it only
supported the new 'config_group' and 'failed_over' parameters to get the
password.

This is a problem in any system that is upgraded and has attachments to
the array, because the connection properties of those volumes will not
contain the new fields and detaching them will result in error
"KeyError: 'config_group'".

This patch adds compatibility code to support the old connection
properties format so we can detach those volumes.

Related-Bug: #1823200
Change-Id: I6f01a178616b74ed9a86876ca46e7e46eb360518
2020-08-13 13:13:02 +02:00
Sean McGinnis
12a1603940
Remove DRBD connector
The DRBD driver was removed by the vendor in the Stein release of
Cinder. This cleans up the unused connector code.

Depends-on: https://review.opendev.org/745393

Change-Id: I14825e5b3a01bd766d0441d61fa8149aa1bd1e65
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-08-07 14:33:30 -05:00
Sean McGinnis
d6e021ebcd
Remove Veritas Hyperscale connector
The Hyperscale connector was removed from Cinder in the Train release.
This cleans up its connector code.

Depends-on: https://review.opendev.org/745393

Change-Id: Icf219ead5d8180527b2d2fa6ef826e0782557824
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-08-07 14:31:55 -05:00
Sean McGinnis
54c8166eb4
Remove the HGST connector
The HGST driver was removed from Cinder in the Stein release. This
cleans up its connector code.

Depends-on: https://review.opendev.org/745393

Change-Id: I9cb2911cba9f8f3310d6132bb8f96b45bf5b0708
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-08-07 14:25:41 -05:00
Sean McGinnis
22d565bcf2
Remove the ITRI DISCO connector
This driver was removed from Cinder several releases ago. This cleans up
the now unused connector from os-brick.

Depends-on: https://review.opendev.org/745393

Change-Id: I8e892aafdfd3fcc4cd8657ec4e9ff0d9dce2e643
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-08-07 14:19:14 -05:00
Zuul
32115be11c Merge "prepend platform info to by-path string" 2020-08-06 22:48:29 +00:00
shenjiatong
7c9020f006 prepend platform info to by-path string
By default, udev will set device by-path name to its ID_PATH.

Looking at [1], most of the time, current code works,
but when system uses platform, then disk name will be prefixed by
'platform-xxxxx'.

[1]: a0be538616/src/udev/udev-builtin-path_id.c (L530)

Change-Id: I9b2c120f074f60b9af6dd81718a5287656040aba
Closes-Bug: #1862443
2020-08-03 21:12:10 +08:00