<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openvswitch.git/python, branch branch-3.0</title>
<subtitle>github.com: openvswitch/ovs.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/'/>
<entry>
<title>python-stream: Handle SSL error in do_handshake.</title>
<updated>2023-04-26T12:56:35+00:00</updated>
<author>
<name>Stefan Hoffmann</name>
<email>stefan.hoffmann@cloudandheat.com</email>
</author>
<published>2023-04-21T08:29:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=0136ccd060e9a9f79d22623ab41f715a5f761505'/>
<id>0136ccd060e9a9f79d22623ab41f715a5f761505</id>
<content type='text'>
In some cases ovsdb server or relay gets restarted, ovsdb python clients
may keep the local socket open. Instead of reconnecting a lot of failures
will be logged.
This can be reproduced with ssl connections to the server/relay and
restarting it, so it has the same IP after restart.

This patch catches the Exceptions at do_handshake to recreate the
connection on the client side.

Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Stefan Hoffmann &lt;stefan.hoffmann@cloudandheat.com&gt;
Signed-off-by: Luca Czesla &lt;luca.czesla@mail.schwarz&gt;
Signed-off-by: Max Lamprecht &lt;max.lamprecht@mail.schwarz&gt;
Co-authored-by: Luca Czesla &lt;luca.czesla@mail.schwarz&gt;
Co-authored-by: Max Lamprecht &lt;max.lamprecht@mail.schwarz&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases ovsdb server or relay gets restarted, ovsdb python clients
may keep the local socket open. Instead of reconnecting a lot of failures
will be logged.
This can be reproduced with ssl connections to the server/relay and
restarting it, so it has the same IP after restart.

This patch catches the Exceptions at do_handshake to recreate the
connection on the client side.

Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Stefan Hoffmann &lt;stefan.hoffmann@cloudandheat.com&gt;
Signed-off-by: Luca Czesla &lt;luca.czesla@mail.schwarz&gt;
Signed-off-by: Max Lamprecht &lt;max.lamprecht@mail.schwarz&gt;
Co-authored-by: Luca Czesla &lt;luca.czesla@mail.schwarz&gt;
Co-authored-by: Max Lamprecht &lt;max.lamprecht@mail.schwarz&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Fix datapath flow decoders.</title>
<updated>2022-12-21T18:19:36+00:00</updated>
<author>
<name>Adrian Moreno</name>
<email>amorenoz@redhat.com</email>
</author>
<published>2022-12-19T16:13:42+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=7b5c4240c1ed5f38e476cf08819869dc14f55e8a'/>
<id>7b5c4240c1ed5f38e476cf08819869dc14f55e8a</id>
<content type='text'>
Fix the following erros in odp decoding:
- Missing push_mpls action
- Typos in collector_set_id, tp_src/tp_dst and csum
- Missing two fields in vxlan match

Signed-off-by: Adrian Moreno &lt;amorenoz@redhat.com&gt;
Acked-by: Mike Pattrick &lt;mkp@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following erros in odp decoding:
- Missing push_mpls action
- Typos in collector_set_id, tp_src/tp_dst and csum
- Missing two fields in vxlan match

Signed-off-by: Adrian Moreno &lt;amorenoz@redhat.com&gt;
Acked-by: Mike Pattrick &lt;mkp@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-cs: Consider default conditions implicitly acked.</title>
<updated>2022-12-13T17:58:23+00:00</updated>
<author>
<name>Dumitru Ceara</name>
<email>dceara@redhat.com</email>
</author>
<published>2022-12-13T17:11:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=2410b95597fcec5f733caf77febdb46f4ffacd27'/>
<id>2410b95597fcec5f733caf77febdb46f4ffacd27</id>
<content type='text'>
When initializing a monitor table the default monitor condition is
[True] which matches the behavior of the server (to send all rows of
that table).  There's no need to include this default condition in the
initial monitor request so we can consider it implicitly acked by the
server.

This fixes the incorrect (one too large) expected condition sequence
number reported by ovsdb_idl_set_condition() when application is
trying to set a [True] condition for a new table.

Reported-by: Numan Siddique &lt;numans@ovn.org&gt;
Suggested-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
Signed-off-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When initializing a monitor table the default monitor condition is
[True] which matches the behavior of the server (to send all rows of
that table).  There's no need to include this default condition in the
initial monitor request so we can consider it implicitly acked by the
server.

This fixes the incorrect (one too large) expected condition sequence
number reported by ovsdb_idl_set_condition() when application is
trying to set a [True] condition for a new table.

Reported-by: Numan Siddique &lt;numans@ovn.org&gt;
Suggested-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
Signed-off-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: idl: Fix idl.Row.__str__ method.</title>
<updated>2022-09-19T16:32:43+00:00</updated>
<author>
<name>Christopher Aubut</name>
<email>christopher@aubut.me</email>
</author>
<published>2022-07-13T15:53:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=6636fc9fff51ca7b0f189148c4cf6e94c940d9d4'/>
<id>6636fc9fff51ca7b0f189148c4cf6e94c940d9d4</id>
<content type='text'>
Fixes idl.Row's __str__ method to only print if the column exists on
the object.  The Row object passed to the 'updates' argument of
Idl.notify only contains a subset of columns.  Printing that argument
causes an AttributeError.

Fixes: 6a1c98461b46 ("Add a __str__ method to idl.Row")
Submitted-at: https://github.com/openvswitch/ovs/pull/392
Acked-by: Terry Wilson &lt;twilson@redhat.com&gt;
Signed-off-by: Christopher Aubut &lt;christopher@aubut.me&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes idl.Row's __str__ method to only print if the column exists on
the object.  The Row object passed to the 'updates' argument of
Idl.notify only contains a subset of columns.  Printing that argument
causes an AttributeError.

Fixes: 6a1c98461b46 ("Add a __str__ method to idl.Row")
Submitted-at: https://github.com/openvswitch/ovs/pull/392
Acked-by: Terry Wilson &lt;twilson@redhat.com&gt;
Signed-off-by: Christopher Aubut &lt;christopher@aubut.me&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Do not send non-zero flag for a SSL socket.</title>
<updated>2022-08-11T23:27:18+00:00</updated>
<author>
<name>Miro Tomaska</name>
<email>mtomaska@redhat.com</email>
</author>
<published>2022-08-08T17:32:42+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=ddff8a7e328391ae464dd20a377ce2fd0e0df9f7'/>
<id>ddff8a7e328391ae464dd20a377ce2fd0e0df9f7</id>
<content type='text'>
pyOpenSSL was recently switched for the Python standard library ssl
module in the cited commit.  Python SSLsocket.send() does not allow
non-zero optional flag and it will explicitly raise an exception for
that.  pyOpenSSL did nothing with this flag but kept it to be
compatible with socket API:
  https://github.com/pyca/pyopenssl/blob/main/src/OpenSSL/SSL.py#L1844

Fixes: 68543dd523bd ("python: Replace pyOpenSSL with ssl.")
Reported-at: https://bugzilla.redhat.com/2115035
Acked-By: Timothy Redaelli &lt;tredaelli@redhat.com&gt;
Signed-off-by: Miro Tomaska &lt;mtomaska@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pyOpenSSL was recently switched for the Python standard library ssl
module in the cited commit.  Python SSLsocket.send() does not allow
non-zero optional flag and it will explicitly raise an exception for
that.  pyOpenSSL did nothing with this flag but kept it to be
compatible with socket API:
  https://github.com/pyca/pyopenssl/blob/main/src/OpenSSL/SSL.py#L1844

Fixes: 68543dd523bd ("python: Replace pyOpenSSL with ssl.")
Reported-at: https://bugzilla.redhat.com/2115035
Acked-By: Timothy Redaelli &lt;tredaelli@redhat.com&gt;
Signed-off-by: Miro Tomaska &lt;mtomaska@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Fix E275 missing whitespace after keyword.</title>
<updated>2022-08-04T16:15:23+00:00</updated>
<author>
<name>Ilya Maximets</name>
<email>i.maximets@ovn.org</email>
</author>
<published>2022-08-04T13:56:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=941c6bda0dbdf77b74ea45520877127f93c0ac0f'/>
<id>941c6bda0dbdf77b74ea45520877127f93c0ac0f</id>
<content type='text'>
With just released flake8 5.0 we're getting a bunch of E275 errors:

 utilities/bugtool/ovs-bugtool.in:959:23: E275 missing whitespace after keyword
 tests/test-ovsdb.py:623:11: E275 missing whitespace after keyword
 python/setup.py:105:8: E275 missing whitespace after keyword
 python/setup.py:106:8: E275 missing whitespace after keyword
 python/ovs/db/idl.py:145:15: E275 missing whitespace after keyword
 python/ovs/db/idl.py:167:15: E275 missing whitespace after keyword
 make[2]: *** [flake8-check] Error 1

This breaks CI on branches below 2.16.  We don't see a problem right
now on newer branches because we're installing extra dependencies
that backtrack flake8 down to 4.1 or even 3.9.

Acked-by: Mike Pattrick &lt;mkp@redhat.com&gt;
Acked-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With just released flake8 5.0 we're getting a bunch of E275 errors:

 utilities/bugtool/ovs-bugtool.in:959:23: E275 missing whitespace after keyword
 tests/test-ovsdb.py:623:11: E275 missing whitespace after keyword
 python/setup.py:105:8: E275 missing whitespace after keyword
 python/setup.py:106:8: E275 missing whitespace after keyword
 python/ovs/db/idl.py:145:15: E275 missing whitespace after keyword
 python/ovs/db/idl.py:167:15: E275 missing whitespace after keyword
 make[2]: *** [flake8-check] Error 1

