46 Commits

Author SHA1 Message Date
Michal Arbet
f6d591917b Fix aodh wsgi config file in Debuntu binary
This patch is fixing file path for WSGIScriptAlias
as debian/ubuntu binary packages installs /usr/bin/aodh-api
as it is in source images also. For details please check
LP bug report.

Closes-Bug: #1953059
Change-Id: I9efe73193bf828b084c2844be73c9813a969c9c7
2021-12-05 20:11:11 +00:00
Michal Arbet
7da770d290 Add missing region_name in keystoneauth sections
Closes-Bug: #1933025

Change-Id: Ib67d715ddfa986a5b70a55fdda39e6d0e3333162
2021-06-22 08:35:35 +02:00
Doug Szumski
647ff667e6 Add variable for changing Apache HTTP timeout
In services which use the Apache HTTP server to service HTTP requests,
there exists a TimeOut directive [1] which defaults to 60 seconds. APIs
which come under heavy load, such as Cinder, can sometimes exceed this
which results in a HTTP 504 Gateway timeout, or similar. However, the
request can still be serviced without error. For example, if Nova calls
the Cinder API to detach a volume, and this operation takes longer
than the shortest of the two timeouts, Nova will emit a stack trace
with a 504 Gateway timeout. At some time later, the request to detach
the volume will succeed. The Nova and Cinder DBs then become
out-of-sync with each other, and frequently DB surgery is required.

Although strictly this category of bugs should be fixed in OpenStack
services, it is not realistic to expect this to happen in the short
term. Therefore, this change makes it easier to set the Apache HTTP
timeout via a new variable.

An example of a related bug is here:

https://bugs.launchpad.net/nova/+bug/1888665

Whilst this timeout can currently be set by overriding the WSGI
config for individual services, this change makes it much easier.

Change-Id: Ie452516655cbd40d63bdad3635fd66693e40ce34
Closes-Bug: #1917648
2021-03-04 11:25:06 +00:00
Zuul
ba933f16e9 Merge "Support TLS encryption of RabbitMQ client-server traffic" 2020-09-29 11:31:03 +00:00
Pierre Riteau
c81772024c Reduce the use of SQLAlchemy connection pooling
When the internal VIP is moved in the event of a failure of the active
controller, OpenStack services can become unresponsive as they try to
talk with MariaDB using connections from the SQLAlchemy pool.

It has been argued that OpenStack doesn't really need to use connection
pooling with MariaDB [1]. This commit reduces the use of connection
pooling via two configuration options:

- max_pool_size is set to 1 to allow only a single connection in the
  pool (it is not possible to disable connection pooling entirely via
  oslo.db, and max_pool_size = 0 means unlimited pool size)
- lower connection_recycle_time from the default of one hour to 10
  seconds, which means the single connection in the pool will be
  recreated regularly

These settings have shown better reactivity of the system in the event
of a failover.

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-April/061808.html

Change-Id: Ib6a62d4428db9b95569314084090472870417f3d
Closes-Bug: #1896635
2020-09-22 17:54:45 +02:00
Mark Goddard
761ea9a333 Support TLS encryption of RabbitMQ client-server traffic
This change adds support for encryption of communication between
OpenStack services and RabbitMQ. Server certificates are supported, but
currently client certificates are not.

The kolla-ansible certificates command has been updated to support
generating certificates for RabbitMQ for development and testing.

RabbitMQ TLS is enabled in the all-in-one source CI jobs, or when
The Zuul 'tls_enabled' variable is true.

Change-Id: I4f1d04150fb2b5af085b762890092f87ae6076b5
Implements: blueprint message-queue-ssl-support
2020-09-17 12:05:44 +01:00
Radosław Piliszek
9c38a0c77b Drop python-path
It was found to be useless in [1].

It is one of distro_python_version usages.

Note Freezer and Horizon still use python_path (and hence
distro_python_version) for different purposes.

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

Change-Id: I6d6d9fdf4c28cb2b686d548955108c994b685bb1
Partially-Implements: blueprint drop-distro-python-version
2020-08-24 07:38:21 +00:00
James Kirsch
19b028e660 Add Keep Alive Timeout for httpd
This patch introduces a global keep alive timeout value for services
that leverage httpd + wsgi to handle http/https requests. The default
value is one minute.

