Unable to list contents of ...tar.gz

185 views
Skip to first unread message

Steve Skyneo

unread,
Apr 21, 2017, 1:28:45 PM4/21/17
to Salt-users
Hello,

I am working on my activemq formula, but i have problem when unpacking tarball

----------
          ID
: activemq_install_files
   
Function: archive.extracted
       
Name: /opt/apache-activemq-5.14.5
     
Result: False
     
Comment: Unable to list contents of /var/cache/salt/minion/files/dev/_apache-activemq-5.14.5-bin.tar.gz. If this is an XZ-compressed tar archive, install XZ Utils to enable listing its contents. If it is compressed using something other than XZ, it may be necessary to specify CLI options to decompress the archive. See the documentation for details. Additional info follows:


              archive location
:
                 
/var/cache/salt/minion/files/dev/_apache-activemq-5.14.5-bin.tar.gz
     
Started: 19:16:05.953742
   
Duration: 5893.128 ms
     
Changes:


My state looks like:

activemq_install_files:
  archive
.extracted:
   
- name: {{ activemq_env.activemq_root }}/{{ activemq_env.activemq_version }}
   
- source: {{ activemq_env.activemq_tarball_source }}
   
- options: xz
   
- user: {{ activemq_env.activemq_user }}
   
- group: {{ activemq_env.activemq_group }}
   
- if_missing: {{ activemq_env.activemq_root }}/{{ activemq_env.activemq_version }}
   
- enforce_ownership_on: {{ activemq_env.activemq_root }}/{{ activemq_env.activemq_version }}


and pillar:

activemq:
  tarball
:
    source
: salt://activemq/apache-activemq-5.14.5-bin.tar.gz
    name
: apache-activemq-5.14.5-bin


I tried to add list_options:

    - list_options: zcat
   
- options: xz


But still no success.

Couldn't find any other solution.

Only working workaround was to use run.cmd with tar command.

My salt version:

172.16.13.238:
   
Salt Version:
               
Salt: 2016.11.3


   
Dependency Versions:
               cffi
: Not Installed
           cherrypy
: Not Installed
           dateutil
: Not Installed
              gitdb
: Not Installed
          gitpython
: Not Installed
              ioflo
: Not Installed
             
Jinja2: 2.7.2
            libgit2
: Not Installed
            libnacl
: Not Installed
           M2Crypto
: 0.21.1
               
Mako: Not Installed
       msgpack
-pure: Not Installed
     msgpack
-python: 0.4.6
       mysql
-python: Not Installed
          pycparser
: Not Installed
           pycrypto
: 2.6.1
             pygit2
: Not Installed
             
Python: 2.7.5 (default, Sep 14 2016, 08:35:31)
       python
-gnupg: Not Installed
             
PyYAML: 3.11
             
PyZMQ: 15.3.0
               RAET
: Not Installed
              smmap
: Not Installed
            timelib
: Not Installed
           
Tornado: 4.2.1
                ZMQ
: 4.1.4


   
System Versions:
               dist
: oracle 7.2
            machine
: x86_64
            release
: 3.8.13-118.14.1.el7uek.x86_64
             system
: Linux
            version
: Oracle Linux Server 7.2

Sebastien Wains

unread,
May 23, 2017, 8:38:39 AM5/23/17
to Salt-users
I'm facing exactly the same issue, interestingly with the same apache-activemq official package.

If I compare the tar.gz from ActiveMQ to another tar.gz generated from a Linux system, we can see it works on one side while it fails on the other:

Typo3

# file /opt/*.tar.gz
/opt/apache-activemq-5.13.2-bin.tar.gz: gzip compressed data, from FAT filesystem (MS-DOS, OS/2, NT)
/opt/typo3_src-4.5.40.tar.gz:           gzip compressed data, from Unix, last modified: Thu Feb 19 10:23:47 2015
# salt-call archive.list /opt/typo3_src-4.5.40.tar.gz | more
local:
    - typo3_src-4.5.40/
    - typo3_src-4.5.40/ChangeLog
    - typo3_src-4.5.40/GPL.txt
[...]

ActiveMQ

# salt-call archive.list /opt/apache-activemq-5.13.2-bin.tar.gz 
Error running 'archive.list': Unable to list contents of /opt/apache-activemq-5.13.2-bin.tar.gz. If this is an XZ-compressed tar archive, install XZ Utils to enable listing its contents. If it is compressed using something other than XZ, it may be necessary to specify CLI options to decompress the archive. See the documentation for details. Additional info follows:

archive location:
    /opt/apache-activemq-5.13.2-bin.tar.gz


If I uncompress and recompress (tar cpzf activemq.tar.gz /opt/apache-activemq-5.13.2), then it works:

# file /opt/activemq.tar.gz 
/opt/activemq.tar.gz: gzip compressed data, from Unix, last modified: Tue May 23 14:35:45 2017

# salt-call archive.list /opt/activemq.tar.gz 
local:
    - apache-activemq-5.13.2/
    - apache-activemq-5.13.2/LICENSE
    - apache-activemq-5.13.2/NOTICE
    - apache-activemq-5.13.2/README.txt


I'm going to fill a bug report. The workaround would be to untar the official archive and retar and recompress for the time being.

Sebastien Wains

unread,
May 23, 2017, 8:51:07 AM5/23/17
to Salt-users


On Friday, April 21, 2017 at 7:28:45 PM UTC+2, Steve Skyneo wrote:
Reply all
Reply to author
Forward
0 new messages