diff --git a/zun/cni/plugins/zun_cni_registry.py b/zun/cni/plugins/zun_cni_registry.py index 8efe450df..29d794946 100644 --- a/zun/cni/plugins/zun_cni_registry.py +++ b/zun/cni/plugins/zun_cni_registry.py @@ -99,7 +99,13 @@ class ZunCNIRegistryPlugin(object): return except KeyError: pass - self._do_work(params, b_base.disconnect) + + try: + self._do_work(params, b_base.disconnect) + except exception.ContainerNotFound: + LOG.warning('Capsule is not found in DB. Ignoring.') + pass + # NOTE(ndesh): We need to lock here to avoid race condition # with the deletion code in the watcher to ensure that # we delete the registry entry exactly once