On 6/30/23 18:33, Flavio Leitner wrote:
> 
> On 6/30/23 12:31, Aaron Conole wrote:
>> Flavio Leitner <[email protected]> writes:
>>
>>> 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 '65'
>>> (EX_DATAERR) 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://bugzilla.redhat.com/1731553
>>> Signed-off-by: Flavio Leitner <[email protected]>
>>> ---
>> LGTM.  I did a quick double check for FreeBSD and Mac OS X, and the
>> error code is the same value as on linux systems.
>>
>> I don't have a windows machine to test with and unfortunately the robot
>> doesn't build series_* branches on appveyor (maybe something to look
>> at).  We may need a workaround for windows - but I'll let Alin take a
>> look.
>>
>> Acked-by: Aaron Conole <[email protected]>
> 
> Thanks for reviewing and testing it.
> 
> fbl

I didn't look very closely at a patch, but it does fail the Windows build
unfortunately:

 utilities\ovs-vsctl.c(28): fatal error C1083: Cannot open include file:
                            'sysexits.h': No such file or directory

Please, take a look.  You should be able to setup appveyor account for
yourself for testing.  It has a free tier.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to