Commit Graph

45 Commits

Author SHA1 Message Date
Rajat Dhasmana aa47cb34ae Add config options for cinder nfs backend
Currently the cinder nfs backend leaves out few options in a
multi backend deployment. It works in single nfs backend deployment
as devstack-plugin-nfs correctly configures all options[1].
We can clearly see the difference between what devstack-plugin-nfs
configures[1] and what devstack nfs configures[2].

Following options are missing which are added by this patch.
* nas_host
* nas_share_path
* nas_secure_file_operations
* nas_secure_file_permissions
* nfs_snapshot_support

[1] dd12367f90/devstack/plugin.sh (L60-L68)
[2] a52041cd3f/lib/cinder_backends/nfs (L32-L34)

Change-Id: I03cad66abb3c6f2ae1d5cf943ac952a30961f783
2022-12-27 06:16:55 +00:00
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
Zuul fcdc8aff6a Merge "Add support for ceph_iscsi cinder driver" 2021-05-20 23:25:33 +00:00
Zuul 1259b7ecbc Merge "Cinder: only set volume_clear for LVM" 2021-05-12 16:26:21 +00:00
Hironori Shiina 01a84d2d03 Configure Cinder backup driver
This patch adds a new environment variable, CINDER_BACKUP_DRIVER for
configuring cinder backup driver used when c-bak service is enabled.
This gets cinder backup driver configurable with a similar pattern to
cinder backends. Although the current configurable backup drivers don't
need cleanup functions, the interface for cleanup is prepared for the
future.

The following backup drivers can be configured:
  swift:
  This is the default backup driver.
  ceph:
  This already can be configured if ceph backend driver is enabled. For
  backward compatibility, ceph backup driver is used if ceph backend
  driver is enabled and no backup driver is specified.
  s3_swift:
  The s3 backup driver gets configurable with this patch. By specifying
  's3_swift', the driver is configured for swift s3api.

In the future, lib/cinder_backups/s3 should be created separatedly for
external S3 compatible storage. This file will just set given parameters
such as a URL and credentials.

Change-Id: I356c224d938e1aa59c8589387a03682b3ec6e23d
2021-03-31 15:12:25 -04:00
Walter A. Boring IV b107f9cf18 Add support for ceph_iscsi cinder driver
This patch adds support to configure the new ceph iscsi driver

Depends-On: https://review.opendev.org/#/c/662829/
Depends-On:https://review.opendev.org/668667
Change-Id: Ica180e00dedb8e7ed60e27e3f4841faa8fef938c
2020-10-15 22:04:46 +00: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
melanie witt 991b1f13f0 Update cinder backup_driver to full class name
Legacy backup service support was recently dropped from cinder in
change I3ada2dee1857074746b1893b82dd5f6641c6e579 and we need to
adjust how we set the config option in devstack accordingly. This
updates the backup_driver option to specify a full class name instead
of only the module name.

Closes-Bug: #1794859

Change-Id: I3a72f38b564b8b83b233fccba7685833b6394d45
2018-09-27 18:37:49 +00: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
Ivan Kolodyazhny 447f141d4f Added support for fake drivers as Cinder backend
FakeLoggingVolumeDriver  will be used for functional Cinder tests to
prevent dependencies on any storage.

FakeGateDriver is based on LVM and will be used to run Tempest tests for
such features like CG's, replication, etc.

Depends-On: I383bcdb531c7d52c0fdbb6875de73f1274a92854
Change-Id: I2dc8ea416f5eb3fcc9d2e959533497e464220ff5
2017-02-22 09:14:54 -05:00
Jenkins fddff69efd Merge "ceph: set rbd_secret_uuid in cinder.conf, not rbd_uuid" 2016-11-30 22:57:42 +00:00
Matt Riedemann aa47a0a8be ceph: set rbd_secret_uuid in cinder.conf, not rbd_uuid
The ceph cinder backend script was setting the wrong
config option in cinder.conf for the secret uuid. This
was being masked by a bug in nova which is failing on
this bug when trying to fix the nova bug...right. It
makes sense.

