Skip to content

Using service name 'default' results in stop/disable/enable/start actions on every run #615

Open
@piloos

Description

@piloos

👻 Brief Description

When using mysql_service 'default' do ... action [:create, :start] ... end, the service mysql is stopped, disabled, enabled and started on every run even if no configuration changes are required.

🥞 Cookbook version

8.6.0

👩‍🍳 Chef-Infra Version

15.6.10

🎩 Platform details

Ubuntu 16.04

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create a recipe with a mysql_service 'default' do ... end

🚓 Expected behavior

On subsequent Chef runs, I expect nothing to happen to the state of the mysql service.

➕ Additional context

Issue is probably caused by the fact that default will result in the service name mysql. The resource first tries to disable the system service, which is also called mysql and then enables his own service which is again called myqsl.
This statement is confirmed by the fact that selecting another service name does not cause the faulty behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workinghacktoberfestAn issue highlighted for the digital ocean Hacktoberfest Event

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions