Change ramdisk log filename template to avoid a colon, as it confuses tar

Bug #1702672 reported by Kaifeng Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Kaifeng Wang

Bug Description

ironic collects ramdisk logs from agent, and save it to /var/log/ironic/deploy.

The time stamp part of log files are formatted as '%Y-%m-%d-%H:%M:%S', as an example:

7b52d13a-9372-448d-9252-fffbaf2db942_1fb52a75-04b6-4c73-80c4-8d49dc30f650_2017-07-06-09:03:18.tar.gz

While the shell can handle colon perfectly, it's not handled properly by tar, experiments shows that the file can't be untared due to filename issue, but works after rename to some name without colons.

For CentOS 7.3 and Ubuntu 16.04:

[root@localhost deploy]# tar xzvf 7b52d13a-9372-448d-9252-fffbaf2db942_7feb37f4-202e-444b-a83d-7af2e63a4aed_2017-07-06-09\:08\:16.tar.gz
tar (child): Cannot connect to 7b52d13a-9372-448d-9252-fffbaf2db942_7feb37f4-202e-444b-a83d-7af2e63a4aed_2017-07-06-09: resolve failed

gzip: stdin: unexpected end of file
tar: Child returned status 128
tar: Error is not recoverable: exiting now

As it may cause misunderstandings to administrators, this patch will provide a workaround by changing colon with dash in the time stamp part.

Kaifeng Wang (kaifeng)
Changed in ironic:
assignee: nobody → Wang KaiFeng (kaifeng)
Changed in ironic:
status: New → In Progress
Dmitry Tantsur (divius)
summary: - Change ramdisk log filename template
+ Change ramdisk log filename template to avoid a colon, as it confuses
+ tar
Changed in ironic:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/481001
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=3b7e6abcbc7d920c906d86727830bb12b4b9bc7b
Submitter: Jenkins
Branch: master

commit 3b7e6abcbc7d920c906d86727830bb12b4b9bc7b
Author: wangkf <email address hidden>
Date: Thu Jul 6 19:46:22 2017 +0800

    Change ramdisk log filename template

    ironic collects ramdisk logs from agent, and save it to
    /var/log/ironic/deploy.

    The time stamp part of log filename is formatted as '%Y-%m-%d-%H:%M:%S',
    as an example:

        7b52d13a-9372-448d-9252-fffbaf2db942_1fb52a75-04b6-4c73-80c4-\
        8d49dc30f650_2017-07-06-09:03:18.tar.gz

    The colon is not handled properly by tar, it fails to untar a file
    with colon in file name.

    This patch provides a workaround by changing colon with dash in time
    stamp.

    Closes-Bug: #1702672
    Change-Id: I1d60939768ffa75de050aa309a3203de553ae877

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 9.0.0

This issue was fixed in the openstack/ironic 9.0.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.