On 7/14/25 12:07 AM, Flavio Leitner wrote: > Today the exit code refers to the execution of the change > in the database. However, when not using parameter --no-wait > (default), the ovs-vsctl also checks if OVSDB transactions > are successfully recorded and reload by ovs-vswitchd. In this > case, an error message is printed if there is a problem during > the reload, like for example the one below: > > # ovs-vsctl add-port br0 gre0 -- \ > set interface gre0 type=ip6gre options:key=100 \ > options:remote_ip=2001::2 > ovs-vsctl: Error detected while setting up 'gre0': could not \ > add network device gre0 to ofproto (Address family not supported\ > by protocol). See ovs-vswitchd log for details. > ovs-vsctl: The default log directory is "/var/log/openvswitch". > # echo $? > 0 > > This patch changes to exit with specific error code 160 > (ERROR_BAD_ARGUMENTS) on Windows and 65 (EX_DATAERR) on > Linux or BSD if errors were reported during the reload. > > This change may break existing scripts because ovs-vsctl will > start to fail when before it was succeeding. However, if an > error is printed, then it is likely that the change was not > functional anyway. > > Reported-at: https://issues.redhat.com/browse/FDP-793 > Signed-off-by: Flavio Leitner <f...@sysclose.org> > --- > > v5: > Fixed afxdp testsuite. > > v4: > Reworded the NEWS entry. > Reworded the man-page change. > Wrapped the 2 long AT_CHECK() lines. > Added the name for the bool argument. > Updated the comment to use post_db_reload_do_checks. > Renamed print_error to reconfig_failed. > > v3: > Fixed the Windows build issue reported by Ilya. > Return ERROR_BAD_ARGUMENTS on Windows. > > v2: > Followed Aaron's suggestion to return EX_DATAERR. > > > NEWS | 5 +++++ > tests/ovs-vsctl.at | 32 +++++++++++++++++++++++++++++-- > tests/ovs-vswitchd.at | 6 +++++- > tests/system-afxdp.at | 2 +- > tests/tunnel.at | 8 +++++++- > utilities/ovs-vsctl.8.in | 11 +++++++++++ > utilities/ovs-vsctl.c | 41 +++++++++++++++++++++++++++++++--------- > 7 files changed, 91 insertions(+), 14 deletions(-)
Thanks, Flavio! I guess, having a review two years before the soft freeze technically qualifies this change for being accepted during the freeze. :) I expanded the NEWS entry a little and applied the patch. Best regards, Ilya Maximets. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev