80 Commits

Author SHA1 Message Date
Mark Goddard
ade5bfa302 Use ansible_facts to reference facts
By default, Ansible injects a variable for every fact, prefixed with
ansible_. This can result in a large number of variables for each host,
which at scale can incur a performance penalty. Ansible provides a
configuration option [0] that can be set to False to prevent this
injection of facts. In this case, facts should be referenced via
ansible_facts.<fact>.

This change updates all references to Ansible facts within Kolla Ansible
from using individual fact variables to using the items in the
ansible_facts dictionary. This allows users to disable fact variable
injection in their Ansible configuration, which may provide some
performance improvement.

This change disables fact variable injection in the ansible
configuration used in CI, to catch any attempts to use the injected
variables.

[0] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#inject-facts-as-vars

Change-Id: I7e9d5c9b8b9164d4aee3abb4e37c8f28d98ff5d1
Partially-Implements: blueprint performance-improvements
2021-06-23 10:38:06 +01:00
Radosław Piliszek
0158221fd2 Drop support for Cinder ZFSSA backend
Following upstream which removed ZFSSA support in Ussuri [1].

[1] https://review.opendev.org/c/openstack/cinder/+/690137

Change-Id: Idb311e18b437fba696759ecb1cf2a6b4803aa5c5
2021-06-21 09:53:01 +00:00
Zuul
a2eb9a6a21 Merge "Use Docker healthchecks for cinder services" 2021-03-26 19:48:32 +00:00
wuchunyang
f332fe8bb5 Remove cinder v2 api
Cinder api v2 support removed in  wallaby.
refer to http://lists.openstack.org/pipermail/openstack-discuss/2020-November/018697.html

Change-Id: I120101d6c30f9169f4c3811357b5ed06496c90ff
2021-03-10 11:24:40 +08:00
wu.chunyang
1e9506a45b Use Docker healthchecks for cinder services
This change enables the use of Docker healthchecks for cinder
services.

Change-Id: I9bef02a66aae2024052078d8354059ab28a71e1e
Implements: blueprint container-health-check
2021-01-09 18:51:06 +08:00
Mark Goddard
11a60a6568 Add support for using a tmpfs for Cinder image conversion
This can improve performance of image format conversion and encryption, if
sufficient memory is available on the cinder-volume host.

Closes-Bug: #1897276

Change-Id: I4ca1c4db7b66fdfc6bb873aad2570234f3882d81
2020-12-16 10:02:48 +00:00
Rafael Weingärtner
f425c0678f Standardize use and construction of endpoint URLs
The goal for this push request is to normalize the construction and use
 of internal, external, and admin URLs. While extending Kolla-ansible
 to enable a more flexible method to manage external URLs, we noticed
 that the same URL was constructed multiple times in different parts
 of the code. This can make it difficult for people that want to work
 with these URLs and create inconsistencies in a large code base with
 time. Therefore, we are proposing here the use of
 "single Kolla-ansible variable" per endpoint URL, which facilitates
 for people that are interested in overriding/extending these URLs.

As an example, we extended Kolla-ansible to facilitate the "override"
of public (external) URLs with the following standard
"<component/serviceName>.<companyBaseUrl>".
Therefore, the "NAT/redirect" in the SSL termination system (HAproxy,
HTTPD or some other) is done via the service name, and not by the port.
This allows operators to easily and automatically create more friendly
 URL names. To develop this feature, we first applied this patch that
 we are sending now to the community. We did that to reduce the surface
  of changes in Kolla-ansible.

Another example is the integration of Kolla-ansible and Consul, which
we also implemented internally, and also requires URLs changes.
Therefore, this PR is essential to reduce code duplicity, and to
facility users/developers to work/customize the services URLs.

