← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1778515] [NEW] nova-manage list_cells doesn't work is some special characters are in the passwords

 

Public bug reported:

nova-manage cell_v2 list_cells does not work without the --verbose flag
if square brackets are used in the DB or transport URL passwords because
we use
https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlsplit
during masking of the passwords and it is explicitly mentioned that this
gives a "ValueError: Invalid IPv6 URL", for square brackets if they are
not symmetric
(https://github.com/enthought/Python-2.7.3/blob/69fe0ffd2d85b4002cacae1f28ef2eb0f25e16ae/Lib/urlparse.py#L181).
Also using "?" or "#" in passwords do not mask the password. These
exceptions surely need to be at least documented somewhere in nova if
they cannot be fixed.

This is what the Error looks like, which is not very helpful:
An error has occurred:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1762, in main
    ret = fn(*fn_args, **fn_kwargs)
  File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1454, in list_cells
    mask_passwd_in_url(cell.database_connection)])
  File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 100, in mask_passwd_in_url
    parsed = urlparse.urlparse(url)
  File "/usr/lib64/python2.7/urlparse.py", line 142, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib64/python2.7/urlparse.py", line 213, in urlsplit
    raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL

** Affects: nova
     Importance: Undecided
     Assignee: Surya Seetharaman (tssurya)
         Status: New


** Tags: cells nova-manage

** Description changed:

  nova-manage cell_v2 list_cells does not work without the --verbose flag
  if square brackets are used in the DB or transport URL passwords because
  we use
  https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlsplit
  during masking of the passwords and it is explicitly mentioned that this
  gives a "ValueError: Invalid IPv6 URL", for square brackets if they are
  not symmetric
  (https://github.com/enthought/Python-2.7.3/blob/69fe0ffd2d85b4002cacae1f28ef2eb0f25e16ae/Lib/urlparse.py#L181).
- Also using "?" or "#" in passwords did not mask the password. These
+ Also using "?" or "#" in passwords do not mask the password. These
  surely need to be at least documented somewhere in nova if they cannot
  be fixed.

** Description changed:

  nova-manage cell_v2 list_cells does not work without the --verbose flag
  if square brackets are used in the DB or transport URL passwords because
  we use
  https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlsplit
  during masking of the passwords and it is explicitly mentioned that this
  gives a "ValueError: Invalid IPv6 URL", for square brackets if they are
  not symmetric
  (https://github.com/enthought/Python-2.7.3/blob/69fe0ffd2d85b4002cacae1f28ef2eb0f25e16ae/Lib/urlparse.py#L181).
  Also using "?" or "#" in passwords do not mask the password. These
  surely need to be at least documented somewhere in nova if they cannot
  be fixed.
+ 
+ 
+ This is what the Error looks like, which is not very helpful:
+ An error has occurred:
+ Traceback (most recent call last):
+   File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1762, in main
+     ret = fn(*fn_args, **fn_kwargs)
+   File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1454, in list_cells
+     mask_passwd_in_url(cell.database_connection)])
+   File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 100, in mask_passwd_in_url
+     parsed = urlparse.urlparse(url)
+   File "/usr/lib64/python2.7/urlparse.py", line 142, in urlparse
+     tuple = urlsplit(url, scheme, allow_fragments)
+   File "/usr/lib64/python2.7/urlparse.py", line 213, in urlsplit
+     raise ValueError("Invalid IPv6 URL")
+ ValueError: Invalid IPv6 URL

** Description changed:

  nova-manage cell_v2 list_cells does not work without the --verbose flag
  if square brackets are used in the DB or transport URL passwords because
  we use
  https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlsplit
  during masking of the passwords and it is explicitly mentioned that this
  gives a "ValueError: Invalid IPv6 URL", for square brackets if they are
  not symmetric
  (https://github.com/enthought/Python-2.7.3/blob/69fe0ffd2d85b4002cacae1f28ef2eb0f25e16ae/Lib/urlparse.py#L181).
  Also using "?" or "#" in passwords do not mask the password. These
- surely need to be at least documented somewhere in nova if they cannot
- be fixed.
- 
+ exceptions surely need to be at least documented somewhere in nova if
+ they cannot be fixed.
  
  This is what the Error looks like, which is not very helpful:
  An error has occurred:
  Traceback (most recent call last):
-   File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1762, in main
-     ret = fn(*fn_args, **fn_kwargs)
-   File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1454, in list_cells
-     mask_passwd_in_url(cell.database_connection)])
-   File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 100, in mask_passwd_in_url
-     parsed = urlparse.urlparse(url)
-   File "/usr/lib64/python2.7/urlparse.py", line 142, in urlparse
-     tuple = urlsplit(url, scheme, allow_fragments)
-   File "/usr/lib64/python2.7/urlparse.py", line 213, in urlsplit
-     raise ValueError("Invalid IPv6 URL")
+   File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1762, in main
+     ret = fn(*fn_args, **fn_kwargs)
+   File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1454, in list_cells
+     mask_passwd_in_url(cell.database_connection)])
+   File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 100, in mask_passwd_in_url
+     parsed = urlparse.urlparse(url)
+   File "/usr/lib64/python2.7/urlparse.py", line 142, in urlparse
+     tuple = urlsplit(url, scheme, allow_fragments)
+   File "/usr/lib64/python2.7/urlparse.py", line 213, in urlsplit
+     raise ValueError("Invalid IPv6 URL")
  ValueError: Invalid IPv6 URL

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1778515

Title:
  nova-manage list_cells doesn't work is some special characters are in
  the passwords

Status in OpenStack Compute (nova):
  New

Bug description:
  nova-manage cell_v2 list_cells does not work without the --verbose
  flag if square brackets are used in the DB or transport URL passwords
  because we use
  https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlsplit
  during masking of the passwords and it is explicitly mentioned that
  this gives a "ValueError: Invalid IPv6 URL", for square brackets if
  they are not symmetric
  (https://github.com/enthought/Python-2.7.3/blob/69fe0ffd2d85b4002cacae1f28ef2eb0f25e16ae/Lib/urlparse.py#L181).
  Also using "?" or "#" in passwords do not mask the password. These
  exceptions surely need to be at least documented somewhere in nova if
  they cannot be fixed.

  This is what the Error looks like, which is not very helpful:
  An error has occurred:
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1762, in main
      ret = fn(*fn_args, **fn_kwargs)
    File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1454, in list_cells
      mask_passwd_in_url(cell.database_connection)])
    File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 100, in mask_passwd_in_url
      parsed = urlparse.urlparse(url)
    File "/usr/lib64/python2.7/urlparse.py", line 142, in urlparse
      tuple = urlsplit(url, scheme, allow_fragments)
    File "/usr/lib64/python2.7/urlparse.py", line 213, in urlsplit
      raise ValueError("Invalid IPv6 URL")
  ValueError: Invalid IPv6 URL

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1778515/+subscriptions


Follow ups