Bug 773364 - [vdsm] cancel-migration: abort migration on dest when vm is during migration results an exception
Summary: [vdsm] cancel-migration: abort migration on dest when vm is during migration ...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Shahar Havivi
QA Contact:
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-11 16:27 UTC by Haim
Modified: 2014-01-13 00:50 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-18 07:42:37 UTC
oVirt Team: ---


Attachments (Terms of Use)
vdsm log (1.45 MB, application/x-gzip)
2012-01-12 18:03 UTC, Haim
no flags Details

Description Haim 2012-01-11 16:27:48 UTC
Description of problem:

- run migration cancel using vdsClient on destination server where vm is on migrating-dest results an AttribureError: 

Thread-177::ERROR::2012-01-11 10:03:22,823::clientIF::90::vds::(wrapper) Traceback (most recent call last):
  File "/usr/share/vdsm/clientIF.py", line 80, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/clientIF.py", line 415, in migrateCancel
    return vm.migrateCancel()
  File "/usr/share/vdsm/vm.py", line 1017, in migrateCancel
    self._migrationSourceThread.stop()
  File "/usr/share/vdsm/libvirtvm.py", line 454, in stop
    self._vm._dom.abortJob()
AttributeError: 'NoneType' object has no attribute 'abortJob


 449     def stop(self):
 450         # if its locks we are before the migrateToURI2()
 451         # call so no need to abortJob()
 452         try:
 453             self._migrationCanceledEvt = True
 454             self._vm._dom.abortJob()


we should check if object is not None before using it, if None, raise proper error.

 455         except libvirt.libvirtError, e:
 456             # TODO: yes its not nice searching in the error message,
 457             # but this is the libvrirt solution
 458             # this will be solved at bz #760149
 459             if e.get_error_code() == libvirt.VIR_ERR_OPERATION_FAILED and \
 460                     'canceled by client' in e.get_error_message():
 461                     # this is exception that libvirt raise when calling
 462                     # abortJob()
 463                     raise
 464             elif not self._preparingMigrationEvt:
 465                     raise

Comment 1 Shahar Havivi 2012-01-12 13:15:55 UTC
can you attach the full log?

Comment 2 Haim 2012-01-12 18:03:17 UTC
Created attachment 552455 [details]
vdsm log

Comment 3 Shahar Havivi 2012-08-30 10:21:26 UTC
still relevant, cannot reproduce...

Comment 4 Haim 2012-08-30 10:29:49 UTC
(In reply to comment #3)
> still relevant, cannot reproduce...

no capacity of testing the flow again.


Note You need to log in before you can comment on or make changes to this bug.