This breaks CI on branches below 2.16.  We don't see a problem right
now on newer branches because we're installing extra dependencies
that backtrack flake8 down to 4.1 or even 3.9.

Acked-by: Mike Pattrick &lt;mkp@redhat.com&gt;
Acked-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Use setuptools instead of distutils.</title>
<updated>2022-08-04T11:59:04+00:00</updated>
<author>
<name>Timothy Redaelli</name>
<email>tredaelli@redhat.com</email>
</author>
<published>2022-06-29T15:31:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=33ac6983b8a488bcdfd12d319c90e9f89185071c'/>
<id>33ac6983b8a488bcdfd12d319c90e9f89185071c</id>
<content type='text'>
On Python 3.12, distutils will be removed and it's currently (3.10+)
deprecated (see PEP 632).

Since the suggested and simplest replacement is setuptools, this commit
replaces distutils to use setuptools instead.

setuptools &lt; 59.0 doesn't have setuptools.errors and so, in this case,
distutils.errors is still used.

Signed-off-by: Timothy Redaelli &lt;tredaelli@redhat.com&gt;
Acked-by: Mike Pattrick &lt;mkp@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Python 3.12, distutils will be removed and it's currently (3.10+)
deprecated (see PEP 632).

Since the suggested and simplest replacement is setuptools, this commit
replaces distutils to use setuptools instead.

setuptools &lt; 59.0 doesn't have setuptools.errors and so, in this case,
distutils.errors is still used.

Signed-off-by: Timothy Redaelli &lt;tredaelli@redhat.com&gt;
Acked-by: Mike Pattrick &lt;mkp@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Add ability to pass extra libs and cflags for C extension.</title>
<updated>2022-07-29T15:17:32+00:00</updated>
<author>
<name>Ilya Maximets</name>
<email>i.maximets@ovn.org</email>
</author>
<published>2022-07-25T12:19:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=e0b417a03e3fbf0228c395f4d50b9f5b3b82f6fb'/>
<id>e0b417a03e3fbf0228c395f4d50b9f5b3b82f6fb</id>
<content type='text'>
In order to correctly link with static libopenvswitch.a library,
users should also provide required cflags and all the libraries
libopenvswitch.a was actually built with and depends on.  Otherwise,
it's not possible to link correctly.

Fixes: 671f93fe42d3 ("python: Allow building json C extension with static OVS library.")
Acked-by: Frode Nordahl &lt;frode.nordahl@canonical.com&gt;
Reviewed-by: David Marchand &lt;david.marchand@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to correctly link with static libopenvswitch.a library,
users should also provide required cflags and all the libraries
libopenvswitch.a was actually built with and depends on.  Otherwise,
it's not possible to link correctly.

Fixes: 671f93fe42d3 ("python: Allow building json C extension with static OVS library.")
Acked-by: Frode Nordahl &lt;frode.nordahl@canonical.com&gt;
Reviewed-by: David Marchand &lt;david.marchand@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python-c-ext: Handle initialization failures.</title>
<updated>2022-07-29T15:16:48+00:00</updated>
<author>
<name>Ilya Maximets</name>
<email>i.maximets@ovn.org</email>
</author>
<published>2022-07-22T19:16:42+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=b4df85397c4def8934b065affe98222f3b38f99a'/>
<id>b4df85397c4def8934b065affe98222f3b38f99a</id>
<content type='text'>
PyModule_AddObject() may fail and it doesn't steal references
in this case.  The error condition should be handled to avoid
possible memory leaks.

And while it's not strictly specified if PyModule_Create may
fail, most of the examples in python documentation include
handling of a NULL case.

Acked-by: Mike Pattrick &lt;mkp@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PyModule_AddObject() may fail and it doesn't steal references
in this case.  The error condition should be handled to avoid
possible memory leaks.

And while it's not strictly specified if PyModule_Create may
fail, most of the examples in python documentation include
handling of a NULL case.

Acked-by: Mike Pattrick &lt;mkp@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python-c-ext: Fix a couple of build warnings.</title>
<updated>2022-07-22T15:25:47+00:00</updated>
<author>
<name>Timothy Redaelli</name>
<email>tredaelli@redhat.com</email>
</author>
<published>2022-07-18T10:40:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=6a75842cd0b68c832f6705c59298501f8bc0514d'/>
<id>6a75842cd0b68c832f6705c59298501f8bc0514d</id>
<content type='text'>
ovs/_json.c:67:20: warning: assignment discards ‘const’ qualifier from pointer
target type [-Wdiscarded-qualifiers]

ovs/_json.c:132:27: warning: comparison of integer expressions of different
signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]

Signed-off-by: Timothy Redaelli &lt;tredaelli@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ovs/_json.c:67:20: warning: assignment discards ‘const’ qualifier from pointer
target type [-Wdiscarded-qualifiers]

ovs/_json.c:132:27: warning: comparison of integer expressions of different
signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]

Signed-off-by: Timothy Redaelli &lt;tredaelli@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
