states.archive doesn't support gzip, whereas modules.archive does #67243
Replies: 10 comments
-
@froztbyte, I have been equally annoyed at this divergence and it is on my list of things to fix, although I would gratefully support anyone else fixing it. Generally states should consist of higher level code that use execution modules to do the lower level work. Thanks for the report. |
Beta Was this translation helpful? Give feedback.
-
@jfindlay no stress. I don't reckon I could really do much in the way of code on this atm (although I will give it a read to see, maybe I surprise myself). Fully willing to test it my side and see if I can break it, though |
Beta Was this translation helpful? Give feedback.
-
Ran into this today while trying to have the GeoLite2 databases downloaded. They are just gzipped files. Actually a little surprised this wasn't supported! Here's the solution I came up with to work around this: GeoIP database:
# The archive.extracted state doesn't currently support gunzip.
# https://github.com/saltstack/salt/issues/23588
file.managed:
- name: /usr/local/share/GeoLite2-City.mmdb.gz
- source: http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
- source_hash: md5=160e35291d399326f097a65f4935c2fa
- unless: ls /usr/local/share/GeoLite2-City.mmdb
module.run:
- name: archive.gunzip
- gzipfile: /usr/local/share/GeoLite2-City.mmdb.gz
- onchanges: [ { file: /usr/local/share/GeoLite2-City.mmdb.gz } ]
|
Beta Was this translation helpful? Give feedback.
-
Exactly same problem here with downloading geolite db. Thanks for the solution @evanpurkhiser ! |
Beta Was this translation helpful? Give feedback.
-
Can someone provide an example state and the debug output where it is not working? I can maybe squeeze in some time this week to investigate the issue. Also, the archive.extracted state looks to have gotten a ton of work for the Carbon (2016.11) release. So, maybe test against that first to see if maybe this is working now... |
Beta Was this translation helpful? Give feedback.
-
Ubuntu 16.04 has the package 'php-apcu'. It includes
Given these, it's assumed that the following should work:
However, it responds with the following:
Setting
versions report from mybox
|
Beta Was this translation helpful? Give feedback.
-
This is kinda silly. any response yet on this? It would also be nice if this supported file_mode and dir_mode. |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Beta Was this translation helpful? Give feedback.
-
Not stale |
Beta Was this translation helpful? Give feedback.
-
Thank you for updating this issue. It is no longer marked as stale. |
Beta Was this translation helpful? Give feedback.
-
Found this: https://github.com/saltstack/salt/blob/develop/salt/states/archive.py#L209
Seems that states.archive could possibly make use of the same code that modules.archive does, but right now it doesn't. A general usecase for this would be something like the Maxmind Geolite DBs: http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
Beta Was this translation helpful? Give feedback.
All reactions