mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
ovs-sim, ovs-sandbox: Turn off logging to syslog.
There's no value in having these testing tools log to syslog. It just pollutes the system log. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
This commit is contained in:
@@ -398,7 +398,7 @@ if $ovn; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
rungdb $gdb_ovsdb $gdb_ovsdb_ex ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file \
|
rungdb $gdb_ovsdb $gdb_ovsdb_ex ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file -vsyslog:off \
|
||||||
--remote=punix:"$sandbox"/db.sock \
|
--remote=punix:"$sandbox"/db.sock \
|
||||||
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \
|
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \
|
||||||
$ovsdb_server_args
|
$ovsdb_server_args
|
||||||
@@ -428,6 +428,7 @@ if $ovn; then
|
|||||||
local i=$1; shift
|
local i=$1; shift
|
||||||
rungdb $gdb_ovsdb $gdb_ovsdb_ex ovsdb-server --detach --no-chdir \
|
rungdb $gdb_ovsdb $gdb_ovsdb_ex ovsdb-server --detach --no-chdir \
|
||||||
--pidfile=$db$i.pid -vconsole:off --log-file=$db$i.log \
|
--pidfile=$db$i.pid -vconsole:off --log-file=$db$i.log \
|
||||||
|
-vsyslog:off \
|
||||||
--remote=db:$schema_name,${DB}_Global,connections \
|
--remote=db:$schema_name,${DB}_Global,connections \
|
||||||
--private-key=db:$schema_name,SSL,private_key \
|
--private-key=db:$schema_name,SSL,private_key \
|
||||||
--certificate=db:$schema_name,SSL,certificate \
|
--certificate=db:$schema_name,SSL,certificate \
|
||||||
@@ -500,7 +501,7 @@ fi
|
|||||||
run ovs-vsctl --no-wait -- init
|
run ovs-vsctl --no-wait -- init
|
||||||
|
|
||||||
# Start ovs-vswitchd.
|
# Start ovs-vswitchd.
|
||||||
rungdb $gdb_vswitchd $gdb_vswitchd_ex ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --log-file \
|
rungdb $gdb_vswitchd $gdb_vswitchd_ex ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --log-file -vsyslog:off \
|
||||||
--enable-dummy=$dummy -vvconn -vnetdev_dummy
|
--enable-dummy=$dummy -vvconn -vnetdev_dummy
|
||||||
|
|
||||||
if $ovn; then
|
if $ovn; then
|
||||||
@@ -530,17 +531,18 @@ if $ovn; then
|
|||||||
for i in $(seq $n_northds); do
|
for i in $(seq $n_northds); do
|
||||||
rungdb $gdb_ovn_northd $gdb_ovn_northd_ex ovn-northd --detach \
|
rungdb $gdb_ovn_northd $gdb_ovn_northd_ex ovn-northd --detach \
|
||||||
--no-chdir --pidfile=ovn-northd$i.pid -vconsole:off \
|
--no-chdir --pidfile=ovn-northd$i.pid -vconsole:off \
|
||||||
--log-file=ovn-northd$i.log \
|
--log-file=ovn-northd$i.log -vsyslog:off \
|
||||||
--ovnsb-db="$OVN_SB_DB" --ovnnb-db="$OVN_NB_DB"
|
--ovnsb-db="$OVN_SB_DB" --ovnnb-db="$OVN_NB_DB"
|
||||||
done
|
done
|
||||||
for i in $(seq $n_controllers); do
|
for i in $(seq $n_controllers); do
|
||||||
rungdb $gdb_ovn_controller $gdb_ovn_controller_ex ovn-controller \
|
rungdb $gdb_ovn_controller $gdb_ovn_controller_ex ovn-controller \
|
||||||
$OVN_CTRLR_PKI --detach --no-chdir \
|
$OVN_CTRLR_PKI --detach --no-chdir -vsyslog:off \
|
||||||
--pidfile=ovn-controller$i.pid -vconsole:off --log-file
|
--pidfile=ovn-controller$i.pid -vconsole:off --log-file
|
||||||
done
|
done
|
||||||
rungdb $gdb_ovn_controller_vtep $gdb_ovn_controller_vtep_ex \
|
rungdb $gdb_ovn_controller_vtep $gdb_ovn_controller_vtep_ex \
|
||||||
ovn-controller-vtep --detach --no-chdir --pidfile -vconsole:off \
|
ovn-controller-vtep --detach --no-chdir --pidfile -vconsole:off \
|
||||||
$OVN_CTRLR_PKI --log-file --ovnsb-db=unix:"$sandbox"/ovnsb_db.sock
|
$OVN_CTRLR_PKI --log-file -vsyslog:off \
|
||||||
|
--ovnsb-db=unix:"$sandbox"/ovnsb_db.sock
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
@@ -100,6 +100,11 @@ sim_setvars() {
|
|||||||
}
|
}
|
||||||
export -f sim_setvars
|
export -f sim_setvars
|
||||||
|
|
||||||
|
ovs-vsctl () { command ovs-vsctl -vsyslog:off "$@"; }; export -f ovs-vsctl
|
||||||
|
ovs-nbctl () { command ovs-nbctl -vsyslog:off "$@"; }; export -f ovs-nbctl
|
||||||
|
ovs-sbctl () { command ovs-sbctl -vsyslog:off "$@"; }; export -f ovs-sbctl
|
||||||
|
vtep-ctl () { command vtep-ctl -vsyslog:off "$@"; }; export -f vtep-ctl
|
||||||
|
|
||||||
as() {
|
as() {
|
||||||
case $# in
|
case $# in
|
||||||
0)
|
0)
|
||||||
@@ -160,18 +165,18 @@ EOF
|
|||||||
# Create sandbox.
|
# Create sandbox.
|
||||||
mkdir "$sim_base"/$1 || return 1
|
mkdir "$sim_base"/$1 || return 1
|
||||||
|
|
||||||
daemon_opts="--detach --no-chdir --pidfile -vconsole:off --log-file"
|
daemon_opts="--detach --no-chdir --pidfile -vconsole:off -vsyslog:off --log-file"
|
||||||
|
|
||||||
# Create database and start ovsdb-server.
|
# Create database and start ovsdb-server.
|
||||||
touch $sim_base/$1/.conf.db.~lock~
|
touch $sim_base/$1/.conf.db.~lock~
|
||||||
as $1 ovsdb-tool create $sim_base/$1/conf.db "$sim_srcdir/vswitchd/vswitch.ovsschema"
|
as $1 ovsdb-tool create $sim_base/$1/conf.db "$sim_srcdir/vswitchd/vswitch.ovsschema"
|
||||||
as $1 ovsdb-server $daemon_opts --remote=punix:"$sim_base"/$1/db.sock
|
as $1 ovsdb-server --remote=punix:"$sim_base"/$1/db.sock $daemon_opts
|
||||||
|
|
||||||
# Initialize database.
|
# Initialize database.
|
||||||
as $1 ovs-vsctl --no-wait -- init
|
as $1 ovs-vsctl --no-wait -- init
|
||||||
|
|
||||||
# Start ovs-vswitchd.
|
# Start ovs-vswitchd.
|
||||||
as $1 ovs-vswitchd $daemon_opts --enable-dummy=system -vvconn -vnetdev_dummy
|
as $1 ovs-vswitchd --enable-dummy=system -vvconn -vnetdev_dummy $daemon_opts
|
||||||
}
|
}
|
||||||
export -f sim_add
|
export -f sim_add
|
||||||
|
|
||||||
@@ -252,12 +257,12 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
daemon_opts="--detach --no-chdir --pidfile -vconsole:off --log-file"
|
daemon_opts="--detach --no-chdir --pidfile -vconsole:off -vsyslog:off --log-file"
|
||||||
for db in ovn-sb ovn-nb; do
|
for db in ovn-sb ovn-nb; do
|
||||||
mkdir "$sim_base"/$db
|
mkdir "$sim_base"/$db
|
||||||
touch "$sim_base"/$db/.$db.db.~lock~
|
touch "$sim_base"/$db/.$db.db.~lock~
|
||||||
as $db ovsdb-tool create "$sim_base"/$db/$db.db "$sim_srcdir"/ovn/$db.ovsschema
|
as $db ovsdb-tool create "$sim_base"/$db/$db.db "$sim_srcdir"/ovn/$db.ovsschema
|
||||||
as $db ovsdb-server $daemon_opts --remote=punix:"$sim_base"/$db/$db.sock "$sim_base"/$db/$db.db
|
as $db ovsdb-server --remote=punix:"$sim_base"/$db/$db.sock "$sim_base"/$db/$db.db $daemon_opts
|
||||||
done
|
done
|
||||||
|
|
||||||
OVN_NB_DB=unix:$sim_base/ovn-nb/ovn-nb.sock; export OVN_NB_DB
|
OVN_NB_DB=unix:$sim_base/ovn-nb/ovn-nb.sock; export OVN_NB_DB
|
||||||
@@ -267,9 +272,8 @@ EOF
|
|||||||
ovn-sbctl init
|
ovn-sbctl init
|
||||||
|
|
||||||
mkdir "$sim_base"/northd
|
mkdir "$sim_base"/northd
|
||||||
as northd ovn-northd $daemon_opts \
|
as northd ovn-northd --ovnnb-db="$OVN_NB_DB" --ovnsb-db="$OVN_SB_DB" \
|
||||||
--ovnnb-db="$OVN_NB_DB" \
|
$daemon_opts
|
||||||
--ovnsb-db="$OVN_SB_DB"
|
|
||||||
}
|
}
|
||||||
export -f ovn_start
|
export -f ovn_start
|
||||||
|
|
||||||
@@ -304,7 +308,7 @@ EOF
|
|||||||
-- set Open_vSwitch . external-ids:ovn-encap-ip=$ip\
|
-- set Open_vSwitch . external-ids:ovn-encap-ip=$ip\
|
||||||
-- add-br br-int \
|
-- add-br br-int \
|
||||||
-- set bridge br-int fail-mode=secure other-config:disable-in-band=true
|
-- set bridge br-int fail-mode=secure other-config:disable-in-band=true
|
||||||
ovn-controller --detach --no-chdir --pidfile -vconsole:off --log-file
|
ovn-controller --detach --no-chdir --pidfile -vconsole:off -vsyslog:off --log-file
|
||||||
}
|
}
|
||||||
export -f ovn_attach
|
export -f ovn_attach
|
||||||
|
|
||||||
@@ -347,6 +351,7 @@ rc='
|
|||||||
EOF
|
EOF
|
||||||
'
|
'
|
||||||
|
|
||||||
|
set +e
|
||||||
status=0; bash --rcfile <(echo "$rc") || status=$?
|
status=0; bash --rcfile <(echo "$rc") || status=$?
|
||||||
|
|
||||||
if $interactive; then
|
if $interactive; then
|
||||||
|
Reference in New Issue
Block a user