Skip to content

libvirtstorageadaptor: better handle failed libvirt storagepool destroy#9390

Merged
rp- merged 1 commit intoapache:4.19from
LINBIT:4.19-kvm-libvirt-cleanup-storagepool
Aug 7, 2024
Merged

libvirtstorageadaptor: better handle failed libvirt storagepool destroy#9390
rp- merged 1 commit intoapache:4.19from
LINBIT:4.19-kvm-libvirt-cleanup-storagepool

Conversation

@rp-
Copy link
Copy Markdown
Contributor

@rp- rp- commented Jul 15, 2024

Description

If the libvirt mount point is still busy and can't be unmounted right now, it was waited 5 seconds and an plain unmount was tried, without cleaning up the libvirt storagepool.
This kept libvirt thinking the storagepool
is active and mounted (which it wasn't).

Now after the plain unmount call, also
the libvirt storagepool will be destroyed.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Linstor cluster with snapshots backuped to secondary storage(NFS).

How did you try to break this feature and the system with this change?

@rp- rp- self-assigned this Jul 15, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 29 lines in your changes missing coverage. Please review.

Project coverage is 15.08%. Comparing base (7db83db) to head (3032e65).
Report is 5 commits behind head on 4.19.

Files Patch % Lines
.../hypervisor/kvm/storage/LibvirtStorageAdaptor.java 0.00% 29 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##               4.19    #9390     +/-   ##
===========================================
  Coverage     15.07%   15.08%             
- Complexity    11170    11172      +2     
===========================================
  Files          5405     5405             
  Lines        472672   472693     +21     
  Branches      60446    59021   -1425     
===========================================
+ Hits          71271    71283     +12     
- Misses       393472   393480      +8     
- Partials       7929     7930      +1     
Flag Coverage Δ
uitests 4.27% <ø> (ø)
unittests 15.79% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

Copy link
Copy Markdown
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@rp- rp- force-pushed the 4.19-kvm-libvirt-cleanup-storagepool branch from 1a5f954 to c98f682 Compare July 15, 2024 09:45
@rp- rp- force-pushed the 4.19-kvm-libvirt-cleanup-storagepool branch from c98f682 to 3032e65 Compare July 19, 2024 05:18
@rp- rp- requested a review from JoaoJandre July 19, 2024 05:18
Copy link
Copy Markdown
Contributor

@JoaoJandre JoaoJandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLGTM, did not test it

@DaanHoogland
Copy link
Copy Markdown
Contributor

@sureshanaparti , I think 4.19 is open for "wild" merges again, is it?

@yadvr yadvr added this to the 4.19.2.0 milestone Jul 29, 2024
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jul 29, 2024

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rohityadavcloud a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10500

@rp-
Copy link
Copy Markdown
Contributor Author

rp- commented Aug 6, 2024

Can we merge this? I would have another NFS fix in the pipeline that would slightly conflict with this.

@weizhouapache
Copy link
Copy Markdown
Member

Can we merge this? I would have another NFS fix in the pipeline that would slightly conflict with this.

@rp-
there are enough approvals. needs some trillian tests

@blueorangutan test rocky8 kvm-rocky8

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests

@weizhouapache
Copy link
Copy Markdown
Member

@blueorangutan test alma9 kvm-alma9

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) has been kicked to run smoke tests

@weizhouapache
Copy link
Copy Markdown
Member

@blueorangutan test ubuntu22 kvm-ubuntu22

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ubuntu22 mgmt + kvm-ubuntu22) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-11030)
Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
Total time taken: 45556 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9390-t11030-kvm-rocky8.zip
Smoke tests completed. 132 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-11031)
Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9
Total time taken: 47203 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9390-t11031-kvm-alma9.zip
Smoke tests completed. 132 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-11032)
Environment: kvm-ubuntu22 (x2), Advanced Networking with Mgmt server u22
Total time taken: 47149 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9390-t11032-kvm-ubuntu22.zip
Smoke tests completed. 132 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

If the libvirt mount point is still busy and can't be unmounted
right now, it was waited 5 seconds and an plain unmount was tried,
without cleaning up the libvirt storagepool.
This kept libvirt thinking the storagepool
is active and mounted (which it wasn't).

Now after the plain unmount call, also
the libvirt storagepool will be destroyed.
@rp- rp- force-pushed the 4.19-kvm-libvirt-cleanup-storagepool branch from 3032e65 to e7c7633 Compare August 7, 2024 07:52
@rp- rp- merged commit 21f3fde into apache:4.19 Aug 7, 2024
@rp- rp- deleted the 4.19-kvm-libvirt-cleanup-storagepool branch August 7, 2024 07:53
@rp-
Copy link
Copy Markdown
Contributor Author

rp- commented Aug 7, 2024

rebased and merged

dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Aug 22, 2024
…oy (apache#9390)

If the libvirt mount point is still busy and can't be unmounted
right now, it was waited 5 seconds and an plain unmount was tried,
without cleaning up the libvirt storagepool.
This kept libvirt thinking the storagepool
is active and mounted (which it wasn't).

Now after the plain unmount call, also
the libvirt storagepool will be destroyed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants