Skip to content

Commit 131ec61

Browse files
authored
Merge pull request #166 from stackhpc/stable/victoria
sync stackhpc/victoria with upstream
2 parents d002751 + 3d8ae1e commit 131ec61

38 files changed

+511
-29
lines changed

ansible/gather-facts.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- name: Group hosts to determine when using --limit
1818
group_by:
1919
key: "all_using_limit_{{ (ansible_play_batch | length) != (groups['all'] | length) }}"
20+
changed_when: false
2021
tags: always
2122

2223
# NOTE(pbourke): This case covers deploying subsets of hosts using --limit. The

ansible/group_vars/all.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ admin_protocol: "{{ 'https' if kolla_enable_tls_internal | bool else 'http' }}"
538538
openstack_release: "victoria"
539539
# Docker image tag used by default.
540540
openstack_tag: "{{ openstack_release ~ openstack_tag_suffix }}"
541-
openstack_tag_suffix: ""
541+
openstack_tag_suffix: "{{ '-centos8s' if 'Stream' in (kolla_centos_release['content'] | default() | b64decode ) else '' }}"
542542
openstack_logging_debug: "False"
543543

544544
openstack_region_name: "RegionOne"
@@ -1074,7 +1074,7 @@ ceph_cinder_user: "cinder"
10741074
ceph_glance_user: "glance"
10751075
ceph_gnocchi_user: "gnocchi"
10761076
ceph_manila_user: "manila"
1077-
ceph_nova_user: "nova"
1077+
ceph_nova_user: "{{ ceph_cinder_user }}"
10781078

10791079
# External Ceph keyrings
10801080
ceph_cinder_keyring: "ceph.client.cinder.keyring"
@@ -1122,6 +1122,7 @@ enable_prometheus_rabbitmq_exporter: "{{ enable_prometheus | bool and enable_rab
11221122

11231123
prometheus_alertmanager_user: "admin"
11241124
prometheus_openstack_exporter_interval: "60s"
1125+
prometheus_openstack_exporter_timeout: "10s"
11251126
prometheus_elasticsearch_exporter_interval: "60s"
11261127
prometheus_cmdline_extras:
11271128
prometheus_ceph_mgr_exporter_endpoints: []