Change-Id: Icf7cb0baf86b428a60a7e9bbed642999711865cd
Partially-Implements: blueprint add-ssl-internal-network
2020-08-13 09:52:40 +00:00
Mark Goddard
0edad7138c Remove default(omit) from openstack_cacert in templates
The use of default(omit) is for module parameters, not templates. We
define a default value for openstack_cacert, so it should never be
undefined anyway.

Change-Id: Idfa73097ca168c76559dc4f3aa8bb30b7113ab28
2020-04-03 14:49:11 +01:00
Mark Goddard
c56d273c93 Python 3: Use distro_python_version for WSGI python_path
Currently the WSGI configuration for binary images uses python2.7
site-packages in some places. This change uses distro_python_version to
select the correct python path.

Change-Id: Id5f3f0ede106498b9264942fa0399d7c7862c122
Partially-Implements: blueprint python-3
2020-01-30 14:08:13 +00:00
James Kirsch
c15dc20341 Configure services to use Certificate Authority
Include a reference to the globally configured Certificate Authority to
all services. Services use the CA to verify HTTPs connections.

Change-Id: I38da931cdd7ff46cce1994763b5c713652b096cc
Partially-Implements: blueprint support-trusted-ca-certificate-file
2020-01-13 11:00:11 -08:00
Michal Nasiadka
3f55b87069 Improve Apache logging
Currently we don't put global Apache error logs into /var/log/kolla,
this change adds statements that redirect those logs there.

Adapted the logfile names to catch into openstack wsgi logging fluentd
input config and existing logrotate cron entries.

Change-Id: I21216e688a1993239e3e81411a4e8b6f13e138c2
2019-12-06 13:11:49 +00:00
Michal Nasiadka
0240763d7d Add proper wsgi loglevel when openstack_logging_debug
Change-Id: I51144d92f34ed51c499a4119c059e6475d02eb46
2019-10-24 09:33:05 +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
chenxing
16d0d4c361 Update python_path for "source" install type
Both ubuntu source and binary install type support python3 now,
python_path should be updated.

Depends-On: https://review.opendev.org/675581
Partially Implements: blueprint python3-support

Change-Id: I4bf721b44220bde2d25d4d985f5ca411699a5a72
2019-09-09 16:06:23 +08:00
Mark Goddard
a103ed7c07 Use service-specific _install_type variables in wsgi scripts
Change-Id: I0c31ad353e1fb764bc8e826cda5c3d092623f44b
2019-03-15 15:22:54 +00:00
chenxing
6722e18465 ubuntu: update configuration Stein UCA
Update wsgi configuration after services migrating to python3.

Change-Id: I25d8db36dabd5f148b2ec96a30381c6a86fa710e
Depends-On: https://review.openstack.org/#/c/625298/
Partially Implements: blueprint python3-support
2019-03-13 21:25:51 +08:00
Jim Rollenhagen
1ebb1ccee2 Allow aodh services to use independent hostnames
This allows aodh service endpoints to use custom hostnames, and adds the
following variables:

* aodh_internal_fqdn
* aodh_external_fqdn

These default to the old values of kolla_internal_fqdn or
kolla_external_fqdn.

This also adds a aodh_api_listen_port option, which defaults to
aodh_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: Iee08b725d066bfbe543d9319c47941d59c22212a
Implements: blueprint service-hostnames
2019-03-06 15:08:28 -05:00
Jim Rollenhagen
2e4e60503a Use keystone_*_url var in all configs
We're duplicating code to build the keystone URLs in nearly every
config, where we've already done it in group_vars. Replace the
redundancy with a variable that does the same thing.

Change-Id: I207d77870e2535c1cdcbc5eaf704f0448ac85a7a
2019-03-06 15:08:26 -05:00
Kien Nguyen
043943117d Use <project>_install_type instead of kolla_install_type
Use <project>_install_type instead of kolla_install_type
to set python_path. For example, general kolla_install_type
is 'binary', but user wants to deploy Horizon from 'source'.
Horizon templates still use python_path=/usr/share/openstack-dashboard,
it is wrong.

Change-Id: Ide6a24e17b1f8ab6506aa5e53f70693706830418
2019-01-04 14:33:46 +07: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
Kien Nguyen
224125bf5e Add Aodh evaluation_interval
Alarm service has been moved to Aodh for a long time [1].
Therefore, we should define evaluation_interval in
aodh.conf rather than ceilometer.conf. The interval value
should be configurable as well because we can use a
custom polling config now [2]

