Skip to content

Delete /run/cni/dhcp.sock when dhcp daemon is stopped #760

@dilyanpalauzov

Description

@dilyanpalauzov

I start /opt/cni/bin/dhcp daemon as described at https://www.cni.dev/plugins/current/ipam/dhcp/ . The file-socket /run/cni/dhcp.sock is created by the process . I stop the process with Ctrl+C. The file-socket /run/cni/dhcp.sock is still there. I call again /opt/cni/bin/dhcp daemon, which prints:

2022/07/24 17:56:32 Error getting listener: listen unix /run/cni/dhcp.sock: bind: address already in use

lsof shows that /run/cni/dhcp.sock is not in use. That said, on Ctrl+C dhcp daemon shall delete /run/cni/dhcp.sock which it created on start up, or reuse on startup. No normal process under linux creates files on startup, which it does not clean by itself, and refuses to start the next time, if the files are present

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions