Force the service provider to Upstart for Ubuntu < 15.04
MODIFY
providers/monitor.rb
providers/monitor.rb
@@ -35,6 +35,7 @@ action :add do # rubocop:disable Metrics/BlockLength
service_provider = nil
if node['datadog']['agent6'] &&
(((node['platform'] == 'amazon' || node['platform_family'] == 'amazon') && node['platform_version'].to_i != 2) ||
+ (node['platform'] == 'ubuntu' && node['platform_version'].to_f < 15.04) || # chef <11.14 doesn't use the correct service provider
(node['platform'] != 'amazon' && node['platform_family'] == 'rhel' && node['platform_version'].to_i < 7))
# use Upstart provider explicitly for Agent 6 on Amazon Linux < 2.0 and RHEL < 7
service_provider = Chef::Provider::Service::Upstart

MODIFY
recipes/dd-agent.rb
recipes/dd-agent.rb
@@ -105,7 +105,7 @@ end
service_provider = nil
if node['datadog']['agent6'] &&
(((node['platform'] == 'amazon' || node['platform_family'] == 'amazon') && node['platform_version'].to_i != 2) ||
- (node['platform'] == 'ubuntu' && node['platform_version'].to_f == 14.04) ||
+ (node['platform'] == 'ubuntu' && node['platform_version'].to_f < 15.04) || # chef <11.14 doesn't use the correct service provider
(node['platform'] != 'amazon' && node['platform_family'] == 'rhel' && node['platform_version'].to_i < 7))
# use Upstart provider explicitly for Agent 6 on Amazon Linux < 2.0 and RHEL < 7
service_provider = Chef::Provider::Service::Upstart

Force the service provider to Upstart for Ubuntu < 15.04