Message ID | 20250518075311.1558398-1-roid@nvidia.com |
---|---|
State | Accepted |
Commit | 261f02ba322c2c8d48a211bab02def8fd4d20bde |
Delegated to: | Eelco Chaudron |
Headers | show |
Series | [ovs-dev,v2] ovs-ctl: Allow to set custom core file size for ovs daemons. | expand |
On 18 May 2025, at 9:53, Roi Dayan wrote: > Allow to set custom core file size with --ulimit-core argument. > This argument can be set in ovs config file > in rhel can set OPTIONS in /etc/sysconfig/openvswitch > in debian can set OVS_CTL_OPTS in /etc/default/openvswitch-switch. > > Signed-off-by: Roi Dayan <roid@nvidia.com> > Acked-by: Gaetan Rivet <gaetanr@nvidia.com> > --- Thanks for the v2, it looks good to me. Acked-by: Eelco Chaudron <echaudro@redhat.com> > > Notes: > v2 > - Add doc to man page and NEWS files. > > Documentation/ref/ovs-ctl.8.rst | 5 +++++ > NEWS | 2 ++ > utilities/ovs-ctl.in | 4 +++- > 3 files changed, 10 insertions(+), 1 deletion(-) > > diff --git a/Documentation/ref/ovs-ctl.8.rst b/Documentation/ref/ovs-ctl.8.rst > index 75b3e16f370b..8a4509f0e4b3 100644 > --- a/Documentation/ref/ovs-ctl.8.rst > +++ b/Documentation/ref/ovs-ctl.8.rst > @@ -199,6 +199,11 @@ The following options are less important: > Sets the Linux Out-Of-Memory (OOM) killer score for the OVS daemon > after it's been started. > > +* ``--ulimit-core=<LIMIT>`` > + > + Sets ulimit core file size for the OVS daemon after it's > + been started. > + > * ``--ovsdb-server-priority=<niceness>`` or > ``--ovs-vswitchd-priority=<niceness>`` > > diff --git a/NEWS b/NEWS > index 9667296657d9..dfd88a069df9 100644 > --- a/NEWS > +++ b/NEWS > @@ -5,6 +5,8 @@ Post-v3.5.0 > - ovs-ctl: > * Added a new option, --oom-score=<score>, to set the daemons' Linux > Out-Of-Memory (OOM) killer score. > + * Added a new option, --ulimit-core=<LIMIT>, to set the daemon's ulimit > + core file size. > - SSL/TLS: > * Support for deprecated TLSv1 and TLSv1.1 protocols on OpenFlow and > database connections is now removed. > diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in > index 077e1f65a321..c65c76812ed5 100644 > --- a/utilities/ovs-ctl.in > +++ b/utilities/ovs-ctl.in > @@ -110,7 +110,7 @@ check_core_config () { > ulimit -c unlimited > fi > elif test X"$FORCE_COREFILES" = Xyes; then > - ulimit -c 67108864 > + ulimit -c $ULIMIT_CORE > fi > } > > @@ -357,6 +357,7 @@ set_defaults () { > OVSDB_SERVER_UMASK= > OVS_VSWITCHD_UMASK= > OOM_SCORE= > + ULIMIT_CORE=67108864 > > DB_FILE=$dbdir/conf.db > DB_SOCK=$rundir/db.sock > @@ -450,6 +451,7 @@ Less important options for "start", "restart" and "force-reload-kmod": > --no-record-hostname do not attempt to determine/record system > hostname as part of start command > --oom-score=SCORE Set oom-score after starting ovs daemon. > + --ulimit-core=LIMIT Set ulimit core file size. > > Debugging options for "start", "restart" and "force-reload-kmod": > --ovsdb-server-wrapper=WRAPPER > -- > 2.21.0
On 18 May 2025, at 9:53, Roi Dayan wrote: > Allow to set custom core file size with --ulimit-core argument. > This argument can be set in ovs config file > in rhel can set OPTIONS in /etc/sysconfig/openvswitch > in debian can set OVS_CTL_OPTS in /etc/default/openvswitch-switch. > > Signed-off-by: Roi Dayan <roid@nvidia.com> > Acked-by: Gaetan Rivet <gaetanr@nvidia.com> Thanks for the patch Roi. I applied it to main. //Eelco
diff --git a/Documentation/ref/ovs-ctl.8.rst b/Documentation/ref/ovs-ctl.8.rst index 75b3e16f370b..8a4509f0e4b3 100644 --- a/Documentation/ref/ovs-ctl.8.rst +++ b/Documentation/ref/ovs-ctl.8.rst @@ -199,6 +199,11 @@ The following options are less important: Sets the Linux Out-Of-Memory (OOM) killer score for the OVS daemon after it's been started. +* ``--ulimit-core=<LIMIT>`` + + Sets ulimit core file size for the OVS daemon after it's + been started. + * ``--ovsdb-server-priority=<niceness>`` or ``--ovs-vswitchd-priority=<niceness>`` diff --git a/NEWS b/NEWS index 9667296657d9..dfd88a069df9 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ Post-v3.5.0 - ovs-ctl: * Added a new option, --oom-score=<score>, to set the daemons' Linux Out-Of-Memory (OOM) killer score. + * Added a new option, --ulimit-core=<LIMIT>, to set the daemon's ulimit + core file size. - SSL/TLS: * Support for deprecated TLSv1 and TLSv1.1 protocols on OpenFlow and database connections is now removed. diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index 077e1f65a321..c65c76812ed5 100644 --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -110,7 +110,7 @@ check_core_config () { ulimit -c unlimited fi elif test X"$FORCE_COREFILES" = Xyes; then - ulimit -c 67108864 + ulimit -c $ULIMIT_CORE fi } @@ -357,6 +357,7 @@ set_defaults () { OVSDB_SERVER_UMASK= OVS_VSWITCHD_UMASK= OOM_SCORE= + ULIMIT_CORE=67108864 DB_FILE=$dbdir/conf.db DB_SOCK=$rundir/db.sock @@ -450,6 +451,7 @@ Less important options for "start", "restart" and "force-reload-kmod": --no-record-hostname do not attempt to determine/record system hostname as part of start command --oom-score=SCORE Set oom-score after starting ovs daemon. + --ulimit-core=LIMIT Set ulimit core file size. Debugging options for "start", "restart" and "force-reload-kmod": --ovsdb-server-wrapper=WRAPPER