l3dsr icon indicating copy to clipboard operation
l3dsr copied to clipboard

make dsrtool handle iptables lock issues gracefully

Open sushilkar opened this issue 4 years ago • 0 comments

Random times it is observed that dsrtools start script fails with the following error message.

TASK [services : restart dsrctl service] ***************************************
00:14:46 fatal: [host.example.com]: FAILED! => {"changed": false, "msg": "Unable to restart service dsr: Job for dsr.service failed because the control process exited with error code. See \"systemctl status dsr.service\" and \"journalctl -xe\" for details.\n"}

Couple of error message noted

systemctl status dsr.service
dsr.service - DSR control
   Loaded: loaded (/usr/lib/systemd/system/dsr.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2021-05-11 02:58:32 UTC; 6 days ago
     Docs: man:dsrctl(8)
  Process: 15427 ExecStop=/usr/sbin/dsrctl stop (code=exited, status=0/SUCCESS)
  Process: 15445 ExecStart=/usr/sbin/dsrctl start (code=exited, status=1/FAILURE)
 Main PID: 15445 (code=exited, status=1/FAILURE)

May 11 02:58:32 host.example.com systemd[1]: Starting DSR control...
May 11 02:58:32 host.example.com dsrctl[15445]: Failed to get iptables (iptables -L -t raw -n).
May 11 02:58:32 host.example.com systemd[1]: dsr.service: main process exited, code=exited, status=1/FAILURE
May 11 02:58:32 host.example.com systemd[1]: Failed to start DSR control.
May 11 02:58:32 host.example.com systemd[1]: Unit dsr.service entered failed state.
May 11 02:58:32 host.example.com systemd[1]: dsr.service failed.
STDERR: Another app is currently holding the xtables lock. Perhaps you want to use the -w option?

Noticed on: 7.9.15-1.el7

$ rpm -q dsrtools
dsrtools-1.4.0-20210314.02.el7.noarch

sushilkar avatar May 17 '21 14:05 sushilkar