Project

General

Profile

Actions

Bug #52473

closed

mgr/dashboard: added accidently wrong value in api and password string for gaetways

Added by jose f over 2 years ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Low
Assignee:
Category:
Component - iSCSI
Target version:
% Done:

0%

Source:
Support
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Description of problem

Accidently i added wrong values for api_password and api_port while creating and adding the iscsi service/gateways to the dashboard
now the dashboard brings the internal error 500 on main dashboard page and iscsi page

if i try to add, list or remove the iscsi-gateways i get this error

root@cd133-ceph-mon-01:~# ceph dashboard iscsi-gateway-list
Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1350, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 393, in call
    return self.func(mgr, **kwargs)
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_cli.py", line 22, in list_iscsi_gateways
    return 0, json.dumps(IscsiGatewaysConfig.get_gateways_config()), ''
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_config.py", line 105, in get_gateways_config
    return cls._load_config_from_store()
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_config.py", line 48, in _load_config_from_store
    cls.update_iscsi_config(config)
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_config.py", line 65, in update_iscsi_config
    service_url=service_url).get_hostname()['data']
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_client.py", line 43, in instance
    port = url.port
  File "/lib64/python3.6/urllib/parse.py", line 170, in port
    port = int(port, 10)
ValueError: invalid literal for int() with base 10: 'admin'

can someone help me to fix that? or how or where can i change those values?

Environment

  • ceph version 16.2.5
  • Platform (OS/distro/release): ubuntu
  • Cluster details (nodes, monitors, OSDs): 8xnodes, 3 mon, 2 rgw, 2 iscsi gw, 60 osd
  • Browser used (e.g.: Version 86.0.4240.198 (Official Build) (64-bit)):

How reproducible

Actual results

Expected results

command or file/db location to change the values of the registered iscsi gateways or to reset them all or to modify the api port and password

Additional info

Actions #1

Updated by Loïc Dachary over 2 years ago

  • Target version deleted (v16.2.6)
Actions #2

Updated by Neha Ojha over 2 years ago

  • Project changed from mgr to Dashboard
  • Category deleted (ceph-mgr)
Actions #3

Updated by Ernesto Puerta over 2 years ago

  • Category set to Component - iSCSI
  • Status changed from New to Triaged
  • Assignee set to Avan Thakkar
  • Priority changed from Normal to Low
  • Target version set to v16.2.7
  • Affected Versions v16.2.5 added
Actions #4

Updated by Avan Thakkar over 2 years ago

I think maybe the issue here is the api_port is passed as a string instead of an integer in config. @jose f f can you share maybe what values you added (just api_port value will be enough) while creation?

Actions #5

Updated by Avan Thakkar over 2 years ago

  • Status changed from Triaged to Need More Info
Actions #6

Updated by jose f over 2 years ago

hi,

i found out later that the ceph ansible script for adding gateways etc i made a mistake... i entered the password into the port field and the portnumber in the password field :-)
after a very long night and a lot of google i found how to change those variablas in the database.
the password admin and port 5001

this should´nt be... :-)

Actions #7

Updated by Ernesto Puerta over 2 years ago

  • Status changed from Need More Info to Rejected
Actions #8

Updated by Sergii Kuzko over 1 year ago

Hi
I have a very similar problem

Invalid port specified
A field whose dashboard functionality does not work correctly
Block -> iSCSI

Is there a description of how to solve this problem

iscsi is fully functional.
editable via gwcli

[root@ceph01 ~]# ceph dashboard iscsi-gateway-list 
Error EINVAL: Traceback (most recent call last):
  File "/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/lib/python3.6/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/lib/python3.6/site-packages/urllib3/connection.py", line 358, in connect
    ssl_context=context)
  File "/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 367, in ssl_wrap_socket
    return context.wrap_socket(sock)
  File "/lib64/python3.6/ssl.py", line 365, in wrap_socket
    _context=self, _session=session)
  File "/lib64/python3.6/ssl.py", line 776, in __init__
    self.do_handshake()
  File "/lib64/python3.6/ssl.py", line 1036, in do_handshake
    self._sslobj.do_handshake()
  File "/lib64/python3.6/ssl.py", line 648, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:897)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/lib/python3.6/site-packages/urllib3/util/retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='10.254.2.12', port=3260): Max retries exceeded with url: /api/sysinfo/hostname (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:897)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/ceph/mgr/dashboard/rest_client.py", line 399, in do_request
    url, headers=request_headers, params=params, auth=self.auth)
  File "/lib/python3.6/site-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/share/ceph/mgr/dashboard/rest_client.py", line 48, in request
    return super(TimeoutRequestsSession, self).request(*args, **kwargs)
  File "/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='10.254.2.12', port=3260): Max retries exceeded with url: /api/sysinfo/hostname (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:897)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1386, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 397, in call
    return self.func(mgr, **kwargs)
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_cli.py", line 22, in list_iscsi_gateways
    return 0, json.dumps(IscsiGatewaysConfig.get_gateways_config()), ''
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_config.py", line 105, in get_gateways_config
    return cls._load_config_from_store()
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_config.py", line 48, in _load_config_from_store
    cls.update_iscsi_config(config)
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_config.py", line 65, in update_iscsi_config
    service_url=service_url).get_hostname()['data']
  File "/usr/share/ceph/mgr/dashboard/rest_client.py", line 535, in func_wrapper
    **kwargs)
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_client.py", line 73, in get_hostname
    return request()
  File "/usr/share/ceph/mgr/dashboard/rest_client.py", line 324, in __call__
    data, raw_content, headers)
  File "/usr/share/ceph/mgr/dashboard/rest_client.py", line 465, in do_request
    ex.args[0].reason.args[0])
  File "/lib64/python3.6/re.py", line 172, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or bytes-like object

Actions

Also available in: Atom PDF