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

[UI] Allow quiescevm and asyncbackup flags while taking volume snapshot from UI when these are supported for the volume #10265

Open
wants to merge 1 commit into
base: 4.19
Choose a base branch
from

Conversation

sureshanaparti
Copy link
Contributor

@sureshanaparti sureshanaparti commented Jan 24, 2025

Description

This PR allows quiescevm and asyncbackup flags while taking volume snapshot from UI when these are supported for the volume, addresses #10106.

Changes from ui/src/views/storage/TakeSnapshot.vue were removed in #7873, re-added in this PR. Now, ui/src/views/compute/CreateSnapshotWizard.vue and ui/src/views/storage/TakeSnapshot.vue are in sync with respect to quiescevm and asyncbackup flags.

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?

Checked the create snapshot UI from instance and volume.

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

…ot from UI when these are supported for the volume
@sureshanaparti
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.14%. Comparing base (2aa2e92) to head (4b79dc3).
Report is 2 commits behind head on 4.19.

Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #10265   +/-   ##
=========================================
  Coverage     15.14%   15.14%           
  Complexity    11283    11283           
=========================================
  Files          5408     5408           
  Lines        473822   473823    +1     
  Branches      57825    57824    -1     
=========================================
+ Hits          71762    71763    +1     
  Misses       394037   394037           
  Partials       8023     8023           
Flag Coverage Δ
uitests 4.29% <ø> (ø)
unittests 15.86% <ø> (+<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.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10265 (QA-JID-531)

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

@DaanHoogland
Copy link
Contributor

@Rubueno , any chance you can test this?

@Rubueno
Copy link
Contributor

Rubueno commented Jan 24, 2025

@Rubueno , any chance you can test this?

Thanks for your efforts @DaanHoogland ! I'm abroad right now, but I'll try to find time next week.

@DaanHoogland
Copy link
Contributor

@Rubueno , any chance you can test this?

Thanks for your efforts @DaanHoogland ! I'm abroad right now, but I'll try to find time next week.

have a good trip @Rubueno , I hope to start on a release by the end of next week, no pressure ;)

@Rubueno
Copy link
Contributor

Rubueno commented Jan 27, 2025

@Rubueno , any chance you can test this?

Thanks for your efforts @DaanHoogland ! I'm abroad right now, but I'll try to find time next week.

have a good trip @Rubueno , I hope to start on a release by the end of next week, no pressure ;)

Thanks! I've just tested the change but it does not seem the quiesce option is present in the "Take Instance volume Snapshot" window. I've tested with local, RBD and NFS on KVM.

@DaanHoogland
Copy link
Contributor

Thanks! I've just tested the change but it does not seem the quiesce option is present in the "Take Instance volume Snapshot" window. I've tested with local, RBD and NFS on KVM.

You are right, I only see it on the take instance snapshot dialog. Can you comment @sureshanaparti ?

@sureshanaparti
Copy link
Contributor Author

Thanks! I've just tested the change but it does not seem the quiesce option is present in the "Take Instance volume Snapshot" window. I've tested with local, RBD and NFS on KVM.

You are right, I only see it on the take instance snapshot dialog. Can you comment @sureshanaparti ?

quiesce option will not available in both VM -> "Take Instance volume Snapshot" & Volume -> "Take Snapshot" dialogs, when the volume response returns quiescevm as false.

@sureshanaparti sureshanaparti marked this pull request as ready for review January 29, 2025 10:03
@Rubueno
Copy link
Contributor

Rubueno commented Jan 29, 2025

Thanks! I've just tested the change but it does not seem the quiesce option is present in the "Take Instance volume Snapshot" window. I've tested with local, RBD and NFS on KVM.

You are right, I only see it on the take instance snapshot dialog. Can you comment @sureshanaparti ?

quiesce option will not available in both VM -> "Take Instance volume Snapshot" & Volume -> "Take Snapshot" dialogs, when the volume response returns quiescevm as false.

