image_transfer.ImageWriter.start() incorrectly assumes image_service.update() is a non-blocking operation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.vmware |
Confirmed
|
Low
|
Unassigned |
Bug Description
Code inside the ImageWriter.start() method looks like this:
try:
except Exception as excep:
The problem with the above is two-fold:
1) The code in image_service.
elif image_status in ['saving', 'queued']:
or:
else:
to happen. The image will either be active or killed if the call to image_service.
2) I have a bad feeling about tightly-coupling the image API with the write handles in this way. I'd much prefer to see the image service/API objects removed entirely from the ImageWriter objects and used in code outside of oslo.vmware library, with the ImageWriter object being a simple wrapper around an io.BufferedWriter. In fact, I'm not entirely sure it's necessary to even have that. Instead, just remove all the custom reader/writer stuff and have oslo.vmware library implement a transfer_queue module that manages the traffic control of io.BufferedReader and io.BufferedWriter objects.
Changed in oslo.vmware: | |
status: | New → Confirmed |
importance: | Undecided → Low |
This issue was fixed in the openstack/ oslo.vmware 2.12.0 release.