Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1804661 Details for
Bug 1980269
[python-ovs] KeyError raised after ovs probe inactivity
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Use a persistent connection
what_i_would_do.diff (text/plain), 2.40 KB, created by
Terry Wilson
on 2021-07-22 20:58:10 UTC
(
hide
)
Description:
Use a persistent connection
Filename:
MIME Type:
Creator:
Terry Wilson
Created:
2021-07-22 20:58:10 UTC
Size:
2.40 KB
patch
obsolete
>diff --git a/provider/handlers/neutron.py b/provider/handlers/neutron.py >index 8783422..37659d2 100644 >--- a/provider/handlers/neutron.py >+++ b/provider/handlers/neutron.py >@@ -32,8 +32,7 @@ class NeutronHandler(SelectingHandler): > if not validate_token(self.headers.get( > TOKEN_HTTP_HEADER_FIELD_NAME, '')): > raise Forbidden() >- with NeutronApi() as ovn_north: >- return response_handler(ovn_north, content, parameters) >+ return response_handler(NeutronApi(), content, parameters) > > @staticmethod > def get_responses(): >diff --git a/provider/neutron/neutron_api.py b/provider/neutron/neutron_api.py >index a653c8b..2c1a321 100644 >--- a/provider/neutron/neutron_api.py >+++ b/provider/neutron/neutron_api.py >@@ -92,7 +92,7 @@ def wrap_default_group_id(f): > class NeutronApi(object): > > def __init__(self, sec_group_support=None): >- self.ovsidl, self.idl = ovn_connection.connect() >+ self.idl = ovn_connection.connect() > self.ovn_north = OvnNorth(self.idl) > self.security_group_support = ( > sec_group_support or self.are_security_groups_supported() >@@ -1665,10 +1665,4 @@ class NeutronApi(object): > self.ovn_north.remove_security_group_rule(security_group_rule_id) > > def are_security_groups_supported(self): >- return ovnconst.TABLE_PORT_GROUP in self.ovsidl.tables >- >- def __enter__(self): >- return self >- >- def __exit__(self, type, value, tb): >- self.ovsidl.close() >+ return ovnconst.TABLE_PORT_GROUP in self.idl.tables >diff --git a/provider/ovn_connection.py b/provider/ovn_connection.py >index 64c653c..bc312f3 100644 >--- a/provider/ovn_connection.py >+++ b/provider/ovn_connection.py >@@ -38,19 +38,25 @@ from ovirt_provider_config_common import ssl_key_file > from ovirt_provider_config_common import ssl_cacert_file > from ovirt_provider_config_common import ssl_cert_file > >+api_impl = None >+ > > def connect(): >+ global api_impl >+ if api_impl: >+ return api_mpl > configure_ssl_connection() > ovsidl = ovsdbapp.backend.ovs_idl.connection.OvsdbIdl.from_server( > ovn_remote(), > ovnconst.OVN_NORTHBOUND > ) >- return ovsidl, OvnNbApiIdlImpl( >+ api_impl = OvnNbApiIdlImpl( > ovsdbapp.backend.ovs_idl.connection.Connection( > idl=ovsidl, > timeout=100 > ) > ) >+ return api_impl > > > def configure_ssl_connection():
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1980269
: 1804661