The 'tripleoclient.export.export_stack' contains a race condition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Medium
|
Jiri Podivin |
Bug Description
Description
===========
The 'export_stack' function contains a race condition.
With the correct operation of the function depending on particular order of the 'tripleoclient.
If the requested file isn't found, and the loop has underwent one successful iteration immediately prior, the 'export_data' variable will be filled with the values obtained at during the previous successful iteration.
If the requested file isn't successfully found and decoded, the error, or warning, is still logged, but the execution continues with the following statements. [0]
As the 'export_data' still contains value obtained in previous iteration, the condition[1] will be cleared and the 'param' key in the 'data' dictionary will be filled with the value contained within the 'export_data' variable.
Source
------
for export_key, export_param in constants.
param = export_
if "file" in export_param:
# get file data
file = os.path.
if not os.path.
[0]-------> LOG.warning('File %s was not found during export' %
with open(file, 'r') as ff:
else:
# get stack data
if export_data: <------
# When we export information from a cell controller stack
# we don't want to filter.
if "filter" in export_param and should_filter:
for filter_key in export_
else:
else:
raise Exception(
"No data returned to export %s from." % param)
description: | updated |
Fix proposed to branch: master /review. opendev. org/c/openstack /python- tripleoclient/ +/805409
Review: https:/