Bug 1920981

Summary: When OCS was deployed with arbiter mode enable add capacity is increasing the count by "2"
Product: OpenShift Container Platform Reporter: Pratik Surve <prsurve>
Component: Console Storage PluginAssignee: Ankush Behl <anbehl>
Status: CLOSED ERRATA QA Contact: Pratik Surve <prsurve>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.7CC: afrahman, aos-bugs, mbukatov, nberry, nthomas, ocs-bugs, owasserm
Target Milestone: ---   
Target Release: 4.7.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-02-24 15:56:44 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:

Description Pratik Surve 2021-01-27 10:53:46 UTC
Description of problem:
When OCS was deployed with arbiter mode enable add capacity is increasing the count by "2"


Version-Release number of selected component (if applicable):
OCP:- 4.7.0-0.nightly-2021-01-19-095812
OCS:- ocs-operator.v4.7.0-238.ci

How reproducible:
Always

Steps to Reproduce:
1. Deploy OCP 4.7 over VMware
2. Deploy OCS 4.7 with arbiter mode enable 
3. Perform Add Capacity 

Actual results:
We have seen that UI increase count by 2 and new "8" osd are getting created

#Snippet from storagecluster
storageDeviceSets:
    - config: {}
      count: 3
      dataPVCTemplate:
        metadata: {}
        spec:
          accessModes:
          - ReadWriteOnce
          resources:
            requests:
              storage: "1"
          storageClassName: localblock
          volumeMode: Block
        status: {}
      name: ocs-deviceset-localblock
      placement: {}
      preparePlacement: {}
      replica: 4
      resources: {}
    version: 4.7.0


Note:- Add Capacity was only perform Once

Expected results:
UI should increase the count by "1"

Additional info:
#### Before Add Capacity (Snippet from Storage cluster) ####

storageDeviceSets:
    - config: {}
      count: 1
      dataPVCTemplate:
        metadata: {}
        spec:
          accessModes:
          - ReadWriteOnce
          resources:
            requests:
              storage: "1"
          storageClassName: localblock
          volumeMode: Block
        status: {}
      name: ocs-deviceset-localblock
      placement: {}
      preparePlacement: {}
      replica: 4
      resources: {}


#### After Add Capacity (Snippet from Storage cluster) ####

storageDeviceSets:
    - config: {}
      count: 3
      dataPVCTemplate:
        metadata: {}
        spec:
          accessModes:
          - ReadWriteOnce
          resources:
            requests:
              storage: "1"
          storageClassName: localblock
          volumeMode: Block
        status: {}
      name: ocs-deviceset-localblock
      placement: {}
      preparePlacement: {}
      replica: 4
      resources: {}

Comment 3 Martin Bukatovic 2021-02-02 10:48:55 UTC
> Expected results:
> UI should increase the count by "1"

Based on my understanding of arbiter feature, expanding by one is not a valid operation in a stretch cluster. When I add new OSD into a data zone A, I also have to add new OSD into data zone B, making sure the new OSDs have the same size.

Comment 4 Orit Wasserman 2021-02-02 13:44:25 UTC
(In reply to Martin Bukatovic from comment #3)
> > Expected results:
> > UI should increase the count by "1"
> 


> Based on my understanding of arbiter feature, expanding by one is not a
> valid operation in a stretch cluster. When I add new OSD into a data zone A,
> I also have to add new OSD into data zone B, making sure the new OSDs have
> the same size.

Correct, we have two Data Zones and we can expand by 2 nodes one for each data zone. 
As we use replica4 , expanding by 4 OSDs make sense as it will make sure we two new OSDs in each data zone. 8 OSDS is a bug.
It is possible to expand by 2 with one OSD per zone but it will make the usable capacity calculation more complicated.
For the UI in  OCS 4.7 we will go with expanding 4 OSDs each time.

Comment 10 errata-xmlrpc 2021-02-24 15:56:44 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.7.0 security, bug fix, and enhancement 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-2020:5633