Stop accidentally removing docker-distribution
authorJiri Stransky <jistr@redhat.com>
Tue, 21 Feb 2017 12:54:06 +0000 (13:54 +0100)
committerJiri Stransky <jistr@redhat.com>
Tue, 21 Feb 2017 13:01:31 +0000 (14:01 +0100)
By default Puppet does virtual package matching if precise name matching
fails. Docker-distribution RPM "provides" docker-registry:

bash-4.2# rpm -q --whatprovides docker-registry
docker-distribution-2.5.1-1.el7.x86_64

This means that when we wanted to make docker-registry package absent,
we were actually removing docker-distribution instead. This is now fixed
by allow_virtual => false. Only name matching is performed.

Change-Id: I1f93b404085f0bc2b6c063f573c801db6409c0bb
Closes-Bug: #1666459

manifests/profile/base/docker_registry.pp

index ebe84bf..0452575 100644 (file)
@@ -38,7 +38,8 @@ class tripleo::profile::base::docker_registry (
 ) {
   # We want a v2 registry
   package{'docker-registry':
-    ensure => absent,
+    ensure        => absent,
+    allow_virtual => false,
   }
   package{'docker-distribution': }
   package{'docker': }