Bug 819283 - ovirt-engine-backend [RACE]: we can destroy a domain while its being activated
ovirt-engine-backend [RACE]: we can destroy a domain while its being activated
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
x86_64 Linux
low Severity high
: ---
: 3.1.0
Assigned To: mkublin
vvyazmin@redhat.com
storage
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-06 05:29 EDT by Dafna Ron
Modified: 2016-02-10 12:04 EST (History)
11 users (show)

See Also:
Fixed In Version: si10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-19 07:16:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
logs (104.00 KB, application/x-gzip)
2012-05-06 05:29 EDT, Dafna Ron
no flags Details
logs vdsm.log $ engine.log (1.02 MB, application/x-gzip)
2012-07-11 08:13 EDT, vvyazmin@redhat.com
no flags Details

  None (edit)
Description Dafna Ron 2012-05-06 05:29:03 EDT
Created attachment 582415 [details]
logs

Description of problem:

activating a domain and starting a destroy action on the domain will cause the domain to be removed from DB but to be connected to the pool in vds. 

1) except for vdsm and backend not being synced (which can cause some issues along the way) since the domains are listed in master domain metadata we will not be able to remove the master domain without destroy of DC. 

2) locking mechanism should apply on this case since domain is suppose to be in locked state. 
 
Version-Release number of selected component (if applicable):

si3

How reproducible:

100

Steps to Reproduce:
1. activate SD -> move to storage tab -> destroy the domain 
2.
3.
  
Actual results:

domain is removed from DB and is activated and connected in vds. 

Expected results:

1) domain should be locked so action should be prevented by locking mechanism since its suppose to be in image locked. 
2) we should also add validation with CanDoAction 

Additional info:

[root@orange-vdsd ~]# vdsClient -s 0 getStorageDomainsList
7887bf00-181d-4861-8da4-26138c2ac94f
8d37aadd-9234-4c06-96e5-f551fca7cc3d
99b356f1-46f4-40bf-8e1b-b86ed4be9914
cc22fd05-fc11-42b5-90dd-19ecfffc6109
1c4b81c0-bc2b-4b57-9341-5179ee848abd


these two domains were destroyed: 

[root@orange-vdsd ~]# vdsClient -s 0 getStorageDomainInfo 7887bf00-181d-4861-8da4-26138c2ac94f
	uuid = 7887bf00-181d-4861-8da4-26138c2ac94f
	vguuid = v0z3T0-qk8P-sBYO-3meb-WMnk-RGTe-q2RO61
	lver = -1
	state = OK
	version = 2
	role = Regular
	pool = ['ce13371e-d637-4901-810d-73e2fdd90496']
	spm_id = -1
	type = ISCSI
	class = Data
	master_ver = 0
	name = small2

[root@orange-vdsd ~]# vdsClient -s 0 getStorageDomainInfo 8d37aadd-9234-4c06-96e5-f551fca7cc3d
	uuid = 8d37aadd-9234-4c06-96e5-f551fca7cc3d
	vguuid = XuAqMC-pMEt-DTqO-eBa2-x7Y7-cZck-APG44u
	lver = -1
	state = OK
	version = 2
	role = Regular
	pool = ['ce13371e-d637-4901-810d-73e2fdd90496']
	spm_id = -1
	type = ISCSI
	class = Data
	master_ver = 0
	name = small3
Comment 1 Yair Zaslavsky 2012-06-10 05:40:16 EDT
suggested patch : http://gerrit.ovirt.org/5179
Comment 2 mkublin 2012-06-10 08:05:37 EDT
pushed
Comment 3 vvyazmin@redhat.com 2012-07-11 08:13:51 EDT
Created attachment 597546 [details]
logs vdsm.log $ engine.log
Comment 4 vvyazmin@redhat.com 2012-07-11 08:14:36 EDT
This bug reproduced on RHEVM 3.1 - SI9.1 

RHEV-M: rhevm-3.1.0-5.el6ev.noarch
VDSM: vdsm-4.9.6-17.0.el6.x86_64
LIBVIRT: libvirt-0.9.10-21.el6.x86_64
QEMU & KVM: qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64 


[root@cougar08 ~]# vdsClient -s 0 getStorageDomainsList
fb9e0f33-022d-4cc7-ab9a-0e6c8394c921
5cac9011-9ea4-4e53-a23e-2344aebad734


Domain: fb9e0f33-022d-4cc7-ab9a-0e6c8394c921 (name = SD-02-iSCSI) - was destroyed.


[root@cougar08 ~]# vdsClient -s 0 getStorageDomainInfo fb9e0f33-022d-4cc7-ab9a-0e6c8394c921
	uuid = fb9e0f33-022d-4cc7-ab9a-0e6c8394c921
	vguuid = YrGidz-60g9-mkFK-FLr1-WJ2d-cFRo-p2fxWx
	lver = -1
	state = OK
	version = 2
	role = Regular
	pool = ['c63ea75d-2c36-4301-9cfb-657ac5a393ac']
	spm_id = -1
	type = ISCSI
	class = Data
	master_ver = 0
	name = SD-02-iSCSI

[root@cougar08 ~]# vdsClient -s 0 getStorageDomainInfo 5cac9011-9ea4-4e53-a23e-2344aebad734
	uuid = 5cac9011-9ea4-4e53-a23e-2344aebad734
	vguuid = zc1IP4-sE6M-s6Sg-VJRG-KaBE-0Cce-4OM9Og
	lver = 2
	state = OK
	version = 2
	role = Master
	pool = ['c63ea75d-2c36-4301-9cfb-657ac5a393ac']
	spm_id = 1
	type = ISCSI
	class = Data
	master_ver = 1
	name = Storage-Domain-01-iSCSI
Comment 5 mkublin 2012-07-11 09:09:39 EDT
http://gerrit.ovirt.org/#/c/6149/
pushed
Comment 6 vvyazmin@redhat.com 2012-07-18 08:19:39 EDT
This bug reproduced on RHEVM 3.1 - SI10
Comment 7 mkublin 2012-07-18 09:12:07 EDT
The system will not allow to ForceRemove same domain twice, but when I did Activate and move domain to status locked, I am releasing a memory lock, by defenition it is not important for ForceRemove status of domain and it will be removed. If ForceRemove was started before Activate, Activate will fail, but the case which is described at bug is not a bug.
Comment 8 vvyazmin@redhat.com 2012-07-19 06:14:56 EDT
The problem is when I destroy the domain, the record not deleted from DB. 
When you run following command, before “destroy” action and after:

vdsClient -s 0 getStorageDomainsList

you get same results.

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