Comment 9 for bug 1842913

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/stein)

Reviewed: https://review.opendev.org/698680
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=067b55505df17995538564c765cb6676218466e1
Submitter: Zuul
Branch: stable/stein

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:

    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: I240ecd6b9a4ef09ef9cbc3f58c9c0169c73c5e58
    Closes-Bug: #1842913