소스 검색

Contiv systemd fixes

Add install section so that enable on reboot works.
Make sure services are always restarted if they die.
Nick Bartos 7 년 전
부모
커밋
e28adead42
3개의 변경된 파일13개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 1
      roles/contiv/templates/aci-gw.service
  2. 4 1
      roles/contiv/templates/netmaster.service
  3. 5 0
      roles/contiv/templates/netplugin.service

+ 4 - 1
roles/contiv/templates/aci-gw.service

@@ -6,5 +6,8 @@ After=auditd.service systemd-user-sessions.service time-sync.target {{ openshift
 ExecStart={{ bin_dir }}/aci_gw.sh start
 ExecStop={{ bin_dir }}/aci_gw.sh stop
 KillMode=control-group
-Restart=on-failure
+Restart=always
 RestartSec=10
+
+[Install]
+WantedBy=multi-user.target

+ 4 - 1
roles/contiv/templates/netmaster.service

@@ -6,5 +6,8 @@ After=auditd.service systemd-user-sessions.service contiv-etcd.service
 EnvironmentFile=/etc/default/netmaster
 ExecStart={{ bin_dir }}/netmaster $NETMASTER_ARGS
 KillMode=control-group
-Restart=on-failure
+Restart=always
 RestartSec=10
+
+[Install]
+WantedBy=multi-user.target

+ 5 - 0
roles/contiv/templates/netplugin.service

@@ -6,3 +6,8 @@ After=auditd.service systemd-user-sessions.service contiv-etcd.service
 EnvironmentFile=/etc/default/netplugin
 ExecStart={{ bin_dir }}/netplugin $NETPLUGIN_ARGS
 KillMode=control-group
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target