systemd unit ExecStop runs after network has finished, but requires network to stop

Solution Unverified - Updated -

Issue

  • systemd unit ExecStop runs after network has finished, but requires network to stop
  • systemd unit contains Requires=network.target and After=network.target but NetworkManager Team network interface stops before the systemd unit stops. When using Ethernet or Bond network interface, the service stops fully before the network is down
  • What needs to be put in a systemd service file in order that the ExecStop script gets executed completely before the network is shut down?

Environment

  • Red Hat Enterprise Linux 7.1
  • NetworkManager running Team network interface
  • systemd service unit file whose ExecStop requires network connectivity to properly shut down

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.