Commit Graph

19 Commits

Author SHA1 Message Date
Gorka Eguileor 97061c9a1f Add LVM NVMe support
This patch adds NVMe LVM support to the existing iSCSI LVM configuration
support.

We deprecate the CINDER_ISCSI_HELPER configuration option since we are
no longer limited to iSCSI, and replace it with the CINDER_TARGET_HELPER
option.

The patch also adds another 3 target configuration options:

- CINDER_TARGET_PROTOCOL
- CINDER_TARGET_PREFIX
- CINDER_TARGET_PORT

These options will have different defaults based on the selected target
helper.  For tgtadm and lioadm they'll be iSCSI,
iqn.2010-10.org.openstack:, and 3260 respectively, and for nvmet they'll
be nvmet_rdma, nvme-subsystem-1, and 4420.

Besides nvmet_rdma the CINDER_TARGET_PROTOCOL option can also be set to
nvmet_tcp, and nvmet_fc.

For the RDMA transport protocol devstack will be using Soft-RoCE and
creating a device on top of the network interface.

LVM NVMe-TCP support is added in the dependency mentioned in the footer
and LVM NVMe-FC will be added in later patches (need os-brick and cinder
patches) but the code here should still be valid.

Change-Id: I6578cdc27489b34916cdeb72ba3fdf06ea9d4ad8
2022-09-13 12:53:31 +02:00
Eric Harney 8c86e5a53e Cinder: only set volume_clear for LVM
This only applies to the LVM driver (when using
thick provisioning), and doesn't have any effect on
other backends like NFS, so only write the conf entry
for LVM.

Change-Id: I722ba2fa0010d9887ed9b7fdd9e050cd4694768e
2019-10-17 15:48:08 -04:00
Lenny Verkhovsky f63ddd609f Replace depricated iscsi_helper with target_helper
Cinder change I5231f8fe3399deb9c57e6efb121d0d008dc9c7f4
replaces iscsi_helper with more general one.



Change-Id: I49fe0365b170e5a5b0449d80003bcf970e4c191d
2018-03-01 07:38:28 +00:00
Isaac Beckman 54a8dc291f cleanup: remove DEVSTACK_CINDER_SECURE_DELETE
DEVSTACK_CINDER_SECURE_DELETE is deprecated from liberty release.
This should have been removed after kilo-eol

Change-Id: I82c15a19f8fe0326d4a5c2a076baa6d3e53fcf32
2017-05-17 14:27:41 +03:00
Ian Wienand 523f488036 Namespace XTRACE commands
I noticed this when debugging some grenade issues failures.

An include of grenade/functions stores the current value of XTRACE
(on) and disables xtrace for the rest of the import.

We then include devstack's "functions" library, which now overwrites
the stored value of XTRACE the current state; i.e. disabled.

When it finishes it restores the prior state (disabled), and then
grenade restores the same value of XTRACE (disabled).

The result is that xtrace is incorrectly disabled until the next time
it just happens to be turned on.

The solution is to name-space the store of the current-value of xtrace
so when we finish sourcing a file, we always restore the tracing value
to what it was when we entered.

Some files had already discovered this.  In general there is
inconsistency around the setting of the variable, and a lot of obvious
copy-paste.  This brings consistency across all files by using
_XTRACE_* prefixes for the sotre/restore of tracing values.

Change-Id: Iba7739eada5711d9c269cb4127fa712e9f961695
2015-11-27 15:36:04 +11:00
John Griffith ce8e6f6aa6 Add ability to specify cinder lvm_type option
Cinder has had an lvm_type option for quite a while
that allows the LVM driver to be configured to use
thin provisioning.

This required an additional PPA in Precise, but is
available in the default Trusty packages.

This patch adds the lvm_type option, and we'll use
it to do gate testing against the lvm_thin configuration.

Change-Id: I99c7fea131f3d79747ec75052adf8b24f41ba483
2015-05-12 17:28:59 -06:00
Dan Smith 6cdb2e0f1a Remove the lvm.conf filter during cleanup
This avoids us leaving the filter in the global lvm config. Without cleaning
this up, we can hit some failures to run stack.sh because devices are excluded
that we need to be able to see. This resets it to what it was before when
we do a cleanup.

