eole-one-master/init/onenode.service

23 lines
750 B
SYSTEMD
Raw Normal View History

[Unit]
Description=OpenNebula Node starter
After=opennebula.service opennebula-sunstone.service libvirt-bin.service
ConditionPathExists=/etc/eole/release
After=multi-user.target
[Service]
Type=oneshot
Environment=CREDS=/var/lib/one/.one/one_auth
Environment=ENDPOINT=http://127.0.0.1:2633/RPC2
RemainAfterExit=yes
Restart=no
ExecStart=/usr/share/eole/sbin/onevm-all -c ${CREDS} -e ${ENDPOINT} -a "resume"
# Permit to start remaining VMs at distance by a simple restart
ExecReload=/usr/share/eole/sbin/onevm-all -c ${CREDS} -e ${ENDPOINT} -a "resume"
ExecStop=/usr/share/eole/sbin/onevm-all -w 300 -c ${CREDS} -e ${ENDPOINT} -a "suspend"
# Keep some marging with timeout
TimeoutStartSec=120s
TimeoutStopSec=360s
[Install]
WantedBy=multi-user.target