evertrue / zookeeper-cookbook

Chef cookbook for installing and managing Zookeeper.
https://supermarket.chef.io/cookbooks/zookeeper
Apache License 2.0
81 stars 117 forks source link

Support Ubuntu 16.04 #203

Closed eherot closed 6 years ago

eherot commented 7 years ago

Might address #201 in the process. Currently this happens:

           * service[zookeeper] action enable
             ================================================================================
             Error executing action `enable` on resource 'service[zookeeper]'
             ================================================================================

             Errno::ENOENT
             -------------
             No such file or directory - /sbin/status

             Resource Declaration:
             ---------------------
             # In /tmp/kitchen/cache/cookbooks/zookeeper/resources/service.rb

       66:     service 'zookeeper' do
       67:       provider Chef::Provider::Service::Upstart
       68:       supports status: true, restart: true, nothing: true
       69:       action   service_actions
       70:     end
       71:   when 'sysv'
jeffbyrnes commented 7 years ago

It might! This could be as simple as:

provider Chef::Provider::Service::Upstart if node['platform_version'] = '14.04'

I added that specifically for 14.04 b/c of the SysV/Upstart confusion on that platform, but SystemD is the default on 16.04 and Chef knows that.

eherot commented 7 years ago

Actually the problem may even have been the wrapper cookbook I was including this from which (I now realize) was hardcoding upstart as the service type. I just didn't want to forget to ensure that this worked. I ended up just using package 'zookeeper' in the wrapper cookbook (since I only needed ZK for testing anyway).

jeffbyrnes commented 6 years ago

Apparently this is all good; it installs just fine using Ubuntu 16.04 now.