Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1786417

Summary: [ceph-ansible]: Ceph-dashboard : add iscsi gateways task fails during upgrade from 3.x to 4.x on rhel 7.7 with dashboard enabled
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Ameena Suhani S H <amsyedha>
Component: iSCSIAssignee: Mike Christie <mchristi>
Status: CLOSED ERRATA QA Contact: Madhavi Kasturi <mkasturi>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.0CC: aschoen, ceph-eng-bugs, ceph-qe-bugs, gmeno, jdillama, mkasturi, nthomas, tchandra, ykaul
Target Milestone: rcKeywords: TestBlocker
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-iscsi-3.4-2.el8cp, ceph-iscsi-3.4-2.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-31 12:48:33 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: 1792247    
Bug Blocks:    
Attachments:
Description Flags
group_vars, inventory and rolling_upgrade logs none

Description Ameena Suhani S H 2019-12-25 05:23:18 UTC
Created attachment 1647584 [details]
group_vars, inventory and rolling_upgrade logs

Description of problem:
The upgrade from 3.x to 4.x fails on rhel 7.7 with [1].

[1]TASK [ceph-dashboard : add iscsi gateways]failed: [magna062 -> magna062] (item=magna086) => changed=false 
  ansible_loop_var: item
  cmd:
  - docker
  - exec
  - ceph-mon-magna062
  - ceph
  - --cluster
  - ceph
  - dashboard
  - iscsi-gateway-add
  - http://admin:admin@10.8.128.86:5000
  delta: '0:00:00.677514'
  end: '2019-12-24 07:50:40.393695'
  invocation:
    module_args:
      _raw_params: docker exec ceph-mon-magna062 ceph --cluster ceph dashboard iscsi-gateway-add http://admin:admin@10.8.128.86:5000
      _uses_shell: false
      argv: null
      chdir: null
      creates: null
      executable: null
      removes: null
      stdin: null
      stdin_add_newline: true
      strip_empty_ends: true
      warn: true
  item: magna086
  msg: non-zero return code
  rc: 22
  start: '2019-12-24 07:50:39.716181'
  stderr: 'Error EINVAL: iscsi REST API cannot be reached: Connection refused [errno 111]. Please check your configuration and that the API endpoint is accessible'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

Version-Release number of selected component (if applicable):

ceph version 14.2.4-85.el8cp 
ansible-2.8.7-1.el7ae.noarch
ceph-ansible-4.0.6-1.el7cp.noarch

How reproducible:
3/3

Steps to Reproduce:
1.Deploy 3.x cluster with dashboard and iscsi-gw
2.upgrade to 4.x

Actual results:
Upgrade failed with [1]

Expected results:
Cluster upgrade should be successful 

Additional info:
the rbd-target-api service is down on the iscsi gateways.

Dec 24 09:05:42 magna062 docker[8528]: Traceback (most recent call last):
Dec 24 09:05:42 magna062 docker[8528]: File "/usr/bin/rbd-target-api", line 2917, in <module>
Dec 24 09:05:42 magna062 docker[8528]: config = Config(logger)
Dec 24 09:05:42 magna062 docker[8528]: File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/common.py", line 88, in __init__
Dec 24 09:05:42 magna062 docker[8528]: self._upgrade_config()
Dec 24 09:05:42 magna062 docker[8528]: File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/common.py", line 189, in _upgrade_config
Dec 24 09:05:42 magna062 docker[8528]: iqn = self.config['gateways']['iqn']
Dec 24 09:05:42 magna062 docker[8528]: KeyError: 'iqn'
Dec 24 09:05:42 magna062 dockerd-current[29634]:     config = Config(logger)
Dec 24 09:05:42 magna062 dockerd-current[29634]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/common.py", line 88, in __init__
Dec 24 09:05:42 magna062 dockerd-current[29634]:     self._upgrade_config()
Dec 24 09:05:42 magna062 dockerd-current[29634]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/common.py", line 189, in _upgrade_config
Dec 24 09:05:42 magna062 dockerd-current[29634]:     iqn = self.config['gateways']['iqn']
Dec 24 09:05:42 magna062 dockerd-current[29634]: KeyError: 'iqn'

Comment 9 errata-xmlrpc 2020-01-31 12:48:33 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, 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/RHBA-2020:0312