Debian: Fix system garbage-collect
On Debian docker registry has moved to /usr/bin/docker-registry. Puppet calls a command with the CentOS path, resulting in error. Updated a command in the platform::dockerdistribution::garbagecollect class to point to correct registry path. Test Plan: Deployed the ISO with the change as AIO-SX and verified the /var/log/puppet/latest/puppet.log file. Closes-Bug: 1998183 Signed-off-by: Boovan Rajendran <boovan.rajendran@windriver.com> Change-Id: If001e4294a8de0ff2eed0f4455fb0fe7acff1b6d
This commit is contained in:
@@ -267,6 +267,7 @@ class platform::dockerdistribution::garbagecollect {
|
||||
$runtime_config = '/etc/docker-distribution/registry/runtime_config.yml'
|
||||
$readonly_config = '/etc/docker-distribution/registry/readonly_config.yml'
|
||||
$used_config = '/etc/docker-distribution/registry/config.yml'
|
||||
$registry_cmd = $::osfamily ? { 'Debian' => 'docker-registry', default => 'registry' }
|
||||
|
||||
exec { 'turn registry read only':
|
||||
command => "ln -fs ${readonly_config} ${used_config}",
|
||||
@@ -279,7 +280,7 @@ class platform::dockerdistribution::garbagecollect {
|
||||
}
|
||||
|
||||
-> exec { 'run garbage collect':
|
||||
command => "/usr/bin/registry garbage-collect ${used_config}",
|
||||
command => "/usr/bin/${registry_cmd} garbage-collect ${used_config}",
|
||||
}
|
||||
|
||||
-> exec { 'turn registry back to read write':
|
||||
|
||||
Reference in New Issue
Block a user