summaryrefslogtreecommitdiff
path: root/rhel/usr_lib_systemd_system_ovn-controller-vtep.service
blob: b1e239f571fb5271b788fa6b4b503e3dce2080ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# See ovn-controller-vtep(8) for details about ovn-controller-vtep.
#
# You may override the following variables to customize ovn-controller-vtep
# behavior:
#
#   OVN_DB - Set this variable to the location of the ovsdb server that is
#            serving the OVN_Southbound database.  See the manpage for
#            ovn-controller-vtep for more details on the format for the db
#            location.
#
#   VTEP_DB - Set this variable to the location of the ovsdb server that is
#             serving the hardware_vtep database.  See the manpage for
#             ovn-controller-vtep for more details on the format for the db
#             location.
#
# To override these variables, you may create a configuration file
# in the /etc/systemd/system/ovn-controller-vtep.d/ directory.  For example,
# you could place the following contents in
# /etc/systemd/system/ovn-controller-vtep.d/local.conf:
#
#   [System]
#   Environment="OVN_DB=unix:/usr/local/var/run/openvswitch/db.sock" "VTEP_DB=unix:/usr/local/var/run/openvswitch/vtep.sock"
#
# Alternatively, you may specify environment variables in the file /etc/sysconfig/ovn-controller-vtep:
#
#   OVN_DB="unix:/usr/local/var/run/openvswitch/db.sock"
#   VTEP_DB="unix:/usr/local/var/run/openvswitch/vtep.sock"

[Unit]
Description=OVN VTEP gateway controller daemon
After=syslog.target
Requires=openvswitch.service
After=openvswitch.service

[Service]
Type=forking
PIDFile=/var/run/openvswitch/ovn-controller-vtep.pid
Restart=on-failure
Environment=OVN_DB=unix:%t/openvswitch/ovnsb_db.sock
Environment=VTEP_DB=unix:%t/openvswitch/db.sock
EnvironmentFile=-/etc/sysconfig/ovn-controller-vtep
EnvironmentFile=/run/openvswitch.useropts
ExecStart=/usr/share/openvswitch/scripts/ovn-ctl \
          --db-sb-sock=${OVN_DB} --db-sock=${VTEP_DB} \
          --ovn-user=${OVS_USER_ID} \
          start_controller_vtep
ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_controller_vtep

[Install]
WantedBy=multi-user.target