Environment
OS: CentOS 7
Salt RPMS:
salt-2017.7.1-1.el7.noarch
salt-minion-2017.7.1-1.el7.noarch
I have a basic state that manages iptables as such:
iptables:
pkg.installed:
- name: iptables-services
service.running:
- enable: True
- watch:
- file: /etc/sysconfig/iptables
- require:
- pkg: iptables-services
Upon updating the iptables config file (that is being watched), I consistently see failures in the minion log:
[salt.loaded.int.module.cmdmod][ERROR ][7136] Command '['systemd-run', '--scope', 'systemctl', 'restart', 'iptables.service']' failed with return code: 1
[salt.loaded.int.module.cmdmod][ERROR ][7136] stderr: Running scope as unit run-7546.scope.
Job for iptables.service failed because the control process exited with error code. See "systemctl status iptables.service" and "journalctl -xe" for details.
[salt.loaded.int.module.cmdmod][ERROR ][7136] retcode: 1
This results in the new config not getting loaded. I have to manually restart iptables in order for the changes to get picked up.
I have scoured the threads for something similar but have only found this, which seems like it *could be* related but possibly not.
Any help understanding this weirdness is appreciated.