napalm-automation / napalm-salt

Modules for event-driven network automation and orchestration using Salt
Apache License 2.0
127 stars 36 forks source link

Start the system service using the unescaped arg #37

Closed mirceaulinic closed 7 years ago

mirceaulinic commented 7 years ago

%I escapes the instance name after @: see https://www.freedesktop.org/software/systemd/man/systemd.unit.html

For example, instead of sng-a11-mgmt-sw2 is trying to start the process for sng/a11/mgmt/sw2:

[root@saltstack1 cache]# systemctl status salt-proxy@sng-a11-mgmt-sw2 
● salt-proxy@sng-a11-mgmt-sw2.service - Salt proxy minion
   Loaded: loaded (/etc/systemd/system/salt-proxy@.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2017-05-26 15:18:59 UTC; 618ms ago
 Main PID: 21990 (salt-proxy)
   CGroup: /system.slice/system-salt\x2dproxy.slice/salt-proxy@sng-a11-mgmt-sw2.service
           ├─21990 /usr/bin/python /usr/bin/salt-proxy -l debug --proxyid sng/a11/mgmt/sw2
           └─21999 /usr/bin/python /usr/bin/salt-proxy -l debug --proxyid sng/a11/mgmt/sw2
lliopt commented 7 years ago

I think it's good to mention that problem looks like an issue with the keys and in the same time you able to start a proxy-minion with the salt-proxy command.


May 26 14:47:47 saltstack1 salt-proxy: To repair this issue, delete the public key for this minion on the Salt Master and restart this minion.
May 26 14:47:47 saltstack1 salt-proxy: Or restart the Salt Master in open mode to clean out the keys. The Salt Minion will now exit.
mirceaulinic commented 7 years ago

Thank you @lliopt for finding this issue and the solution.