339 Commits

Author SHA1 Message Date
Zuul
0486d4ccf3 Merge "init_cinder() shouldn't always create DEFAULT_VOLUME_GROUP_NAME" 2022-01-04 18:50:10 +00:00
Lee Yarwood
fc8ef86fbe Only write out uwsgi configs when deploying API services
Previously this would always happen for Nova and Cinder even if n-api
and c-api were not enabled on the host respectively.

This change stops this by placing both calls write_uwsgi_config behind
is_service_enabled checks.

Change-Id: I997685da771736dbad79bcfe4b00dbc63bd6d6b6
2021-12-03 12:09:08 +00:00
Zuul
a2d4d08b00 Merge "Allow cinder default quotas configuration" 2021-11-04 22:08:00 +00:00
Zuul
5585d84c92 Merge "Support optimized cinder backend for glance" 2021-08-12 18:54:55 +00:00
Brian Rosmaita
f44aa0c55a Allow cinder default quotas configuration
The default cinder quotas for volumes, backups, or snapshots may
be too low for highly concurrent testing, so make these configurable
in devstack.

Change-Id: Ie3cf3239b48f9905f5760ad0166eea954ecf5eed
2021-08-04 18:27:48 -04:00
Zuul
015622115e Merge "Add enforce_scope setting support for Cinder" 2021-07-20 16:42:43 +00:00
Zuul
0e31ce488f Merge "Remove Block Storage API v2 support" 2021-05-20 22:26:26 +00:00
Brian Rosmaita
35cec0d7c0 Remove Block Storage API v2 support
The Block Storage API v2 was deprecated in Pike by change
I913c44799cddc37c3342729ec0ef34068db5b2d4 and is (finally)
being removed in Xena [0].  So remove v2 support from devstack.

[0] https://wiki.openstack.org/wiki/CinderXenaPTGSummary#Removing_the_Block_Storage_API_v2

Depends-on: https://review.opendev.org/c/openstack/devstack/+/792048
Change-Id: I856d78648d28ac4cad0fb212bef1ae6ad32fca90
2021-05-19 08:43:44 -04:00
Zuul
c9abd1d6ba Merge "Drop Bionic support" 2021-05-18 07:54:47 +00:00
Brian Rosmaita
6e9f7c2570 Support optimized cinder backend for glance
When Glance is configured with a cinder glance_store, Cinder can be
configured to allow cloning of image data directly in the backend
instead of transferring data through Glance.  Expose these
configuration options in devstack to facilitate testing this feature.

Adds:
- CINDER_ALLOWED_DIRECT_URL_SCHEMES
- GLANCE_SHOW_DIRECT_URL
- GLANCE_SHOW_MULTIPLE_LOCATIONS

Change-Id: Iee619b443088fd77cf7b1a48563203bdf4a93a39
2021-05-17 19:29:19 -04:00
Zuul
1259b7ecbc Merge "Cinder: only set volume_clear for LVM" 2021-05-12 16:26:21 +00:00
Ghanshyam Mann
7ad4cd07c8 Drop Bionic support
Since victoria cycle, we have moved upstream testing to
Ubuntu Focal (20.04) and so does no Bionic distro in
Xena cycle testing runtime[1]. Grenade jobs also started
running on Focal since victoria was released.

Only thing left was legacy jobs which were not migrated to
Ubuntu Focal in Victoria and as per another community-wide
goal[2], all the lgeacy jobs were suppsoed to be migrated
to zuulv3 native jobs in victoria cycle itself. One of the
pending job was in nova (nova-grenade-multinode) which is also
migrated to zuulv3 native now
- https://review.opendev.org/c/openstack/nova/+/778885

If there is any job running on bionic, we strongly recommend
to migrate it to Ubuntu Focal.

[1] https://governance.openstack.org/tc/reference/runtimes/xena.html
[2] https://governance.openstack.org/tc/goals/selected/victoria/native-zuulv3-jobs.html

