Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1850458

Summary: Proper block SD teardown
Product: [oVirt] vdsm Reporter: Vojtech Juranek <vjuranek>
Component: CoreAssignee: Vojtech Juranek <vjuranek>
Status: CLOSED CURRENTRELEASE QA Contact: Evelina Shames <eshames>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.40.17CC: aefrat, bugs, sfishbai, tnisan
Target Milestone: ovirt-4.4.3Keywords: ZStream
Target Release: 4.40.24   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm-4.40.24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-11 06:41:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vojtech Juranek 2020-06-24 11:12:55 UTC
Description of problem:

Improve block SD teardown and cleanup of LVs and VG mappings.
As per discussion under
https://gerrit.ovirt.org/#/c/109836/
the flow should look like this:

* deactivate vg
* log warnings from this command or the error message if it fails
* maybe log a warning about lvs that are still active in this vg - "dmsetup status" can be good way to find them.
* if there are active (but not open) lvs after this call, we can open LVM bug, I think lvm should clean up in all case
* if there are cases when lvm does not clean up we can use "dmesetup remove" with a warning since this is not expected

Comment 2 Evelina Shames 2020-10-13 12:02:26 UTC
Vojtech, can you please provide a clear verification flow?
The flow you mentioned is unclear.

Comment 3 Evelina Shames 2020-10-13 12:03:49 UTC
Vojtech, can you please provide a clear verification flow?
The flow you mentioned is unclear.

Comment 4 Vojtech Juranek 2020-10-13 12:46:03 UTC
(In reply to Evelina Shames from comment #3)
> Vojtech, can you please provide a clear verification flow?
> The flow you mentioned is unclear.

1. create block SD
2. check that LV on this SD are active
3. put SD into maintenance
4. check all LVs on this SD and VG corresponding to this SD are deactivated

Comment 5 Evelina Shames 2020-10-13 13:23:06 UTC
(In reply to Vojtech Juranek from comment #4)
> (In reply to Evelina Shames from comment #3)
> > Vojtech, can you please provide a clear verification flow?
> > The flow you mentioned is unclear.
> 
> 1. create block SD
> 2. check that LV on this SD are active
> 3. put SD into maintenance
> 4. check all LVs on this SD and VG corresponding to this SD are deactivated

Thanks!

Verified with the following flow on rhv-4.4.3-8:
1. Create block SD
2. Connect to its host
3. Run lvdisplay
4. Search for /dev/<sd_id> and under 'LV Status' check that it is 'available'
5. Put SD into maintenance
6. Run lvdisplay again
7. This time search for /dev/<sd_id> and under 'LV Status' check that it is 'NOT available'

Vojtech, is that what you meant?

Comment 6 Vojtech Juranek 2020-10-13 13:43:52 UTC
(In reply to Evelina Shames from comment #5)
> (In reply to Vojtech Juranek from comment #4)
> > (In reply to Evelina Shames from comment #3)
> > > Vojtech, can you please provide a clear verification flow?
> > > The flow you mentioned is unclear.
> > 
> > 1. create block SD
> > 2. check that LV on this SD are active
> > 3. put SD into maintenance
> > 4. check all LVs on this SD and VG corresponding to this SD are deactivated
> 
> Thanks!
> 
> Verified with the following flow on rhv-4.4.3-8:
> 1. Create block SD
> 2. Connect to its host
> 3. Run lvdisplay
> 4. Search for /dev/<sd_id> and under 'LV Status' check that it is 'available'
> 5. Put SD into maintenance
> 6. Run lvdisplay again
> 7. This time search for /dev/<sd_id> and under 'LV Status' check that it is
> 'NOT available'
> 
> Vojtech, is that what you meant?

yes

Comment 7 Evelina Shames 2020-10-13 14:04:26 UTC
(In reply to Vojtech Juranek from comment #6)
> (In reply to Evelina Shames from comment #5)
> > (In reply to Vojtech Juranek from comment #4)
> > > (In reply to Evelina Shames from comment #3)
> > > > Vojtech, can you please provide a clear verification flow?
> > > > The flow you mentioned is unclear.
> > > 
> > > 1. create block SD
> > > 2. check that LV on this SD are active
> > > 3. put SD into maintenance
> > > 4. check all LVs on this SD and VG corresponding to this SD are deactivated
> > 
> > Thanks!
> > 
> > Verified with the following flow on rhv-4.4.3-8:
> > 1. Create block SD
> > 2. Connect to its host
> > 3. Run lvdisplay
> > 4. Search for /dev/<sd_id> and under 'LV Status' check that it is 'available'
> > 5. Put SD into maintenance
> > 6. Run lvdisplay again
> > 7. This time search for /dev/<sd_id> and under 'LV Status' check that it is
> > 'NOT available'
> > 
> > Vojtech, is that what you meant?
> 
> yes

Great, moving to 'Verified'.

Comment 8 Sandro Bonazzola 2020-11-11 06:41:25 UTC
This bugzilla is included in oVirt 4.4.3 release, published on November 10th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.3 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.