Instance deletion fails due to race condition on Hyper-V
Bug #1276772 reported by
Alessandro Pilotti
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Alessandro Pilotti |
Bug Description
A recently merge patch separates the lock required to delete an instance from the one used during instance creation and other operations.
This leads to race conditions in the Hyper-V driver, as the spawn and destroy methods have been written considering that locking already occurs at the compute manager level.
This patch has already been committed, reverted and committed again:
https:/
https:/
https:/
tags: | added: hyper-v |
Changed in nova: | |
importance: | Undecided → High |
status: | New → In Progress |
assignee: | nobody → Alessandro Pilotti (alexpilotti) |
milestone: | none → icehouse-3 |
Changed in nova: | |
milestone: | icehouse-3 → icehouse-rc1 |
Changed in nova: | |
milestone: | icehouse-rc1 → icehouse-3 |
status: | In Progress → Fix Released |
Changed in nova: | |
milestone: | icehouse-3 → 2014.1 |
To post a comment you must log in.
Fail:
http:// 64.119. 130.115/ 63217/7/ Hyper-V/ hv-compute2/ nova-compute. log.gz
2014-02-04 12:04:21.801 444 ERROR nova.virt. hyperv. vmops [req-169d8df4- f190-409e- ae31-3e501e9b64 01 0c4d774866944ff 78b9222e732172e ee f467a9dd25c4477 398f3ba92977acc 14] [Error 32] The process cannot access the file because it is being used by another process: 'C:\\OpenStack\ \Instances\ \instance- 00000008\ \root.vhd' hyperv. vmops Traceback (most recent call last): hyperv. vmops File "c:\OpenStack\ virtualenv\ lib\site- packages\ nova\virt\ hyperv\ vmops.py" , line 357, in destroy hyperv. vmops self._delete_ disk_files( instance_ name) hyperv. vmops File "c:\OpenStack\ virtualenv\ lib\site- packages\ nova\virt\ hyperv\ vmops.py" , line 336, in _delete_disk_files hyperv. vmops remove_dir=True) hyperv. vmops File "c:\OpenStack\ virtualenv\ lib\site- packages\ nova\virt\ hyperv\ pathutils. py", line 120, in get_instance_dir hyperv. vmops create_dir, remove_dir) hyperv. vmops File "c:\OpenStack\ virtualenv\ lib\site- packages\ nova\virt\ hyperv\ pathutils. py", line 106, in _get_instances_ sub_dir hyperv. vmops self._check_ remove_ dir(path) hyperv. vmops File "c:\OpenStack\ virtualenv\ lib\site- packages\ nova\virt\ hyperv\ pathutils. py", line 99, in _check_remove_dir hyperv. vmops self.rmtree(path) hyperv. vmops File "c:\OpenStack\ virtualenv\ lib\site- packages\ nova\virt\ hyperv\ pathutils. py", line 75, in rmtree hyperv. vmops shutil.rmtree(path) hyperv. vmops File "C:\Python27\ Lib\shutil. py", line 252, in rmtree hyperv. vmops onerror(os.remove, fullname, sys.exc_info()) hyperv. vmops File "C:\Python27\ Lib\shutil. py", line 250, in rmtree hyperv. vmops os.remove(fullname) hyperv. vmops WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'C:\\OpenStack\ \Instances\ \instance- 00000008\ \root.vhd' hyperv. vmops
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.
2014-02-04 12:04:21.801 444 TRACE nova.virt.