Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Nas BnR: Fix for restore not working correctly #10785

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

Open
wants to merge 2 commits into
base: 4.20
Choose a base branch
from

Conversation

abh1sar
Copy link
Collaborator

@abh1sar abh1sar commented Apr 29, 2025

Description

This PR fixes an issue in Nas bnr plugin due to which restore was not working.
Even if no mount options are provided while adding the backup repository, the -o flag is added to the mount command (during restore) resulting in an error.

Restore is broken since #9666, so this needs to go into 4.20.

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?

@abh1sar abh1sar requested a review from Pearl1594 April 29, 2025 11:36
@abh1sar abh1sar added this to the 4.20.1 milestone Apr 29, 2025
Copy link

codecov bot commented Apr 29, 2025

Codecov Report

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

Project coverage is 16.13%. Comparing base (80b5d5c) to head (c73c1c9).
Report is 86 commits behind head on 4.20.

Files with missing lines Patch % Lines
...ce/wrapper/LibvirtRestoreBackupCommandWrapper.java 0.00% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #10785      +/-   ##
============================================
+ Coverage     16.00%   16.13%   +0.12%     
- Complexity    13104    13214     +110     
============================================
  Files          5651     5649       -2     
  Lines        495862   496691     +829     
  Branches      60043    60175     +132     
============================================
+ Hits          79367    80136     +769     
+ Misses       407635   407633       -2     
- Partials       8860     8922      +62     
Flag Coverage Δ
uitests 4.01% <ø> (+<0.01%) ⬆️
unittests 16.98% <0.00%> (+0.13%) ⬆️

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.

@Pearl1594 Pearl1594 moved this to In Progress in ACS 4.20.1 Apr 29, 2025
Copy link
Contributor

@Pearl1594 Pearl1594 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

@Pearl1594
Copy link
Contributor

@blueorangutan package

1 similar comment
@abh1sar
Copy link
Collaborator Author

abh1sar commented Apr 29, 2025

@blueorangutan package

@blueorangutan
Copy link

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

if ("cifs".equals(backupRepoType)) {
mountOptions += ",nobrl";
}
if (!mountOptions.trim().isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

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

add mountOptions != null ?

Copy link
Contributor

Choose a reason for hiding this comment

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

also above <null> + “,nobrl" == “null,nobrl” I don’t think that is intended.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mountOptions is retrieved from the backup_repository table, where the column is defined as not null.
So either it will have a proper option or it will be an empty string.
But I'll add a null check anyway for extra safety.

In case it is empty we should not be prefixing a , before nobrl.
I'll update the PR.

@blueorangutan
Copy link

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

@abh1sar
Copy link
Collaborator Author

abh1sar commented Apr 29, 2025

@blueorangutan package

@blueorangutan
Copy link

@abh1sar 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

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

@abh1sar
Copy link
Collaborator Author

abh1sar commented Apr 30, 2025

@weizhouapache @DaanHoogland I have addressed your comments, please check.

@abh1sar
Copy link
Collaborator Author

abh1sar commented Apr 30, 2025

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_02_restore_vm_strict_tags_failure Failure 54.21 test_vm_strict_host_tags.py
test_02_scale_vm_strict_tags_failure Failure 57.45 test_vm_strict_host_tags.py
test_06_deploy_vm_on_any_host_with_strict_tags_failure Failure 3.60 test_vm_strict_host_tags.py

Copy link
Member

@rohityadavcloud rohityadavcloud left a comment

Choose a reason for hiding this comment

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

LGTM needs testing

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.

clgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

8 participants