ansible/library/kolla_docker.py

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@
247247
'''
248248

249249

250+
COMPARE_CONFIG_CMD = ['/usr/local/bin/kolla_set_configs', '--check']
251+
252+
250253
def get_docker_client():
251254
return docker.APIClient
252255

@@ -328,7 +331,9 @@ def get_container_info(self):
328331

329332
def compare_container(self):
330333
container = self.check_container()
331-
if not container or self.check_container_differs():
334+
if (not container or
335+
self.check_container_differs() or
336+
self.compare_config()):
332337
self.changed = True
333338
return self.changed
334339

@@ -566,6 +571,43 @@ def compare_healthcheck(self, container_info):
566571
if current_healthcheck:
567572
return True
568573

574+
def compare_config(self):
575+
try:
576+
job = self.dc.exec_create(
577+
self.params['name'],
578+
COMPARE_CONFIG_CMD,
579+
user='root',
580+
)
581+
output = self.dc.exec_start(job)
582+
exec_inspect = self.dc.exec_inspect(job)
583+
except docker.errors.APIError as e:
584+
# NOTE(yoctozepto): If we have a client error, then the container
585+
# cannot be used for config check (e.g., is restarting, or stopped
586+
# in the mean time) - assume config is stale = return True.
587+
# Else, propagate the server error back.
588+
if e.is_client_error():
589+
return True
590+
else:
591+
raise
592+
# Exit codes:
593+
# 0: not changed
594+
# 1: changed
595+
# 137: abrupt exit -> changed
596+
# else: error
597+
if exec_inspect['ExitCode'] == 0:
598+
return False
599+
elif exec_inspect['ExitCode'] == 1:
600+
return True
601+
elif exec_inspect['ExitCode'] == 137:
602+
# NOTE(yoctozepto): This is Docker's command exit due to container
603+
# exit. It means the container is unstable so we are better off
604+
# marking it as requiring a restart due to config update.
605+
return True
606+
else:
607+
raise Exception('Failed to compare container configuration: '
608+
'ExitCode: %s Message: %s' %
609+
(exec_inspect['ExitCode'], output))
610+
569611
def parse_image(self):
570612
full_image = self.params.get('image')
571613

ansible/roles/common/tasks/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@
277277
become: true
278278
when:
279279
- common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host
280+
- enable_rabbitmq | bool
280281
- api_address_family == "ipv6"
281282

282283
- name: Copy rabbitmq erl_intr to kolla toolbox
@@ -288,4 +289,5 @@
288289
become: true
289290
when:
290291
- common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host
292+
- enable_rabbitmq | bool
291293
- api_address_family == "ipv6"

ansible/roles/common/tasks/inspect.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

ansible/roles/common/templates/kolla-toolbox.json.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dest": "/var/lib/rabbitmq/.erlang.cookie",
77
"owner": "rabbitmq",
88
"perm": "0600"
9-
}{% endif %}{% if api_address_family == 'ipv6' %},
9+
}{% if api_address_family == 'ipv6' %},
1010
{
1111
"source": "{{ container_config_directory }}/rabbitmq-env.conf",
1212
"dest": "/etc/rabbitmq/rabbitmq-env.conf",
@@ -18,7 +18,7 @@
1818
"dest": "/etc/rabbitmq/erl_inetrc",
1919
"owner": "rabbitmq",
2020
"perm": "0600"
21-
}{% endif %}
21+
}{% endif %}{% endif %}
2222
],
2323
"permissions": [
2424
{

ansible/roles/haproxy/handlers/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
re_safe_address: "{{ kolla_internal_vip_address | regex_escape }}"
2525
group_by:
2626
key: kolla_ha_is_master_{{ ip_addr_output.stdout is regex('\b' + re_safe_address + '\b') }}
27+
changed_when: false
2728
when:
2829
- kolla_action != "config"
2930
listen:

ansible/roles/haproxy/tasks/precheck.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@
1616
- name: Group hosts by whether they are running keepalived
1717
group_by:
1818
key: "keepalived_running_{{ container_facts['keepalived'] is defined }}"
19+
changed_when: false
1920
when:
2021
- enable_keepalived | bool
2122
- inventory_hostname in groups['haproxy']
2223

2324
- name: Group hosts by whether they are running HAProxy
2425
group_by:
2526
key: "haproxy_running_{{ container_facts['haproxy'] is defined }}"
27+
changed_when: false
2628
when:
2729
- enable_haproxy | bool
2830
- inventory_hostname in groups['haproxy']

ansible/roles/keystone/tasks/bootstrap_service.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- name: Group nodes where keystone_fernet is running
1515
group_by:
1616
key: keystone_fernet_{{ container_facts['keystone_fernet'].State | default('bootstrap') }}
17+
changed_when: false
1718

1819
# NOTE(mgoddard): If we bootstrap Fernet keys on an existing cluster, this
1920
# would overwrite existing keys, and invalidate tokens created from them.

ansible/roles/mariadb/tasks/lookup_cluster.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- name: Divide hosts by their MariaDB volume availability
1111
group_by:
1212
key: mariadb_had_volume_{{ mariadb_volume is not changed }}
13+
changed_when: false
1314

1415
- name: Establish whether the cluster has already existed
1516
set_fact:
@@ -29,6 +30,7 @@
2930
- name: Divide hosts by their MariaDB service port liveness
3031
group_by:
3132
key: mariadb_port_alive_{{ check_mariadb_port_liveness is success }}
33+
changed_when: false
3234

3335
- name: Fail on existing but stopped cluster
3436
fail:
@@ -64,6 +66,7 @@
6466
- name: Divide hosts by their MariaDB service WSREP sync status
6567
group_by:
6668
key: mariadb_sync_status_{{ mariadb_sync_status | default('NA') }}
69+
changed_when: false
6770

6871
- name: Fail when MariaDB services are not synced across the whole cluster
6972
fail:

0 commit comments

Comments
 (0)