Skip to content

Conversation

@shwstppr
Copy link
Contributor

Description

Fixes #11593

Ensure that the RPM package creates the /var/lib/cloudstack/management directory during installation. This provides a consistent location for management server state and runtime data, avoiding the need for manual directory creation.

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?

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

Fixes apache#11593

Ensure that the RPM package creates the /var/lib/cloudstack/management
directory during installation. This provides a consistent location for
management server state and runtime data, avoiding the need for manual
directory creation.

Signed-off-by: Abhishek Kumar <[email protected]>
@codecov
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.42%. Comparing base (8089d32) to head (32595f4).
⚠️ Report is 54 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11723      +/-   ##
============================================
+ Coverage     17.36%   17.42%   +0.06%     
- Complexity    15245    15338      +93     
============================================
  Files          5888     5892       +4     
  Lines        525831   526521     +690     
  Branches      64183    64293     +110     
============================================
+ Hits          91298    91770     +472     
- Misses       424227   424398     +171     
- Partials      10306    10353      +47     
Flag Coverage Δ
uitests 3.61% <ø> (-0.02%) ⬇️
unittests 18.48% <ø> (+0.07%) ⬆️

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.

@weizhouapache
Copy link
Member

@shwstppr
I think the issue is due to diffrent hom directory of cloud user on ubuntu/debian and RHEL

rocky

# echo ~cloud
/var/cloudstack/management

ubuntu

# echo ~cloud
/var/lib/cloudstack/management

I wonder if we should use the home directory of cloud user

-    private static final String EXTENSIONS_DATA_DIRECTORY_PROD = "/var/lib/cloudstack/management/extensions";
+    private static final String EXTENSIONS_DATA_DIRECTORY_PROD = System.getProperty("user.home") + "/extensions";

@shwstppr
Copy link
Contributor Author

Thanks @weizhouapache for checking. I guess @abh1sar can comment better on it.
One minor issue I see is that we may have to update documentation accordingly

@abh1sar
Copy link
Collaborator

abh1sar commented Sep 26, 2025

Thanks @weizhouapache for checking. I guess @abh1sar can comment better on it. One minor issue I see is that we may have to update documentation accordingly

@shwstppr I like Wei's suggestion of using the user.home with documentation update.

@shwstppr
Copy link
Contributor Author

Thanks @weizhouapache and @abh1sar . I'm closing this PR based on your suggestion

@shwstppr shwstppr closed this Sep 26, 2025
@weizhouapache
Copy link
Member

Thanks @weizhouapache for checking. I guess @abh1sar can comment better on it. One minor issue I see is that we may have to update documentation accordingly

@shwstppr I like Wei's suggestion of using the user.home with documentation update.

@abh1sar
I think user.home makes more sense
however, the upgrade from 4.21.0.0 is a problem, do we need to move the files in the upgrade ?

@abh1sar
Copy link
Collaborator

abh1sar commented Sep 26, 2025

Thanks @weizhouapache for checking. I guess @abh1sar can comment better on it. One minor issue I see is that we may have to update documentation accordingly

@shwstppr I like Wei's suggestion of using the user.home with documentation update.

@abh1sar I think user.home makes more sense however, the upgrade from 4.21.0.0 is a problem, do we need to move the files in the upgrade ?

These are temporary files used only once after creation. I don't think we would need to move them on upgrade.

@weizhouapache
Copy link
Member

Thanks @weizhouapache for checking. I guess @abh1sar can comment better on it. One minor issue I see is that we may have to update documentation accordingly

@shwstppr I like Wei's suggestion of using the user.home with documentation update.

@abh1sar I think user.home makes more sense however, the upgrade from 4.21.0.0 is a problem, do we need to move the files in the upgrade ?

These are temporary files used only once after creation. I don't think we would need to move them on upgrade.

good, thanks for the confirmation @abh1sar
let me create a draft PR

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.

Missing extensions directory after upgrade 4.21.0

3 participants