Comment 4 for bug 1727855

Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

Two things :

#1 the conditional branch with "if request_spec" makes that code to be run if and only if the existing instance isn't having a RequestSpec record. There are two reasons for that : either it's a very old instance that was created post-Mitaka (IIRC when we started to persist the ReqSpec) or we're in a cellsv1 case where we could have the API DB not containing the record because of another cell. Both cases are very unlikely to happen because we wrote an online data migration method in Mitaka that operators needed to run for creating all RequestSpec records for existing instances.
So in theory, we could remove that section of code and just assume that all instances are having a ReqSpec record - but I'd love to see operators confirming that doesn't break their clouds.

#2 That's actually a good catch, we pass image_ref=None when we evacuate (so that means evacuations of old instances not having a ReqSpec record don't verify the correct image, hence the bug) but for the rebuild case (I mean the rebuild API) we need to check the new image that is passed by the user, right? In that case, I can see the API passing image_ref=image_href to the conductor API (which is the new image reference), so I don't see why we should use the nested image from the instance ?