2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-23 02:17:42 +00:00

ovs-ctl: Allow inclusion of hugepages in coredumps.

Add new option --dump-hugepages option in ovs-ctl to enable the addition
of hugepages in the core dump filter.

Reviewed-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Mike Pattrick 2022-12-19 08:38:38 -05:00 committed by Ilya Maximets
parent c82f496c3b
commit d34245ea15
2 changed files with 15 additions and 4 deletions

4
NEWS
View File

@ -14,6 +14,10 @@ Post-v3.0.0
10 Gbps link speed by default in case the actual link speed cannot be 10 Gbps link speed by default in case the actual link speed cannot be
determined. Previously it was 10 Mbps. Values can still be overridden determined. Previously it was 10 Mbps. Values can still be overridden
by specifying 'max-rate' or '[r]stp-path-cost' accordingly. by specifying 'max-rate' or '[r]stp-path-cost' accordingly.
- ovs-ctl:
* New option '--dump-hugepages' to include hugepages in core dumps. This
can assist with postmortem analysis involving DPDK, but may also produce
significantly larger core dump files.
v3.0.0 - 15 Aug 2022 v3.0.0 - 15 Aug 2022

View File

@ -103,8 +103,13 @@ set_system_ids () {
action "Configuring Open vSwitch system IDs" "$@" $extra_ids action "Configuring Open vSwitch system IDs" "$@" $extra_ids
} }
check_force_cores () { check_core_config () {
if test X"$FORCE_COREFILES" = Xyes; then if test X"$DUMP_HUGEPAGES" = Xyes; then
echo 0x7f > /proc/self/coredump_filter
if test X"$FORCE_COREFILES" = Xyes; then
ulimit -c unlimited
fi
elif test X"$FORCE_COREFILES" = Xyes; then
ulimit -c 67108864 ulimit -c 67108864
fi fi
} }
@ -116,7 +121,7 @@ del_transient_ports () {
} }
do_start_ovsdb () { do_start_ovsdb () {
check_force_cores check_core_config
if daemon_is_running ovsdb-server; then if daemon_is_running ovsdb-server; then
log_success_msg "ovsdb-server is already running" log_success_msg "ovsdb-server is already running"
@ -193,7 +198,7 @@ add_managers () {
} }
do_start_forwarding () { do_start_forwarding () {
check_force_cores check_core_config
insert_mod_if_required || return 1 insert_mod_if_required || return 1
@ -330,6 +335,7 @@ set_defaults () {
DAEMON_CWD=/ DAEMON_CWD=/
FORCE_COREFILES=yes FORCE_COREFILES=yes
DUMP_HUGEPAGES=no
MLOCKALL=yes MLOCKALL=yes
SELF_CONFINEMENT=yes SELF_CONFINEMENT=yes
MONITOR=yes MONITOR=yes
@ -419,6 +425,7 @@ Other important options for "start", "restart" and "force-reload-kmod":
Less important options for "start", "restart" and "force-reload-kmod": Less important options for "start", "restart" and "force-reload-kmod":
--daemon-cwd=DIR set working dir for OVS daemons (default: $DAEMON_CWD) --daemon-cwd=DIR set working dir for OVS daemons (default: $DAEMON_CWD)
--no-force-corefiles do not force on core dumps for OVS daemons --no-force-corefiles do not force on core dumps for OVS daemons
--dump-hugepages include hugepages in core dumps
--no-mlockall do not lock all of ovs-vswitchd into memory --no-mlockall do not lock all of ovs-vswitchd into memory
--ovsdb-server-priority=NICE set ovsdb-server's niceness (default: $OVSDB_SERVER_PRIORITY) --ovsdb-server-priority=NICE set ovsdb-server's niceness (default: $OVSDB_SERVER_PRIORITY)
--ovsdb-server-options=OPTIONS additional options for ovsdb-server (example: '-vconsole:dbg -vfile:dbg') --ovsdb-server-options=OPTIONS additional options for ovsdb-server (example: '-vconsole:dbg -vfile:dbg')