Bug 1948952 - LVs are left open in SPM host after storage domain detach
Summary: LVs are left open in SPM host after storage domain detach
Keywords:
Status: CLOSED DUPLICATE of bug 1928041
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 4.4.3
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.4.5
: ---
Assignee: Vojtech Juranek
QA Contact: Avihai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-13 06:56 UTC by nijin ashok
Modified: 2021-05-19 17:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-20 07:28:51 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5957851 0 None None None 2021-04-13 07:53:07 UTC

Description nijin ashok 2021-04-13 06:56:45 UTC
Description of problem:

As per bug 1163890, the LVs are deactivated when SD is put into maintenance mode.

===
2021-04-13 06:15:26,360+0000 INFO  (monitor/d2831c8) [storage.BlockSD] Tearing down domain d2831c8a-2e31-4d13-9fc3-9116debab149 (blockSD:992)
===

However, When the user detaches the SD, vdsm starts a "detachStorageDomain" in the SPM host which activates the LVs again.

===
2021-04-13 06:15:56,371+0000 INFO  (jsonrpc/7) [vdsm.api] START detachStorageDomain(sdUUID='d2831c8a-2e31-4d13-9fc3-9116debab149', spUUID='fd4eb21e-72d8-11eb-80ee-00163e75cb19', msdUUID='00000000-0000-0000-0000-000000000000', masterVersion=1, options=None) from=::ffff:10.74.252.109,59212, flow_id=3500b73f-e735-41c9-b866-5d8e0b94cee2, task_id=1b2e0d8d-2905-4c9f-a6dc-8ad7c9d9bcff (api:48)

2021-04-13 06:15:56,988+0000 INFO  (jsonrpc/7) [storage.LVM] Activating lvs: vg=d2831c8a-2e31-4d13-9fc3-9116debab149 lvs=['ids'] (lvm:1738)
2021-04-13 06:15:57,678+0000 INFO  (jsonrpc/7) [storage.LVM] Activating lvs: vg=d2831c8a-2e31-4d13-9fc3-9116debab149 lvs=['leases'] (lvm:1738)
2021-04-13 06:15:58,030+0000 INFO  (jsonrpc/7) [storage.LVM] Activating lvs: vg=d2831c8a-2e31-4d13-9fc3-9116debab149 lvs=['metadata', 'inbox', 'outbox', 'xleases', 'master'] (lvm:1738)
===

This leaves all the default SD LVs active after the detach operation.

===
lvs --config 'devices { filter = [ "a|/dev/mapper/*|", "r|.*|" ] }' 
  LV                                   VG                                   Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  c9f66cdc-e6ee-4900-92d6-e13d98f6660a d2831c8a-2e31-4d13-9fc3-9116debab149 -wi------- 128.00m                                                    
  fe74fe69-12f6-49c9-a253-04d54fc8fbcd d2831c8a-2e31-4d13-9fc3-9116debab149 -wi------- 128.00m                                                    
  ids                                  d2831c8a-2e31-4d13-9fc3-9116debab149 -wi-a----- 128.00m                                                    
  inbox                                d2831c8a-2e31-4d13-9fc3-9116debab149 -wi-a----- 128.00m                                                    
  leases                               d2831c8a-2e31-4d13-9fc3-9116debab149 -wi-a-----   2.00g                                                    
  master                               d2831c8a-2e31-4d13-9fc3-9116debab149 -wi-a-----   1.00g                                                    
  metadata                             d2831c8a-2e31-4d13-9fc3-9116debab149 -wi-a----- 128.00m                                                    
  outbox                               d2831c8a-2e31-4d13-9fc3-9116debab149 -wi-a----- 128.00m                                                    
  xleases                              d2831c8a-2e31-4d13-9fc3-9116debab149 -wi-a-----   1.00g                                        
===


Version-Release number of selected component (if applicable):


vdsm-4.40.40-1.el8ev.x86_64

How reproducible:

100%

Steps to Reproduce:

1. Put an FC SD in maintenance mode.  
2. Check the lvs output in SPM. All the LVs will be inactive for this SD.
3. Deatch the storage domain.
4. Check the lvs output in SPM. All the default SD LVs active will be in "active" status.

Actual results:

LVs are left open in SPM host after the storage domain detach.

Expected results:

LVs should be inactive to allow easier unmapping of LUN from the host.

Additional info:

Comment 2 Vojtech Juranek 2021-04-20 06:31:34 UTC
I believe this was fixed in https://github.com/oVirt/vdsm/commit/a80f85834da738073a914e2b0f70a5292266a755 which should be available since v4.40.50.7.

Comment 3 Eyal Shenitzky 2021-04-20 07:28:51 UTC
Thanks Vojtech,

Closing as duplication of bug 1928041.

*** This bug has been marked as a duplicate of bug 1928041 ***


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