{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/19928","labels_url":"https://api.github.com/repos/saltstack/salt/issues/19928/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/19928/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/19928/events","html_url":"https://github.com/saltstack/salt/issues/19928","id":55089660,"number":19928,"title":"Regression in archive.extracted with tar_options","user":{"login":"highlyunavailable","id":6266125,"avatar_url":"https://avatars.githubusercontent.com/u/6266125?v=3","gravatar_id":"","url":"https://api.github.com/users/highlyunavailable","html_url":"https://github.com/highlyunavailable","followers_url":"https://api.github.com/users/highlyunavailable/followers","following_url":"https://api.github.com/users/highlyunavailable/following{/other_user}","gists_url":"https://api.github.com/users/highlyunavailable/gists{/gist_id}","starred_url":"https://api.github.com/users/highlyunavailable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highlyunavailable/subscriptions","organizations_url":"https://api.github.com/users/highlyunavailable/orgs","repos_url":"https://api.github.com/users/highlyunavailable/repos","events_url":"https://api.github.com/users/highlyunavailable/events{/privacy}","received_events_url":"https://api.github.com/users/highlyunavailable/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Pending+Discussion","name":"Pending Discussion","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":194,"closed_issues":405,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2015-01-21T23:58:57Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-01-21T22:52:22Z","updated_at":"2015-01-21T23:58:59Z","closed_at":null,"body":"I've got the following state:\r\n\r\n```\r\nEnsure Grafana archive is extracted to the correct directory:\r\n  archive.extracted:\r\n    - name: /var/www/grafana\r\n    - source: salt://service/grafana/files/grafana-1.9.1.tar.gz\r\n    - archive_format: tar\r\n    - tar_options: \"--strip=1\"\r\n    - if_missing: /var/www/grafana/index.html\r\n```\r\n\r\nIt fails to extract with tar_options enabled, with the following errors:\r\n```\r\n[INFO    ] Executing state archive.extracted for /var/www/grafana\r\n[INFO    ] Executing command ['tar', 'x--strip=1', '-f', \"'/var/cache/salt/minion/files/base/_var_www_grafana_index.html.tar'\"] in directory '/var/www/grafana'\r\n[ERROR   ] Command ['tar', 'x--strip=1', '-f', \"'/var/cache/salt/minion/files/base/_var_www_grafana_index.html.tar'\"] failed with return code: 2\r\n```\r\n\r\nVersions:\r\n```\r\n           Salt: 2014.7.1\r\n         Python: 2.7.8 (default, Nov 10 2014, 08:19:18)\r\n         Jinja2: 2.7.3\r\n       M2Crypto: 0.21.1\r\n msgpack-python: 0.4.2\r\n   msgpack-pure: Not Installed\r\n       pycrypto: 2.6.1\r\n        libnacl: Not Installed\r\n         PyYAML: 3.11\r\n          ioflo: Not Installed\r\n          PyZMQ: 14.3.1\r\n           RAET: Not Installed\r\n            ZMQ: 4.0.4\r\n           Mako: Not Installed\r\n```\r\n\r\nIn v2017.7.0, this state (needs the x before strip to work) is what I used:\r\n```\r\nEnsure Grafana archive is extracted to the correct directory:\r\n  archive.extracted:\r\n    - name: /var/www/grafana\r\n    - source: salt://service/grafana/files/grafana-1.9.1.tar.gz\r\n    - archive_format: tar\r\n    - tar_options: \"xz --strip=1\"\r\n    - if_missing: /var/www/grafana/index.html\r\n```\r\n\r\nAnd it gave this output:\r\n```\r\n[INFO    ] Running state [/var/www/grafana] at time 22:51:41.718958\r\n[INFO    ] Executing state archive.extracted for /var/www/grafana\r\n[INFO    ] Executing command \"tar xz --strip=1 -f '/var/cache/salt/minion/files/base/_var_www_grafana_index.html.tar'\" in directory '/var/www/grafana'\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/70946988","html_url":"https://github.com/saltstack/salt/issues/19928#issuecomment-70946988","issue_url":"https://api.github.com/repos/saltstack/salt/issues/19928","id":70946988,"user":{"login":"rallytime","id":6547906,"avatar_url":"https://avatars.githubusercontent.com/u/6547906?v=3","gravatar_id":"","url":"https://api.github.com/users/rallytime","html_url":"https://github.com/rallytime","followers_url":"https://api.github.com/users/rallytime/followers","following_url":"https://api.github.com/users/rallytime/following{/other_user}","gists_url":"https://api.github.com/users/rallytime/gists{/gist_id}","starred_url":"https://api.github.com/users/rallytime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rallytime/subscriptions","organizations_url":"https://api.github.com/users/rallytime/orgs","repos_url":"https://api.github.com/users/rallytime/repos","events_url":"https://api.github.com/users/rallytime/events{/privacy}","received_events_url":"https://api.github.com/users/rallytime/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T23:58:59Z","updated_at":"2015-01-21T23:58:59Z","body":"Thanks for the report @highlyunavailable. We actually had a regression in 2014.7.0 about this, as reported in #18052, so when we fixed it in #18345, we made the function return to its original behavior. The original behavior was to not require an `x`. Does that help explain the behavior you're seeing?"}}