Merge "Restore Ceilometer installation"

This commit is contained in:
Zuul 2021-01-19 03:44:47 +00:00 committed by Gerrit Code Review
commit 7906be6818
7 changed files with 108 additions and 46 deletions

View File

@ -56,10 +56,7 @@
- openstack/blazar-nova - openstack/blazar-nova
- openstack/horizon - openstack/horizon
- openstack/barbican - openstack/barbican
# Temporarily remove because of Ubuntu Focal Migration issue - openstack/ceilometer
# https://storyboard.openstack.org/#!/story/2008121
# https://review.opendev.org/#/c/752294/
# - openstack/ceilometer
- openstack/heat - openstack/heat
- openstack/mistral - openstack/mistral
- openstack/mistral-dashboard - openstack/mistral-dashboard
@ -80,21 +77,19 @@
DATABASE_TYPE: mysql DATABASE_TYPE: mysql
KEYSTONE_SERVICE_HOST: "{{ hostvars['controller']['nodepool']['private_ipv4'] }}" KEYSTONE_SERVICE_HOST: "{{ hostvars['controller']['nodepool']['private_ipv4'] }}"
MYSQL_HOST: "{{ hostvars['controller']['nodepool']['private_ipv4'] }}" MYSQL_HOST: "{{ hostvars['controller']['nodepool']['private_ipv4'] }}"
TACKER_HOST: "{{ hostvars['controller-tacker']['nodepool']['private_ipv4'] }}" GNOCCHI_SERVICE_HOST: "{{ hostvars['controller-tacker']['nodepool']['private_ipv4'] }}"
TACKER_MODE: standalone
IS_ZUUL_FT: True
Q_SERVICE_PLUGIN_CLASSES: router,neutron.services.metering.metering_plugin.MeteringPlugin,networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,neutron.services.qos.qos_plugin.QoSPlugin,qos Q_SERVICE_PLUGIN_CLASSES: router,neutron.services.metering.metering_plugin.MeteringPlugin,networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,neutron.services.qos.qos_plugin.QoSPlugin,qos
Q_ML2_PLUGIN_EXT_DRIVERS: port_security,qos Q_ML2_PLUGIN_EXT_DRIVERS: port_security,qos
L2_AGENT_EXTENSIONS: qos L2_AGENT_EXTENSIONS: qos
devstack_local_conf:
post-config:
$NEUTRON_DHCP_CONF:
DEFAULT:
enable_isolated_metadata: True
test_matrix_configs: [neutron] test_matrix_configs: [neutron]
zuul_work_dir: src/opendev.org/openstack/tacker zuul_work_dir: src/opendev.org/openstack/tacker
host-vars: host-vars:
controller: controller:
devstack_local_conf:
post-config:
$NEUTRON_DHCP_CONF:
DEFAULT:
enable_isolated_metadata: True
devstack_plugins: devstack_plugins:
heat: https://opendev.org/openstack/heat heat: https://opendev.org/openstack/heat
networking-sfc: https://opendev.org/openstack/networking-sfc networking-sfc: https://opendev.org/openstack/networking-sfc
@ -149,32 +144,22 @@
c-bak: false c-bak: false
tox_install_siblings: false tox_install_siblings: false
controller-tacker: controller-tacker:
devstack_local_conf: {} devstack_plugins:
ceilometer: https://opendev.org/openstack/ceilometer
tacker: https://opendev.org/openstack/tacker
devstack_services: devstack_services:
q-agt: true q-agt: true
# Ceilometer services
ceilometer-acompute: false
ceilometer-acentral: true
ceilometer-aipmi: false
ceilometer-anotification: true
# Tacker services # Tacker services
tacker: true tacker: true
tacker-conductor: true tacker-conductor: true
devstack_plugins:
# Temporarily remove because of Ubuntu Focal Migration issue
# https://storyboard.openstack.org/#!/story/2008121
# https://review.opendev.org/#/c/752294/
# ceilometer: https://opendev.org/openstack/ceilometer
tacker: https://opendev.org/openstack/tacker
tox_envlist: dsvm-functional tox_envlist: dsvm-functional
group-vars: group-vars:
subnode: compute:
devstack_localrc:
CELLSV2_SETUP: singleconductor
PHYSICAL_NETWORK: mgmtphysnet0
OVS_BRIDGE_MAPPINGS: public:br-ex,mgmtphysnet0:br-infra
Q_DVR_MODE: dvr
DATABASE_TYPE: mysql
KEYSTONE_SERVICE_HOST: "{{ hostvars['controller']['nodepool']['private_ipv4'] }}"
MYSQL_HOST: "{{ hostvars['controller']['nodepool']['private_ipv4'] }}"
TACKER_HOST: "{{ hostvars['controller-tacker']['nodepool']['private_ipv4'] }}"
TACKER_MODE: standalone
IS_ZUUL_FT: True
# Since a VirtualInterfaceCreateException occurs during a test, # Since a VirtualInterfaceCreateException occurs during a test,
# the setting of network-vif-plugged is changed by the reference of # the setting of network-vif-plugged is changed by the reference of
# the following URL. # the following URL.
@ -184,17 +169,40 @@
$NOVA_CONF: $NOVA_CONF:
DEFAULT: DEFAULT:
vif_plugging_is_fatal: False vif_plugging_is_fatal: False
subnode:
devstack_localrc:
CELLSV2_SETUP: singleconductor
PHYSICAL_NETWORK: mgmtphysnet0
OVS_BRIDGE_MAPPINGS: public:br-ex,mgmtphysnet0:br-infra
Q_DVR_MODE: dvr
DATABASE_TYPE: mysql
KEYSTONE_SERVICE_HOST: "{{ hostvars['controller']['nodepool']['private_ipv4'] }}"
MYSQL_HOST: "{{ hostvars['controller']['nodepool']['private_ipv4'] }}"
GNOCCHI_SERVICE_HOST: "{{ hostvars['controller-tacker']['nodepool']['private_ipv4'] }}"
TACKER_HOST: "{{ hostvars['controller-tacker']['nodepool']['private_ipv4'] }}"
TACKER_MODE: standalone
IS_ZUUL_FT: True
# NOTES:
# - Without this ugly inline template, we would have to overwrite devstack_localrc
# as a whole in some way. However keeping up with parent jobs' definitions would
# be too costly. E.g., ADMIN_PASSWORD, NETWORK_GATEWAY, etc. Too many variables.
# - The reason we set CEILOMETER_BACKEND=none for compute nodes is that otherwise
# gnocchi setup would run on every compute nodes (esp. multiple asynchronous calls
# of recreate_database() would be disastrous). Unused api servers would also be
# deployed on each compute node.
CEILOMETER_BACKEND: "{% if 'compute' in group_names %}none{% else %}gnocchi{% endif %}"
Q_SERVICE_PLUGIN_CLASSES: "qos,\
networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,\
neutron.services.metering.metering_plugin.MeteringPlugin,\
neutron.services.qos.qos_plugin.QoSPlugin,\
router"
Q_ML2_PLUGIN_EXT_DRIVERS: port_security,qos
L2_AGENT_EXTENSIONS: qos
devstack_plugins:
ceilometer: https://opendev.org/openstack/ceilometer
devstack_services: devstack_services:
q-agt: true ceilometer-acompute: true
n-api: false # To override the parent job's definitions.
n-api-meta: false
n-cauth: false
n-cond: false
n-cpu: true
n-novnc: false
n-obj: false
n-sch: false
horizon: false
tls-proxy: false tls-proxy: false
- project: - project:

View File

@ -1,5 +1,6 @@
- hosts: all - hosts: all
roles: roles:
- ensure-db-cli-installed
- orchestrate-devstack - orchestrate-devstack
- modify-heat-policy - modify-heat-policy
- setup-default-vim - setup-default-vim

View File

@ -0,0 +1,4 @@
# This module evaluates 'devstack_localrc', which is defined as an entry in
# zuul job.vars and contains jinja2 templates. These default values are to
# avoid its evaluation falure.
external_bridge_mtu: -1

View File

@ -0,0 +1,18 @@
# Currently the plugins which implicitly require db cli to be
# pre-installed when the database is remote (i.e., MYSQL_HOST
# != host-where-it-is-enabled) is only ceilometer. So it'd be
# more accurate to set the outermost 'when' condition like:
#
# when:
# - devstack_plugins['ceilometer'] | default(false)
# - devstack_localrc['DATABASE_TYPE'] is defined
#
# Either is fine so let's dispense with it to keep it simple.
- block:
- name: install mysql client if needed
include_tasks: mysql.yaml
when: devstack_localrc['DATABASE_TYPE'] == 'mysql'
- name: install postgresql client if needed
include_tasks: postgresql.yaml
when: devstack_localrc['DATABASE_TYPE'] == 'postgresql'
when: devstack_localrc['DATABASE_TYPE'] is defined

View File

@ -0,0 +1,23 @@
- name: set db cli package name (mysql-community-client)
set_fact:
db_cli_package_name: mysql-community-client
when: ansible_distribution == 'OracleLinux'
- name: set db cli package name (mariadb-client)
set_fact:
db_cli_package_name: mariadb-client
when:
- ansible_distribution != 'OracleLinux'
- ansible_os_family in ['RedHat', 'Suse']
- name: set db cli package name (mysql-client)
set_fact:
db_cli_package_name: mysql-client
when: ansible_os_family == 'Debian'
- name: fail if db cli package is not resolved
fail:
msg: mysql client to install cannot be determined
when: db_cli_package_name is not defined
- name: install db cli package
become: true
package:
name: "{{ db_cli_package_name }}"
state: present

View File

@ -0,0 +1,13 @@
- name: set db cli package name (postgresql-client)
set_fact:
db_cli_package_name: postgresql-client
when: ansible_os_family in ['Debian', 'RedHat', 'Suse']
- name: fail if postgresql client package is not resolved
fail:
msg: postgresql client to install cannot be determined
when: db_cli_package_name is not defined
- name: install db cli package
become: true
package:
name: "{{ db_cli_package_name }}"
state: present

View File

@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import time import time
import unittest
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
@ -112,15 +111,11 @@ class VnfTestAlarmMonitor(base.BaseTackerTest):
self.addCleanup(self.wait_until_vnf_delete, vnf_id, self.addCleanup(self.wait_until_vnf_delete, vnf_id,
constants.VNF_CIRROS_DELETE_TIMEOUT) constants.VNF_CIRROS_DELETE_TIMEOUT)
# TODO(kden): restore this test once Change #757537 is reverted.
@unittest.skip("Until ceilometer is restored")
def test_vnf_alarm_respawn(self): def test_vnf_alarm_respawn(self):
self._test_vnf_tosca_alarm( self._test_vnf_tosca_alarm(
'sample-tosca-alarm-respawn.yaml', 'sample-tosca-alarm-respawn.yaml',
'alarm and respawn-vnf') 'alarm and respawn-vnf')
# TODO(kden): restore this test once Change #757537 is reverted.
@unittest.skip("Until ceilometer is restored")
def test_vnf_alarm_scale(self): def test_vnf_alarm_scale(self):
self._test_vnf_tosca_alarm( self._test_vnf_tosca_alarm(
'sample-tosca-alarm-scale.yaml', 'sample-tosca-alarm-scale.yaml',