Bug 2121462

Summary: [iscsi] [upgrade] [4.x to 5.x] [rhel-8] : target-api and target-gw services are stuck in AttributeError: 'Request' object has no attribute 'is_xhr' : upgrade failed saying Error EINVAL: iscsi REST API failed request with status code 500'
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: iSCSIAssignee: Xiubo Li <xiubli>
Status: CLOSED ERRATA QA Contact: Vasishta <vashastr>
Severity: high Docs Contact: Akash Raj <akraj>
Priority: unspecified    
Version: 5.3CC: akraj, anarnold, ceph-eng-bugs, cephqe-warriors, idryomov, vereddy, xiubli
Target Milestone: ---Keywords: Regression
Target Release: 5.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-iscsi-3.6-1.el8cp Doc Type: Bug Fix
Doc Text:
.Upgrade from {storage-product} 4.x to 5.x with iSCSI works as expected Previously, due to version conflict between some of the `ceph-iscsi` dependent libraries, upgrades from {storage-product} 4.x to 5.x would lead to a persistent HTTP 500 error. With this fix, the versioning conflict is resolved and the upgrade works as expected. However, as a result of this fix, iSCSI REST API responses aren’t pretty-printed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-11 17:41:19 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: 2126049    

Description Vasishta 2022-08-25 14:19:55 UTC
Description of problem:
Cluster upgrade from 4.x to 5.x failed in task TASK [ceph-dashboard : add iscsi gateways - ipv4] [1] saying-
stderr: |-'
    Error EINVAL: iscsi REST API failed request with status code 500'
    (b\'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\\n<title>500 Inter\''
     b'nal Server Error</title>\\n<h1>Internal Server Error</h1>\\n<p>The server en'"
     b'countered an internal error and was unable to complete your request. Either '"
     b'the server is overloaded or there is an error in the application.</p>\\n')"

Checked rbd target api and gw services, they were stuck in 
AttributeError: 'Request' object has no attribute 'is_xhr'

Version-Release number of selected component (if applicable):
ceph-version: 16.2.10-17.el8cp
container-tag: ceph-5.3-rhel-8-containers-candidate-66238-20220822205728
6.0.28.0-1.el8cp.noarch

How reproducible:
once

Steps to Reproduce:
1. Configure 4.x cluster with iscsigws
2. Upgrade clusters to 5.x

Actual results:
(Mentioned in description)

Expected results:
Upgrade must be successful

Additional info:
[1] ceph-ansible code - https://github.com/ceph/ceph-ansible/blob/stable-6.0/roles/ceph-dashboard/tasks/configure_dashboard.yml#L364-L372

Comment 20 errata-xmlrpc 2023-01-11 17:41:19 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: Red Hat Ceph Storage 5.3 security update and Bug Fix), 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-2023:0076