See:

http://docs.ceph.com/docs/master/rbd/rbd-openstack/#configuring-cinder

Change-Id: I4655cae3212d589177d2570403b563a83aad529a
Closes-Bug: #1635488
2016-10-20 22:27:25 -04:00
Sébastien Han 556139e710 fix ceph config file path variable
CEPH_CONF does not exist anymore, resulting both cinder-volume and
cinder-backup being configured with an empty rbd_ceph_conf option.
Using CEPH_CONF_FILE to fix this.

Change-Id: I1aa590aba900a4a94698917e45a0ea5c6f497f18
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-08-18 15:09:44 +02:00
Isaac Beckman 65be33f68e Remove lib/cinder_backends/xiv
Since support for sections was added to devstack local.conf parsing
we don't need this, and actually prefer just using the
sections in local.conf.

Change-Id: I5908fdf7ad127997bb1f4a6bbb16d0d8cf073ddd
2016-08-14 15:29:25 +03:00
John Griffith 2d57f2f88d Remove lib/cinder_backends/solidfire
This was something we used a while back, but since support
for sections was added to devstack local.conf parsing we
don't need this, and actually prefer just using the
sections in local.conf.

Here's an example of how to achieve the same thing via
local.conf sections:

CINDER_ENABLED_BACKENDS=solidfire
TEMPEST_VOLUME_DRIVER=SolidFireDriver
TEMPEST_VOLUME_VENDOR="SolidFire Inc"
TEMPEST_STORAGE_PROTOCOL=iSCSI

[[post-config|$CINDER_CONF]]
[DEFAULT]
CINDER_ENABLED_BACKENDS=solidfire
[solidfire]
volume_driver=cinder.volume.drivers.solidfire.SolidFireDriver
san_ip=192.168.160.3
san_login=admin
san_password=admin
volume_backend_name=solidfire

Change-Id: I8068fd4fb14510b15c31edf490283454f167f6c6
2016-01-27 14:29:31 -05:00
Yuriy Nesenenko a6bbe031f1 Fix restoring a backup volume to a larger volume
We cannot restore a backup to a larger volume on ceph because it
fails with status "error_restoring". This patch adds read/write
permissions to volumes pool for backup user. We need such permissions
to change volume size during restoring backup when the backup is
smaller than a volume.

Change-Id: I794c1126bcee4e07baf5a9dcfee779fd61da5636
Closes-Bug: 1519749
2015-12-23 16:40:44 +02: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
Jenkins 5734d08174 Merge "Ability to use a remote Ceph cluster" 2015-01-13 18:16:02 +00:00
Sébastien Han 4eb04a5f9e Ability to use a remote Ceph cluster
Sometimes we want to run some benchmarks on virtual machines that will be
backed by a Ceph cluster. The first idea that comes in our mind is to
use devstack to quickly get an OpenStack up and running but what about
the configuration of Devstack with this remote cluster?

Thanks to this commit it's now possible to use an already existing Ceph
cluster. In this case Devstack just needs two things:

