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
scylla-node: remove ignore_errors, make node exporter from 2022 work
2022 node exporter now works for clean install and upgrades
fix detection of node-exporter services
make sure the name of node exporter service matches the check
Copy file name to clipboardExpand all lines: ansible-scylla-node/tasks/common.yml
+23-8
Original file line number
Diff line number
Diff line change
@@ -128,23 +128,38 @@
128
128
become: true
129
129
when: skip_ntp is defined and skip_ntp|bool == false
130
130
131
-
- name: node exporter setup
131
+
- name: check for node_exporter_install
132
+
stat:
133
+
path: /usr/sbin/node_exporter_install
134
+
register: node_exporter_install
135
+
136
+
- name: setup legacy node exporter
132
137
shell: |
133
138
node_exporter_install --force
134
-
when: install_type == 'online'
139
+
when: (install_type == 'online') and (node_exporter_install.stat.exists)
135
140
become: true
136
141
notify:
137
142
- node_exporter start
138
-
ignore_errors: true
139
-
#TODO: stop ignoring errors when the node_exporter_install script fix is available in all actual versions, resp. use only for < 5.0 / 2022
140
143
141
-
- name: node exporter setup from 5.0/2022
142
-
service:
144
+
- name: check for node_exporter
145
+
stat:
146
+
path: /opt/scylladb/node_exporter/node_exporter
147
+
register: node_exporter
148
+
149
+
- name: setup bundled node exporter
150
+
block:
151
+
- name: Enforce disabling of old node exporter
152
+
service:
153
+
name: node-exporter
154
+
state: stopped
155
+
when: ansible_facts.services['node-exporter.service'] is defined and (ansible_facts.services['node-exporter.service']["status"] != "not-found")
156
+
- name: Start bundled node exporter
157
+
service:
143
158
name: scylla-node-exporter
144
159
state: started
160
+
when: ansible_facts.services['scylla-node-exporter.service'] is defined and (ansible_facts.services['scylla-node-exporter.service']["status"] != "not-found")
145
161
become: true
146
-
ignore_errors: true
147
-
#TODO: stop ignoring errors when a version check is added
0 commit comments