50-heat-config-docker-cmd error for empty config

Bug #1648249 reported by Steve Baker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Heat Templates
Fix Released
Medium
Steve Baker

Bug Description

When there are no docker-cmd configs the following error is raised. The error is harmless but misleading, so empty config should be properly handled.

dib-run-parts Wed Dec 7 23:02:48 UTC 2016 Running /usr/libexec/os-refresh-config/configure.d/50-heat-config-docker-cmd
Traceback (most recent call last):
  File "/usr/libexec/os-refresh-config/configure.d/50-heat-config-docker-cmd", line 144, in <module>
    sys.exit(main(sys.argv))
  File "/usr/libexec/os-refresh-config/configure.d/50-heat-config-docker-cmd", line 59, in main
    cmd_configs = list(build_configs(configs))
UnboundLocalError: local variable 'configs' referenced before assignment

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

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

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

Reviewed: https://review.openstack.org/408347
Committed: https://git.openstack.org/cgit/openstack/heat-templates/commit/?id=d10069ac13897bea8f2e296070081b74cf927e05
Submitter: Jenkins
Branch: master

commit d10069ac13897bea8f2e296070081b74cf927e05
Author: Steve Baker <email address hidden>
Date: Thu Dec 8 12:25:06 2016 +1300

    docker-cmd hook handle empty config file

    Early in a server boot the file /var/run/heat-config/heat-config may
    exist but be empty. This causes a stack trace to be raised in this
    script.

    This change detects a json parse error and exits gracefully.

    Change-Id: I29d731098659bfbf10a2caf80c2cfc49de5df4cc
    Closes-Bug: #1648249

Changed in heat-templates:
status: In Progress → Fix Released
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.