* the location of the Ceph config file (by default devstack will look
for /etc/ceph/ceph.conf
* the admin key of the remote ceph cluster (by default devstack will
look for /etc/ceph/ceph.client.admin.keyring)

Devstack will then create the necessary pools, users, keys and will
connect the OpenStack environment as usual. During the unstack phase
every pools, users and keys will be deleted on the remote cluster while
local files and ceph-common package will be removed from the current
Devstack host.

To enable this mode simply add REMOTE_CEPH=True to your localrc file.

Change-Id: I1a4b6fd676d50b6a41a09e7beba9b11f8d1478f7
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2015-01-13 09:49:58 +01: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
Jenkins 7fb5d296a2 Merge "Add NetApp Cinder backend support" 2014-10-28 03:16:25 +00:00
Dean Troyer a08ba1c5e3 Add NetApp Cinder backend support
Supports both iSCSI and NFS, and now both 7mode and cluster mode

Change-Id: If590a7a255268fcce4770c94956607251c36fdf5
2014-10-02 15:51:45 -05:00
Dean Troyer 3324f19f5a Fix docs build errors
Fix shocco errors during docs generation

Closes-Bug: 1362691
Change-Id: I2b7fb008c89f0b4e7280b2d0a054320765e83e47
2014-10-02 15:30:50 -05:00
Thang Pham 3e13d60005 Add VMware vmdk cinder backend
The following patch adds VMware vmdk as a cinder backend.

Change-Id: I9c7fd99c3307278326e81758c0b74fc84428d237
2014-09-09 17:30:54 -04:00
Jenkins 312fafd228 Merge "Support GlusterFS cinder backend" 2014-08-31 08:26:51 +00:00
Jenkins 434982c96d Merge "Additional Cinder backend: solidfire" 2014-08-29 11:20:28 +00:00
Jenkins 40564a2b35 Merge "Adds xiv_ds8k cinder driver support" 2014-08-25 14:42:32 +00:00
Dean Troyer e8a35acd1d Clean up local variable usage - cinder
Change-Id: Iedeafa15def1fa26d4ddcbc5f670129f66e38b9d
2014-08-19 19:12:27 -05:00
Thang Pham eae7c9979a Support GlusterFS cinder backend
Commit 0971833 added support for multiple cinder backend types.
It initially only contains lvm and nfs. The following patch adds
glusterfs to the backends supported.

Change-Id: I9d5c1dfd4e0d05fcbfe3c35172150c57aa4e6eb2
2014-08-14 15:43:55 -04:00
Alon Marx d178cf401e Adds xiv_ds8k cinder driver support
To use xiv_ds8k, set the following in localrc:
CINDER_ENABLED_BACKENDS+=,xiv:<volume-type-name>
XIV_DRIVER_VERSION=<version-string>
SAN_IP=<storage-ip-or-hostname>
SAN_LOGIN=<storage-admin-account>
SAN_PASSWORD=<storage-admin-password>
SAN_CLUSTERNAME=<cluster-name>
CONNECTION_TYPE=<connection-type> iscsi|fc
XIV_CHAP=<chap-type> disabled|enabled

Change-Id: I084ad2b2cb8e34c4a8aed77a52e90f9a9739f1f3
2014-08-11 19:42:29 +03:00
Dean Troyer bcd2ba4b23 Additional Cinder backend: solidfire
Change-Id: I465a77e9862a00885bdccc560404ffcbb26547f8
2014-07-31 10:44:23 -05:00
Sébastien Han 36f2f024db Implement Ceph backend for Glance / Cinder / Nova
The new lib installs a full Ceph cluster. It can be managed
by the service init scripts. Ceph can also be installed in
standalone without any other components.
This implementation adds the auto-configuration for
the following services with Ceph:

* Glance
* Cinder
* Cinder backup
* Nova

To enable Ceph simply add: ENABLED_SERVICES+=,ceph to your localrc.
If you want to play with the Ceph replication, you can use the
CEPH_REPLICAS option and set a replica. This replica will be used for
every pools (Glance, Cinder, Cinder backup and Nova). The size of the
loopback disk used for Ceph can also be managed thanks to the
CEPH_LOOPBACK_DISK_SIZE option.

Going further pools, users and PGs are configurable as well. The
convention is <SERVICE_NAME_IN_CAPITAL>_CEPH_<OPTION> where services are
GLANCE, CINDER, NOVA, CINDER_BAK. Let's take the example of Cinder:

* CINDER_CEPH_POOL
* CINDER_CEPH_USER
* CINDER_CEPH_POOL_PG
* CINDER_CEPH_POOL_PGP

** Only works on Ubuntu Trusty, Fedora 19/20 or later **

Change-Id: Ifec850ba8e1e5263234ef428669150c76cfdb6ad
Implements: blueprint implement-ceph-backend
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2014-07-23 16:13:45 +02: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