Skip to content

Addressed the comments received on upstream PR for refactoring the fix for NFS Cancel maintenance - #131

Merged
sandeeplocharla merged 1 commit into
mainfrom
bugfix/CSTACKEX-359
Oct 22, 2026
Merged

sandeeplocharla merged 1 commit into
mainfrom
bugfix/CSTACKEX-359

Conversation

@sandeeplocharla

Copy link
Copy Markdown
Collaborator

Description

This PR addresses the comments received on upstream PR apache#13897 to refactor the code written for fixing the Cancel Maintenance where the Pool wasn't getting mounted back in case of NFS.

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):

Screenshot 2026-10-22 at 8 08 49 PM Screenshot 2026-10-22 at 8 10 22 PM Screenshot 2026-10-22 at 8 11 18 PM Screenshot 2026-10-22 at 8 12 02 PM Screenshot 2026-10-22 at 8 13 28 PM Screenshot 2026-10-22 at 8 12 51 PM

How Has This Been Tested?

  • Created Primary1 storage pool of NetworkFileSystem type using DefaultPrimary storage plugin.
  • Created testPool storage pool of NetworkFileSystem type using NetApp ONTAP storage plugin.
  • Enter Maintenance on both the pools.
  • Cancel Maintenance on both the pools.
  • At each stage, both mount | grep nfs and libvirtd's virst pool-list --all should reflect the pools appropriately.
    • Before Enter Maintenance, both the commands should have mount and pool listed respectively.
    • On Enter Maintenance, neither should be listed.
    • On Cancel Maintenance, both should be listed again.

_haMonitor.unregisterStoragePool(uuid);
deleteStatus = adaptor.deleteStoragePool(uuid);
} else {
deleteStatus = adaptor.deleteStoragePool(uuid, details);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

you removed this method in below change ?

@sandeeplocharla sandeeplocharla Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it was suggested on the PR (Ref: apache#13897 (comment))

@rajiv-jain-netapp rajiv-jain-netapp Oct 22, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

but you are still calling this method at line number 465

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

For NFS case, adaptor.deleteStoragePool(uuid) has to be called, while for all other pool types adaptor.deleteStoragePool(uuid, details) has to be called.

@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 25.76%
Branch coverage 20.05%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

@sandeeplocharla
sandeeplocharla merged commit c5210eb into main Oct 22, 2026
12 checks passed
sandeeplocharla added a commit that referenced this pull request Oct 22, 2026
…x for NFS Cancel maintenance (#131)

### Description

This PR addresses the comments received on upstream PR
apache#13897 to refactor the code
written for fixing the Cancel Maintenance where the Pool wasn't getting
mounted back in case of NFS.

<!---
*******************************************************************************
-->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE
DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!---
*******************************************************************************
-->

### Types of changes

- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [X] 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
- [X] Major
- [ ] Minor
- [ ] Trivial

### Screenshots (if appropriate):
<img width="1045" height="339" alt="Screenshot 2026-10-22 at 8 08 49 PM"
src="https://github.com/user-attachments/assets/438b7f0e-8b45-4b39-a425-3fb4bd4451ab"
/>
<img width="1298" height="183" alt="Screenshot 2026-10-22 at 8 10 22 PM"
src="https://github.com/user-attachments/assets/58507563-828d-4ff2-b50c-0decd4674578"
/>
<img width="1049" height="358" alt="Screenshot 2026-10-22 at 8 11 18 PM"
src="https://github.com/user-attachments/assets/0ad746fd-137a-4e76-92c8-8bddf3d28692"
/>
<img width="1302" height="216" alt="Screenshot 2026-10-22 at 8 12 02 PM"
src="https://github.com/user-attachments/assets/c0efeadf-a2b6-4328-adb3-928f6bfee618"
/>
<img width="1048" height="360" alt="Screenshot 2026-10-22 at 8 13 28 PM"
src="https://github.com/user-attachments/assets/f6eae7fb-08fc-4d29-94b6-678371f0054c"
/>
<img width="1301" height="314" alt="Screenshot 2026-10-22 at 8 12 51 PM"
src="https://github.com/user-attachments/assets/0eeba7e2-2e98-4e9c-b463-5606f1838776"
/>

### How Has This Been Tested?
- Created `Primary1` storage pool of `NetworkFileSystem` type using
`DefaultPrimary` storage plugin.
- Created `testPool` storage pool of `NetworkFileSystem` type using
`NetApp ONTAP` storage plugin.
- Enter Maintenance on both the pools.
- Cancel Maintenance on both the pools.
- At each stage, both `mount | grep nfs` and libvirtd's `virst pool-list
--all` should reflect the pools appropriately.
- Before Enter Maintenance, both the commands should have mount and pool
listed respectively.
   - On Enter Maintenance, neither should be listed.
   - On Cancel Maintenance, both should be listed again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants