yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #24920
[Bug 1397153] [NEW] instance stuck at migrating state when some unexpected error happened
Public bug reported:
As the code in conductor:
try:
live_migrate.execute(context, instance, destination,
block_migration, disk_over_commit)
except (exception.NoValidHost,
exception.ComputeServiceUnavailable,
exception.InvalidHypervisorType,
....) as ex:
with excutils.save_and_reraise_exception():
# TODO(johngarbutt) - eventually need instance actions here
request_spec = {'instance_properties': {
'uuid': instance['uuid'], },
}
scheduler_utils.set_vm_state_and_notify(context,
'compute_task', 'migrate_server',
dict(vm_state=instance['vm_state'],
task_state=None,
expected_task_state=task_states.MIGRATING,),
ex, request_spec, self.db)
except Exception as ex:
LOG.error(_LE('Migration of instance %(instance_id)s to host'
' %(dest)s unexpectedly failed.'),
{'instance_id': instance['uuid'], 'dest': destination},
exc_info=True)
raise exception.MigrationError(reason=six.text_type(ex))
When there is any unexpected exception raised from 'live_migrate.execute', the code will raise MigrationError, then the instance stuck at vm_state:active task_state: migrating and return 400 to user. This is confuse for user.
** Affects: nova
Importance: Undecided
Assignee: Alex Xu (xuhj)
Status: New
** Changed in: nova
Assignee: (unassigned) => Alex Xu (xuhj)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1397153
Title:
instance stuck at migrating state when some unexpected error happened
Status in OpenStack Compute (Nova):
New
Bug description:
As the code in conductor:
try:
live_migrate.execute(context, instance, destination,
block_migration, disk_over_commit)
except (exception.NoValidHost,
exception.ComputeServiceUnavailable,
exception.InvalidHypervisorType,
....) as ex:
with excutils.save_and_reraise_exception():
# TODO(johngarbutt) - eventually need instance actions here
request_spec = {'instance_properties': {
'uuid': instance['uuid'], },
}
scheduler_utils.set_vm_state_and_notify(context,
'compute_task', 'migrate_server',
dict(vm_state=instance['vm_state'],
task_state=None,
expected_task_state=task_states.MIGRATING,),
ex, request_spec, self.db)
except Exception as ex:
LOG.error(_LE('Migration of instance %(instance_id)s to host'
' %(dest)s unexpectedly failed.'),
{'instance_id': instance['uuid'], 'dest': destination},
exc_info=True)
raise exception.MigrationError(reason=six.text_type(ex))
When there is any unexpected exception raised from 'live_migrate.execute', the code will raise MigrationError, then the instance stuck at vm_state:active task_state: migrating and return 400 to user. This is confuse for user.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1397153/+subscriptions
Follow ups
References