Skip to content

Commit afd68a8

Browse files
authored
Merge pull request #354 from npawelek/maas-fix-holland
Fix issue preventing Holland from deploying on all supported rpc-o versions
2 parents 904e8d4 + f685fba commit afd68a8

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

playbooks/files/rax-maas/plugins/holland_local_check.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def parse_args():
5555

5656

5757
def print_metrics(name, size):
58-
metric('hollabd_backup_size', 'double', size, 'Megabytes')
58+
metric('holland_backup_size', 'double', size, 'Megabytes')
5959

6060

6161
def container_holland_lb_check(container, binary, backupset):

playbooks/maas-infra-galera.yml

+1-10
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@
4242
when:
4343
- ansible_distribution | lower == 'ubuntu'
4444

45-
- name: Check for holland
46-
stat:
47-
path: "{{ maas_holland_venv_bin }}"
48-
register: holland_check
49-
50-
- name: Set holland enabled fact disabled
51-
set_fact:
52-
holland_check_disabled: "{{ not holland_check.stat.exists }}"
53-
5445
- name: Install holland check
5546
template:
5647
src: "templates/rax-maas/holland_local_check.yaml.j2"
@@ -60,7 +51,7 @@
6051
mode: "0644"
6152
delegate_to: "{{ physical_host | default(ansible_host) }}"
6253
when:
63-
- not holland_check_disabled | bool
54+
- maas_holland_enabled
6455
notify:
6556
- Restart rax-maas
6657

playbooks/templates/rax-maas/holland_local_check.yaml.j2

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{% set label = "holland_local_check" %}
22
{% set check_name = label+'--'+inventory_hostname %}
3+
{% set holland_venv_bin = (maas_holland_venv_enabled | bool | ternary(maas_holland_venv_bin,'/usr/local/bin')) %}
34
type : agent.plugin
45
label : "{{ check_name }}"
56
period : "{{ maas_check_period_override[label] | default(maas_check_period) }}"
67
timeout : "{{ maas_check_timeout_override[label] | default(maas_check_timeout) }}"
78
disabled : "{{ (check_name | match(maas_excluded_checks_regex)) | ternary('true', 'false') }}"
89
details :
910
file : run_plugin_in_venv.sh
10-
args : ["{{ maas_plugin_dir }}holland_local_check.py", "{{ container_name }}", "{{ holland_venv_bin + '/holland' }}"]
11+
args : ["{{ maas_plugin_dir }}/holland_local_check.py", "{{ container_name }}", "{{ holland_venv_bin + '/holland' }}"]
1112
alarms :
1213
holland_backup_status:
1314
label : holland_backup_status--{{ inventory_hostname }}

playbooks/vars/maas-infra.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ elasticsearch_process_names:
1919
filebeat_process_names:
2020
- filebeat
2121

22-
maas_holland_venv_bin: "/openstack/venvs/holland-{{ maas_release }}/bin"
22+
maas_holland_venv_bin: "/openstack/venvs/holland-{{ rpc_release }}/bin"
2323
maas_mysql_connection_warning_threshold: 80
2424
maas_mysql_connection_critical_threshold: 90
2525
maas_mysql_access_denied_errors_rate_warning_threshold: 10

playbooks/vars/main.yml

+12
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,15 @@ maas_rpc_legacy_ceph: false
253253
# to "{{ proxy_env_url }}".
254254
#
255255
# maas_proxy_url: http://username:[email protected]:9000/
256+
257+
#
258+
# maas_holland_enabled: (Optional) Instruct rpc-maas to deploy holland check
259+
#
260+
#
261+
maas_holland_enabled: false
262+
263+
#
264+
# maas_holland_venv_enabled: Instruct rpc-maas that the holland executable is within a venv
265+
# in the galera containers (RPC-O newton and onward).
266+
#
267+
maas_holland_venv_enabled: false

0 commit comments

Comments
 (0)