Bug 1957926

Summary: "Add Capacity" should allow to add n*3 (or n*4) local devices at once
Product: OpenShift Container Platform Reporter: Martin Bukatovic <mbukatov>
Component: Console Storage PluginAssignee: Sanjal Katiyar <skatiyar>
Status: CLOSED ERRATA QA Contact: Martin Bukatovic <mbukatov>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.7CC: aos-bugs, nberry, nthomas, skatiyar
Target Milestone: ---   
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 23:07:08 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:
Embargoed:
Attachments:
Description Flags
screenshot #1: Add Capacity form, when one selects storage class, there are no other options to tweak none

Description Martin Bukatovic 2021-05-06 18:57:08 UTC
Description of problem
======================

When "Add Capacity" functionality (as provided by OCP Console) is used on
LSO StorageCluster, the cluster will be extended by just 3 (or 4 when stretch
cluster mode is enabled) devices from local device set, no matter how many free
local devices are actually available in selected ocs storage class (local
volume set).

This is not optimal, because it's not possible to add more devices at once.
I would expect that one can add any multiple of 3 (or 4) available.

Reproducer is done on arbiter stretch cluster, but the problem is general,
applicable to non arbiter deployments as well.

This is similar to BZ 1928319, but here we are discussing "Add Capacity"
instead of installation.

Version-Release number of selected component
============================================

OCP 4.7.0-0.nightly-2021-05-05-092347
LSO 4.7.0-202104250659.p0
OCS 4.7.0-377.ci (4.7.0-rc8)

How reproducible
================

100%

Steps to Reproduce
==================

1. Install OCP on vSphere, with 3 master and 6 worker nodes, with 2 local
   storage device per worker node (for LSO).

2. Install LSO and OCS operators.

3. Label nodes via `oc label node $NODE topology.kubernetes.io/zone=$ZONE`
   so that you have 3 worker nodes and 1 master in each data zone, and just
   single master in arbiter zone:

   ```
   $ oc get nodes -L topology.kubernetes.io/zone
   NAME              STATUS   ROLES    AGE   VERSION           ZONE
   compute-0         Ready    worker   8h    v1.20.0+c8905da   data-a
   compute-1         Ready    worker   8h    v1.20.0+c8905da   data-a
   compute-2         Ready    worker   8h    v1.20.0+c8905da   data-a
   compute-3         Ready    worker   8h    v1.20.0+c8905da   data-b
   compute-4         Ready    worker   8h    v1.20.0+c8905da   data-b
   compute-5         Ready    worker   8h    v1.20.0+c8905da   data-b
   control-plane-0   Ready    master   8h    v1.20.0+c8905da   data-a
   control-plane-1   Ready    master   8h    v1.20.0+c8905da   data-b
   control-plane-2   Ready    master   8h    v1.20.0+c8905da   foo-arbiter
   ```

4. Use "Create Storage Cluster" wizard in OCP Console to start setup of Storage
   Cluster in "Internal - Attached devices" mode. Make sure that the cluster
   will have just 4 OSDs (if BZ 1928319 is not fixed, you don't need to do
   anything, but if BZ 1928319 is fixed, you need to tweak local volume set
   accordingly).

5. Prepare local volume set for expand, so that there are 8 more local devices
   in OCS local volume set.

6. Go to OCP Console, locate StorageCluster/ocs-storagecluster and use
   "Add Capacity" feature to extend the cluster, selecting the LSO storage
   class.

Actual results
==============

Even though there are 8 more local devices in the LSO storage class, only 4
were consumed during "Add Capacity" operation.

Expected results
================

It's possible to add 8 OSDs at once (I don't expect this to be new default, but
that there is an option to do this if desired).

Comment 1 Martin Bukatovic 2021-05-06 18:58:46 UTC
Created attachment 1780435 [details]
screenshot #1: Add Capacity form, when one selects storage class, there are no other options to tweak

Comment 2 Sanjal Katiyar 2021-05-10 06:49:05 UTC
Hi Martin,
PR corresponding to BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1928319 introduces the same functionality/behaviour for add-capacity as we are introducing during installation. So, during adding capacity as well, we will add n*3 (or n*4) local devices at once.

Comment 3 Sanjal Katiyar 2021-05-10 07:25:13 UTC
"I don't expect this to be new default, but
that there is an option to do this if desired" --> for initial installation, we decided not to provide any new option to the users and by default we will take all the available devices (n*3 or n*4). That is why same functionality was implemented for add-capacity modal as well.

Comment 6 Martin Bukatovic 2021-05-19 21:24:57 UTC
Testing with:

OCP 4.8.0-0.nightly-2021-05-13-002125
LSO 4.8.0-202105111002.p0
OCS 4.8.0-394.ci

I used existing OCP/OCS cluster deployed in arbiter strech mode, with 6 storage nodes and 12 OSDs.

I attached 8 more local devices to the cluster so that ocs localvolumeset were expanded to 20 devices. Then I initialized "Add Capacity" operation, selected osd storage class and when the operation finished, I see that there are 20 OSDs ready in the cluster.

>>> VERIFIED

Comment 9 errata-xmlrpc 2021-07-27 23:07:08 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