13b6d692b0
use User and Group in octavia-interface service. this way looks more graceful this change also fix the octavia-interface does not restart when the octavia-interface.service changed. Change-Id: I9d253d7519b1774985d165a080047fdbecd321b4
17 lines
457 B
Django/Jinja
17 lines
457 B
Django/Jinja
[Unit]
|
|
Description=Octavia Interface Creator
|
|
Requires=docker.service
|
|
After=docker.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=root
|
|
Group=root
|
|
RemainAfterExit=true
|
|
ExecStartPre=/sbin/ip link set dev {{ octavia_network_interface }} address {{ port_info.port.mac_address }}
|
|
ExecStart=/sbin/dhclient -v {{ octavia_network_interface }} -cf /etc/dhcp/octavia-dhclient.conf
|
|
ExecStop=/sbin/dhclient -r {{ octavia_network_interface }}
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|