[1] https://review.openstack.org/#/c/200593/
[2] https://review.openstack.org/#/c/572013/

Change-Id: I7adeff2dff5d6d6ae4c621e84857347995e9203a
2018-10-16 08:14:22 +07:00
Kien Nguyen
3cac115595 Remove deprected notification_topics option
notification_topics was deprecated. Now we use
oslo_messaging_notifications.topics option instead [1]

[1] https://docs.openstack.org/oslo.messaging/latest/configuration/opts.html#oslo-messaging-notifications

Change-Id: I9ed3cca6d25d08494e0933a1fb8a9502b07b9775
2018-10-12 10:39:21 +07:00
wu.chunyang
0011124f66 fix aodh warning
the memcache_servers has Deprecated ,and auth_uri is marked
deprecated . and these will cause aodh containers warning
refer to [0]
[0]https://docs.openstack.org/aodh/latest/configuration/aodh-config-file.html

Change-Id: I0c1eed6707fd85ace6b2bdddec600e5adee3a4de
2018-08-02 06:34:48 +00:00
Benjamin Diaz
fbddccd5f1 Revert "Remove keystone_authtoken section for aodh"
This reverts commit f8fd06011aed5cd9028a8c1e206762a78e137df7.

Based on the code, overall uses service_credentials, but looks like a
few parts is using keystonemiddleware.auth_*

Closes-Bug: #1775956

Change-Id: I766a5624737cae892fe77fa8151b20e0972ed5b2
2018-06-26 12:37:13 -03:00
zhulingjie
f8fd06011a Remove keystone_authtoken section for aodh
1. Now, the aodh use [service_credentials] to get credentials[0],
remove the unused [keystone_authtoken]
2. Move memcache stuff into service_credentials section

refer to https://review.openstack.org/#/c/570393/

Change-Id: I08cf3ec4e9ca32cc83d74bd4204e7e170b01feb7
2018-05-29 09:24:34 +00:00
yuqian
bf0f155d13 Make sure aodh/service_credentials wotks with internalURL
Aodh service credential defaults to publicURL.

Aodh should work with the internal interface (v3 API Identity syntax):

.....
[service_credentials]
interface = internal
.....

Change-Id: Ie11290be25291fee1938032ae6294546fb7a98f3
2018-05-06 17:42:12 +08:00
Kevin TIBI
a81a5d5d5d Fix SSL api for multiple services
If SSL is enabled, api of multiple services returns
wrong external URL without https prefix.

Removal of condition for deletion of http  header.

Change-Id: I4264e04d0d6b9a3e11ef7dd7add6c5e166cf9fb4
Closes-Bug: #1749155
Closes-Bug: #1717491
2018-04-18 17:20:27 +02:00
ZhongShengping
3088bf5d0e Use the pbr generated wsgi binary file located in binary folder
Since pbr 1.4.0, wsgi_scripts entrypoing is supported and it will
generated a wsgi compatible binary file. No need to copied it to
/var/www/cgi-bin/aodh folder.

Change-Id: Iacb08fba8a238c3d4ef075aa58d38b439409b2f5
2018-04-10 00:56:50 +00:00
Jeffrey Zhang
f8cb527f78 Security reinforce for apache server
Disable ServerSignature and Hide apache related infromation.

Change-Id: I9188ddb85988539087c922117bb9f53454b7507c
2018-03-14 18:14:26 +08: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
Dai Dang Van
fdfefa9360 Support policy.yaml file for Aodh
This will copy both of yaml or json policy file
if it exists

Change-Id: Ie5e03e0307d239f1079d2522e353367f7f954e77
Implements: blueprint support-custom-policy-yaml
Co-authored-By: Duong Ha-Quang <duonghq@vn.fujitsu.com>
2018-01-05 01:20:20 +00:00
Andrew Smith
fd1d3af0df Add support for hybrid messaging backends
This commit separates the messaging rpc and notify transports in order
to support separate and different oslo.messaging backends

This patch:
* add rpc and notify variables
* update service role conf templates
* add example to globals.yaml
* add release note

Implements: blueprint hybrid-messaging
Change-Id: I34691c2895c8563f1f322f0850ecff98d11b5185
2017-11-22 14:09:40 -05:00
Tatsuma Matsuki
db0f469614 Unified Apache access log format
Apache access log formats are modified to be consistent with
the format defined in wsgi-keystone.conf, which includes
the response time (%D) and X-forwarder-For fields.

Change-Id: I02aa5eb106fb894196dfb6e22daf2968e27ed3cb
Closes-Bug: #1703571
2017-07-26 04:11:54 +00:00
Jeffrey Zhang
f5dd178fc5 Disable trace for all containers running httpd
Trace method is enabled in default for httpd. There is security risk
with trace enabled. So disable it in default. more info please check[0].

[0] https://security.stackexchange.com/a/7711

Change-Id: I4496a6d058d88e1abfb210085f189e7a610e0362
Closes-Bug: #1705160
2017-07-19 10:52:41 +08:00
Bertrand Lallau
372e991bec Standardize Keystone domain variables
As described here:
https://github.com/openstack/keystone/blob/master/keystone/resource/core.py#L841
https://github.com/openstack/keystone/blob/master/keystone/conf/identity.py#L21

* default project domain name MUST be named 'Default'
* default project domain id MUST be named 'default'
* default project user name MUST be named 'Default'
* default project user id MUST be named 'default'

Change-Id: I610a0416647fdea31bb04889364da5395d8c8d74
2017-07-06 14:34:11 +00:00
Bertrand Lallau
afdd11b9a2 Generalize api_interface_address variable usage
Useful api_interface_address variable has been define here:
https://github.com/openstack/kolla-ansible/blob/master/ansible/group_vars/all.yml#L57
In order to simplify codebase we must use it as much as possible.

Change-Id: I18fec19bf69e05a22a4142a9cd1165eccd022455
2017-05-23 08:35:15 +00:00
Jenkins
c3073f216f Merge "Fix aodh upgrade permission issue" 2016-12-24 02:55:17 +00:00
zhubingbing
ebc301c891 Fix aodh upgrade permission issue
Change-Id: I6ba291eb77586d04ae0840363421908d9477945a
Partial-Bug: #1631503
2016-12-18 04:33:42 +00:00
Eduardo Gonzalez
775d8019b6 Add custom policies in service.json
Include custom policy.json files in service-api.json.j2 files

Change-Id: Ic55bfc6f61131aa72c3497ce8b2282056bcc7f92
Partially-Implements: blueprint custom-policies
2016-12-02 16:22:17 +00:00
Jenkins
0f36b78313 Merge "Make number of aodh-api processes configurable" 2016-10-19 16:51:15 +00:00
Christian Berendt
053b90454b Make number of aodh-api processes configurable
TrivialFix

Change-Id: Ifeaf69c9a3c8cf7ee85f831793311a011d778f6e
2016-10-10 14:07:32 +02:00
zhubingbing
6b321051a7 change perm and user wsgi file permission
change perm 0640 to 0600
change gnocchi user to root, because wsgi config should use root user

TrivialFix

Change-Id: I474788d4d402aaf085534ea15b554d9c69fb1e56
2016-09-27 07:10:56 +00:00
Paul Bourke
3b8209c982 Fix up aodh config templates
* The recently merged aodh role is trying to copy api_paste.ini on startup
which is already present at build time.

* memcache_servers was using incorrect for loop syntax

Note, the trim_blocks header is to solve the issue highlighted by
Jeffrey[0]

[0] http://lists.openstack.org/pipermail/openstack-dev/2016-September/103532.html

Change-Id: I8baa5446b3b6271d57d54c4c1663a338d8ab3cc8
Closes-Bug: #1624462
2016-09-16 16:48:02 +01:00
MD NADEEM
cb51a44c9a Replace deprecated rabbitmq parametrs
This patch replace rabbitmq deprecated
paramters with transport_url.

https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_rabbit.py#L112,#L134
https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/transport.py#L46
https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_rabbit.py#L163,L174

Change-Id: Idbac8aefe9b624d4c386283174fd5fd47a1545b2
Closes-Bug: #1620477
2016-09-06 12:32:27 +05:30
zhubingbing
7ce05f9782 Add aodh role
Partially-Implements: blueprint ansible-aodh

Change-Id: I9e20f4bf5e7d8f37f243ae15746e2b7bb49eb20c
2016-08-31 03:54:35 +00:00