Comment 2 for bug 1707659

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/489258
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=c20150c572e50e0c41ec3a00f939ddea15b32bf5
Submitter: Jenkins
Branch: master

commit c20150c572e50e0c41ec3a00f939ddea15b32bf5
Author: Michele Baldessari <email address hidden>
Date: Mon Jul 31 17:10:55 2017 +0200

    Skip empty resource_registry sections

    With a test.yaml like the following:
    $ cat test.yaml
    resource_registry:
      # foo

    We fail like this:
    $ openstack overcloud deploy --templates -e test.yaml
    Started Mistral Workflow tripleo.validations.v1.check_pre_deployment_validations. Execution ID: 46214613-ad5c-4075-85f6-745d88928d2a
    Waiting for messages on queue 'f27e1bfa-ad33-404f-847f-4d3b6b8bf335' with no timeout.
    Removing the current plan files
    Uploading new plan files
    Started Mistral Workflow tripleo.plan_management.v1.update_deployment_plan. Execution ID: f4126d36-3566-47c3-8428-a56087ea9d0c
    Plan updated.
    Processing templates in the directory /tmp/tripleoclient-Z0maJF/tripleo-heat-templates
    'NoneType' object has no attribute 'items'
    $ echo $?
    1

    After the fix we get the correct error from mistral and don't need to
    guess any longer:
      u'message': u'Failed to run action [action_ex_id=6bdbb294-964d-4bce-8ae4-9608b09723f6, action_cls=\'<class \'mistral.actions.action_factory.DeployStackAction\'>\', attributes=\'{}\', params=\'{u\'skip_deploy_identifier\': False, u\'container\': u\'overcloud\', u\'timeout\': 240}\']
      ERROR: Environment not in valid format: environment has empty section "resource_registry"', u'status': u'FAILED'}

    While it would have been nice to actually print the erroneous file
    as well, that would require a bigger overhaul, so for the time being
    this fix is the simplest and at least gives us some clues as to what
    is going wrong.

    Change-Id: I2638ab35c6799efa1ac8ccf4bf0dc331f75fae25
    Closes-Bug: #1707659