Bug #49957
closedError in dashboard iscsi gateways configuration when IPV6 is used
100%
Description
Error appears in the dashboard and it is caused by the current URL format specified for IPv6 addresses:
http://admin:admin@2620:52:0:880:225:90ff:fefc:26f8:5000
urlparse('http://admin:admin@2620:52:0:880:225:90ff:fefc:26f8:5000').hostname
'2620'
urlparse('http://admin:admin@2620:52:0:880:225:90ff:fefc:26f8:5000').port
Traceback (most recent call last):
... File "<stdin>", line 1, in <module>
... File "/usr/lib64/python3.6/urllib/parse.py", line 169, in port
... port = int(port, 10)
... ValueError: invalid literal for int() with base 10: '52:0:880:225:90ff:fefc:26f8:5000'
That's not compliant with the standard IPv6 URL encoding, which requires square brackets enclosing IPv6 literal addresses (https://tools.ietf.org/html/rfc2732):
urlparse('http://admin:admin@[2620:52:0:880:225:90ff:fefc:26f8]:5000').hostname
'2620:52:0:880:225:90ff:fefc:26f8'
urlparse('http://admin:admin@[2620:52:0:880:225:90ff:fefc:26f8]:5000').port
5000