Update nova microversion for volume backed instance rebuild
The cinder side change for reimaging a volume merged in yoga[1].
However, it assume the nova side change has microversion 2.91
which was correct during that time but since then many new
features have merged in nova causing the nova side microversion
to bump to 2.93 (as per current upstream change[2]).
This patch updates the nova microversion (which we use) to send
'volume-reimaged' external event to nova notifying about
completion of the operation from cinder side.
[1] d69e89ea3b
[2] https://review.opendev.org/c/openstack/nova/+/830883
Change-Id: I8fae9e2b138545e97cc60e32bbfb527c2e2072ea
This commit is contained in:
parent
2aa4922bdd
commit
6eb2f4fb77
|
@ -226,7 +226,7 @@ class API(base.Base):
|
|||
return result
|
||||
|
||||
def reimage_volume(self, context, server_ids, volume_id):
|
||||
api_version = '2.91'
|
||||
api_version = '2.93'
|
||||
events = [self._get_volume_reimaged_event(server_id, volume_id)
|
||||
for server_id in server_ids]
|
||||
result = self._send_events(context, events, api_version=api_version)
|
||||
|
|
|
@ -295,7 +295,7 @@ class NovaApiTestCase(test.TestCase):
|
|||
|
||||
mock_novaclient.assert_called_once_with(self.ctx,
|
||||
privileged_user=True,
|
||||
api_version='2.91')
|
||||
api_version='2.93')
|
||||
mock_create_event.assert_called_once_with([
|
||||
{'name': 'volume-reimaged',
|
||||
'server_uuid': 'server-id-1',
|
||||
|
@ -323,7 +323,7 @@ class NovaApiTestCase(test.TestCase):
|
|||
|
||||
mock_novaclient.assert_called_once_with(self.ctx,
|
||||
privileged_user=True,
|
||||
api_version='2.91')
|
||||
api_version='2.93')
|
||||
mock_create.assert_called_once_with(
|
||||
self.ctx,
|
||||
message_field.Action.REIMAGE_VOLUME,
|
||||
|
|
Loading…
Reference in New Issue