Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid login details keeps the plugin busy exhausting wsapi sessions #534

Closed
sneharai4 opened this issue Mar 27, 2019 · 9 comments
Closed
Assignees
Labels

Comments

@sneharai4
Copy link
Collaborator

Plugin error log:

2019-03-27T05:32:51+0000 [twisted.web.server.Request#critical]
        Traceback (most recent call last):
          File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/server.py", line 258, in render
            body = resrc.render(self)
          File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/resource.py", line 210, in render
            d = defer.maybeDeferred(_execute)
          File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/internet/defer.py", line 151, in maybeDeferred
            result = f(*args, **kw)
          File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/resource.py", line 204, in _execute
            **kwargs)
        --- <exception caught here> ---
          File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/internet/defer.py", line 151, in maybeDeferred
            result = f(*args, **kw)
          File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/app.py", line 128, in execute_endpoint
            return endpoint_f(self._instance, *args, **kwargs)
          File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/app.py", line 227, in _f
            return _call(instance, f, request, *a, **kw)
          File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/app.py", line 50, in _call
            result = f(*args, **kwargs)
          File "/python-hpedockerplugin/hpedockerplugin/hpe_storage_api.py", line 732, in volumedriver_get
            qualified_name)
          File "/python-hpedockerplugin/hpedockerplugin/backend_orchestrator.py", line 247, in get_volume_snap_details
            snapname, qualified_name)
          File "/python-hpedockerplugin/hpedockerplugin/backend_orchestrator.py", line 163, in _execute_request
            backend, request, volname, *args, **kwargs)
          File "/python-hpedockerplugin/hpedockerplugin/backend_orchestrator.py", line 152, in __execute_request
            return getattr(volume_mgr, request)(volname, *args, **kwargs)
          File "/python-hpedockerplugin/hpedockerplugin/volume_manager.py", line 1107, in get_volume_snap_details
            vol_detail['cpg'])
          File "/python-hpedockerplugin/hpedockerplugin/hpe/hpe_3par_fc.py", line 562, in get_domain
            common = self._login()
          File "/python-hpedockerplugin/hpedockerplugin/hpe/hpe_3par_fc.py", line 75, in _login
            common.client_login()
          File "/python-hpedockerplugin/hpedockerplugin/hpe/hpe_3par_common.py", line 161, in client_login
            self.src_bkend_config.hpe3par_password)
          File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/client.py", line 294, in login
          File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 124, in authenticate
          File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 376, in post
          File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 321, in _cs_request
          File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 297, in _time_request
          File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 279, in request
          File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 262, in request
        hpe3parclient.exceptions.HTTPServiceUnavailable: Service Unavailable (HTTP 503) 31 - maximum number of server connections has been reached

Total sessions on 3PAR active at the moment when plugin gives the error:

CSSOS-SSA04 cli% showwsapisession
              Id Node -Name-- -Role- -Client_IP_Addr- ----Connected_since---- -State- -Session_Type-
1553665899721082 0    3paradm super  192.168.120.130  2019-03-27 11:21:39 IST Idle    Regular
1553665897919303 0    3paradm super  192.168.120.132  2019-03-27 11:21:37 IST Idle    Regular
1553665839748379 0    3paradm super  192.168.120.130  2019-03-27 11:20:39 IST Idle    Regular
1553665838813000 0    3paradm super  192.168.120.132  2019-03-27 11:20:38 IST Idle    Regular
1553665783177462 0    3paradm super  192.168.120.130  2019-03-27 11:19:43 IST Idle    Regular
1553665782994363 0    3paradm super  192.168.120.132  2019-03-27 11:19:42 IST Idle    Regular
1553665779788901 0    3paradm super  192.168.120.132  2019-03-27 11:19:39 IST Idle    Regular
1553665779184133 0    3paradm super  192.168.120.130  2019-03-27 11:19:39 IST Idle    Regular
1553665733018904 0    3paradm super  192.168.120.132  2019-03-27 11:18:53 IST Idle    Regular
1553665730535537 0    3paradm super  192.168.120.131  2019-03-27 11:18:50 IST Idle    Regular
1553665729420630 0    3paradm super  192.168.120.130  2019-03-27 11:18:49 IST Idle    Regular
1553665729006127 0    3paradm super  192.168.120.132  2019-03-27 11:18:49 IST Idle    Regular
1553665727116828 0    3paradm super  192.168.120.131  2019-03-27 11:18:47 IST Idle    Regular
1553665725334535 0    3paradm super  192.168.120.132  2019-03-27 11:18:45 IST Idle    Regular
1553665724987512 0    3paradm super  192.168.120.130  2019-03-27 11:18:44 IST Idle    Regular
1553665723715695 0    3paradm super  192.168.120.131  2019-03-27 11:18:43 IST Idle    Regular
1553665721974328 0    3paradm super  192.168.120.132  2019-03-27 11:18:41 IST Idle    Regular
1553665720794251 0    3paradm super  192.168.120.130  2019-03-27 11:18:40 IST Idle    Regular
1553665720429454 0    3paradm super  192.168.120.131  2019-03-27 11:18:40 IST Idle    Regular
1553665718213124 0    3paradm super  192.168.120.132  2019-03-27 11:18:38 IST Idle    Regular
1553665716711427 0    3paradm super  192.168.120.130  2019-03-27 11:18:36 IST Idle    Regular
1553665701867522 0    3paradm super  192.168.120.131  2019-03-27 11:18:21 IST Idle    Regular
1553665699575099 0    3paradm super  192.168.120.132  2019-03-27 11:18:19 IST Idle    Regular
1553665697549523 0    3paradm super  192.168.120.130  2019-03-27 11:18:17 IST Idle    Regular
1553665670926366 0    3paradm super  192.168.120.131  2019-03-27 11:17:50 IST Idle    Regular
1553665669613567 0    3paradm super  192.168.120.132  2019-03-27 11:17:49 IST Idle    Regular
1553665667436949 0    3paradm super  192.168.120.130  2019-03-27 11:17:47 IST Idle    Regular
1553665667113747 0    3paradm super  192.168.120.131  2019-03-27 11:17:47 IST Idle    Regular
1553665666028066 0    3paradm super  192.168.120.132  2019-03-27 11:17:46 IST Idle    Regular
1553665663564226 0    3paradm super  192.168.120.131  2019-03-27 11:17:43 IST Idle    Regular
1553665663063075 0    3paradm super  192.168.120.130  2019-03-27 11:17:43 IST Idle    Regular
1553665662386483 0    3paradm super  192.168.120.132  2019-03-27 11:17:42 IST Idle    Regular
1553665660344830 0    3paradm super  192.168.120.131  2019-03-27 11:17:40 IST Idle    Regular
1553665659031402 0    3paradm super  192.168.120.132  2019-03-27 11:17:39 IST Idle    Regular
1553665658983929 0    3paradm super  192.168.120.130  2019-03-27 11:17:38 IST Idle    Regular
1553665657159565 0    3paradm super  192.168.120.131  2019-03-27 11:17:37 IST Idle    Regular
----------------------------------------------------------------------------------------------------
              36 total

Docker systemctl status:

Mar 27 11:02:51 CSSOSBE03-B04 dockerd[20239]: an class=\"function\">request</span>\n      </div>\n      <div class=\"snippet\">\n        <div class=\"snippetLine\">\n          <span class=\"lineno\">261</span>\n      ...ss=\"lineno\">262
Mar 27 11:18:31 CSSOSBE03-B04 dockerd[20239]: time="2019-03-27T11:18:31.838860304+05:30" level=warning msg="Error while looking up volume" driver=hpe error="VolumeDriver.Get: <html><head><title>web.Server Traceback (m...  <style type=\"t
Mar 27 11:18:31 CSSOSBE03-B04 dockerd[20239]:  &#160; &#160;result = f(*args, **kw)</code>\n        </div><div class=\"snippetLine\">\n          <span class=\"lineno\">152</span>\n          <code class=\"code\"> &#160..."location\">\n
Mar 27 11:18:31 CSSOSBE03-B04 dockerd[20239]: 10.0-py3.6.egg/klein/app.py</span>:<span>50</span> in\n        <span class=\"function\">_call</span>\n      </div>\n      <div class=\"snippet\">\n        <div class=\"sni...160; &#160;args =
Mar 27 11:18:31 CSSOSBE03-B04 dockerd[20239]:           <code class=\"code\"> &#160; &#160; &#160; &#160;return self._execute_request('get_volume_snap_details', volname,</code>\n        </div><div class=\"snippetHighl...#160; &#160; &#16
Mar 27 11:18:31 CSSOSBE03-B04 dockerd[20239]: #160; &#160; &#160;return getattr(volume_mgr, request)(volname, *args, **kwargs)</code>\n        </div><div class=\"snippetLine\">\n          <span class=\"lineno\">153</s...">\n      <div cl
Mar 27 11:18:31 CSSOSBE03-B04 dockerd[20239]: e_3par_fc.py</span>:<span>75</span> in\n        <span class=\"function\">_login</span>\n      </div>\n      <div class=\"snippet\">\n        <div class=\"snippetLine\">\n ...mon.do_setup()</c
Mar 27 11:18:31 CSSOSBE03-B04 dockerd[20239]: span>\n          <code class=\"code\"></code>\n        </div><div class=\"snippetHighlightLine\">\n          <span class=\"lineno\">294</span>\n          <code class=\"cod...      <code class
Mar 27 11:18:31 CSSOSBE03-B04 dockerd[20239]: ">\n        <div class=\"snippetLine\">\n          <span class=\"lineno\">320</span>\n          <code class=\"code\"></code>\n        </div><div class=\"snippetHighlightLi...><div class=\"sni
Mar 27 11:18:31 CSSOSBE03-B04 dockerd[20239]: an class=\"function\">request</span>\n      </div>\n      <div class=\"snippet\">\n        <div class=\"snippetLine\">\n          <span class=\"lineno\">261</span>\n      ...ss=\"lineno\">262
Hint: Some lines were ellipsized, use -l to show in full.
@farhan7500
Copy link
Contributor