But in this case it is present in Volume -> "Take Snapshot" and VM -> "Take Instance Snapshot" dialogs

@sureshanaparti
Copy link
Contributor Author

sureshanaparti commented Jan 30, 2025

Thanks! I've just tested the change but it does not seem the quiesce option is present in the "Take Instance volume Snapshot" window. I've tested with local, RBD and NFS on KVM.

You are right, I only see it on the take instance snapshot dialog. Can you comment @sureshanaparti ?

quiesce option will not available in both VM -> "Take Instance volume Snapshot" & Volume -> "Take Snapshot" dialogs, when the volume response returns quiescevm as false.

But in this case it is present in Volume -> "Take Snapshot" and VM -> "Take Instance Snapshot" dialogs

Both these dialogs are in sync with the quiescevm param in the volume response, shows it when quiescevm param is true.

Even when it is set, it fails here when unsupported: https://github.com/apache/cloudstack/blob/4.19/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java#L496-L498

@sureshanaparti
Copy link
Contributor Author

sureshanaparti commented Feb 3, 2025

@Rubueno are you fine with these changes in this PR (both dialogs are in sync with respect to the volume response).

ui/src/views/compute/CreateSnapshotWizard.vue (VM -> "Take Instance volume Snapshot" dialog) =>

        <a-form-item name="quiescevm" ref="quiescevm" v-if="isQuiesceVm">
          <template #label>
            <tooltip-label :title="$t('label.quiescevm')" :tooltip="apiParams.quiescevm.description"/>
          </template>
          <a-switch v-model:checked="form.quiescevm"/>
        </a-form-item>
        <a-form-item name="asyncbackup" ref="asyncbackup" v-if="!supportsStorageSnapshot">
          <template #label>
            <tooltip-label :title="$t('label.asyncbackup')" :tooltip="apiParams.asyncbackup.description"/>
          </template>
          <a-switch v-model:checked="form.asyncbackup"/>
        </a-form-item>

ui/src/views/storage/TakeSnapshot.vue (Volume -> "Take Snapshot" dialog) =>

        <a-form-item :label="$t('label.asyncbackup')" name="asyncbackup" ref="asyncbackup" v-if="!supportsStorageSnapshot">
          <a-switch v-model:checked="form.asyncbackup" />
        </a-form-item>
        <a-form-item :label="$t('label.quiescevm')" name="quiescevm" ref="quiescevm" v-if="quiescevm">
          <a-switch v-model:checked="form.quiescevm" />
        </a-form-item>

@Rubueno
Copy link
Contributor

Rubueno commented Feb 3, 2025

@sureshanaparti In our env I cannot proceed with testing this, and thus does not resolve issue #10106, as both dialog boxes give different output at the moment

@sureshanaparti
Copy link
Contributor Author

@sureshanaparti In our env I cannot proceed with testing this, and thus does not resolve issue #10106, as both dialog boxes give different output at the moment

ok @Rubueno, does your env has the updated code / pkgs from this PR?

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@Rubueno
Copy link
Contributor

Rubueno commented Feb 3, 2025

Yes I had built new packages based on 4.19

@blueorangutan
Copy link

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

@Rubueno
Copy link
Contributor

Rubueno commented Feb 3, 2025

Hmm an interesting development: When taking a snapshot from VM -> "Take Instance Snapshot" with "Quiesce Instance" enabled, it will make a snapshot and quiesce process works. When taking a snapshot from Volume -> "Take Snapshot" with "Quiesce Instance" enabled, it will not quiesce the instance and even logs "quiesceVm":false

VM -> "Take Instance Snapshot" logfile: https://pastebin.com/hYMHDxKF
Volume -> "Take Snapshot" logfile: https://pastebin.com/EF33nP6z

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.

Quiesce Instance not an option in "Take Instance volume Snapshot" window
4 participants