Skip to content

Commit 8025910

Browse files
committed
Disabling opentracing/log-correlation in order to eventually upgrade to latest twisted release and base off asyncio reactor for twisted.
1 parent 2e2bdb5 commit 8025910

File tree

9 files changed

+165
-134
lines changed

9 files changed

+165
-134
lines changed

README.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@ Installation instruction
2929

3030
.. code:: bash
3131
32-
pip install pyvoltha-min
32+
python -m pip install pyvoltha-min
3333
3434
Release Notes
3535
-------------
36+
v2.8.1 (2022-09-21)
37+
^^^^^^^^^^^^^^^^^^^
38+
- Disabling opentracing/log-correlation in order to eventually upgrade to latest
39+
twisted release and base off asyncio reactor for twisted.
40+
- Moving minimum python version to 3.8
41+
3642
v2.8.0 (2022-02-01)
3743
^^^^^^^^^^^^^^^^^^^
3844
- Pull in v2.8 (release) voltha-protos definitions and python generated code and

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.8.0
1+
2.8.1

pyvoltha_min/adapters/kafka/kafka_inter_container_library.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,8 @@ def send_request(self, rpc, to_topic, reply_topic=None, # pylint: disable=too-
682682
async_span = None
683683

684684
d = self.send_kafka_message(to_topic, request, async_span)
685-
685+
if d is not None:
686+
return
686687
if self.tx_stats:
687688
def successful(results, rpc_name, start):
688689
# Update statistic at this level

pyvoltha_min/adapters/log_controller.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ def __init__(self, etcd_host, etcd_port, scope_manager, config, watch_callback=N
5858
self._global_log_level = GLOBAL_DEFAULT_LOGLEVEL
5959
self._watch_callback = watch_callback
6060

61-
# Reference
62-
GlobalTracingSupport.set_log_controller(self, scope_manager, config)
61+
# CB: 2022-09-21: Disabling tracing during transition phase of using the latest Twisted
62+
# releases and asyncio as the base reactor. Once this is complete, a
63+
# new major version of pyvoltha-min will be created with tracing re-enabled
64+
# # Reference
65+
# GlobalTracingSupport.set_log_controller(self, scope_manager, config)
6366

6467
@staticmethod
6568
def make_component_path(component):
@@ -254,8 +257,14 @@ def persist_initial_log_features(self):
254257
# Return none always
255258

256259
def enable_jaeger_client(self):
257-
log_correlation_enabled = GlobalTracingSupport.log_correlation_status
258-
tracing_enabled = GlobalTracingSupport.trace_publishing_status
260+
261+
# CB: 2022-09-21: Disabling tracing during transition phase of using the latest Twisted
262+
# releases and asyncio as the base reactor. Once this is complete, a
263+
# new major version of pyvoltha-min will be created with tracing re-enabled.
264+
log_correlation_enabled = False
265+
tracing_enabled = False
266+
# log_correlation_enabled = GlobalTracingSupport.log_correlation_status
267+
# tracing_enabled = GlobalTracingSupport.trace_publishing_status
259268

260269
if tracing_enabled or log_correlation_enabled:
261270
# The following are available 'config' dictionary options

pyvoltha_min/adapters/log_features.py

+32-20
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,17 @@ def log_correlation_status(self, value):
3838
if not isinstance(value, bool):
3939
raise TypeError('Boolean required')
4040

41-
if value != self._log_correlation_enabled:
42-
# Close any previous tracer and reopen if required
43-
tracer = global_tracer()
44-
if hasattr(tracer, 'close'):
45-
tracer.close()
46-
47-
self._log_correlation_enabled = value
48-
self._log_controller.enable_jaeger_client()
41+
# CB: 2022-09-21: Disabling tracing during transition phase of using the latest Twisted
42+
# releases and asyncio as the base reactor. Once this is complete, a
43+
# new major version of pyvoltha-min will be created with tracing re-enabled.
44+
# if value != self._log_correlation_enabled:
45+
# # Close any previous tracer and reopen if required
46+
# tracer = global_tracer()
47+
# if hasattr(tracer, 'close'):
48+
# tracer.close()
49+
#
50+
# self._log_correlation_enabled = value
51+
# self._log_controller.enable_jaeger_client()
4952

5053
@property
5154
def trace_publishing_status(self):
@@ -56,14 +59,17 @@ def trace_publishing_status(self, value):
5659
if not isinstance(value, bool):
5760
raise TypeError('Boolean required')
5861

59-
if value != self._trace_publishing_enabled:
60-
# Close any previous tracer and reopen if required
61-
tracer = global_tracer()
62-
if hasattr(tracer, 'close'):
63-
tracer.close()
64-
65-
self._trace_publishing_enabled = value
66-
self._log_controller.enable_jaeger_client()
62+
# CB: 2022-09-21: Disabling tracing during transition phase of using the latest Twisted
63+
# releases and asyncio as the base reactor. Once this is complete, a
64+
# new major version of pyvoltha-min will be created with tracing re-enabled.
65+
# if value != self._trace_publishing_enabled:
66+
# # Close any previous tracer and reopen if required
67+
# tracer = global_tracer()
68+
# if hasattr(tracer, 'close'):
69+
# tracer.close()
70+
#
71+
# self._trace_publishing_enabled = value
72+
# self._log_controller.enable_jaeger_client()
6773

6874
@property
6975
def component_name(self):
@@ -88,10 +94,16 @@ def set_log_controller(self, log_controller, scope_manager, config):
8894
self._component_name = config.get('component_name', os.environ.get('COMPONENT_NAME',
8995
'unknown-olt'))
9096
self.scope_manager = scope_manager
91-
# Set trace/log correlation directly. During initial startup, we want to start the
92-
# OpenTracing client at the end of our init and not from the property setter functions.
93-
self._trace_publishing_enabled = config.get('trace_enabled')
94-
self._log_correlation_enabled = config.get('log_correlation_enabled')
97+
# CB: 2022-09-21: Disabling tracing during transition phase of using the latest Twisted
98+
# releases and asyncio as the base reactor. Once this is complete, a
99+
# new major version of pyvoltha-min will be created with tracing re-enabled.
100+
self._trace_publishing_enabled = False
101+
self._log_correlation_enabled = False
102+
103+
# # Set trace/log correlation directly. During initial startup, we want to start the
104+
# # OpenTracing client at the end of our init and not from the property setter functions.
105+
# self._trace_publishing_enabled = config.get('trace_enabled')
106+
# self._log_correlation_enabled = config.get('log_correlation_enabled')
95107

96108

97109
GlobalTracingSupport = _LogFeatures()

0 commit comments

Comments
 (0)