If the plugin fails due to login issue and retries again and again, ultimately the array WSAPI sessions no longer respond and throw:

Service Unavailable (HTTP 503) 31 - maximum number of server connections has been reached

@wdurairaj wdurairaj changed the title Plugin throws service unavailable error for 3PAR Invalid login details keeps the plugin busy exhausting wsapi sessions Apr 1, 2019
@wdurairaj
Copy link
Collaborator

@sneharai4 , if you are able to recreate this consistently, keep i will keep this as "high" (documenting the steps here) , otherwise, i would deprioritize to either "medium" or "low".

@prablr79
Copy link
Contributor

prablr79 commented Apr 2, 2019

@sneharai4 can you provide some steps ? else we can mark to Medium..

@wdurairaj
Copy link
Collaborator

I was able to recreate the problem of 1 session leak per backend when this setting is given with improper value

ssh_hosts_key_file = /root/.ssh/known_hosts in hpe.conf
paramiko SSH Exception is not caught and it propagates outside of hpe_3par_common in do_setup() call, and the next call which is check_for_error() is not done (which would have done the session logout),

But, when this problem happens, the backend is correctly marked in FAILED state in this command docker volume create -d hpe -o help=backends and the logs gives adequate clue about the SSHException as

 _http_log_resp /usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py:185^[[00m
2019-04-09 01:21:37.174 20 ERROR hpe3parclient.ssh [-] Error connecting via ssh: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts': FileNotFoundError: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts'^[[00m
2019-04-09 01:21:37.175 20 ERROR hpedockerplugin.volume_manager [-] ('hpeplugin_driver do_setup failed, error is: %s', "Error connecting via ssh: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts'"): paramiko.ssh_exception.SSHException: Error connecting via ssh: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts'^[[00m
2019-04-09 01:21:37.175 20 INFO hpedockerplugin.volume_manager [-] Failed to initialize 3PAR driver for array: https://192.168.67.7:8080/api/v1!Exception: HPE Docker Volume plugin not ready: ('hpeplugin_driver do_setup failed, error is: %s', "Error connecting via ssh: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts'")^[[00m
2019-04-09 01:21:37.176 20 ERROR hpedockerplugin.backend_async_initializer [-] INITIALIZING backend: 3par3 FAILED Error: HPE Docker Volume Plugin Start Plugin Service Failed: Failed to initialize 3PAR driver for array: https://192.168.67.7:8080/api/v1!Exception: HPE Docker Volume plugin not ready: ('hpeplugin_driver do_setup failed, error is: %s', "Error connecting via ssh: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts'"): hpedockerplugin.exception.HPEPluginStartPluginException: HPE Docker Volume Plugin Start Plugin Service Failed: Failed to initialize 3PAR driver for array: https://192.168.67.7:8080/api/v1!Exception: HPE Docker Volume plugin not ready: ('hpeplugin_driver do_setup failed, error is: %s', "Error connecting via ssh: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts'")^[[00m
2019-04-09 01:21:37.176 20 INFO hpedockerplugin.backend_async_initializer [-] in finally : 3par3 , {'mgr': None, 'backend_state': 'FAILED'} ^[[00m

So, in production this situation can only be hit, when

  1. there is an improper value in ssh_hosts_key_file, which is indicated by a failed backend initialization and the logs indicate the failed SSH called via paramiko exception

  2. The number of session leak is 1 per backend, with every restart of the plugin container, and it's cleared after a default time out of 15 mins.

Based on the above reason, we can downgrade this bug to a "medium" priority,

@sneharai4 , please let me know, if you need any other details (or) your comments

@prablr79
Copy link
Contributor

@sneharai4 any comments ?

@sneharai4
Copy link
Collaborator Author

sneharai4 commented Apr 10, 2019

I tried re-producing the same issue, but this time I am not getting "Service Unavailable (HTTP 503) 31 - maximum number of server connections has been reached" response error.

I have one host, where hpe.conf has invalid know_hosts file path because of which the backend fails to initialize. This has created 36 sessions on 3PAR. Error in plugin-container log:

2019-04-10 08:33:50.103 20 ERROR hpedockerplugin.backend_async_initializer [-] INITIALIZING backend: DEFAULT2 FAILED Error: HPE Docker Volume Plugin Start Plugin Service Failed: Failed to initialize 3PAR driver for array: https://192.168.67.7:8080/api/v1!Exception: 'RequestException' object has no attribute 'message': hpedockerplugin.exception.HPEPluginStartPluginException: HPE Docker Volume Plugin Start Plugin Service Failed: Failed to initialize 3PAR driver for array: https://192.168.67.7:8080/api/v1!Exception: 'RequestException' object has no attribute 'message'�[00m
2019-04-10 08:33:50.105 20 ERROR hpe3parclient.ssh [-] Error connecting via ssh: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts': FileNotFoundError: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts'�[00m
2019-04-10 08:33:50.110 20 INFO hpedockerplugin.backend_async_initializer [-] in finally : DEFAULT2 , {'mgr': None, 'backend_state': 'FAILED'} �[00m
2019-04-10 08:33:50.110 20 ERROR hpedockerplugin.volume_manager [-] ('hpeplugin_driver do_setup failed, error is: %s', "Error connecting via ssh: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts'"): paramiko.ssh_exception.SSHException: Error connecting via ssh: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts'�[00m
2019-04-10 08:33:50.112 20 INFO hpedockerplugin.volume_manager [-] Failed to initialize 3PAR driver for array: https://192.168.67.7:8080/api/v1!Exception: HPE Docker Volume plugin not ready: ('hpeplugin_driver do_setup failed, error is: %s', "Error connecting via ssh: [Errno 2] No such file or directory: '/groot/.ssh/known_hosts'")�[00m
2019-04-10T08:33:50+0000 [twisted.logger._global#warn] /usr/lib/python3.6/site-packages/urllib3-1.23-py3.6.egg/urllib3/connectionpool.py:857: urllib3.exceptions.InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
2019-04-10T08:33:50+0000 [twisted.logger._global#warn] /usr/lib/python3.6/site-packages/urllib3-1.23-py3.6.egg/urllib3/connectionpool.py:857: urllib3.exceptions.InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
2019-04-10 08:33:50.114 20 INFO hpedockerplugin.volume_manager [-] Failed to initialize 3PAR driver for array: https://192.168.67.7:8080/api/v1!Exception: 'RequestException' object has no attribute 'message'�[00m

Detailed log:
backend_init_fails_when_hpe_conf_has_incorrect_hosts_file_path.zip

invalid_host_path_hpe_conf.txt

Now, i have another host where the backend is set to OK which uses the same array which has exhausted all the sessions on 3PAR. Getting below error while creating a volume on this host:

2019-04-10T08:35:57+0000 [twisted.web.server.Request#critical] 
	Traceback (most recent call last):
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/server.py", line 258, in render
	    body = resrc.render(self)
	  File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/resource.py", line 210, in render
	    d = defer.maybeDeferred(_execute)
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/internet/defer.py", line 151, in maybeDeferred
	    result = f(*args, **kw)
	  File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/resource.py", line 204, in _execute
	    **kwargs)
	--- <exception caught here> ---
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/internet/defer.py", line 151, in maybeDeferred
	    result = f(*args, **kw)
	  File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/app.py", line 128, in execute_endpoint
	    return endpoint_f(self._instance, *args, **kwargs)
	  File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/app.py", line 227, in _f
	    return _call(instance, f, request, *a, **kw)
	  File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/app.py", line 50, in _call
	    result = f(*args, **kwargs)
	  File "/python-hpedockerplugin/hpedockerplugin/hpe_storage_api.py", line 732, in volumedriver_get
	    qualified_name)
	  File "/python-hpedockerplugin/hpedockerplugin/backend_orchestrator.py", line 247, in get_volume_snap_details
	    snapname, qualified_name)
	  File "/python-hpedockerplugin/hpedockerplugin/backend_orchestrator.py", line 163, in _execute_request
	    backend, request, volname, *args, **kwargs)
	  File "/python-hpedockerplugin/hpedockerplugin/backend_orchestrator.py", line 152, in __execute_request
	    return getattr(volume_mgr, request)(volname, *args, **kwargs)
	  File "/python-hpedockerplugin/hpedockerplugin/volume_manager.py", line 1107, in get_volume_snap_details
	    vol_detail['cpg'])
	  File "/python-hpedockerplugin/hpedockerplugin/hpe/hpe_3par_fc.py", line 562, in get_domain
	    common = self._login()
	  File "/python-hpedockerplugin/hpedockerplugin/hpe/hpe_3par_fc.py", line 75, in _login
	    common.client_login()
	  File "/python-hpedockerplugin/hpedockerplugin/hpe/hpe_3par_common.py", line 161, in client_login
	    self.src_bkend_config.hpe3par_password)
	  File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/client.py", line 294, in login
	    
	  File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 124, in authenticate
	    
	  File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 376, in post
	    
	  File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 321, in _cs_request
	    
	  File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 297, in _time_request
	    
	  File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/http.py", line 291, in request
	    
	hpe3parclient.exceptions.RequestException: <RequestException instance at 0x7f68606fe708 with str error:
	 Traceback (most recent call last):
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/python/reflect.py", line 448, in safe_str
	    return str(o)
	  File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/exceptions.py", line 104, in __str__
	    formatted_string = self.message
	AttributeError: 'RequestException' object has no attribute 'message'
	>
	
2019-04-10T08:35:57+0000 [_GenericHTTPChannelProtocol,193,] Unhandled Error writing response
	Traceback (most recent call last):
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/server.py", line 359, in processingFailed
	    util.formatFailure(reason) +
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/util.py", line 432, in formatFailure
	    flattenString(None, FailureElement(myFailure)).addBoth(result.append)
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/_flatten.py", line 419, in flattenString
	    d = flatten(request, root, io.write)
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/_flatten.py", line 401, in flatten
	    _writeFlattenedData(state, write, result)
	--- <exception caught here> ---
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/internet/defer.py", line 654, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "/usr/lib/python3.6/site-packages/klein-17.10.0-py3.6.egg/klein/resource.py", line 256, in processing_failed
	    request.processingFailed(failure)
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/server.py", line 359, in processingFailed
	    util.formatFailure(reason) +
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/util.py", line 437, in formatFailure
	    result[0].raiseException()
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/python/failure.py", line 467, in raiseException
	    raise self.value.with_traceback(self.tb)
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/_flatten.py", line 362, in _writeFlattenedData
	    element = next(state)
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/_flatten.py", line 330, in _flattenTree
	    raise FlattenerError(e, roots, extract_tb(exc_info()[2]))
	twisted.web.error.FlattenerError: Exception while flattening:
	  <twisted.web.util.FailureElement object at 0x7f686052bb00>
	  [Tag('div', children=['\n', '  ', Tag('style', attributes=OrderedDict([('type', 'text/css')]), children=['\n', '    div.error {', '\n', '      color: red;', '\n', '      font-family: Verdana, Arial, helvetica, sans-serif;', '\n', '      font-weight: bold;', '\n', '    }', '\n', '\n', '    div {', '\n', '      font-family: Verdana, Arial, helvetica, sans-serif;', '\n', '    }', '\n', '\n', '    div.stackTrace {', '\n', '    }', '\n', '\n', '    div.frame {', '\n', '      padding: 1em;', '\n', '      background: white;', '\n', '      border-bottom: thin black dashed;', '\n', '    }', '\n', '\n', '    div.frame:first-child {', '\n', '      padding: 1em;', '\n', '      background: white;', '\n', '      border-top: thin black dashed;', '\n', '      border-bottom: thin black dashed;', '\n', '    }', '\n', '\n', '    div.location {', '\n', '    }', '\n', '\n', '    span.function {', '\n', '      font-weight: bold;', '\n', '      font-family: "Courier New", courier, monospace;', '\n', '    }', '\n', '\n', '    div.snippet {', '\n', '      margin-bottom: 0.5em;', '\n', '      margin-left: 1em;', '\n', '      background: #FFFFDD;', '\n', '    }', '\n', '\n', '    div.snippetHighlightLine {', '\n', '      color: red;', '\n', '    }', '\n', '\n', '    span.code {', '\n', '      font-family: "Courier New", courier, monospace;', '\n', '    }', '\n', '  ']), '\n', '\n', '  ', Tag('div', attributes=OrderedDict([('class', 'error')]), children=['\n', '    ', Tag('span'), ': ', Tag('span'), '\n', '  ']), '\n', '  ', Tag('div', attributes=OrderedDict([('class', 'stackTrace')]), children=['\n', '    ', Tag('div', attributes=OrderedDict([('class', 'frame')]), children=['\n', '      ', Tag('div', attributes=OrderedDict([('class', 'location')]), children=['\n', '        ', Tag('span'), ':', Tag('span'), ' in', '\n', '        ', Tag('span', attributes=OrderedDict([('class', 'function')])), '\n', '      ']), '\n', '      ', Tag('div', attributes=OrderedDict([('class', 'snippet')]), children=['\n', '        ', Tag('div', children=['\n', '          ', Tag('span', attributes=OrderedDict([('class', 'lineno')])), '\n', '          ', Tag('code', attributes=OrderedDict([('class', 'code')])), '\n', '        ']), '\n', '      ']), '\n', '    ']), '\n', '  ']), '\n', '  ', Tag('div', attributes=OrderedDict([('class', 'error')]), children=['\n', '    ', Tag('span'), ': ', Tag('span'), '\n', '  ']), '\n'])]
	  Tag <div>
	  ['\n', '  ', Tag('style', attributes=OrderedDict([('type', 'text/css')]), children=['\n', '    div.error {', '\n', '      color: red;', '\n', '      font-family: Verdana, Arial, helvetica, sans-serif;', '\n', '      font-weight: bold;', '\n', '    }', '\n', '\n', '    div {', '\n', '      font-family: Verdana, Arial, helvetica, sans-serif;', '\n', '    }', '\n', '\n', '    div.stackTrace {', '\n', '    }', '\n', '\n', '    div.frame {', '\n', '      padding: 1em;', '\n', '      background: white;', '\n', '      border-bottom: thin black dashed;', '\n', '    }', '\n', '\n', '    div.frame:first-child {', '\n', '      padding: 1em;', '\n', '      background: white;', '\n', '      border-top: thin black dashed;', '\n', '      border-bottom: thin black dashed;', '\n', '    }', '\n', '\n', '    div.location {', '\n', '    }', '\n', '\n', '    span.function {', '\n', '      font-weight: bold;', '\n', '      font-family: "Courier New", courier, monospace;', '\n', '    }', '\n', '\n', '    div.snippet {', '\n', '      margin-bottom: 0.5em;', '\n', '      margin-left: 1em;', '\n', '      background: #FFFFDD;', '\n', '    }', '\n', '\n', '    div.snippetHighlightLine {', '\n', '      color: red;', '\n', '    }', '\n', '\n', '    span.code {', '\n', '      font-family: "Courier New", courier, monospace;', '\n', '    }', '\n', '  ']), '\n', '\n', '  ', Tag('div', attributes=OrderedDict([('class', 'error')]), children=['\n', '    ', Tag('span'), ': ', Tag('span'), '\n', '  ']), '\n', '  ', Tag('div', attributes=OrderedDict([('class', 'stackTrace')]), children=['\n', '    ', Tag('div', attributes=OrderedDict([('class', 'frame')]), children=['\n', '      ', Tag('div', attributes=OrderedDict([('class', 'location')]), children=['\n', '        ', Tag('span'), ':', Tag('span'), ' in', '\n', '        ', Tag('span', attributes=OrderedDict([('class', 'function')])), '\n', '      ']), '\n', '      ', Tag('div', attributes=OrderedDict([('class', 'snippet')]), children=['\n', '        ', Tag('div', children=['\n', '          ', Tag('span', attributes=OrderedDict([('class', 'lineno')])), '\n', '          ', Tag('code', attributes=OrderedDict([('class', 'code')])), '\n', '        ']), '\n', '      ']), '\n', '    ']), '\n', '  ']), '\n', '  ', Tag('div', attributes=OrderedDict([('class', 'error')]), children=['\n', '    ', Tag('span'), ': ', Tag('span'), '\n', '  ']), '\n']
	  Tag <div>
	  ['\n', '    ', Tag('span'), ': ', Tag('span'), '\n', '  ']
	  Tag <span>
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/_flatten.py", line 321, in _flattenTree
	    element = next(stack[-1])
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/_flatten.py", line 237, in _flattenElement
	    result = renderMethod(request, rootClone)
	  File "/usr/lib/python3.6/site-packages/Twisted-18.7.0rc1-py3.6-linux-x86_64.egg/twisted/web/util.py", line 406, in value
	    return tag(unicode(self.failure.value).encode('utf8'))
	  File "/usr/lib/python3.6/site-packages/python_3parclient-4.2.9-py3.6.egg/hpe3parclient/exceptions.py", line 104, in __str__
	    formatted_string = self.message
	AttributeError: 'RequestException' object has no attribute 'message'

Detailed log:

create_volume_fails_with_correct_hpe_conf.zip

hpe_conf.txt

@wdurairaj wdurairaj self-assigned this Apr 10, 2019
wdurairaj added a commit to wdurairaj/python-hpedockerplugin that referenced this issue Apr 12, 2019
@prablr79 prablr79 added the Fixed Code fixed label Apr 15, 2019
nilangekarss pushed a commit that referenced this issue Apr 15, 2019
* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Fix issue #534 - invalid config entry creates session leak
@sneharai4
Copy link
Collaborator Author

Fix is verified and working.

But need to open a new bug to log errors when the session exhausts and client is raising an exception which is not being handled correctly by 3PAR. Different error is raised for 3.3.1 and 3.2.2 array.

@prablr79
Copy link
Contributor

@sneharai4 can you raise a new bug and close this ? else we can keep it open until we address the issue completely.. Please let me know.

@sneharai4
Copy link
Collaborator Author

@prablr79 Closing this issue.

wdurairaj added a commit to wdurairaj/python-hpedockerplugin that referenced this issue Apr 25, 2019
* Fix Issue hpe-storage#390, Allow 'size' in snapshot options

* Updated usage doc

* Fix issue hpe-storage#534 - invalid config entry creates session leak
wdurairaj added a commit that referenced this issue Apr 25, 2019
* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Fix issue #534 - invalid config entry creates session leak
wdurairaj added a commit that referenced this issue Jun 24, 2019
* Fix Issue #534 (#576)

* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Fix issue #534 - invalid config entry creates session leak

* Fix for chcon error -- issue #640
wdurairaj added a commit that referenced this issue Jul 3, 2019
… not present (#669)

* Fix Issue #534 (#576)

* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Fix issue #534 - invalid config entry creates session leak

* Fix pop from empty list error on FC driver
nilangekarss pushed a commit that referenced this issue Sep 25, 2019
* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Added space between words

* Ability to create a regular volume from a replicated backend

* Fixed pep8 issue regarding redundant back slashes

* Pep8 Fix attempt 2: Indentation

* Update hpe_storage_api.py

* Fixed an issue when a regular volume is mounted while the backend is replication enabled

* Fixed pep8 line too long issues

* Not treating as a replication backend if the volume created is not replicated volume

* Allowing the non replicated volume from a replicated backend to be successfully imported to docker volume plugin

* Added back some required checks

* Removed unwanted space

* Update .travis.yml

* Fix for issue 518-encrypted password decrytion fails when the passphrase length is of 16,24,32 characters

* Fix for issue 502 (#555)

* Added needed check to see mgr object is available or not (#559)

* Feature: Add logging to file -- Include changes for Pull Request #563 in v300 branch (#569)

* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Feature: Add support for RotatingFileHandler in logging

* Fix Issue #534 (#576)

* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Fix issue #534 - invalid config entry creates session leak

* Fix issue #513 on v300 branch (#583)

* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Fixed issue #513

-Added rollback to mount flow for any cleanup in case of any failure
-Added validation for fsOwner

* Pep8 fixed

* Use deferred thread for processing REST calls in twistd

* Fixed msg creation

* Retry on lock exception

* Another attempt on processing lock failed exception

* Changes in mount_volume to avoid lock during mount conflict check

* Fix _is_vol_mounted_on_this_node definition

* Minor change

* Backport pull request #650 and related changes

* Implemented blocking Etcd lock + Eviction fixes merged

* Fix problem with mount entry check

* Returning multiple enums from _is_vol_mounted_on_this_node + inspect output to have volume id

* Expect node_mount_info to be absent for the first mount

-Also removed dead code

* path_info to be handled as JSON object + handled stale mount_id in reboot case

* Fix for UTs

* Replaced path.path with path

* Fixed snap related TC

* PEP8 errors fixed

* Added more information to the logs

* For UT 3pardcv.log location changed

* Added check for manager-list initialization

* Removed redundant code

* Removed duplicate functions from fileutil

As part of merge process, fileutil ended up having two duplicate functions. Fixed it.
Also UT needed to use un-deferred thread code to avoid handling multi-threaded UTs.

* Fixed UTs for File

* Added exception handling for mount_dir()

* Adopted 3.2 async initialization fix required for UT

* Reintroduced sleep of 3 secs

* Corrected usage of sleep() call

* Disabled detailed logging due to Travis CI log size restriction

* Pep8 fix

* Fix for issue #735

* Fixed removal of redundant old_path_info entries

* Added missing argument to rollback call

* Removed code that was added to look for iscsi devices

Ideally, we should remove this file altogether... to be taken up later
wdurairaj pushed a commit that referenced this issue Oct 17, 2019
* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Added space between words

* Ability to create a regular volume from a replicated backend

* Fixed pep8 issue regarding redundant back slashes

* Pep8 Fix attempt 2: Indentation

* Update hpe_storage_api.py

* Fixed an issue when a regular volume is mounted while the backend is replication enabled

* Fixed pep8 line too long issues

* Not treating as a replication backend if the volume created is not replicated volume

* Allowing the non replicated volume from a replicated backend to be successfully imported to docker volume plugin

* Added back some required checks

* Removed unwanted space

* Update .travis.yml

* Fix for issue 518-encrypted password decrytion fails when the passphrase length is of 16,24,32 characters

* Fix for issue 502 (#555)

* Added needed check to see mgr object is available or not (#559)

* Feature: Add logging to file -- Include changes for Pull Request #563 in v300 branch (#569)

* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Feature: Add support for RotatingFileHandler in logging

* Fix Issue #534 (#576)

* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Fix issue #534 - invalid config entry creates session leak

* Fix issue #513 on v300 branch (#583)

* Fix Issue #390, Allow 'size' in snapshot options

* Updated usage doc

* Fixed issue #513

-Added rollback to mount flow for any cleanup in case of any failure
-Added validation for fsOwner

* Pep8 fixed

* Use deferred thread for processing REST calls in twistd

* Fixed msg creation

* Retry on lock exception

* Another attempt on processing lock failed exception

* Changes in mount_volume to avoid lock during mount conflict check

* Fix _is_vol_mounted_on_this_node definition

* Minor change

* Backport pull request #650 and related changes

* Implemented blocking Etcd lock + Eviction fixes merged

* Fix problem with mount entry check

* Returning multiple enums from _is_vol_mounted_on_this_node + inspect output to have volume id

* Expect node_mount_info to be absent for the first mount

-Also removed dead code

* path_info to be handled as JSON object + handled stale mount_id in reboot case

* Fix for UTs

* Replaced path.path with path

* Fixed snap related TC

* PEP8 errors fixed

* Added more information to the logs

* For UT 3pardcv.log location changed

* Added check for manager-list initialization

* Removed redundant code

* Removed duplicate functions from fileutil

As part of merge process, fileutil ended up having two duplicate functions. Fixed it.
Also UT needed to use un-deferred thread code to avoid handling multi-threaded UTs.

* Fixed UTs for File

* Added exception handling for mount_dir()

* Adopted 3.2 async initialization fix required for UT

* Reintroduced sleep of 3 secs

* Corrected usage of sleep() call

* Disabled detailed logging due to Travis CI log size restriction

* Pep8 fix

* Fix for issue #735

* Fixed removal of redundant old_path_info entries

* Added missing argument to rollback call

* Removed code that was added to look for iscsi devices

Ideally, we should remove this file altogether... to be taken up later

* pyparsing ImportError fix

* Changed setuptools version to 41.0.0

41.0.0 was used by v3.1 of plugin and was

* Device remapping fix

On reboot, the volumes that were mapped to the multipath devices earlier are remapped to different devices. This fix handles that case.

* Fixed lock name

* Fixed PEP8 issues

* Missed a PEP8 conformance

* Fixed log statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants