Skip to content

Fix to not enable the disabled local storage(s) on host connection - #11722

Merged
weizhouapache merged 1 commit into
apache:4.20from
shapeblue:fix-local-storage-disabled-is-enabled-on-start
Oct 7, 2025
Merged

Fix to not enable the disabled local storage(s) on host connection#11722
weizhouapache merged 1 commit into
apache:4.20from
shapeblue:fix-local-storage-disabled-is-enabled-on-start

Conversation

@sureshanaparti

@sureshanapartisureshanaparti commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

Description

This PR prevents disabled local storage pools from being automatically enabled during host connection. It fixes an issue where disabled local storage pools were being automatically enabled (marked as "Up") on host connection, during management server / agent start.

Issue
Disabled local storage(s) are marked Up after mgmt server / agent start, and volumes are allocated on it.

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?

  • Enable local storage in zone (and restart management server)
  • Disable any of the local storages and restart that host's agent or restart management server

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

@sureshanaparti

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti 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.

@codecov

codecovBot commented Sep 25, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.17%. Comparing base (36cfd76) to head (35216dc).
⚠️ Report is 10 commits behind head on 4.20.

Files with missing linesPatch %Lines
...orage/volume/datastore/PrimaryDataStoreHelper.java0.00%2 Missing ⚠️
...cycle/CloudStackPrimaryDataStoreLifeCycleImpl.java0.00%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## 4.20 #11722 +/- ##
=========================================
Coverage 16.17% 16.17% + Complexity 13296 13295 -1 
=========================================
Files 5656 5656 Lines 498219 498220 +1 Branches 60451 60452 +1 =========================================
+ Hits 80579 80588 +9 + Misses 408672 408663 -9 - Partials 8968 8969 +1 
FlagCoverage Δ
uitests4.00% <ø> (ø)
unittests17.02% <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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti
sureshanaparti marked this pull request as ready for review September 26, 2025 06:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where disabled local storage pools were being automatically marked as "Up" when hosts connected to the management server or agent during startup, which could result in volumes being allocated on storage that should remain disabled.

  • Adds a condition to check if the storage pool is disabled before setting its status to Up
  • Prevents disabled local storage pools from being automatically enabled during host connection

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@DaanHooglandDaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

makes sense/clgtm

@sureshanaparti

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapacheweizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

code lgtm

@weizhouapacheweizhouapache added this to the 4.20.2 milestone Oct 6, 2025
@weizhouapacheweizhouapache self-assigned this Oct 6, 2025
@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-14525)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 54348 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11722-t14525-kvm-ol8.zip
Smoke tests completed. 140 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_13_retrieve_vr_default_filesError1.34test_diagnostics.py
test_14_retrieve_vr_one_fileError1.13test_diagnostics.py
test_15_retrieve_ssvm_default_filesError1.14test_diagnostics.py
test_16_retrieve_ssvm_single_fileError1.12test_diagnostics.py
test_17_retrieve_cpvm_default_filesError1.16test_diagnostics.py
test_18_retrieve_cpvm_single_fileError1.15test_diagnostics.py

@weizhouapache

Copy link
Copy Markdown
Member

I can reproduce the issue that Disabled local storage is Up when cloudstack agent is restarted, and verify this PR fixes the issue

@weizhouapache
weizhouapache merged commit 823cb00 into apache:4.20Oct 7, 2025
40 of 42 checks passed
@weizhouapache
weizhouapache deleted the fix-local-storage-disabled-is-enabled-on-start branch October 7, 2025 09:22
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Oct 17, 2025
sandeeplocharla pushed a commit to NetApp/cloudstack that referenced this pull request Oct 21, 2025
Sign up for freeto 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.

5 participants

@sureshanaparti@blueorangutan@weizhouapache@DaanHoogland