Bug 1926029

Summary: [RFE] Either disable save or give warning when no disks support snapshot
Product: OpenShift Container Platform Reporter: Guohua Ouyang <gouyang>
Component: Console Kubevirt PluginAssignee: Phillip Bailey <phbailey>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, gouyang, mcarleto, phbailey, ycui, yzamir
Target Milestone: ---Keywords: FutureFeature
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:41:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Snapshot modal none

Description Guohua Ouyang 2021-02-08 04:23:48 UTC
Description of problem:
It does not make sense to take a snapshow when no disks support snapshot, either disable save or give warning when no disks support snapshot in the modal.

Version-Release number of selected component (if applicable):
OCP 4.7

How reproducible:


Steps to Reproduce:
1. create a VM which has no disks support snapshot
2. go to snapshot and try to take snapshot
3.

Actual results:
It's able to take snapshot even though no disk support snapshot.

Expected results:
either disable save or give warning when no disks support snapshot in the modal.

Additional info:

Comment 1 Phillip Bailey 2021-05-14 20:15:50 UTC
Matt,

I can think of two options off the top of my head, but would like to get you or your team's input.

Option one is to disable the Save button and provide a single warning explaining that there are no volumes from which to create a snapshot and why that's the case.

Option two is to disable the "Take Snapshot" button and add a popover with the warning.

Comment 2 Matt 2021-05-17 13:09:43 UTC
I like the first option - it allows more clear direction for fixing the issue.
What is the solution for this? Is it possible for them to take a snapshot if they change the disk?

Comment 3 Phillip Bailey 2021-05-17 13:20:08 UTC
Created attachment 1784068 [details]
Snapshot modal

Snapshot modal with warnings.

Comment 4 Phillip Bailey 2021-05-17 13:32:39 UTC
Option one it is, then.

The solution is to add a disk with a snapshot-supported storage class or add a snapshot-supported storage class to an existing disk.

The modal already has a number of potential alerts (see the attachment I uploaded), including an info alert at the top of the modal explaining this and a warning alert that lists all disks that won't be included. This is why I suggested replacing all of them with a single alert that explains the problem. 

Perhaps something like this for the alert copy:

"No disks found to include in the snapshot (alert header)

Only disks with a snapshot-supported storage class defined 
are included in snapshots. No such disks were found.

Add a snapshot-supported storage class to an existing disk, 
add a new disk with a compatible storage class defined, or 
contact your cluster admin for further details.

Learn more about snapshots (external link)"

Comment 5 Matt 2021-05-17 14:41:43 UTC
I think that solution could work well. I'd like to get Yifat's opinion on it before it get's merged though if possible.

Comment 9 errata-xmlrpc 2021-07-27 22:41:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438