saltstack-formulas / mongodb-formula

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

[BUG] tries to run mongodb service instead of mongod on debian stretch #71

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, the formula tries to launch a "mongodb" service and fails. The installed service is named mongod (without a trailing b)

       16:16:41.776024 [ 38.593 ms]       file.managed    Clean     Name: /usr/lib/systemd/system/mongod.service
       ----------
                 ID: mongodb server mongod service running
           Function: service.running
               Name: mongodb
             Result: False
            Comment: The named service mongodb is not available
            Started: 16:16:41.821027
           Duration: 12.692 ms
            Changes:   

Steps to reproduce the bug

run mongodb state

Expected behaviour

The formula successfully created the /usr/lib/systemd/system/mongod.service file. It should run the service with the same name.

Attempts to fix the bug

none

Additional context

myii commented 4 years ago

@sylvainfaivre I can't reproduce this. I've implemented semantic-release in #73, which includes running the mongodb state for all of the Debian-based platforms and verifying the service with InSpec:

Can you share you exact configuration, specifically the pillar? Please ensure there's nothing sensitive in there first.

sylvainfaivre commented 4 years ago

You're right, this was caused by a leftover setting in my pillar :

 mongodb:
  mongod: mongodb

Sorry about this.

myii commented 4 years ago

No problem, thanks for closing the issue.