Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Archive.tar: unpacking is not working as documented #26474

@mostafahussein

Description

@mostafahussein

I cannot extract using archive.tar , however it works correctly using normal shell commands.

salt-call archive.tar Pxvf /path/to/tar/backup_1439997131.tar.gz -ldebug

and i got the same when i did the following:

salt-call archive.tar Pxvf /path/to/tar/backup_1439997131.tar.gz dest=/
Passed invalid arguments: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/cli/caller.py", line 138, in call
    ret['return'] = func(*args, **kwargs)
  File "<string>", line 2, in tar
  File "/usr/lib/python2.6/site-packages/salt/utils/decorators/__init__.py", line 150, in wrapped
    return function(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/salt/modules/archive.py", line 106, in tar
    cmd.extend(sources)
TypeError: 'NoneType' object is not iterable
           Salt: 2015.5.3
         Python: 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
         Jinja2: 2.2.1
       M2Crypto: 0.20.2
 msgpack-python: 0.4.6
   msgpack-pure: Not Installed
       pycrypto: 2.0.1
        libnacl: Not Installed
         PyYAML: 3.10
          ioflo: Not Installed
          PyZMQ: 14.3.1
           RAET: Not Installed
            ZMQ: 3.2.5
           Mako: Not Installed
        Tornado: 2.2.1

Currently , i had to pass sources as an empty list which is not explained at documentation at the unpacking example, maybe it needs to be updated there ?

I have solved it like this

salt-call archive.tar Pxvf /path/to/tar/backup_1439997131.tar.gz sources=[]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Execution-ModuleP3Priority 3PlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions