Add a backup keyserver in case the main one is down
MODIFY
attributes/default.rb
attributes/default.rb
@@ -155,6 +155,9 @@ default['datadog']['installrepo'] = true
default['datadog']['aptrepo'] = 'http://apt.datadoghq.com'
default['datadog']['aptrepo_dist'] = 'stable'
default['datadog']['aptrepo_retries'] = 4
+default['datadog']['aptrepo_use_backup_keyserver'] = false
+default['datadog']['aptrepo_keyserver'] = 'hkp://keyserver.ubuntu.com:80'
+default['datadog']['aptrepo_backup_keyserver'] = 'hkp://pool.sks-keyservers.net:80'
default['datadog']['yumrepo'] = "#{yum_protocol}://yum.datadoghq.com/rpm/#{architecture_map[node['kernel']['machine']]}/"
default['datadog']['yumrepo_gpgkey'] = "#{yum_protocol}://yum.datadoghq.com/DATADOG_RPM_KEY.public"
default['datadog']['yumrepo_proxy'] = nil

MODIFY
recipes/repository.rb
recipes/repository.rb
@@ -30,9 +30,10 @@ when 'debian'
distribution = node['datadog']['agent6'] ? node['datadog']['agent6_aptrepo_dist'] : node['datadog']['aptrepo_dist']
components = node['datadog']['agent6'] ? ['main', '6'] : ['main']
retries = node['datadog']['aptrepo_retries']
+ keyserver = node['datadog']['aptrepo_use_backup_keyserver'] ? node['datadog']['aptrepo_backup_keyserver'] : node['datadog']['aptrepo_keyserver']
# Add APT repository
apt_repository 'datadog' do
- keyserver 'hkp://keyserver.ubuntu.com:80'
+ keyserver keyserver
key 'A2923DFF56EDA6E76E55E492D3A80E30382E94DE'
uri uri
distribution distribution

Add a backup keyserver in case the main one is down