Bug 1963019

Summary: [DOC][ISCSI] - dashboard cli changes for RHCS5
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Harish Munjulur <hmunjulu>
Component: DocumentationAssignee: Amrita <asakthiv>
Status: CLOSED DUPLICATE QA Contact: Harish Munjulur <hmunjulu>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.0CC: agunn, hyelloji, kdreyer, sangadi, vereddy
Target Milestone: ---   
Target Release: 5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-16 08:11:38 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: 1966486    

Description Harish Munjulur 2021-05-21 06:34:06 UTC
Describe the issue: New CLI for adding gateways to dashboard


Reference Document URL: https://docs.ceph.com/en/latest/mgr/dashboard/#enabling-iscsi-management


Product Version: RHCS 5


More information: 

using this doc for reference: https://docs.ceph.com/en/latest/mgr/dashboard/#enabling-iscsi-management

step1 : Add iscsi nodes and deploy containers. 

iscsi.yaml content
service_type: iscsi
service_id: iscsi
placement:
  hosts:
  - magna007
  - magna010
spec:
  pool: iscsi_pool
  trusted_ip_list: "10.8.128.10, 10.8.128.7, 2620:52:0:880:225:90ff:fefc:2538, 2620:52:0:880:225:90ff:fefc:252c"
  api_user: admin
  api_password: admin

 ceph orch apply -i iscsi.yaml   //successfully the containers are deployed


Step2: $ ceph dashboard set-iscsi-api-ssl-verification false  //To disable API SSL verification 

step3: ceph dashboard iscsi-gateway-list
[ceph: root@magna007 ~]# ceph dashboard iscsi-gateway-list
{"gateways": {"magna007": {"service_url": "http://admin:admin@[2620:52:0:880:225:90ff:fefc:2538]:5000"}, "magna010": {"service_url": "http://admin:admin@[2620:52:0:880:225:90ff:fefc:252c]:5000"}}}

step4: created 2 files gatewayurl and gatewayurl2 with "http://admin:admin@[2620:52:0:880:225:90ff:fefc:2538]:5000" and "http://admin:admin@[2620:52:0:880:225:90ff:fefc:252c]:5000" as content respectively. 
[ceph: root@magna007 ~]# cat gatewayurl
http://admin:admin@[2620:52:0:880:225:90ff:fefc:2538]:5000
[ceph: root@magna007 ~]# cat gatewayurl2
http://admin:admin@[2620:52:0:880:225:90ff:fefc:252c]:5000

step5: 
add 1st gateway 
[ceph: root@magna007 ~]# ceph dashboard iscsi-gateway-add -i gatewayurl magna007                                                  
Success
add 2nd gateway
[ceph: root@magna007 ~]# ceph dashboard iscsi-gateway-add -i gatewayurl2 magna010
Success

Expected results: Both the targets should be up in the dashboard