Change-Id: I39e38e4a6c2e52dd3822c9fdea354258359a9f53
2021-04-29 09:33:59 -05:00
Lee Yarwood
0386c1cda6 cinder: Default CINDER_ISCSI_HELPER to tgtadm on Bionic
If5c860d1e69aaef9a9236303c370479a7714ad43 attempted to move this default
to lioadm while pinning certain Bionic based jobs to tgtadm.

Unfortunately it missed the legacy dsvm based jobs within various
projects that do not inherit from the devstack-platform-bionic base job
and that are also not covered by devstack's gate.

This change simply forces CINDER_ISCSI_HELPER to tgtadm on Bionic based
hosts to ensure it is always used.

Closes-Bug: #1926411
Change-Id: Ib4b38b45f25575c92fb09b8e97fa1b24af0cc06a
2021-04-28 09:32:39 +01:00
Lee Yarwood
c062792709 cinder: Default CINDER_ISCSI_HELPER to lioadm
As outlined in bug #1917750 the use of tgtadm in multinode environments
with multiple c-vol services can cause volumes to use duplicate WWNs.

This has been shown to cause some encrypted volume test failures as
os-brick returns a /dev/disk/by-id path to n-cpu that can point to the
wrong underlying volume when multiple volumes with the same WWN are
connected to a host.

There is also some speculation that the duplicate WWNs are also causing
libvirt to fail to detach volumes from instances but as yet this has not
been proven.

This change aims to avoid all of the above by switching the default of
CINDER_ISCSI_HELPER to lioadm for all deployments instead of just EL and
SUSE based deployments.

The Bionic platform job however is pinned to tgtadm as there issues
installing python3-rtslib-fb.

Closes-Bug: #1917750
Change-Id: If5c860d1e69aaef9a9236303c370479a7714ad43
2021-04-23 10:53:10 +01:00
Zuul
cd0147194d Merge "Configure Cinder backup driver" 2021-04-08 15:33:49 +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
Ghanshyam Mann
bd0d0fde24 Add enforce_scope setting support for Cinder
Conder started moving to new RBAC and cinder-tempest-plugin
and Tempest need to set few configuration to enable the
scope checks on cinder side and on Temepst side to tell
cinder is all configured with scope checks and test can be run with
scoped token.

Change-Id: Ic7cd919c000c4e7b9a3a06638a5bd87b1617e749
2021-03-06 17:23:39 -06:00
Dan Smith
b4bba2f2c8 Increase volumes quota for service project
If we are backing glance with cinder, we will use more volumes and
if timing is right, we will clash with other tests and be unable
to create what we need. If we are backing glance with cinder, we
should increase the volumes quota, which this patch does (to 50 from
a default of 10).

Closes-Bug: #1914665
Change-Id: I2ad1c4d21f996ee1a9ce29ba4f1a4b8f5720f8fb
2021-02-05 15:36:01 +00:00
Lee Yarwood
fc41717222 cinder: Double [DEFAULT]/rpc_response_timeout to 120
Bug #1873234 documents a number of CI failures caused by RPC requests
from c-api to c-vol timing out due to `lvchange` taking longer than the
default rpc_response_timeout of 60 seconds to complete.

While the underlying reason for the slowness should be investigated by
the cinder team a trivial workaround to the fallout created by these
timeouts is to simply double the client RPC timeout used by c-api,
allowing c-vol to return and overall the request to succeed.

Change-Id: I53dc0ae10af6aa13f1349b58373932eb6a15ab02
Related-Bug: #1873234
2020-12-23 10:58:26 +00:00
Zuul
2ecd182385 Merge "Remove GLANCE_V1_ENABLED option" 2020-07-07 19:16:32 +00:00
Xinliang Liu
b066707d64 Fix targetcli install error on ubuntu focal
No targetcli package on Ubuntu Focal, it should use targetcli-fb also
when "$CINDER_ISCSI_HELPER" == "lioadm".

