Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cleanup directory if empty after removal of snapshot #8002

Merged
merged 3 commits into from Sep 29, 2023

Conversation

vishesh92
Copy link
Member

Description

This PR removes the directory of snapshot if it's empty after removal of snapshot.

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)

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?

Copy link
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.

did a quick test with hidden files and code looks good

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #8002 (20a2085) into 4.18 (29c7b31) will increase coverage by 0.04%.
Report is 58 commits behind head on 4.18.
The diff coverage is 20.00%.

❗ Current head 20a2085 differs from pull request most recent head c4c631f. Consider uploading reports for the commit c4c631f to get more accurate results

@@             Coverage Diff              @@
##               4.18    #8002      +/-   ##
============================================
+ Coverage     13.02%   13.06%   +0.04%     
- Complexity     9032     9106      +74     
============================================
  Files          2720     2720              
  Lines        257080   257500     +420     
  Branches      40088    40149      +61     
============================================
+ Hits          33476    33649     +173     
- Misses       219400   219621     +221     
- Partials       4204     4230      +26     
Files Coverage Δ
.../main/java/com/cloud/network/IpAddressManager.java 100.00% <100.00%> (ø)
...ava/com/cloud/network/as/AutoScaleVmProfileVO.java 80.20% <100.00%> (+11.66%) ⬆️
...java/com/cloud/upgrade/DatabaseUpgradeChecker.java 40.89% <100.00%> (+0.64%) ⬆️
...va/com/cloud/upgrade/DatabaseVersionHierarchy.java 85.10% <100.00%> (+1.01%) ⬆️
.../api/command/admin/ratelimit/ResetApiLimitCmd.java 0.00% <ø> (ø)
...oud/hypervisor/kvm/resource/LibvirtConnection.java 0.00% <ø> (ø)
.../hypervisor/kvm/storage/ScaleIOStorageAdaptor.java 10.44% <100.00%> (ø)
...ava/com/cloud/api/commands/StopNetScalerVMCmd.java 0.00% <ø> (ø)
...tungsten/api/command/ListTungstenFabricTagCmd.java 0.00% <ø> (ø)
.../com/cloud/network/guru/VxlanGuestNetworkGuru.java 56.36% <100.00%> (ø)
... and 52 more

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@vishesh92 a [SF] 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.

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
…udstack/storage/resource/NfsSecondaryStorageResource.java

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
@blueorangutan
Copy link

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

@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@vishesh92 a [SF] 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

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

@vishesh92
Copy link
Member Author

@blueorangutan test

@blueorangutan
Copy link

@vishesh92 a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_01_invalid_upgrade_kubernetes_cluster Failure 3616.43 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 545.40 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 3614.89 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.08 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.09 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.09 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.10 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Error 5.53 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 65.93 test_kubernetes_clusters.py

Copy link
Contributor

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

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

code LGTM

@DaanHoogland DaanHoogland added this to the 4.18.2.0 milestone Sep 29, 2023
@DaanHoogland DaanHoogland merged commit f2c1775 into apache:4.18 Sep 29, 2023
23 of 25 checks passed
@DaanHoogland DaanHoogland deleted the ssvm-cleanup-empty-directory branch September 29, 2023 13:21
DaanHoogland added a commit that referenced this pull request Sep 29, 2023
* 4.18:
  fix: cleanup directory if empty after removal of snapshot (#8002)
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.

None yet

6 participants