Change-Id: I73d483e01476e779a5155b2e18dd5ea25f514e93
Signed-off-by: Rafael Weingärtner <rafael@apache.org>
2020-08-19 07:22:17 +00:00
Mark Goddard
146b00efa7 Mount /etc/timezone based on host OS
Previously we mounted /etc/timezone if the kolla_base_distro is debian
or ubuntu. This would fail prechecks if debian or ubuntu images were
deployed on CentOS. While this is not a supported combination, for
correctness we should fix the condition to reference the host OS rather
than the container OS, since that is where the /etc/timezone file is
located.

Change-Id: Ifc252ae793e6974356fcdca810b373f362d24ba5
Closes-Bug: #1882553
2020-08-10 10:14:18 +01:00
Mark Goddard
55c0787d00 Remove max count from Cinder online schema migration
During an upgrade from Stein to Train, Kolla Ansible fails while running
TASK [cinder : Running Cinder online schema migration]

This is because the `--max_count 10` option is used, which returns 1
while migrations are processed. According to the upgrade documentation,
the command should be rerun while the exit status is 1:
https://docs.openstack.org/cinder/train/upgrade.html

This issue was introduced by a change to the image [1] which fixed a bug
in the way that the max count was interpreted, but exposed an issue in
using the max count.

This change fixes the issue by ceasing to pass MAX_NUMBER, which will
cause all migrations to occur in a single pass.

[1] https://review.opendev.org/#/c/712055

Change-Id: Ia786d037f5484f18294188639c956d4ed5ffbc2a
Closes-Bug: #1880753
2020-06-15 16:41:04 +00:00
Zuul
fb00819e86 Merge "Add support for encrypting cinder api." 2020-04-17 10:45:00 +00:00
zhangmeng
c8ada70747 Add support for encrypting cinder api.
Change-Id: I4673f436d8943e6fce7e579446c27ec8215b7346
2020-04-16 18:17:46 +08:00
Dincer Celik
4b5df0d866 Introduce /etc/timezone to Debian/Ubuntu containers
Some services look for /etc/timezone on Debian/Ubuntu, so we should
introduce it to the containers.

In addition, added prechecks for /etc/localtime and /etc/timezone.

Closes-Bug: #1821592
Change-Id: I9fef14643d1bcc7eee9547eb87fa1fb436d8a6b3
2020-04-09 18:53:36 +00:00
Radosław Piliszek
eff22e7c56 Fix Cinder Backup access to kernel modules (iscsi_tcp issue)
It looks like the only missing part was the actual mount of
/lib/modules

Now Cinder Backup volumes differ from Cinder Volume volumes only
by /etc/target which is not relevant (Cinder Backup does not
provide a target).

Change-Id: Iccf4298c4f9306eb0a95b6712815778555ef44fc
Closes-bug: #1863094
2020-02-14 08:54:30 +01:00
Michal Nasiadka
4e6fe7a6da Remove kolla-ceph
Kolla-Ansible Ceph deployment mechanism has been deprecated in Train [1].

This change removes the Ansible code and associated CI jobs.

[1]: https://review.opendev.org/669214

Change-Id: Ie2167f02ad2f525d3b0f553e2c047516acf55bc2
2020-02-11 11:42:06 +01:00
Mark Goddard
5a786436be Python 3: Use distro_python_version for dev mode
In dev mode currently the python source is mounted under python2.7
site-packages. This change fixes this to use the distro_python_version
variable to ensure dev mode works with Python 3 images.

Change-Id: Ieae3778a02f1b79023b4f1c20eff27b37f481077
Partially-Implements: blueprint python-3
2020-01-30 14:00:34 +00:00
Mark Goddard
9755c924be CentOS 8: Support variable image tag suffix
For the CentOS 7 to 8 transition, we will have a period where both
CentOS 7 and 8 images are available. We differentiate these images via a
tag - the CentOS 8 images will have a tag of train-centos8 (or
master-centos8 temporarily).

To achieve this, and maintain backwards compatibility for the
openstack_release variable, we introduce a new 'openstack_tag' variable.
This variable is based on openstack_release, but has a suffix of
'openstack_tag_suffix', which is empty except on CentOS 8 where it has a
value of '-centos8'.

