fuel-library/deployment/puppet/docker/manifests/container.pp
Matthew Mosesohn c6ac49bb80 Reduce yum timeout inside containers
Changed yum configuration inside Docker containers:
* Reduced retries to 5 (was 10)
* Reduced timeout to 5 (was 30)

This enables containers to fail connections to external
repositories if network connectivity is not working in
uncommon situations where DNS works, but HTTP connections
fail.

Change-Id: I06e5514157ed7bf143ac3738fd7af23ba383fdaa
Closes-Bug: #1494640
2015-09-14 14:22:11 +00:00

27 lines
515 B
Puppet

class docker::container (
$tz = 'UTC',
$yum_retries = '5',
$yum_timeout = '5',
$zoneinfo_dir = '/usr/share/zoneinfo',
) {
if $tz != false {
file { '/etc/localtime':
ensure => present,
target => "${zoneinfo_dir}/${tz}"
}
}
file_line {'yum retries':
path => '/etc/yum.conf',
line => "retries=${yum_retries}",
after => '\[main\]',
}
file_line {'yum timeout':
path => '/etc/yum.conf',
line => "timeout=${yum_timeout}",
after => '\[main\]',
}
}