This project is now read‑only. Starting Monday, February 2, please use Jira Cloud for all bug tracking management.
Bug 1498825 - [ceph-iscsi-cli]: iSCSI GW creation failed with "INTERNAL SERVER ERROR"
Summary: [ceph-iscsi-cli]: iSCSI GW creation failed with "INTERNAL SERVER ERROR"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: iSCSI
Version: 3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 3.0
Assignee: Jason Dillaman
QA Contact: Tejas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-05 10:53 UTC by Manohar Murthy
Modified: 2017-12-05 23:47 UTC (History)
5 users (show)

Fixed In Version: ceph-iscsi-cli-2.5-9.el7cp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-05 23:47:21 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-iscsi-cli pull 37 0 None closed Properly construct seed gateway list 2020-09-25 18:36:59 UTC
Red Hat Product Errata RHBA-2017:3387 0 normal SHIPPED_LIVE Red Hat Ceph Storage 3.0 bug fix and enhancement update 2017-12-06 03:03:45 UTC

Description Manohar Murthy 2017-10-05 10:53:49 UTC
Description of problem:
1st and 2nd GW creation was successful.
Creating 3rd and 4th iSCSI GW failed with internal server error but after exiting from gwcli and logged in back,new GW is shown. 

Version-Release number of selected component (if applicable):
ceph-iscsi-cli-2.5-8.el7cp.noarch
ceph-iscsi-config-2.3-10.el7cp.noarch


Steps followed:
1.Created 1st and 2nd iSCSI GW successfully.
2.Added some disks and clients.exposed disks to clients.
3.Tried to create 3rd GW and it failed with internal server error.
4. Exited from gwcli and logged in back, new GW is shown.

Actual results:
1.GW creation failed but actually created and shown after exiting from gwcli and logged in back.

/iscsi-target...-igw/gateways> ls
o- gateways ................................................... [Up: 2/2, Portals: 2]
  o- avenger ...................................................... [10.70.39.2 (UP)]
  o- banshee ...................................................... [10.70.39.3 (UP)]
/iscsi-target...-igw/gateways> create 
gateway_name=  ip_address=    nosync=        skipchecks=    
/iscsi-target...-igw/gateways> create catalina 10.70.39.4
CMD: ../gateways/ create catalina 10.70.39.4 nosync=False skipchecks=false
Adding gateway, sync'ing 4 disk(s) and 1 client(s)
Failed API request: PUT http://127.0.0.1:5000/api/gateway/catalina
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>TypeError: 'NoneType' object is not iterable // Werkzeug Debugger</title>
    <link rel="stylesheet" href="?__debugger__=yes&amp;cmd=resource&amp;f=style.css" type="text/css">
    <!-- We need to make sure this has a favicon so that the debugger does not by
         accident trigger a request to /favicon.ico which might change the application
         state. -->
    <link rel="shortcut icon" href="?__debugger__=yes&amp;cmd=resource&amp;f=console.png">
    <script type="text/javascript" src="?__debugger__=yes&amp;cmd=resource&amp;f=jquery.js"></script>
    <script type="text/javascript" src="?__debugger__=yes&amp;cmd=resource&amp;f=debugger.js"></script>
    <script type="text/javascript">
      var TRACEBACK = 54672976,
          CONSOLE_MODE = false,
          EVALEX = true,
          SECRET = "DeJCJMn1PE0NFO038faU";
    </script>
  </head>
  <body>
    <div class="debugger">
<h1>TypeError</h1>
<div class="detail">
  <p class="errormsg">TypeError: 'NoneType' object is not iterable</p>
</div>
<h2 class="traceback">Traceback <em>(most recent call last)</em></h2>
<div class="traceback">
  
  <ul><li><div class="frame" id="frame-140543275457680">
  <h4>File <cite class="filename">"/usr/lib/python2.7/site-packages/flask/app.py"</cite>,
      line <em class="line">1836</em>,
      in <code class="function">__call__</code></h4>
  <pre>return self.wsgi_app(environ, start_response)</pre>
</div>

<li><div class="frame" id="frame-140543275456208">
  <h4>File <cite class="filename">"/usr/lib/python2.7/site-packages/flask/app.py"</cite>,
      line <em class="line">1820</em>,
      in <code class="function">wsgi_app</code></h4>
  <pre>response = self.make_response(self.handle_exception(e))</pre>
</div>

<li><div class="frame" id="frame-140543275457232">
  <h4>File <cite class="filename">"/usr/lib/python2.7/site-packages/flask/app.py"</cite>,
      line <em class="line">1403</em>,
      in <code class="function">handle_exception</code></h4>
  <pre>reraise(exc_type, exc_value, tb)</pre>
</div>

<li><div class="frame" id="frame-140543275458320">
  <h4>File <cite class="filename">"/usr/lib/python2.7/site-packages/flask/app.py"</cite>,
      line <em class="line">1817</em>,
      in <code class="function">wsgi_app</code></h4>
  <pre>response = self.full_dispatch_request()</pre>
</div>

<li><div class="frame" id="frame-140543275455312">
  <h4>File <cite class="filename">"/usr/lib/python2.7/site-packages/flask/app.py"</cite>,
      line <em class="line">1477</em>,
      in <code class="function">full_dispatch_request</code></h4>
  <pre>rv = self.handle_user_exception(e)</pre>
</div>

<li><div class="frame" id="frame-140543275455952">
  <h4>File <cite class="filename">"/usr/lib/python2.7/site-packages/flask/app.py"</cite>,
      line <em class="line">1381</em>,
      in <code class="function">handle_user_exception</code></h4>
  <pre>reraise(exc_type, exc_value, tb)</pre>
</div>

<li><div class="frame" id="frame-140543275457552">
  <h4>File <cite class="filename">"/usr/lib/python2.7/site-packages/flask/app.py"</cite>,
      line <em class="line">1475</em>,
      in <code class="function">full_dispatch_request</code></h4>
  <pre>rv = self.dispatch_request()</pre>
</div>

<li><div class="frame" id="frame-140543275456464">
  <h4>File <cite class="filename">"/usr/lib/python2.7/site-packages/flask/app.py"</cite>,
      line <em class="line">1461</em>,
      in <code class="function">dispatch_request</code></h4>
  <pre>return self.view_functions[rule.endpoint](**req.view_args)</pre>
</div>

<li><div class="frame" id="frame-140543275456080">
  <h4>File <cite class="filename">"/usr/bin/rbd-target-api"</cite>,
      line <em class="line">94</em>,
      in <code class="function">decorated</code></h4>
  <pre>return f(*args, **kwargs)</pre>
</div>

<li><div class="frame" id="frame-140543275458000">
  <h4>File <cite class="filename">"/usr/bin/rbd-target-api"</cite>,
      line <em class="line">325</em>,
      in <code class="function">gateway</code></h4>
  <pre>api_vars)</pre>
</div>

<li><div class="frame" id="frame-140543275457168">
  <h4>File <cite class="filename">"/usr/bin/rbd-target-api"</cite>,
      line <em class="line">363</em>,
      in <code class="function">seed_tpg</code></h4>
  <pre>for gw in gateways:</pre>
</div>
</ul>
  <blockquote>TypeError: 'NoneType' object is not iterable</blockquote>
</div>

<div class="plain">
  <form action="/?__debugger__=yes&amp;cmd=paste" method="post">
    <p>
      <input type="hidden" name="language" value="pytb">
      This is the Copy/Paste friendly version of the traceback.  <span
      class="pastemessage">You can also paste this traceback into
      a <a href="https://gist.github.com/">gist</a>:
      <input type="submit" value="create paste"></span>
    </p>
    <textarea cols="50" rows="10" name="code" readonly>Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/bin/rbd-target-api", line 94, in decorated
    return f(*args, **kwargs)
  File "/usr/bin/rbd-target-api", line 325, in gateway
    api_vars)
  File "/usr/bin/rbd-target-api", line 363, in seed_tpg
    for gw in gateways:
TypeError: 'NoneType' object is not iterable</textarea>
  </form>
</div>
<div class="explanation">
  The debugger caught an exception in your WSGI application.  You can now
  look at the traceback which led to the error.  <span class="nojavascript">
  If you enable JavaScript you can also use additional features such as code
  execution (if the evalex feature is enabled), automatic pasting of the
  exceptions and much more.</span>
</div>
      <div class="footer">
        Brought to you by <strong class="arthur">DON'T PANIC</strong>, your
        friendly Werkzeug powered traceback interpreter.
      </div>
    </div>
  </body>
</html>

<!--

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/bin/rbd-target-api", line 94, in decorated
    return f(*args, **kwargs)
  File "/usr/bin/rbd-target-api", line 325, in gateway
    api_vars)
  File "/usr/bin/rbd-target-api", line 363, in seed_tpg
    for gw in gateways:
TypeError: 'NoneType' object is not iterable

-->

Failed : 500 INTERNAL SERVER ERROR
/iscsi-target...-igw/gateways> ls
o- gateways ................................................... [Up: 2/2, Portals: 2]
  o- avenger ...................................................... [10.70.39.2 (UP)]
  o- banshee ...................................................... [10.70.39.3 (UP)]
/iscsi-target...-igw/gateways> exit
[root@avenger ~]# gwcli 
/iscsi-target...-igw/gateways> ls
o- gateways ................................................... [Up: 3/3, Portals: 3]
  o- avenger ...................................................... [10.70.39.2 (UP)]
  o- banshee ...................................................... [10.70.39.3 (UP)]
  o- catalina ..................................................... [10.70.39.4 (UP)]
/iscsi-target...-igw/gateways> create cornell 10.70.39.6
Adding gateway, sync'ing 4 disk(s) and 1 client(s)
Failed : 500 INTERNAL SERVER ERROR
/iscsi-target...-igw/gateways> ls
o- gateways .................................................................................................. [Up: 3/3, Portals: 3]
  o- avenger ..................................................................................................... [10.70.39.2 (UP)]
  o- banshee ..................................................................................................... [10.70.39.3 (UP)]
  o- catalina .................................................................................................... [10.70.39.4 (UP)]
/iscsi-target...-igw/gateways> ls
o- gateways .................................................................................................. [Up: 3/3, Portals: 3]
  o- avenger ..................................................................................................... [10.70.39.2 (UP)]
  o- banshee ..................................................................................................... [10.70.39.3 (UP)]
  o- catalina .................................................................................................... [10.70.39.4 (UP)]
/iscsi-target...-igw/gateways> exit
[root@avenger ~]# gwcli 
/iscsi-target...-igw/gateways> ls
o- gateways .................................................................................................. [Up: 4/4, Portals: 4]
  o- avenger ..................................................................................................... [10.70.39.2 (UP)]
  o- banshee ..................................................................................................... [10.70.39.3 (UP)]
  o- catalina .................................................................................................... [10.70.39.4 (UP)]
  o- cornell ..................................................................................................... [10.70.39.6 (UP)]
/iscsi-target...-igw/gateways>

Comment 4 Manohar Murthy 2017-10-11 10:21:50 UTC
Issue is not seen in recent builds.

ceph-iscsi-cli-2.5-9.el7cp.noarch
ceph-iscsi-config-2.3-11.el7cp.noarch

Output:
o- gateways ...................................................................... [Up: 2/2, Portals: 2]
  o- avenger ......................................................................... [10.70.39.2 (UP)]
  o- banshee ......................................................................... [10.70.39.3 (UP)]
/iscsi-target...-igw/gateways> 
*             /             @gateways     @host-groups  @hosts        avenger/      banshee/      
bookmarks     cd            create        exit          get           goto          help          
info          ls            pwd           refresh       set           
/iscsi-target...-igw/gateways> create catalina 10.70.39.4
CMD: ../gateways/ create catalina 10.70.39.4 nosync=False skipchecks=false
Adding gateway, sync'ing 2 disk(s) and 1 client(s)
Gateway creation TPG mapping succeeded
Adding gw to UI
- checking iSCSI/API ports on catalina
ok
/iscsi-target...-igw/gateways> create cornell 10.70.39.6
CMD: ../gateways/ create cornell 10.70.39.6 nosync=False skipchecks=false
Adding gateway, sync'ing 2 disk(s) and 1 client(s)
Gateway creation TPG mapping succeeded
Adding gw to UI
- checking iSCSI/API ports on cornell
ok
/iscsi-target...-igw/gateways> ls
o- gateways ...................................................................... [Up: 4/4, Portals: 4]
  o- avenger ......................................................................... [10.70.39.2 (UP)]
  o- banshee ......................................................................... [10.70.39.3 (UP)]
  o- catalina ........................................................................ [10.70.39.4 (UP)]
  o- cornell ......................................................................... [10.70.39.6 (UP)]
/iscsi-target...-igw/gateways>

Comment 7 errata-xmlrpc 2017-12-05 23:47:21 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-2017:3387


Note You need to log in before you can comment on or make changes to this bug.