Comment 48 for bug 1664931

Revision history for this message
Nolwenn Cauchois (nolwenn) wrote : Re: nova rebuild ignores all image properties and scheduler filters (CVE-2017-16239)

I tested the patch in newton and it works well.
But when nova rejects the rebuild operation, image of the instance is still changed.
For example, if we rebuild an ubuntu instance with a new windows image and it is rejected by the nova scheduler, when we do a "nova show" we see that the instance has a windows image.

If an exception is raised here:
https://github.com/openstack/nova/blob/stable/newton/nova/conductor/manager.py#L699
it may be necessary to update the instance with the old image:
instance.task_state = None
instance.image_ref = orig_image_ref
instance.save()