Also, do this before we add the line, so we don't add multiple lines on
successive runs.

Closes-bug: #1437998
Change-Id: Idbf8a06b723f79ef16a7c175ee77a8c25f813244
2015-04-23 22:12:15 +00:00
Attila Fazekas c70605d101 Add lioadm cinder iscsi helper support
The Linux-IO is a modern way of handling targets.
Per the IRC discussions lioadm as default
seams like a better default for everyone, for now it will be
optional, but the tgtadm admin support expected to be removed when
lioadm works well with all CI (including third party).

Change-Id: Ia54c59914c1d3ff2ef5f00ecf819426bc448d0a9
2015-03-26 20:41:18 +01:00
John Griffith 4bf861c76c Create global_filter to avoid scan of missing devs
A while back I added an lvm.conf file with a device filter setting
to try and clean up the LVM hangs in the gate:
  (commit 0b9e76f280)

It turns out this wasn't the real problem, the real problem
is that on an LVS/VGS command LVM  will attempt to open and read
all potential block devices in /dev to see if they have LVM data
on them.  I initially thought the local filter would keep that
from happening, as it turns out the local filter only limits what's
returned AFTER the actual scan process.  In order to keep the scan
from happening at all, either a global_filter needs to be used or
lvmetad needs to be running and enabled.

There are situations in gate tests where /dev/sdX devices are created and
deleted and the result is that we hit situations where LVM tries
to open up devices to check them even if they've been removed.  The
result is we have a blocking open call from LVM that takes approx
60 seconds to time out and fail.

Ubuntu won't have a version of lvmetad until Vivid, so for now
that just leaves the global_filter as an option.

This patch adds the filter routine to the end of stack.sh.  We don't
want to put the routine in lib/cinder_backend/lvm like we had it because
now we have to set the global filter for all LVM commands on the system.
So we put this as one of the last steps in stack.sh and run it if Cinder
is enabled.  This way we can query PV's on the system regardless of what
other services may be running and using LVM and make sure that all of
their devices are added to the filter as well.

Also, make sure we only set this for Ubuntu as Fedora/RHEL variants
utilize lvmetad.

This patch also removes the old change that set the local filter.

DocImpact
Should add this to recommended config for Cinder on systems
that don't have lvmetad, and recommend lvmetad for those that do.

Change-Id: I5d5c48e188cbb9b4208096736807f082bce524e8
Closes-Bug: #1373513
2015-03-18 10:29:29 -06:00
Andreas Scheuring 15d40a5683 Add quotation marks to parse string correclty on rhel7
Problem:
On rhel7 the lvm.conf filter is generated wrongly

Root Cause:

bash-4.2 (rhel7/centos7) incorrectly splits herestrings 
when combined with IFS.  See [1] and [2]

Quoting the argument is a safe work-around

[1] http://stackoverflow.com/questions/20144593/trying-to-split-a-string-into-two-variables
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1196566

Closes-Bug #1425839
Change-Id: Ie82fcd7ef0deacbb6aaf18c5c466a5d5baf52681
2015-02-26 10:18:41 +00:00
John Griffith c3c94ca6bc Add eval message when setting Cinder lvm.conf
We added an lvm filter for use when using Cinder's
LVM driver that would only scan devices that we have
actually deployed Cinder Volume Groups on.

This patch adds a simple output message to the setup
routine so we can more easily inspect what was found
and what has been set during devstack setup.

Change-Id: Iba5012caffd45dfb5143b6df954eed277445a60e
2015-02-11 20:46:56 -07:00
Jenkins ea8fb0c246 Merge "Use LVMVolumeDriver instead of LVMISCSIDriver" 2015-01-29 04:44:04 +00:00
Mike Perez a0126b642c Use LVMVolumeDriver instead of LVMISCSIDriver
The Cinder LVMISCSIDriver is now deprecated. As a result, default
settings in devstack are giving warnings in the Cinder volume serivce.
The LVMVolumeDriver now handles all cases, by looking at the
iscsi_helper. This will use that driver instead, which will stop the
deprecation warnings.

