Ask Your Question

Puppet Agent run on master fails with Error: tar xzf

asked 2016-02-09 16:06:53 -0600

RyboCollier gravatar image

Hello all

I upgraded our puppet master from v2015.2.3 to v2015.3.1 (running on Centos 6.7). The upgrade appears to have gone successfully, I do not see any obvious errors after the upgrade process ran. After the upgrade, I noticed that puppet runs on the master node were failing. When I manually run puppet agent –t on the master, I get the following error output:

Error: tar xzf /opt/puppetlabs/server/data/staging/pe_repo-puppet-agent-1.3.5/puppet-agent-el-6-i386.tar.gz --strip=5 returned 2 instead of one of [0]
Error: /Stage[main]/Pe_repo::Platform::El_6_i386/Pe_repo::El[el-6-i386]/Pe_repo::Repo[el-6-i386 2015.3.1]/Pe_staging::Deploy[puppet-agent-el-6-i386.tar.gz]/Pe_staging::Extract[puppet-agent-el-6-i386.tar.gz]/Exec[extract puppet-agent-el-6-i386.tar.gz]/returns: change from notrun to 0 failed: tar xzf /opt/puppetlabs/server/data/staging/pe_repo-puppet-agent-1.3.5/puppet-agent-el-6-i386.tar.gz --strip=5 returned 2 instead of one of [0]

I am able to get a successful run if I remove the pe_repo::platform::el_6_i386 class from the PE Master Classification Group. I've also copied the .gz file that puppet is having difficulty with to another location and attempted to run the tar xzf command against it. When I do, I get the following output:

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

It seems to me that the .gz file is corrupted. Has anyone ran into this before?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-02-10 00:00:09 -0600

GregLarkin gravatar image

updated 2016-02-10 00:36:27 -0600

I just installed PE 2015.2.3, classified the master with the el_6_i386 repo class and ran the agent successfully. Then I upgraded to PE 2015.3.1, and everything worked fine. The Puppet agent ran successfully on the upgraded installation with no errors.

The question I have is why is your installation trying to extract puppet-agent-1.3.5? That version is included in PE 2015.3.2 (released today), but PE 2015.3.1 contains puppet-agent-1.3.2. The 1.3.5 agent package may still be corrupted, but I'm just confused why it's showing up in your older installation.

For kicks, I guess I'll try upgrading from PE 2015.3.1 to PE 2015.3.2 now to see if the agent .tar.gz is corrupted.

UPDATE: The upgrade to PE 2015.3.2 went fine, and the agent continues to run with no errors. Next thing to look at would be the contents of your /opt/puppetlabs/server/data/staging directory on the master. Mine looks like this:

# ls -la
total 20
drwxr-xr-x  5 root root 4096 Feb 10 06:03 .
drwxr-xr-x 11 root root 4096 Dec 22 01:00 ..
drwxr-xr-x  2 root root 4096 Feb 10 05:46 pe_repo-puppet-agent-1.2.7
drwxr-xr-x  2 root root 4096 Feb 10 05:53 pe_repo-puppet-agent-1.3.2
drwxr-xr-x  2 root root 4096 Feb 10 06:06 pe_repo-puppet-agent-1.3.5

If yours looks similar, run the following command and compare the output to these MD5 checksums:

# find . -type f -print | xargs -n1 md5sum
2af70281db893e905b364dc5806d2ced  ./pe_repo-puppet-agent-1.2.7/puppet-agent-el-6-i386.tar.gz
1a7562f7f834bf98166fba3901861f8d  ./pe_repo-puppet-agent-1.3.5/puppet-agent-el-6-i386.tar.gz
868cec1066cae0bbcd8add4d58f60814  ./pe_repo-puppet-agent-1.3.2/puppet-agent-el-6-i386.tar.gz

Finally, what is the output of the ls -alR command?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-02-09 16:06:53 -0600

Seen: 278 times

Last updated: Feb 10 '16