__consul fails with zip error message #184

Closed
opened 2021-11-20 15:20:58 +00:00 by ungleich-gitea · 4 comments

Created by: telmich

[18:46] freiheit:~% echo __consul | cdist config -vp -i - 136.243.52.231
INFO: cdist: version 3.1.10-14-g66ad275
INFO: 136.243.52.231: Running global explorers
INFO: 136.243.52.231: Running initial manifest /home/users/nico/.tmp/cdist.stdin.e0_69gwf
INFO: 136.243.52.231: Running manifest and explorers for __consul/
UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
Default action is to extract files in list, except those in xlist, to exdir;
file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage).

-p extract files to pipe, no messages -l list files (short format)
-f freshen existing files, create none -t test compressed archive data
-u update files, create if necessary -z display archive comment only
-v list verbosely/show version info -T timestamp archive to latest
-x exclude files that follow (in xlist) -d extract files into exdir
modifiers:
-n never overwrite existing files -q quiet mode (-qq => quieter)
-o overwrite files WITHOUT prompting -a auto-convert any text files
-j junk paths (do not make directories) -aa treat ALL files as text
-U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields
-C match filenames case-insensitively -L make (some) names lowercase
-X restore UID/GID info -V retain VMS version numbers
-K keep setuid/setgid/tacky permissions -M pipe through "more" pager
See "unzip -hh" or unzip.txt for more help. Examples:
unzip data1 -x joe => extract all files except joe from zipfile data1.zip
unzip -p foo | more => send contents of foo.zip via pipe into program more
unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
ERROR: 136.243.52.231: Command failed: /bin/sh -e /home/users/nico/.tmp/tmpxnv8s7d5/conf/type/__consul/manifest
INFO: cdist: Total processing time for 1 host(s): 45.94395685195923
ERROR: cdist: Failed to configure the following hosts: 136.243.52.231
[18:47] freiheit:~%

*Created by: telmich* [18:46] freiheit:~% echo __consul | cdist config -vp -i - 136.243.52.231 INFO: cdist: version 3.1.10-14-g66ad275 INFO: 136.243.52.231: Running global explorers INFO: 136.243.52.231: Running initial manifest /home/users/nico/.tmp/cdist.stdin.e0_69gwf INFO: 136.243.52.231: Running manifest and explorers for __consul/ UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send bug reports using http://www.info-zip.org/zip-bug.html; see README for details. Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir] Default action is to extract files in list, except those in xlist, to exdir; file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage). -p extract files to pipe, no messages -l list files (short format) -f freshen existing files, create none -t test compressed archive data -u update files, create if necessary -z display archive comment only -v list verbosely/show version info -T timestamp archive to latest -x exclude files that follow (in xlist) -d extract files into exdir modifiers: -n never overwrite existing files -q quiet mode (-qq => quieter) -o overwrite files WITHOUT prompting -a auto-convert any text files -j junk paths (do not make directories) -aa treat ALL files as text -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields -C match filenames case-insensitively -L make (some) names lowercase -X restore UID/GID info -V retain VMS version numbers -K keep setuid/setgid/tacky permissions -M pipe through "more" pager See "unzip -hh" or unzip.txt for more help. Examples: unzip data1 -x joe => extract all files except joe from zipfile data1.zip unzip -p foo | more => send contents of foo.zip via pipe into program more unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer ERROR: 136.243.52.231: Command failed: /bin/sh -e /home/users/nico/.tmp/tmpxnv8s7d5/conf/type/__consul/manifest INFO: cdist: Total processing time for 1 host(s): 45.94395685195923 ERROR: cdist: Failed to configure the following hosts: 136.243.52.231 [18:47] freiheit:~%
Author
Owner

Created by: asteven

fixed by 44d5749

*Created by: asteven* fixed by 44d5749
Author
Owner

Created by: asteven

Maybe something like this could work:

  • maintain version to cksum mapping of the versions we use ourself
  • default to the latest version
  • allow user to pass in optional url and cksum in case we are not up to date or he needs a old version

The __consul type would then be a thin wrapper arround a __staged_file object

*Created by: asteven* Maybe something like this could work: - maintain version to cksum mapping of the versions we use ourself - default to the latest version - allow user to pass in optional url and cksum in case we are not up to date or he needs a old version The __consul type would then be a thin wrapper arround a __staged_file object
Author
Owner

Created by: asteven

The question is how can we make a __consul type that works for other people without beeing doomed to maintain it (or the consul version it uses) for the rest of time.

*Created by: asteven* The question is how can we make a __consul type that works for other people without beeing doomed to maintain it (or the consul version it uses) for the rest of time.
Author
Owner

Created by: asteven

I totally forgot about that. I don't even use this type anymore. I use this instead in a custom type instead.

__staged_file /usr/local/bin/consul \
   --source https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip \
   --cksum '428915666 15738724 consul' \
   --fetch-command 'curl -s -L "%s"' \
   --prepare-command 'unzip -p "%s"' \
   --state present \
   --group root \
   --owner root \
   --mode 755
*Created by: asteven* I totally forgot about that. I don't even use this type anymore. I use this instead in a custom type instead. ``` __staged_file /usr/local/bin/consul \ --source https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip \ --cksum '428915666 15738724 consul' \ --fetch-command 'curl -s -L "%s"' \ --prepare-command 'unzip -p "%s"' \ --state present \ --group root \ --owner root \ --mode 755 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ungleich-public/cdist#184
No description provided.