Bug 1926029 - [RFE] Either disable save or give warning when no disks support snapshot
Summary: [RFE] Either disable save or give warning when no disks support snapshot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.8.0
Assignee: Phillip Bailey
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-08 04:23 UTC by Guohua Ouyang
Modified: 2021-07-27 22:42 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 22:41:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Snapshot modal (50.91 KB, image/png)
2021-05-17 13:20 UTC, Phillip Bailey
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 8962 0 None open WIP: Bug 1926029: Disable snapshot save button when save isn't possible 2021-05-18 14:57:52 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:42:17 UTC

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


Note You need to log in before you can comment on or make changes to this bug.