Regression due to newly-introduced DIB_DEBUG_TRACE

Bug #1854904 reported by Michele Baldessari on 2019-12-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Undecided
Michele Baldessari

Bug Description

We started to see some CI failures since the introduction of the following commit:
commit 824042d6082934964feebed61b42027304cc6b83
Author: Michael Johnson <email address hidden>
Date: Fri Sep 6 15:55:30 2019 -0700

    Add output for mis-configured element scripts

    I commonly get asked for help when people are attempting to create
    local image elements and they cannot get them to work.
    diskimage-builder silently ignores element scripts that it doesn't
    find to it's liking, such as non-executable or files with extensions
    (.sh is a common mistake).
    This patch extends the '-x' tracing flag down to dib-run-parts and
    will cause it to print out helpful messages when these files would
    otherwise be silently ignored.

    Examples:
    Ignoring non-executable files: 10-do-not-run-me
    Ignoring non-conforming filenames: 10-I-can-run.sh

    I am not enabling these by default as they can create extra noise
    and require additional filesystem IO to produce.

    Change-Id: Ic804efca3015c199440b4b10da951d71a815c64f

CI fails here https://e1e508f5dc56ac8f13d2-ba0bbef8fa5bd9d33ddbd8694210833c.ssl.cf2.rackcdn.com/696904/1/check/tripleo-ci-centos-7-undercloud-oooq/e90bdd8/logs/undercloud/home/zuul/undercloud_install.log.txt.gz with the following error:
2019-12-02 16:24:33 | 2019-12-02 16:24:33,403 INFO: INFO: 2019-12-02 16:24:33,402 -- Running hook extra-data
2019-12-02 16:24:33 | 2019-12-02 16:24:33,403 INFO: INFO: 2019-12-02 16:24:33,403 -- ############### Begin stdout/stderr logging ###############
2019-12-02 16:24:33 | 2019-12-02 16:24:33,423 INFO: /usr/lib/python2.7/site-packages/diskimage_builder/lib/dib-run-parts: line 108: DIB_DEBUG_TRACE: unbound variable
2019-12-02 16:24:33 | 2019-12-02 16:24:33,423 INFO: INFO: 2019-12-02 16:24:33,423 -- ############### End stdout/stderr logging ###############
2019-12-02 16:24:33 | 2019-12-02 16:24:33,424 INFO: ERROR: 2019-12-02 16:24:33,423 -- Hook FAILED.
2019-12-02 16:24:33 | 2019-12-02 16:24:33,425 INFO: ERROR: 2019-12-02 16:24:33,424 -- Failed running command ['/usr/lib/python2.7/site-packages/diskimage_builder/lib/dib-run-parts', u'/root/.instack/tmp/instack.NpEvHi/hookHxEHFB/extra-data.d']
2019-12-02 16:24:33 | 2019-12-02 16:24:33,425 INFO: File "/usr/lib/python2.7/site-packages/instack/main.py", line 181, in main
2019-12-02 16:24:33 | 2019-12-02 16:24:33,425 INFO: em.run()
2019-12-02 16:24:33 | 2019-12-02 16:24:33,426 INFO: File "/usr/lib/python2.7/site-packages/instack/runner.py", line 109, in run
2019-12-02 16:24:33 | 2019-12-02 16:24:33,426 INFO: self.run_hook(hook)
2019-12-02 16:24:33 | 2019-12-02 16:24:33,426 INFO: File "/usr/lib/python2.7/site-packages/instack/runner.py", line 212, in run_hook
2019-12-02 16:24:33 | 2019-12-02 16:24:33,427 INFO: raise Exception("Failed running command %s" % command)
2019-12-02 16:24:33 | 2019-12-02 16:24:33,427 INFO: ERROR: 2019-12-02 16:24:33,425 -- None

Fix proposed to branch: master
Review: https://review.opendev.org/697008

Changed in diskimage-builder:
assignee: nobody → Michele Baldessari (michele)
status: New → In Progress

Reviewed: https://review.opendev.org/697008
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=f9dcbd30cc24b30e910eaae95b750627eabbbab3
Submitter: Zuul
Branch: master

commit f9dcbd30cc24b30e910eaae95b750627eabbbab3
Author: Michele Baldessari <email address hidden>
Date: Tue Dec 3 08:23:48 2019 +0100

    Make sure DIB_DEBUG_TRACE has a default value

    After the introduction of 'Add output for mis-configured element
    scripts' we started seeing CI failures in tripleo where
    instack-undercloud is being used (rocky/queens):

      /usr/lib/python2.7/site-packages/diskimage_builder/lib/dib-run-parts: line 108: DIB_DEBUG_TRACE: unbound variable
      INFO: 2019-12-02 16:24:33,423 -- ############### End stdout/stderr logging ###############
      ERROR: 2019-12-02 16:24:33,423 -- Hook FAILED.

    Let's make sure that by default the env variable is set
    to 0.

    Change-Id: I38c76c0edee436f1e7dd0c9a868cea1e6ee3271d
    Closes-Bug: #1854904

Changed in diskimage-builder:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers