add tuned-2.14.0 and openvswitch-2.14.0

This commit is contained in:
ikerbs
2020-12-11 01:30:35 +03:00
parent 439fda5245
commit c4c2dc2483
18 changed files with 458 additions and 13 deletions

View File

@ -0,0 +1 @@
d /var/run/openvswitch 0770 root root -

View File

@ -0,0 +1,10 @@
[Unit]
Description=Open vSwitch Delete Transient Ports
After=ovsdb-server.service
Before=ovs-vswitchd.service
AssertPathExists=/var/run/openvswitch/db.sock
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl delete-transient-ports

View File

@ -0,0 +1,21 @@
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
description="Open vSwitch virtual switch"
command="/usr/sbin/ovs-vswitchd"
command_args="
--pidfile
--detach
--monitor
${OPTIONS} ${DATABASE}"
pidfile="/var/run/openvswitch/ovs-vswitchd.pid"
depend() {
use ovsdb-server logger
}
start_pre() {
checkpath -d "/var/run/openvswitch" -m 0750
}

View File

@ -0,0 +1,26 @@
[Unit]
Description=Open vSwitch Daemon
Documentation=man:ovs-vswitchd
Wants=network.target
Before=network.target network.service
Requires=ovsdb-server.service
After=ovsdb-server.service network-pre.target systemd-udev-settle.service
ReloadPropagatedFrom=ovsdb-server.service
AssertPathIsReadWrite=/var/run/openvswitch/db.sock
[Service]
Type=forking
Restart=on-failure
Environment=HOME=/var/run/openvswitch
EnvironmentFile=-/etc/conf.d/ovs-vswitchd
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
--no-ovsdb-server --no-monitor --system-id=random \
--ovs-user=${OVS_USER_ID} start $OPTIONS
ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server stop
ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server \
--no-monitor --system-id=random --ovs-user=${OVS_USER_ID} \
restart $OPTIONS
TimeoutSec=300
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,7 @@
# Connection string for the configuration database (usually a unix socket)
DATABASE="unix:/var/run/openvswitch/db.sock"
# Additional options
OPTIONS="--mlockall"
OVS_USER_ID="root:root"

View File

@ -0,0 +1,15 @@
[Unit]
Description=Open vSwitch Daemon
Documentation=man:ovs-vswitchd
Wants=network.target
Before=network.target
Requires=ovsdb-server.service
After=ovsdb-server.service
[Service]
# --pidfile options is needed for create file used
# by ovs-appctl command.
ExecStart=/usr/sbin/ovs-vswitchd --mlockall --monitor unix:/var/run/openvswitch/db.sock --pidfile
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,34 @@
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
description="Open vSwitch database server"
remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"}
remote_db=${REMOTE_DB:+"--remote=${REMOTE_DB}"}
private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"}
certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"}
bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"}
command="/usr/sbin/ovsdb-server"
command_args="
--pidfile
--detach
--monitor
${remote_punix}
${remote_db}
${private_key}
${certificate}
${bootstrap_ca_cert}
${DATABASE}
${OPTIONS}"
pidfile="/var/run/openvswitch/ovsdb-server.pid"
depend() {
need localmount
use logger
}
start_pre() {
checkpath -d "/var/run/openvswitch" -m 0750
}

View File

@ -0,0 +1,22 @@
[Unit]
Description=Open vSwitch Database Unit
Documentation=man:ovsdb-server
After=syslog.target network-pre.target
Before=network.target network.service
Wants=ovs-delete-transient-ports.service
[Service]
Type=forking
Restart=on-failure
EnvironmentFile=-/etc/conf.d/ovsdb-server
ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
--no-ovs-vswitchd --no-monitor --system-id=random \
--ovs-user=${OVS_USER_ID} \
start $OPTIONS
ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop
ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \
--ovs-user=${OVS_USER_ID} \
--no-monitor restart $OPTIONS
RuntimeDirectory=openvswitch
RuntimeDirectoryMode=0755

View File

@ -0,0 +1,14 @@
[Unit]
Description=Open vSwitch Database Server
Documentation=man:ovsdb-server
[Service]
# The file can be shared for this as this values are prone to change
# and that way we don't need to update them in two different places
EnvironmentFile=/etc/conf.d/ovsdb-server
ExecStart=/usr/sbin/ovsdb-server --monitor \
--remote=punix:${DB_SOCKET} \
--remote=${REMOTE_DB} \
--private-key=${PRIVATE_KEY} \
--certificate=${CERTIFICATE} \
--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}

View File

@ -0,0 +1,16 @@
# Socket for bringing the server up
DB_SOCKET="/var/run/openvswitch/db.sock"
# Remote sockets are defined in the database by default
REMOTE_DB="db:Open_vSwitch,manager_options"
# All certificates and keys are stored in the database (if any)
PRIVATE_KEY="db:SSL,private_key"
CERTIFICATE="db:SSL,certificate"
BOOTSTRAP_CA_CERT="db:SSL,ca_cert"
# Alternative path for the database (default is /etc/openvswitch/conf.db)
# DATABASE="/etc/openvswitch/conf.db"
# Additional options
# OPTIONS=""

View File

@ -0,0 +1,19 @@
# Socket for bringing the server up
DB_SOCKET="/var/run/openvswitch/db.sock"
# Remote sockets are defined in the database by default
REMOTE_DB="db:Open_vSwitch,Open_vSwitch,manager_options"
# All certificates and keys are stored in the database (if any)
PRIVATE_KEY="db:Open_vSwitch,SSL,private_key"
CERTIFICATE="db:Open_vSwitch,SSL,certificate"
BOOTSTRAP_CA_CERT="db:Open_vSwitch,SSL,ca_cert"
# Default user
OVS_USER_ID="root:root"
# Alternative path for the database (default is /etc/openvswitch/conf.db)
# DATABASE="/etc/openvswitch/conf.db"
# Additional options
# OPTIONS=""

View File

@ -0,0 +1,20 @@
Description: Use xcp-xapi interface-reconfigure if found
Ubuntu/Debian provide the XCP interface-reconfigure hook in
a FHS compliant location; use this if found.
Author: James Page <james.page@ubuntu.com>
Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1195053
Forwarded: no
--- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
+++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
@@ -43,6 +43,10 @@ def delete_cacert():
def update(session, args):
# Refresh bridge network UUIDs in case this host joined or left a pool.
script = '/opt/xensource/libexec/interface-reconfigure'
+ # NOTE(jamespage): Override with distro xcp xapi locations
+ # if present
+ if os.path.exists('/usr/lib/xcp/lib/interface-reconfigure'):
+ script = '/usr/lib/xcp/lib/interface-reconfigure'
try:
retval = subprocess.call([script, 'rewrite'])
if retval != 0: