diff --git a/octavia/common/base_taskflow.py b/octavia/common/base_taskflow.py index 4fb3e3a183..1d072cc955 100644 --- a/octavia/common/base_taskflow.py +++ b/octavia/common/base_taskflow.py @@ -16,6 +16,9 @@ import concurrent.futures import datetime +# work around for https://bugs.python.org/issue7980 +import _strptime # noqa: F401 pylint: disable=unused-import + from oslo_config import cfg from taskflow import engines as tf_engines diff --git a/releasenotes/notes/fix-python2-attributeerror-strptime-89a7350c55ac8818.yaml b/releasenotes/notes/fix-python2-attributeerror-strptime-89a7350c55ac8818.yaml new file mode 100644 index 0000000000..95eaf051df --- /dev/null +++ b/releasenotes/notes/fix-python2-attributeerror-strptime-89a7350c55ac8818.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fix a potential AttributeError exception at init time in the housekeeping + service when using python2 because of an issue with thread safety when + calling strptime for the first time.