Bug 1816174

Summary: [DOC][OCS4.3] Documentation of how to add an additional OCS4.3 baremetal node is wrong
Product: [Red Hat Storage] Red Hat OpenShift Container Storage Reporter: Benjamin Chardi <bchardim>
Component: documentationAssignee: Kusuma <kbg>
Status: CLOSED NOTABUG QA Contact: Raz Tamir <ratamir>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.3CC: bchardim, kbg, ocs-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: OCS4.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 11:08:30 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:
Bug Depends On:    
Bug Blocks: 1826040    

Description Benjamin Chardi 2020-03-23 13:47:29 UTC
Description of problem (please be detailed as possible and provide log
snippests):

Maybe this documentation is WIP, but the procedure documented on draft official docs for OCS4.3 on how to add and additional OCS4.3 node to an existing OCS4.3 cluster in baremetal is wrong:

https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/4.3/html-single/managing_openshift_container_storage/index?lb_target=preview#adding-a-node-on-a-local-storage-device_rhocs


-----------------------------------------------------------------------------------------------------

5.3.1.3. Adding a node on a local storage device

Use this procedure to add a node on bare metal and Amazon EC2 infrastructures.

...

[1] Add a node that has usable disks to the OpenShift Container Platform cluster. See Installing a cluster on bare metal.

[2] Add the storage label to the new node.

# oc label nodes ip-10-0-219-187.ec2.internal cluster.ocs.openshift.io/openshift-storage=''

[3] To use the disks of the new node, create the local volume CR or update the existing one.

apiVersion: local.storage.openshift.io/v1
kind: LocalVolume
metadata:
  name: local-disks-scale
  namespace: local-storage
spec:
  logLevel: Normal
  managementState: Managed
  nodeSelector:
    nodeSelectorTerms:
    - matchExpressions:
      - key: cluster.ocs.openshift.io/openshift-storage
        operator: In
        values:
        - worker-4
    storageClassDevices:
    - devicePaths:
    - /dev/disk/by-id/nvme.44tf-7ld33-409265-01
    storageClassName: localblock-sc2
    volumeMode: Block

------------------------------------------------------------------------------------


If at step [2] the node to be add is labeled as "cluster.ocs.openshift.io/openshift-storage=''" then local volume CR suggested some lines before will never work (and additional node is not added to OCS4.3 cluster) because local volume CR is using the conditional:

...
  nodeSelector:
    nodeSelectorTerms:
   - matchExpressions:
      - key: cluster.ocs.openshift.io/openshift-storage
        operator: In
        values:
        - worker-4


is searching for cluster.ocs.openshift.io/openshift-storage='worker-4'

...


So I believe that this documentation/procedure must be tested and corrected. 



Note: If using procedure https://docs.google.com/document/d/1AqFw3ylCfZ7vxq-63QVbGPHESPW-xep4reGVS0mPgXQ/edit#

where the local volume CR is based in node hostname label, 

...
  nodeSelector:
    nodeSelectorTerms:
    - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
            - ocp4-worker-3.info.net
...

the procedure is working as expected.




Version of all relevant components (if applicable):

OCS4.3




Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?

Documented draft procedure on how to add an additional OCS4.3 node is not working


Is there any workaround available to the best of your knowledge?

https://docs.google.com/document/d/1AqFw3ylCfZ7vxq-63QVbGPHESPW-xep4reGVS0mPgXQ/edit#


Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?

1


Can this issue reproducible?
Yes

Can this issue reproduce from the UI?
No


If this is a regression, please provide more details to justify this:
New feature



Steps to Reproduce:

Follow steps to add a new OCS4.3 node on a OCP4.3 baremetal cluster at:

https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/4.3/html-single/managing_openshift_container_storage/index?lb_target=preview#adding-a-node-on-a-local-storage-device_rhocs



Actual results:

Additional node not added to OCS4.3 cluster, local-storage PV not created because local volume CR documented is not consistent with "cluster.ocs.openshift.io/openshift-storage=''" node label.

Expected results:

Additional OCS4.3 node added to an existing OCS4.3 cluster on OCP4.3 baremetal.

Additional info: