Browse Source

do not die if cannot remove socket file

(may be it was removed by hand or by other app)

Change-Id: I5a85c39e09a87cc4f0ec2b76819b264f26d433f8
Signed-off-by: Andrey Zaikin <a.zaikin@partner.samsung.com>
changes/63/711463/16
Andrey Zaikin 2 years ago
parent
commit
25fb761251
  1. 6
      kuryr_kubernetes/cni/binding/vhostuser.py

6
kuryr_kubernetes/cni/binding/vhostuser.py

@ -117,7 +117,11 @@ class VIFVHostUserDriver(health.HealthHandler, base.BaseBindingDriver):
vhu_sock_path = os.path.join(self.mount_path,
_get_vhu_sock(config_file_path))
LOG.debug("remove: %s, %s", config_file_path, vhu_sock_path)
os.remove(vhu_sock_path)
try:
os.remove(vhu_sock_path)
except Exception:
LOG.exception("Failed to delete socket %s when processing VIF %s.",
vhu_sock_path, vif.id)
os.remove(config_file_path)
def is_alive(self):

Loading…
Cancel
Save