Change-Id: I12ce4661afb3c255136cdc1aabe7cbd25560d625
Partially-Implements: blueprint centos-rhel-8
2020-01-10 09:56:04 +00:00
Michal Nasiadka
6a8cfbb933 External Ceph: template cinder backend config when cinder_backend_ceph
Currently External Ceph Cinder config requires the user to create cinder
service custom configuration.

This change alters the if/else statements to template out cinder backends
configuration when cinder_backend_ceph is True.

Change-Id: I143c3b44d2839e56d1dbf28484c0eaae0a753dc9
2019-12-16 14:08:04 +01:00
yuchengde
44a302d7d2 Allow nova to delete volume with cinder auth
If "reclaim_instance_interval" has been set in nova conf,
attched volume may not be delete while instacne deleted.
Adding cinder auth in nova conf can solve the problem.

Change-Id: I9eb3a74c2f6976043cc35a94915f1fcecb9ef601
Closes-Bug:  1850279
2019-11-01 14:48:37 +00:00
Radosław Piliszek
bc053c09c1 Implement IPv6 support in the control plane
Introduce kolla_address filter.
Introduce put_address_in_context filter.

Add AF config to vars.

Address contexts:
- raw (default): <ADDR>
- memcache: inet6:[<ADDR>]
- url: [<ADDR>]

Other changes:

globals.yml - mention just IP in comment

prechecks/port_checks (api_intf) - kolla_address handles validation

3x interface conditional (swift configs: replication/storage)

2x interface variable definition with hostname
(haproxy listens; api intf)

1x interface variable definition with hostname with bifrost exclusion
(baremetal pre-install /etc/hosts; api intf)

neutron's ml2 'overlay_ip_version' set to 6 for IPv6 on tunnel network

basic multinode source CI job for IPv6

prechecks for rabbitmq and qdrouterd use proper NSS database now

MariaDB Galera Cluster WSREP SST mariabackup workaround
(socat and IPv6)

Ceph naming workaround in CI
TODO: probably needs documenting

RabbitMQ IPv6-only proto_dist

Ceph ms switch to IPv6 mode

