Closed WesleyE closed 4 years ago
Isn't this simpy wrong usage? The readme states that you should use the provider
option. Besides, on Ubuntu 16, systemd
is the default anyway
It might be wrong usage, I've tried provider Chef::Provider::MysqlServiceSystemd
, but that fails with a constant not set error.
It is the default on Ubuntu 16, yes. But on certain images (the Scaleway one for instance), it still detects Upstart when it is installed but not used. It then fails with an /sbin/status not found
error.
Ah, I think that's where the documentation is wrong; it might need to be set to Chef::Provider::MysqlServiceManagerSystemd
(the class name in the source code, changed in Version 8
Using that still fails with
NameError
---------
uninitialized constant Chef::Provider::MysqlServiceManagerSystemd
Do I need to import something to make that constant work?
@someara The docs are wrong here right? Seems like things didn't get entirely updated for the service manager stuff.
What is the solution to this ?
This still does not work in 8.2.0
Docs should read:
mysql_service 'default' do
...
provider Chef::Provider::Service::Systemd
...
Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.
We are no longer supporting operating systems which still rely on sysvinit.
Cookbook version
8.0.2
Chef-client version
Chef: 12.13.37
Platform Details
Ubuntu 16.04 - Scaleway
Scenario:
Installing MySQL with mysql_service, using service_manager 'systemd'
Steps to Reproduce:
Expected Result:
Installation succeeds
Actual Result:
Installation fails, it cannot find /sbin/status when restarting apparmor. It seems like the init setting is not used during this call. When I add provider Chef::Provider::Service::Systemd to
service "#{instance} apparmor" do
inmysql_service_base.rb
, it goes trough.