You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Install explicitly specified Scylla version
34
28
block:
35
-
- name: Set Scylla package prefix as OSS
36
-
set_fact:
37
-
scylla_package_prefix: "scylla"
38
-
when: scylla_edition == 'oss'
39
-
40
-
- name: Set Scylla package prefix as Enterprise
41
-
set_fact:
42
-
scylla_package_prefix: "scylla-enterprise"
43
-
when: scylla_edition == 'enterprise'
44
29
45
30
- name: Get versions of {{ scylla_edition }} package
46
31
# 'apt list -a' output has a package version as a second column and an arch as a third one.
@@ -57,7 +42,7 @@
57
42
58
43
- name: "Validate scylla version correctness"
59
44
ansible.builtin.fail:
60
-
msg: "Too many/few choices for a requested version '{{ scylla_version_to_install }}': {{ aptversions.stdout_lines }}. Bailing out!"
45
+
msg: "Too many/few choices for a requested version '{{ scylla_version_to_install }}': {{ aptversions.stdout_lines }}. Fix your Scylla scylla_version or scylla_deb_repos/scylla_repo_keys!"
# strip scylla_version_to_install off the last .XXX only to format 2022.2.0-20230112
71
+
72
+
# scylla:
73
+
# 2022.2.0-0.20230112.4f0f82ff2e1d-1
74
+
# scylla machine image:
75
+
# 2022.2.0-20230112.1239c34-1
76
+
77
+
- name: Get versions of {{ scylla_edition }} machine image package
78
+
# 'apt list -a' output has a package version as a second column and an arch as a third one.
79
+
# Let's filter by the arch first and then cut the version column.
80
+
# Then we will filter out all rows that start with a requested version string followed by a digit to filter out version like 2021.1.11 when 2021.1.1 was requested.
81
+
# And finally, we are going to get rid of duplications.
msg: "Too many/few choices for a requested version '{{ stripped_scylla_machine_image_version_escaped }}': {{ aptversions_machine_image.stdout_lines }}. Fix your Scylla scylla_version or scylla_deb_repos/scylla_repo_keys!"
# if above is not found leverage /opt/scylladb/python3/bin/python3 /opt/scylladb/scylla-machine-image/lib/scylla_cloud_io_setup.py ?
60
+
# or provide our own role runner for pre 2022.2.1 ?
61
+
when: (scylla_raid_setup is defined) and (scylla_raid_setup|length > 0) and (io_cloud_setup.stat.exists) and (io_prop_stat.stat.exists|bool == False)
62
+
# we should maybe add a better way how to detect if this is cloud and run it, otherwise fallback to below (though above should fall back to it too, but it was broken in early 2022.1 and 2022.2.0)
63
+
45
64
- name: check for existing io_properties
46
65
stat:
47
66
path: /etc/scylla.d/io_properties.yaml
@@ -95,23 +114,37 @@
95
114
become: true
96
115
when: skip_ntp is defined and skip_ntp|bool == false
97
116
117
+
- name: check for node_exporter_install
118
+
stat:
119
+
path: /usr/sbin/node_exporter_install
120
+
register: node_exporter_install
121
+
98
122
- name: node exporter setup
99
123
shell: |
100
124
node_exporter_install --force
101
-
when: install_type == 'online'
125
+
when: (install_type == 'online') and (node_exporter_install.stat.exists)
102
126
become: true
103
127
notify:
104
128
- node_exporter start
105
-
ignore_errors: true
106
-
#TODO: stop ignoring errors when the node_exporter_install script fix is available in all actual versions, resp. use only for < 5.0 / 2022
129
+
130
+
- name: check for node_exporter
131
+
stat:
132
+
path: /opt/scylladb/node_exporter/node_exporter
133
+
register: node_exporter
107
134
108
135
- name: node exporter setup from 5.0/2022
109
-
service:
136
+
block:
137
+
- name: Enforce disabling of old node exporter
138
+
service:
139
+
name: node-exporter
140
+
state: stopped
141
+
ignore_errors: true
142
+
- name: Start bundled node exporter
143
+
service:
110
144
name: scylla-node-exporter
111
145
state: started
112
146
become: true
113
-
ignore_errors: true
114
-
#TODO: stop ignoring errors when a version check is added
0 commit comments