summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorMike Pattrick <mkp@redhat.com>2022-12-19 08:38:38 -0500
committerIlya Maximets <i.maximets@ovn.org>2022-12-20 13:46:42 +0100
commitd34245ea150a7ae4dbae9e7fc37e3adfcbbf0bc6 (patch)
tree69089e93b2fc1456ca6fd6ea02b8f832a2db9447 /utilities
parentc82f496c3b69a036432af7c79adbc00545621ed1 (diff)
downloadopenvswitch-d34245ea150a7ae4dbae9e7fc37e3adfcbbf0bc6.tar.gz
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>
Diffstat (limited to 'utilities')
-rw-r--r--utilities/ovs-ctl.in15
1 files changed, 11 insertions, 4 deletions
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index eba9512fe..d91552588 100644
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -103,8 +103,13 @@ set_system_ids () {
action "Configuring Open vSwitch system IDs" "$@" $extra_ids
}
-check_force_cores () {
- if test X"$FORCE_COREFILES" = Xyes; then
+check_core_config () {
+ 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
fi
}
@@ -116,7 +121,7 @@ del_transient_ports () {
}
do_start_ovsdb () {
- check_force_cores
+ check_core_config
if daemon_is_running ovsdb-server; then
log_success_msg "ovsdb-server is already running"
@@ -193,7 +198,7 @@ add_managers () {
}
do_start_forwarding () {
- check_force_cores
+ check_core_config
insert_mod_if_required || return 1
@@ -330,6 +335,7 @@ set_defaults () {
DAEMON_CWD=/
FORCE_COREFILES=yes
+ DUMP_HUGEPAGES=no
MLOCKALL=yes
SELF_CONFINEMENT=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":
--daemon-cwd=DIR set working dir for OVS daemons (default: $DAEMON_CWD)
--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
--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')