Bug 1156597

Summary: Pcs should not generate tarballs that "tar" complains about when unpacking
Product: Red Hat Enterprise Linux 7 Reporter: Jan Pokorný [poki] <jpokorny>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED ERRATA QA Contact: michal novacek <mnovacek>
Severity: low Docs Contact:
Priority: low    
Version: 7.1CC: cfeist, cluster-maint, mnovacek, rsteiger, tojeline
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.136-1.el7 Doc Type: Bug Fix
Doc Text:
Cause: User unpacks tarball created by the 'pcs config backup' or 'pcs config import-cman' command. Consequence: Tar prints a warning that version.txt file has implausibly old time stamp. Fix: Set valid time stamp for version.txt file when creating the tarball. Result: No warnings when unpacking the tarball.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 09:20:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed fix none

Description Jan Pokorný [poki] 2014-10-24 17:46:39 UTC
# pcs config import-cman output=foo.tar input=cluster-test01.conf
# tar xf foo.tar.bz2 
> tar: version.txt: implausibly old time stamp 1970-01-01 01:00:00

Comment 2 Tomas Jelinek 2014-10-30 13:57:47 UTC
Created attachment 952139 [details]
proposed fix

Before fix:
[root@rh70-node1:~/devel/pcs/pcs]# ./pcs config import-cman output=import.tar.bz2 input=cluster.conf
[root@rh70-node1:~/devel/pcs/pcs]# tar xf import.tar.bz2
tar: version.txt: implausibly old time stamp 1970-01-01 01:00:00
[root@rh70-node1:~/devel/pcs/pcs]# ./pcs config backup backup.tar.bz2
[root@rh70-node1:~/devel/pcs/pcs]# tar xf backup.tar.bz2
tar: version.txt: implausibly old time stamp 1970-01-01 01:00:00

After fix:
[root@rh70-node1:~/devel/pcs/pcs]# ./pcs config import-cman output=import.tar.bz2 input=cluster.conf
[root@rh70-node1:~/devel/pcs/pcs]# tar xf import.tar.bz2
[root@rh70-node1:~/devel/pcs/pcs]# ./pcs config backup backup.tar.bz2
[root@rh70-node1:~/devel/pcs/pcs]# tar xf backup.tar.bz2

Comment 5 michal novacek 2015-01-16 13:17:49 UTC
I have verified that 'pcs cluster' command now creates tar archives with
correct timestamps with pcs-0.9.137-11.el7.x86_64.

-----

[root@duck-01 ~]# rpm -q pcs 
pcs-0.9.137-11.el7.x86_64

[root@duck-01 ~]# pcs config backup /tmp/backup

[root@duck-01 ~]# file /tmp/backup.tar.bz2 
/tmp/backup.tar.bz2: bzip2 compressed data, block size = 900k

[root@duck-01 ~]# tar tvf /tmp/backup.tar.bz2 
-rw-r--r-- 0/0               1 2015-01-16 14:05 version.txt
drwxr-xr-x root/root         0 2014-10-13 16:59 uidgid.d/
-rw-r--r-- root/root       346 2015-01-15 17:32 corosync.conf
-rw------- hacluster/haclient 7762 2015-01-16 12:18 cib.xml

[root@duck-01 ~]# tar xf /tmp/backup.tar.bz2 

[root@duck-01 ~]# echo $?
0

Comment 7 errata-xmlrpc 2015-03-05 09:20:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0415.html