saltstack-formulas / mongodb-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
31 stars 121 forks source link

[BUG] compass install fails on debian stretch #70

Closed sylvainfaivre closed 4 years ago

sylvainfaivre commented 4 years ago

Your setup

Formula commit hash / release tag

9140a18483bbb7d20b3f8cb243e35b4d57ff10d2

Versions reports (master & minion)

Salt Version: Salt: 2019.2.0

Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: 2.5.3 docker-py: Not Installed gitdb: 2.0.0 gitpython: 2.1.1 ioflo: Not Installed Jinja2: 2.9.4 libgit2: Not Installed libnacl: Not Installed M2Crypto: Not Installed Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.4.8 mysql-python: 1.3.7 pycparser: Not Installed pycrypto: 2.6.1 pycryptodome: Not Installed pygit2: Not Installed Python: 3.5.3 (default, Sep 27 2018, 17:25:39) python-gnupg: Not Installed PyYAML: 3.12 PyZMQ: 16.0.2 RAET: Not Installed smmap: 2.0.1 timelib: Not Installed Tornado: 4.4.3 ZMQ: 4.2.1

System Versions: dist: debian 9.11 locale: UTF-8 machine: x86_64 release: 4.9.0-11-amd64 system: Linux version: debian 9.11

Pillar / config used

default config


Bug details

Describe the bug

On Debian Stretch, compass install fails with the following error :

                 ID: mongodb compass archive mongodb-compass-community_1.17.0_amd64.deb install
           Function: archive.extracted
               Name: /opt
             Result: False
            Comment: Could not guess archive_format from the value of the 'source' argument. Please set this archive_format to one of the following: tar, rar, zip
            Started: 14:57:07.392014
           Duration: 2.138 ms
            Changes:   
       ----------
                 ID: mongodb compass archive mongodb-compass-community_1.17.0_amd64.deb install
           Function: file.symlink
               Name: /usr/local
             Result: False
            Comment: One or more requisite failed: mongodb.compass.archive.mongodb compass archive mongodb-compass-community_1.17.0_amd64.deb install
            Started: 14:57:07.398505
           Duration: 0.018 ms
            Changes:   

Steps to reproduce the bug

run mongodb state

Expected behaviour

compass setup should be optional and should not fail

Attempts to fix the bug

I will propose a PR to make compass install optional

Additional context

myii commented 4 years ago

This is failing because it is trying to use archive.extracted with a .deb:

       mongodb compass archive mongodb-compass-community_1.17.0_amd64.deb install:

         archive.extracted:
           - source: file:///tmp/mongodbtmp/mongodb-compass-community_1.17.0_amd64.deb
           - name: /opt
           - makedirs: True
           - trim_output: True
           - enforce_toplevel: True
          -source_hash:sha512=cc6b23e9e18cafc06831a51c16ca7e1d3725fc1c4998b307d0bfe693881b0c1f088f2c231bd519eba6888a1b96733d718e25fcc7c20595b19f01183812c557d
           - require:
             - mongodb compass archive mongodb-compass-community_1.17.0_amd64.deb download
           - require_in:
             - file: mongodb compass archive mongodb-compass-community_1.17.0_amd64.deb install

         file.symlink:
           - name: /usr/local
           - target: /opt/mongodb-compas

@noelmcloughlin Could you have a look at this, please?

noelmcloughlin commented 4 years ago

Fixed in #83

noelmcloughlin commented 4 years ago

Please retest with new release of mongodb-formula after #83