Closes-bug: #1413761
Change-Id: Ifbb9ce45694095ff9e30f3ca4c3859a07de8df73
2015-01-22 16:01:11 -08:00
John Griffith 0b9e76f280 Auto add a cinder lvm.conf file
We have a number of issues where LVM scan commands hang during
test runs.  Looking closer at this with strace it turns out
that what seems to be happening is that we're scanning all of the
devices on the node, this includes the loop devices for swift and
other projects as well as the Cinder devices that are being attached
to the system during the test.

This is particularly messy for example when we issue a VG or LV scan
on a device like /dev/vdb and at the same time issue a detach.  The
result is LVM scan commands hanging waiting for timeout.

This patch adds a function to the cinder_backend/lvm module which
is called as the last part of cinder init.  If Cinder LVM is in use
as per cinder.conf this function will copy the default
/etc/lvm/lvm.conf to /etc/cinder/lvm.conf and use the cinder.conf file
and PVS to create filters so that ONLY the devices actually being used
by Cinder are included in scans.

There are two pieces to this fix; the first is to properly setup an
lvm.conf file with filters.  The second step is to merge the Cinder
change that modifies the Cinder LVM commands to specify the lvm.conf
file usage.

The Cinder part of this fix can be found here:
    https://review.openstack.org/#/c/148747/

Change-Id: I962b6e21cbfb6f5612b6c973053d86828ca8071a
Partial-Bug: #1373513
2015-01-22 12:27:58 -07:00
Daniel Genin d470867f08 Adds support for LVM ephemeral storage in Nova
DevStack currently lacks support for LVM ephemeral storage in Nova.
This support is important for testing of Nova's LVM backend. The
proposed change adds a default volume group, to be shared by Cinder
and Nova. It also adds a configuration option NOVA_BACKEND, which
must be LVM if it is set, that determines whether Nova should be
configured to use LVM ephemeral storage.

Change-Id: I4eb9afff3536fbcd563939f2d325efbb845081bb
2015-01-19 11:51:16 -05:00
Sean Dague 537532931d Make changes such that -o nounset runs
This makes a bunch of variable cleanups that will let -o nounset
function, for the time being we hide nounset behind another setting
variable so that it's not on by default.

Because this is bash, and things are only executed on demand, this
probably only works in the config it was run in. Expect cleaning up
all the paths to be something that takes quite a while.

This also includes a new set of unit tests around the trueorfalse
function, because my change in how it worked, didn't. Tests are good
m'kay.

Change-Id: I71a896623ea9e1f042a73dc0678ce85acf0dc87d
2015-01-15 13:06:14 -05:00
Sean Dague e263c82e48 add shebang lines to all lib files
With gerrit 2.8, and the new change screen, this will trigger syntax
highlighting in gerrit. Thus making reviewing code a lot nicer.

Change-Id: Id238748417ffab53e02d59413dba66f61e724383
2014-12-10 11:28:05 -05:00
Dean Troyer e8a35acd1d Clean up local variable usage - cinder
Change-Id: Iedeafa15def1fa26d4ddcbc5f670129f66e38b9d
2014-08-19 19:12:27 -05:00
Dean Troyer 097183356e Support multiple Cinder backend types
This is the first step in supporting multiple Cinder backend types at
once.  It initially converts the existing hard-coded multi-lvm support
to a new cinder_backends driver form.  Eventually the cinder_plugins
will be converted to this form so they can be enabled more than just
one at a time using CINDER_ENABLED_BACKENDS.

The default configuration should be identical to the previous defaults,
including for both True and False values of CINDER_MULTI_LVM_BACKEND.

The existing cinder_plugins are expected to be removed when this is
complete. They should continue to work until they have been converted.

Add wait for c-api to ensure it is started before continuing.

Change-Id: I93b8ef32832269d730c76a6dc24ddb4f20c6d9df
2014-07-15 16:03:42 +02:00