Change ramdisk log filename template to avoid a colon, as it confuses tar
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/
The time stamp part of log files are formatted as '%Y-%m-
7b52d13a-
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-
tar (child): Cannot connect to 7b52d13a-
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.
Changed in ironic: | |
assignee: | nobody → Wang KaiFeng (kaifeng) |
Changed in ironic: | |
status: | New → In Progress |
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 |
Reviewed: https:/ /review. openstack. org/481001 /git.openstack. org/cgit/ openstack/ ironic/ commit/ ?id=3b7e6abcbc7 d920c906d867278 30bb12b4b9bc7b
Committed: https:/
Submitter: Jenkins
Branch: master
commit 3b7e6abcbc7d920 c906d86727830bb 12b4b9bc7b
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 log/ironic/ deploy.
/var/
The time stamp part of log filename is formatted as '%Y-%m- %d-%H:% M:%S',
as an example:
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 5de050aa309a320 3de553ae877
Change-Id: I1d60939768ffa7