commit 067b55505df17995538564c765cb6676218466e1
Author: Mark Goddard <email address hidden>
Date: Thu Dec 12 10:09:02 2019 +0000
Fix nova and cinder handlers with no ceph
Stein only
If we deploy nova or cinder without internal or external ceph
configured, and there are no config or container changes, then the
following task may fail:
Thank you to Emanuel Evans (shosti) for determining that ceph_conf is the issue
here. The problem is that if ceph_confs is undefined, then we set ceph_conf to
{{ none }}, however due to the 'magic' of Jinja this evaluates to a string. The
check for none therefore fails, and we look up an attribute 'changed' on a
string.
This change fixes the issue by changing the condition from 'is not none' to 'is
mapping'. We also change the value to an empty string, to make it clear that it
does not end up as None.
Reviewed: https:/ /review. opendev. org/698680 /git.openstack. org/cgit/ openstack/ kolla-ansible/ commit/ ?id=067b55505df 17995538564c765 cb6676218466e1
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit 067b55505df1799 5538564c765cb66 76218466e1
Author: Mark Goddard <email address hidden>
Date: Thu Dec 12 10:09:02 2019 +0000
Fix nova and cinder handlers with no ceph
Stein only
If we deploy nova or cinder without internal or external ceph
configured, and there are no config or container changes, then the
following task may fail:
RUNNING HANDLER [nova : Restart nova-libvirt container]
The error is in evaluating the conditionals:
'str object' has no attribute 'changed'
Thank you to Emanuel Evans (shosti) for determining that ceph_conf is the issue
here. The problem is that if ceph_confs is undefined, then we set ceph_conf to
{{ none }}, however due to the 'magic' of Jinja this evaluates to a string. The
check for none therefore fails, and we look up an attribute 'changed' on a
string.
This change fixes the issue by changing the condition from 'is not none' to 'is
mapping'. We also change the value to an empty string, to make it clear that it
does not end up as None.
Change-Id: I240ecd6b9a4ef0 9ef9cbc3f58c9c0 169c73c5e58
Closes-Bug: #1842913