Missing get_file files don't cause deploy failures

Bug #1634260 reported by Steve Baker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Thomas Herve

Bug Description

Since the fix for bug 1625783 landed, a get_file call to a file which doesn't exist will now continue the deploy, even though it should have failed with an error.

For a specific example, hear is a chain of file resolutions that currently exists:
- tripleo-heat-templates/environments/docker.yaml ->
- tripleo-heat-templates/docker/compute-post.yaml ->
- tripleo-heat-templates/puppet/manifests/overcloud_compute.pp

overcloud_compute.pp no longer exists, so this should fail. Instead the following is logged and the deployment continues without adding the docker.yaml environment at all:

Processing environment files ['/home/centos/overcloud-env.json', u'tripleo-heat-templates/environments/docker.yaml', u'tripleo-heat-templates/environments/docker-network.yaml']
Processing environment files /home/centos/overcloud-env.json
Processing environment files tripleo-heat-templates/environments/docker.yaml
Redirecting env file /home/centos/dev/tripleo-heat-templates/environments/docker.yaml to /tmp/tripleoclient-pRP81X/tripleo-heat-templates/environments/docker.yaml
Error Could not fetch contents for file:///tmp/tripleoclient-pRP81X/tripleo-heat-templates/puppet/manifests/overcloud_compute.pp processing environment file /tmp/tripleoclient-pRP81X/tripleo-heat-templates/environments/docker.yaml
Rewriting /tmp/tripleoclient-pRP81X/tripleo-heat-templates/environments/docker.yaml environment to /tmp/tripleoclient-pRP81X/tripleo-heat-templates/env-install_docker_agents-Qqyas3.yaml
Processing environment files tripleo-heat-templates/environments/docker-network.yaml
Redirecting env file /home/centos/dev/tripleo-heat-templates/environments/docker-network.yaml to /tmp/tripleoclient-pRP81X/tripleo-heat-templates/environments/docker-network.yaml
Adding files {u'file:///tmp/tripleoclient-pRP81X/tripleo-heat-templates/net-config-bridge.yaml': '{"outputs": {"OS::stack_id": {"description": "The OsNetConfigImpl resource.", "value": {"get_resource": "OsNetConfigImpl"}}}, "heat_template_version": "2015-04-30", "description": "Software Config to drive os-net-config for a simple bridge.\\n", "parameters": {"StorageIpSubnet": {"default": "", "type": "string", "description": "IP address/subnet on the storage network"}, "StorageMgmtIpSubnet": {"default": "", "type": "string", "description": "IP address/subnet on the storage mgmt network"}, "TenantIpSubnet": {"default": "", "type": "string", "description": "IP address/subnet on the tenant network"}, "ManagementIpSubnet": {"default": "", "type": "string", "description": "IP address/subnet on the management network"}, "ControlPlaneIp": {"default": "", "type": "string", "description": "IP address/subnet on the ctlplane network"}, "InternalApiIpSubnet": {"default": "", "type": "string", "description": "IP address/subnet on the internal API network"}, "ExternalIpSubnet": {"default": "", "type": "string", "description": "IP address/subnet on the external network"}}, "resources": {"OsNetConfigImpl": {"type": "OS::Heat::StructuredConfig", "properties": {"group": "os-apply-config", "config": {"os_net_config": {"network_config": [{"use_dhcp": true, "type": "ovs_bridge", "name": {"get_input": "bridge_name"}, "members": [{"type": "interface", "name": {"get_input": "interface_name"}, "primary": true}]}]}}}}}}'} for /tmp/tripleoclient-pRP81X/tripleo-heat-templates/environments/docker-network.yaml

Steven Hardy (shardy)
Changed in tripleo:
status: New → Triaged
importance: Undecided → High
milestone: none → ocata-1
tags: added: newton-backport-potential
Revision history for this message
James Slagle (james-slagle) wrote :

sbaker also pointed out:

"An error in the user's environment files can result in all environments being silently dropped and the overcloud deploying with the defaults - this is not a great user experience."

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

Fix proposed to branch: master
Review: https://review.openstack.org/394471

Changed in tripleo:
assignee: nobody → Thomas Herve (therve)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

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

commit 6e552f643f8c536166e2f7587625820b47b729bb
Author: Thomas Herve <email address hidden>
Date: Mon Nov 7 15:51:48 2016 +0100

    Fix handling of missing environment files

    I560784dc49842113563f617b343702bb045fca76 tried to handle renaming files
    that were jinja templates, but didn't handle writing the new env file
    correctly, so wasn't loading any environment. This tries to fix it.

    Change-Id: I8485ab487a8b3b6f66db769ce00201f29449ccaf
    Closes-Bug: #1634260

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/394630

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

Reviewed: https://review.openstack.org/394630
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=1a832b79eff3fee00cf891fc4c32681039b37801
Submitter: Jenkins
Branch: stable/newton

commit 1a832b79eff3fee00cf891fc4c32681039b37801
Author: Thomas Herve <email address hidden>
Date: Mon Nov 7 15:51:48 2016 +0100

    Fix handling of missing environment files

    I560784dc49842113563f617b343702bb045fca76 tried to handle renaming files
    that were jinja templates, but didn't handle writing the new env file
    correctly, so wasn't loading any environment. This tries to fix it.

    Change-Id: I8485ab487a8b3b6f66db769ce00201f29449ccaf
    Closes-Bug: #1634260
    (cherry picked from commit 6e552f643f8c536166e2f7587625820b47b729bb)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 5.4.0

This issue was fixed in the openstack/python-tripleoclient 5.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 5.5.0

This issue was fixed in the openstack/python-tripleoclient 5.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 5.4.0

This issue was fixed in the openstack/python-tripleoclient 5.4.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.