Remove neutron-server ml2_type_vxlan/vxlan_group setting
as it is not used (let's avoid any confusion)
and could break setups without proper multicast routing
if it started working (also IPv4-only)

haproxy upgrade checks for slaves based on ipv6 addresses

TODO:

ovs-dpdk grabs ipv4 network address (w/ prefix len / submask)
not supported, invalid by default because neutron_external has no address
No idea whether ovs-dpdk works at all atm.

ml2 for xenapi
Xen is not supported too well.
This would require working with XenAPI facts.

rp_filter setting
This would require meddling with ip6tables (there is no sysctl param).
By default nothing is dropped.
Unlikely we really need it.

ironic dnsmasq is configured IPv4-only
dnsmasq needs DHCPv6 options and testing in vivo.

KNOWN ISSUES (beyond us):

One cannot use IPv6 address to reference the image for docker like we
currently do, see: https://github.com/moby/moby/issues/39033
(docker_registry; docker API 400 - invalid reference format)
workaround: use hostname/FQDN

RabbitMQ may fail to bind to IPv6 if hostname resolves also to IPv4.
This is due to old RabbitMQ versions available in images.
IPv4 is preferred by default and may fail in the IPv6-only scenario.
This should be no problem in real life as IPv6-only is indeed IPv6-only.
Also, when new RabbitMQ (3.7.16/3.8+) makes it into images, this will
no longer be relevant as we supply all the necessary config.
See: https://github.com/rabbitmq/rabbitmq-server/pull/1982

For reliable runs, at least Ansible 2.8 is required (2.8.5 confirmed
to work well). Older Ansible versions are known to miss IPv6 addresses
in interface facts. This may affect redeploys, reconfigures and
upgrades which run after VIP address is assigned.
See: https://github.com/ansible/ansible/issues/63227

Bifrost Train does not support IPv6 deployments.
See: https://storyboard.openstack.org/#!/story/2006689

Change-Id: Ia34e6916ea4f99e9522cd2ddde03a0a4776f7e2c
Implements: blueprint ipv6-control-plane
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-10-16 10:24:35 +02:00
Michal Nasiadka
bdc8df0c90 Change ceph_client caps to use profile rbd
Using profiles in cephx is the recommended way since Mimic,
this also adds support for blacklist ops.

Change-Id: Ib9f65644637a5761c6cd7ca8925afc6bb2b8d5f5
Closes-Bug: #1760065
2019-10-09 14:18:17 +02:00
Mark Goddard
3522d235bd Refactor service, endpoint and user registration
Use upstream Ansible modules for registration of services, endpoints,
users, projects, roles, and role grants.

Change-Id: I7c9138d422cc91c177fd8992347176bb54156b5a
2019-09-17 10:13:56 -07:00
chenxing
b7ca065edf Remove `hnas_iscsi` from the supported storage backends list of Cinder
The Hitachi NAS Platform iSCSI driver was marked as not supported by
Cinder in the Ocata realease[1].

[1] https://review.opendev.org/#/c/444287/

Change-Id: I1a25789374fddaefc57bc59badec06f91ee6a52a
Closes-Bug: #1832821
2019-06-24 09:04:14 +00:00
binhong.hua
12ff28a693 Make kolla-ansible support extra volumes
When integrating 3rd party component into openstack with kolla-ansible,
maybe have to mount some extra volumes to container.

Change-Id: I69108209320edad4c4ffa37dabadff62d7340939
Implements: blueprint support-extra-volumes
2019-05-17 11:55:04 +08:00
Zuul
3a173ac1b7 Merge "Allow cinder services to use independent hostnames" 2019-03-07 12:44:48 +00:00
Zuul
4dbbc0e7e0 Merge "Added ability to skip enabled backends pre-check" 2019-03-07 10:33:46 +00:00
Arkadiy Shinkarev
1d9f4f9ff1 Added ability to skip enabled backends pre-check
When using custom storage backends with cinder.conf overrides file,
precheck stage in kolla-ansible is fail. This commit adds option
'skip_cinder_backend_check' (default: False) to cinder role.

Change-Id: Ifee138ad8b281903ea2365441aada044c80c46f0
2019-03-07 10:27:41 +03:00
Jim Rollenhagen
45bde4b9b3 Allow cinder services to use independent hostnames
This allows cinder service endpoints to use custom hostnames, and adds the
following variables:

* cinder_internal_fqdn
* cinder_external_fqdn

These default to the old values of kolla_internal_fqdn or
kolla_external_fqdn.

This also adds a cinder_api_listen_port option, which defaults to
cinder_api_port for backward compatibility.

This option allow the user to differentiate between the port the
service listens on, and the port the service is reachable on. This is
useful for external load balancers which live on the same host as the
service itself.

Change-Id: I2a5036456afac6135dca3723ae754ea9f8bc8475
Implements: blueprint service-hostnames
2019-03-06 15:08:28 -05:00
Mark Goddard
1c22da32ff Use new cinder target_helper option
The iscsi_helper option was deprecated in favour of target_helper in
Queens, and will be removed in the Stein release.

This also renames the cinder_iscsi_helper variable to
cinder_target_helper, deprecating but still supporting the former name
until the Train release.

Change-Id: Ie38c09b2dd8598f62b0733c8444eec5f6ce3daac
2019-03-01 14:36:25 +00:00
wu.chunyang
4939fc28d2 remove cinder v1 endpoint
now,cinder does not support v1 endpoint,so no need to create it in
keystone

Change-Id: I4b3bbf24c19a996e73f4b360beeb20a110907a6d
2018-12-24 14:39:43 +00:00
Zuul
acda7ba592 Merge "Configure vitrage notification topic" 2018-12-20 03:26:54 +00:00
Patrick O'Neill
f77cc87e81 Add support for Quobyte backend to Cinder and Nova
Add an enable_cinder_backend_quobyte option to etc/kolla/globals.yml to
enable use the Quobyte Cinder backend.
Change the bind mounts for /var/lib/nova/mnt to include the shared
propogation if Quobyte is enabled.
Update the documentation to include a section on configuring the Cinder.

Implements: blueprint cinder-quobyte-backend

Change-Id: I364939407ad244fe81cea40f880effdbcaa8a20d
2018-12-17 11:58:56 +00:00
Kien Nguyen
838cffd9c9 Configure vitrage notification topic
According [1], vitrage notification has to be configured in Nova,
Neutron, Cinder & Aodh config file.

[1] https://review.openstack.org/#/c/302802/

Change-Id: Iaf8cd7d40e6eb988adf4d208e6ad784f1004caa5
2018-12-17 08:10:39 +07:00
Adam Harwell
f1c8136556 Refactor haproxy config (split by service) V2.0
Having all services in one giant haproxy file makes altering
configuration for a service both painful and dangerous. Each service
should be configured with a simple set of variables and rendered with a
single unified template.

Available are two new templates:

* haproxy_single_service_listen.cfg.j2: close to the original style, but
only one service per file
* haproxy_single_service_split.cfg.j2: using the newer haproxy syntax
for separated frontend and backend

For now the default will be the single listen block, for ease of
transition.

Change-Id: I6e237438fbc0aa3c89a3c8bd706a53b74e71904b
2018-09-26 03:30:38 -07:00
MinSun
12f4554330 Support checkout dedicated version from git with dev mode
Now kolla dev mode only support clone master branch from git,
add version tag to support clone dedicated branch.

Change-Id: I88de238e5dc7461ba0662a3ecea9a2d80fd0db60
2018-08-14 16:06:00 +08:00
Zuul
e9b089d2cd Merge "Save targetcli configuration to a volume for container upgrades" 2018-08-13 07:09:28 +00:00
Will Miller
33598f5821 Extract cinder_iscsi_helper default from role
The variable `cinder_iscsi_helper` is used not only in the `cinder` role,
but also in the `iscsi` role. It needs to have a default accessible for
both roles.

Change-Id: I33d7f2c7b5597a541a0d104c76520ac4a1cd5026
Closes-Bug: #1785066
2018-08-02 14:32:17 +00:00
Lakshmi Prasanna Goutham Pratapa
76210a2d85 Apply Resource Constraints to Openstack Services
This commit is to apply resource-constraints only to few OpenStack services.
Commit to apply constraints to other services will be made in coming commits.

Partially-Implements: blueprint resource-constraints

Change-Id: Icafa54baca24d2de64238222a5677b9d8b90e2aa
2018-07-25 17:05:04 +01:00
Vladislav Belogrudov
acaebf83ce Save targetcli configuration to a volume for container upgrades
When using lioadm / targetcli to serve LVM volumes to instances
the former saves target configuration under /etc/target.
If cinder_volume container is upgraded / replaced then all targets
are gone and instances cannot connect to their volumes any longer.

This fix introduces target_config volume where corresponding
information is persisted.

Change-Id: I919bbe00853266037dd5c015810cc13c25e2e033
Closes-Bug: #1783569
2018-07-25 17:50:38 +03:00
Jeffrey Zhang
3397668d10 Migrate ceph keyring creation to kolla_ceph_keyring module
In this way, keyring caps is updatable.

Change-Id: Idf7f222645b5073e2c72d59eecf3d47b3f1dc6ba
2018-07-02 09:49:48 +08:00
caoyuan
c8bb9bcc2b dev mode: Add support for cinder
Provide support for kolla dev mode in cinder. When
'kolla_dev_mode' or 'cinder_dev_mode' variables are
enabled, source code of cinder project is cloned
and bind mounted.

Partially implements: blueprint mount-sources

Change-Id: I9ccd395d076f9cc1ad4b51af9d22ba8b17fac1bc
2018-06-15 00:08:33 +00:00
Zuul
b28c3efec7 Merge "Apply Cinder rolling upgrade" 2018-02-09 03:11:26 +00:00
Duong Ha-Quang
99a199f2af Apply Cinder rolling upgrade
Apply Cinder database migration procedure:

[1] https://docs.openstack.org/cinder/pike/upgrade.html

Depends-On: I9a847b0a916a85d8f2622e93734330da5122f0d8
Change-Id: I934c38cb5366f0b3a65115b4cdd19878efec7ebc
2018-01-30 08:16:58 +00:00
Alexandru Bogdan Pica
8e3b79440c Implement external MariaDB and pre-configured Databases support
This change allows the following use cases:

1. Using an already-configured MariaDB / MySQL server / Cluster
2. Using already-created DB users, without requiring root DB access.

Update: added external mariadb precheck

Change-Id: I78b0d178306d7c5293b0bf53e445f19f18b4b824
Implements: blueprint external-mariadb-support.
Closes-Bug: #1603121
2018-01-23 13:07:40 +00:00
caoyuan
b63ecd7e3e Update kolla_internal_fqdn to database_address since it defined in all.yml
through the database_address has beed defined in groups_vars/all.yml, we should
better use it, this way, if we want to use external database, we just need to
redefined in all.yml

refer to https://github.com/openstack/kolla-ansible/blob/master/ansible/group_vars/all.yml#L83
Co-Authored-By: chenqiaomin <chen.qiaomin@99cloud.net>

Change-Id: Ie559301451954e16347ceaabf02f594c5c5cbe56
2018-01-17 13:01:48 +08:00
Vladislav Belogrudov
4829ed2c87 Move Cinder backend passwords to passwords.yml
Move Hitachi NAS and Oracle ZFSSA passwords
to /etc/kolla/passwords.yml

Change-Id: I1c94c45701fda5430b5d5a88c719db13d1956b11
Closes-Bug: #1733565
2017-12-06 15:29:28 +03:00
Jenkins
70bb073bd3 Merge "Allow Cinder to use ZFSSA iSCSI volume service" 2017-09-26 07:16:58 +00:00
caoyuan
8fed5e2e62 Make the pg and pgp value configurable
Change-Id: I99cca8c3830077736f71a7ab1abd3818688f9bb1
2017-09-22 03:21:52 +00:00
Vladislav Belogrudov
73225d285c Allow Cinder to use ZFSSA iSCSI volume service
Added configuration to enable Oracle ZFS Storage Appliance:
https://docs.openstack.org/cinder/pike/configuration/block-storage/drivers/zfssa-iscsi-driver.html

Change-Id: Id5807f0d4567e16a68283cace7e126eddc4dea20
Implements: blueprint zfssa-cinder-support
2017-09-21 15:34:26 +00:00
Pavel Glushchak
0f70b3883d Make cinder-backup service optional
Introduced new option enable_cinder_backup, that controls
whether to deploy cinder-backup service.

Change-Id: Ibb0ca0a478748d4caba4df434456ead0df95ffca
Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
2017-07-25 11:04:39 +03:00
shaofeng_cheng
f12a4a6dad Add VMware DataStore support to cinder
Add VMware VMDK driver supports to cinder service.
The VMware driver for OpenStack Block Storage is recommended and
should be used for managing volumes based on vSphere data stores.
see
https://docs.openstack.org/ocata/config-reference/compute/hypervisor-vmware.html
https://docs.openstack.org/ocata/config-reference/block-storage/drivers/vmware-vmdk-driver.html#block-storage-vmdk-driver

Partially-implements: blueprint kolla-ansible-support-vsphere

Change-Id: Ic3eb7ae34c1e8584945b3d97f8b427ee67ea8fba
2017-07-13 09:44:12 +08:00