diff --git a/tripleo_common/actions/validations.py b/tripleo_common/actions/validations.py index 017f99de0..d54ef2e20 100644 --- a/tripleo_common/actions/validations.py +++ b/tripleo_common/actions/validations.py @@ -332,15 +332,6 @@ class VerifyProfilesAction(base.TripleOAction): bm_nodes = {node['uuid']: node for node in self.nodes if node['provision_state'] in ('available', 'active')} - if not bm_nodes: - message = ('Error: There are no nodes in an available ' - 'or active state and with maintenance mode off.') - return_value = { - 'errors': [message], - 'warnings': [], - } - return actions.Result(error=return_value) - free_node_caps = {uu: self._node_get_capabilities(node) for uu, node in bm_nodes.items()} diff --git a/workbooks/validations.yaml b/workbooks/validations.yaml index eb3377f05..29742d9d4 100644 --- a/workbooks/validations.yaml +++ b/workbooks/validations.yaml @@ -716,22 +716,6 @@ workflows: errors: <% $.errors + task().result.get('errors', []) %> warnings: <% $.warnings + task().result.get('warnings', []) %> status: FAILED - on-success: verify_profiles - on-error: verify_profiles - - verify_profiles: - workflow: verify_profiles - input: - flavors: <% $.flavors %> - run_validations: <% $.run_validations %> - queue_name: <% $.queue_name %> - publish: - errors: <% $.errors + task().result.get('errors', []) %> - warnings: <% $.warnings + task().result.get('warnings', []) %> - publish-on-error: - errors: <% $.errors + task().result.get('errors', []) %> - warnings: <% $.warnings + task().result.get('warnings', []) %> - status: FAILED on-success: check_default_nodes_count on-error: check_default_nodes_count @@ -754,6 +738,25 @@ workflows: warnings: <% $.warnings + task().result.get('warnings', []) %> statistics: <% task().result.get('statistics') %> status: FAILED + on-success: verify_profiles + # Do not confuse user with info about profiles if the nodes + # count is off in the first place. Skip directly to + # send_message. (bug 1703942) + on-error: send_message + + verify_profiles: + workflow: verify_profiles + input: + flavors: <% $.flavors %> + run_validations: <% $.run_validations %> + queue_name: <% $.queue_name %> + publish: + errors: <% $.errors + task().result.get('errors', []) %> + warnings: <% $.warnings + task().result.get('warnings', []) %> + publish-on-error: + errors: <% $.errors + task().result.get('errors', []) %> + warnings: <% $.warnings + task().result.get('warnings', []) %> + status: FAILED on-success: send_message on-error: send_message