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
This commit is contained in:
parent
ad6d46378b
commit
c6ac49bb80
@ -1,5 +1,7 @@
|
||||
class docker::container (
|
||||
$tz = 'UTC',
|
||||
$yum_retries = '5',
|
||||
$yum_timeout = '5',
|
||||
$zoneinfo_dir = '/usr/share/zoneinfo',
|
||||
) {
|
||||
|
||||
@ -9,5 +11,16 @@ $zoneinfo_dir = '/usr/share/zoneinfo',
|
||||
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\]',
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user