From 1f5218100e931953649f6279789460a3d073e990 Mon Sep 17 00:00:00 2001 From: Sergii Golovatiuk Date: Tue, 29 Sep 2020 17:17:44 +0200 Subject: [PATCH] Default cinder_volume_node_names to [] There are cases when cinder_volume_node_names is not defined. It was fixed for "set cinder_volume upgrade node facts from the limit option" task in loop but never for non HA task. So, standalone upgrade job fails with the following message. "msg": "The task includes an option with an undefined variable. The error was: 'cinder_volume_node_names' is undefined\n\nThe error appears to be in '/home/zuul/standalone-ansible-YpY5Oe/Standalone/upgrade_tasks_step1.yaml': line 27, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: set cinder_volume upgrade node facts in a single-node environment\n ^ here\n", This patch defaults cinder_volume_node_names to [] when cinder_volume_node_names is not defined in hiera. Closes-Bug: #1897760 Change-Id: I1145c39e379ac6579662f2bbfcc9a4d2d3e0f059 (cherry picked from commit 0f7ed0b8d521ad7e9333482e59894af210d63d03) --- deployment/cinder/cinder-volume-pacemaker-puppet.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/cinder/cinder-volume-pacemaker-puppet.yaml b/deployment/cinder/cinder-volume-pacemaker-puppet.yaml index 9ec7b9774a..277d7142b7 100644 --- a/deployment/cinder/cinder-volume-pacemaker-puppet.yaml +++ b/deployment/cinder/cinder-volume-pacemaker-puppet.yaml @@ -316,7 +316,7 @@ outputs: - name: set cinder_volume upgrade node facts in a single-node environment set_fact: cinder_volume_short_node_names_upgraded: "{{ cinder_volume_short_node_names }}" - cinder_volume_node_names_upgraded: "{{ cinder_volume_node_names }}" + cinder_volume_node_names_upgraded: "{{ cinder_volume_node_names | default([]) }}" cacheable: no when: groups['cinder_volume'] | length <= 1 - name: set cinder_volume upgrade node facts from the limit option