Although Xenial only has targetcli, but Xenial is dropped from CI. And
starting from bionic, Ubuntu uses targetcli-fb to replace targetcli. So
here we can use is_ubuntu to make ubuntu use targetcli-fb.

Change-Id: I6d35b6651d486e716980dcd9f4d693bed560463a
2020-06-28 09:59:02 +00:00
Brian Rosmaita
ee5cf747d8 Remove GLANCE_V1_ENABLED option
This option sets enable_v1_api in glance-api.conf, a setting that
was removed by change Ia086230cc8c92f7b7dfd5b001923110d5bc55d4d
in July 2018, so remove the devstack option from lib/glance.

It occurs in two other places:

This option is used in lib/cinder to set an option that was removed
from Cinder by change Ice379db9ae83420bacf9e96e242c7515930eae86 in
Queens, so remove the related code.

When this option is False, it is used in lib/tempest to set
[image-feature-enabled]/api_v1 to False in the tempest config file.
However, the default value of ths setting has been False since
change Iab3a209c744375bf2618afc00a3f7731b62f557e in Sept 2018,
so remove the related code.

Change-Id: I4b18a0a388ed7e7a392fabeac613778e0d23dee7
2020-06-27 10:47:53 +02:00
Ian Wienand
312517d510 Use uwsgi binary from path
All these uwsgi invocations assume that the uwsgi binary is in the
same directory as their project binaries are installed into (probably
/usr/bin).  That may not be correct -- for example if using a packaged
uwsgi on Fedora the binary will live in /usr/sbin/uwsgi (not /usr/bin
where the project files from pip are).

Switch invocations to just find it in the path.

Change-Id: I298e3374e9c84e209ffcabbaaacda17f8df19f4f
2020-06-01 15:48:16 +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
Ghanshyam Mann
d331fa7a2d Set cinder's my_ip based on SERVICE_IP_VERSION value
Devstack's lib/cinder set the my_ip on cinder side but it
hard-code it with HOST_IP[1]. It is no issue for IPv4 env
but when you build or run the IPv6 job then this ip is left
to set with IPv6. my_ip should be set to HOST_IP or HOST_IPV6
based on SERVICE_IP_VERSION value.

As part of Train community goal 'Support IPv6-Only Deployments',
we will expand the 'devstack-tempest-ipv6' job to do IPv6-only
deployments verification so we need fix the the my_ip setting.

Closes-Bug: #1838250

Depends-On: https://review.opendev.org/#/c/677524/

[1]6aeaceb0c4/lib/cinder (L231)

Change-Id: I71c74e46467a5d3c1bf9c7d683f364cba7cf9d80
2019-08-21 05:42:08 +00:00
Dirk Mueller
8ab64b3236 Drop signing_dir option from configure_auth_token_middleware
This is no longer being used due to Keystone PKI tokens no longer
being implemented.

In order to not break backward compatibility we create a new function
that is to be used instead and deprecate the old one. Modify the old
function to ignore the 3rd argument and display a deprecation warning.
Adjust callers to no longer create and set that directory, calling the
new function instead.

Change-Id: Id0dec1ba72467cce5cacfcfdb2bc0af2bd3a3610
2019-06-28 16:28:03 +00:00
Brian Rosmaita
87daf8abe6 End support for changing cinder periodic_interval
Support for changing the cinder periodic_interval config option
was added way back in havana as a workaround for bug #1180976
by change I20e52e66fcc94b224476cdd14c88bd6981b4e617.  As the fix
for that bug does not require modifying this config value, and
such modification may have unintentional adverse effects, end
the support.

