node.service.j2 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. [Unit]
  2. Description=OpenShift Node
  3. After={{ openshift_docker_service_name }}.service
  4. Wants=openvswitch.service
  5. After=ovsdb-server.service
  6. After=ovs-vswitchd.service
  7. Wants={{ openshift_docker_service_name }}.service
  8. Documentation=https://github.com/openshift/origin
  9. Requires=dnsmasq.service
  10. After=dnsmasq.service
  11. {% if openshift_use_crio %}Wants=cri-o.service{% endif %}
  12. [Service]
  13. Type=notify
  14. EnvironmentFile=/etc/sysconfig/{{ openshift_service_type }}-node
  15. Environment=GOTRACEBACK=crash
  16. ExecStartPre=/usr/bin/cp /etc/origin/node/node-dnsmasq.conf /etc/dnsmasq.d/
  17. ExecStartPre=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:/in-addr.arpa/127.0.0.1,/{{ openshift.common.dns_domain }}/127.0.0.1
  18. ExecStopPost=/usr/bin/rm /etc/dnsmasq.d/node-dnsmasq.conf
  19. ExecStopPost=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:
  20. ExecStart=/usr/bin/openshift start node {% if openshift_node_bootstrap %} --kubeconfig=${KUBECONFIG} --bootstrap-config-name=${BOOTSTRAP_CONFIG_NAME}{% endif %} --config=${CONFIG_FILE} $OPTIONS
  21. LimitNOFILE=65536
  22. LimitCORE=infinity
  23. WorkingDirectory=/var/lib/origin/
  24. SyslogIdentifier={{ openshift_service_type }}-node
  25. Restart=always
  26. RestartSec=5s
  27. TimeoutStartSec=300
  28. OOMScoreAdjust=-999
  29. [Install]
  30. WantedBy=multi-user.target