From cea68953a257477198ac262f3f9c8047e4f39498 Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Tue, 6 Feb 2018 12:57:21 +0100 Subject: Verify that requested services have schedulable nodes matching the selectors Signed-off-by: Vadim Rutkovsky --- roles/openshift_prometheus/tasks/install_prometheus.yaml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/openshift_prometheus') diff --git a/roles/openshift_prometheus/tasks/install_prometheus.yaml b/roles/openshift_prometheus/tasks/install_prometheus.yaml index 0b565502f..0d09b0228 100644 --- a/roles/openshift_prometheus/tasks/install_prometheus.yaml +++ b/roles/openshift_prometheus/tasks/install_prometheus.yaml @@ -2,6 +2,13 @@ # set facts - include_tasks: facts.yaml +- name: Ensure that Prometheus has nodes to run on + fail: + msg: |- + No schedulable nodes found matching node selector for Prometheus - '{{ openshift_prometheus_node_selector }}' + when: + - openshift_schedulable_node_labels | lib_utils_oo_has_no_matching_selector(openshift_prometheus_node_selector) + # namespace - name: Add prometheus project oc_project: -- cgit v1.2.1