Change-Id: I1ef1fe564123216b19582262726cdb1078b7650e
Partial-bug: #1824837
2019-04-24 09:41:57 -04:00
whoami-rajat
f28c75f87a Cinder: create target directory for targetcli-fb package
While installing 'targetcli-fb' on bionic, a dependent package
'python-rtslib-fb' requires (but doesn't create) /etc/target
and fails[1] when this directory not found.
This patch creates the required directory.

[1] http://logs.openstack.org/26/641926/1/check/cinder-tempest-dsvm-lvm-lio-barbican/8f95df1/logs/devstacklog.txt.gz#_2019-03-13_03_36_44_623

Related-bug: #1819819
Change-Id: I7efefead873037da4aaacbdc6284458bdaad0f6b
2019-03-14 10:20:37 +00:00
Eric Harney
363acd9d3d Cinder: install targetcli-fb for Bionic
The "targetcli" package no longer exists
in Bionic and has been superseded by
"targetcli-fb".

Change-Id: I99e4e8ad8fbb6e7c86571af8b0c222dafacf6447
2019-03-04 17:50:47 -05:00
Attila Fazekas
bfd2a54c13 Stop creating the cinderv1 endpoint
The cinder v1 api is disabled by default,
the catalog entry is confusing.

Change-Id: Ifea283d8aff9f7a70b68d601c5225c3d4fe250e6
2019-02-08 14:53:37 -05:00
aojeagarcia
61f6cafed7
Switch to lioadm in openSUSE distros
This patch switches the CINDER_ISCSI_HELPER from tgtadm
to lioadm in openSUSE distros, as it increase the performance
and reduce the flakiness on some tests.

Change-Id: Ic3ee9c6baabe20f8f4d14246f6e29808796a5db9
Signed-off-by: aojeagarcia <aojeagarcia@suse.com>
2018-09-24 12:34:15 +02:00
Matt Riedemann
31c7d5c796 cinder: configure backup_swift_url in subnodes
The tempest-multinode-full job is running the c-bak
service on the subnode where swift isn't running, and
because of the "is_enabled_service swift" check, cinder
on the subnode wasn't getting configured to talk to
swift so the c-bak service was down. Since chances are
good that we're running swift, just configure cinder
to always use it.

Change-Id: I86b090967dadeeefc017ff0311beeea9441b6ba6
Closes-Bug: #1783128
2018-07-23 09:25:08 -04:00
Zuul
5da7e4a22e Merge "Fix running with SERVICE_IP_VERSION=6" 2018-07-10 06:10:28 +00:00
Monty Taylor
69057d4655
Register versioned endpoint for block-storage service
cinder does not yet support operations without project_id in the url.
The unversioned endpoint is not a usable endpoint for a user that
requests the block-storage service. Although it would be lovely to have
the block-storage service have the unversioned endpoint in the catalog,
we need to get project-id out of the urls first.

Change-Id: I4246708b6ea31496ba4d565ab422abc76f730ee7
Needed-By: https://review.openstack.org/564494
2018-05-01 05:57:21 -05:00
Huan Xiong
63beab5243 init_cinder() shouldn't always create DEFAULT_VOLUME_GROUP_NAME
DEFAULT_VOLUME_GROUP_NAME volume group is LVM ephemeral storage used by
Nova. It is created by init_nova() if user sets NOVA_BACKEND to "LVM".
However, init_cinder() is also hardcoded to create it, based on the
asumption that CINDER_ENABLED_BACKENDS includes it. That assumption
doesn't hold for the current code. What's more important, even if user
wants to use DEFAULT_VOLUME_GROUP_NAME as one of cinder backends and
adds it to CINDER_ENABLED_BACKENDS, the current code in init_cinder()
are general enough and should work fine. This change removes relevant
code in init_cinder(). It also moves DEFAULT_VOLUME_GROUP_NAME clean-up
code from unstack.sh to cleanup_nova().

Change-Id: I53762f8eda6256f962cc4e1f1098406879bbcf5c
2018-03-23 14:42:37 +00:00
Zuul
a534913572 Merge "Remove default value for Cinder Auth Strategy" 2018-03-13 16:35:13 +00:00
Ivan Kolodyazhny
165199eebd Remove default value for Cinder Auth Strategy
Cinder supports both noauth and keystone auth mode. So now we can
configure this value via local.conf:

[[post-config|$CINDER_CONF]]
[DEFAULT]
auth_strategy = noauth

Change-Id: I1e434362117ab30dae71a8f3a80bc139e78f51bc
2018-03-12 22:26:17 +02:00
Jens Harbott
dc7b429463 Fix running with SERVICE_IP_VERSION=6
- There are some locations where we need the raw IPv6 address instead of the
  url-quoted version enclosed in brackets.
- Make nova-api-metadata service listen on IPv6 when we need that.
- Use SERVICE_HOST instead of HOST_IP for TLS_IP.

Change-Id: Id074be38ee95754e88b7219de7d9beb06f796fad
Partial-Bug: 1656329
2018-03-11 08:53:41 +00:00
Zuul
a6a36d11d8 Merge "Allow overrides for ETCD ports" 2018-03-11 05:43:44 +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
Monty Taylor
22d70554ac
Add /volume to block-storage endpoint
The block-storage endpoint was added to the catalog, but in the suburl
case it was not added with the /volume suburl. This leads to find it and
attempting to use it but not being able to because it's mis-formed.

Needed-By: https://review.openstack.org/545117
Change-Id: I84721c8ae637417e4b01be9e546ff77c250fc149
2018-02-15 16:42:49 -06:00
Zuul
632d87a17c Merge "Create block-storage endpoint for cinder" 2018-01-31 08:27:54 +00:00
Zuul
3d0f7c7af3 Merge "lioadm make sure targetcli is there" 2018-01-01 22:53:25 +00:00
Zuul
924b1149c8 Merge "Remove Cinder policy.json install" 2017-12-13 04:31:01 +00:00
Attila Fazekas
501aaeb4e7 lioadm make sure targetcli is there
Without installing the targetcli package
tools and configs can be missing.

The code was correct baside a typo,
it is `ISCSI` not `ICSI`

Change-Id: I32e5d84d87560458f0eaaf820dcd00c86e6dec8b
2017-12-11 13:20:19 +00:00
lkuchlan
cb8256f225 Add fixed_key parameter under key_manager section in cinder conf
This change is necessary for uploading an encrypted volume to glance.

Change-Id: I0975fc0c49ec243025d076f0406e28c4f5522d3a
2017-12-04 10:58:58 +02:00
Sean McGinnis
1d12784912 Remove Cinder policy.json install
Cinder has now implemented "policy in code" and policy.json is
only needed for overriding default policies. The default policy.json
file has been removed in Cinder so we need to stop trying to copy
it during Cinder setup.

Change-Id: I364e401227fe43e2bacf8a799e10286ee445f835
2017-11-30 14:15:04 -06:00
Davanum Srinivas
27367bea48 Allow overrides for ETCD ports
This will enable us to run one etcd for devstack and another
for kubernetes in the same box if necessary

Change-Id: Ib71ded24727b80afd4d98eb68bade0f8c0f72311
2017-11-30 20:04:05 +00:00
Eric Fried
cda2cb557f Create block-storage endpoint for cinder
block-storage is the official service type for cinder, according to the
service-types-authority.  Add it as a service in devstack, with cinder's
unversioned endpoint, to enable proper discovery.

Change-Id: I75cf7212678f7f270c3c32f0bce227dbbf6b466d
2017-10-10 11:49:06 -05:00
Ian Wienand
1f82f43016 Revert "Remove cache dirs from the services"
This reverts commit ef5ebed6c9ca3d9d47fd2a732a1542555a0f65ba.

The problem here is a backwards-incompatible change to
configure_auth_token_middleware.  Plugins are still passing a
"signing_dir" which is interpreted now as the "section" argument
... this leads to an interesting red-herring issue; because "v" is a
gnu sed command for checking the version, a signing_dir of "/var/..."
(as done in most plugins) gives the weird error:

 sed: -e expression #1, char 32: expected newer version of sed

I think we'll either need a new function, or dummy arguments to get
this back in.

Change-Id: I2098d4eb2747282622cf486fa7dbf216f932f58b
2017-10-04 09:54:43 +11:00