Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mostafahussein opened this issue Aug 19, 2015 · 3 comments
Closed

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

mostafahussein opened this issue Aug 19, 2015 · 3 comments
Labels
Bug broken, incorrect, or confusing behavior Execution-Module help-wanted Community help is needed to resolve this P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@mostafahussein
Copy link
Contributor

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=[]
@jfindlay jfindlay added Execution-Module Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around help-wanted Community help is needed to resolve this P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps labels Aug 19, 2015
@jfindlay jfindlay added this to the Approved milestone Aug 19, 2015
@jfindlay
Copy link
Contributor

@sh3llsh0ck, thanks for the report.

@mostafahussein mostafahussein changed the title Archive.tar: unpacking is not working correctly Archive.tar: unpacking is not working as documented Aug 19, 2015
@simonbp
Copy link
Contributor

simonbp commented Dec 3, 2015

This is working for me in salt 2015.8.1 (Beryllium)

# salt-call archive.tar Pxvf /path/to/archive.tar
[INFO    ] Executing command ['tar', 'Pxvf', '/path/to/archive.tar'] in directory '/root'
local:
    - file1
    - file2

@jfindlay
Copy link
Contributor

jfindlay commented Dec 3, 2015

@simonbp, thanks for the confirmation.

@jfindlay jfindlay closed this as completed Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Execution-Module help-wanted Community help is needed to resolve this P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

3 participants