Bug 1946230 - Unable to define a IPv6 host with cinder manage
Summary: Unable to define a IPv6 host with cinder manage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z6
: 16.1 (Train on RHEL 8.2)
Assignee: Eric Harney
QA Contact: Tzach Shefi
Andy Stillman
URL:
Whiteboard:
Depends On: 1944671
Blocks: 1871165
TreeView+ depends on / blocked
 
Reported: 2021-04-05 13:07 UTC by Eric Harney
Modified: 2022-08-30 11:58 UTC (History)
0 users

Fixed In Version: openstack-cinder-15.3.1-7.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-26 13:52:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-1790 0 None None None 2022-08-30 11:58:49 UTC
Red Hat Product Errata RHBA-2021:2097 0 None None None 2021-05-26 13:53:07 UTC

Description Eric Harney 2021-04-05 13:07:29 UTC
This bug was initially created as a copy of Bug #1871165

I am copying this bug because: 



Description of problem:
When we cinder manage a volume to set the host, it will be blocked by the regex validation when it's IPv6 because brackets are not included in the regex pattern.

I believe this could be fixed by adding the brackets to this pattern [a]. Asking the customer to test and will submit a patch upstream if it works.

Version-Release number of selected component (if applicable):
openstack-cinder-15.1.1-0.20200403213514.cfa2d1b.el8ost.noarch


Additional info:

[a] https://opendev.org/openstack/cinder/src/branch/master/cinder/api/validation/parameter_types.py#L232

[1]
~~~
DEBUG (shell:1025) Invalid input for field/attribute host. Value: hostgroup@tripleo_netapp#[dead:beef::cafe]:/remus_cinder_01. 'hostgroup@tripleo_netapp#[dead:beef::cafe]:/remus_cinder_01' does not match '^[a-zA-Z0-9-._#@:/+]*$' (HTTP 400) (Request-ID: req-2aafd9a5-3f3e-44cd-9e97-e9391636822f)
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cinderclient/shell.py", line 1017, in main
    OpenStackCinderShell().main(sys.argv[1:])
  File "/usr/lib/python3.6/site-packages/cinderclient/shell.py", line 790, in main
    args.func(self.cs, args)
  File "/usr/lib/python3.6/site-packages/cinderclient/v3/shell.py", line 1265, in do_manage
    cluster=getattr(args, 'cluster', None))
  File "/usr/lib/python3.6/site-packages/cinderclient/v3/volumes.py", line 247, in manage
    return self._create('/os-volume-manage', body, 'volume')
  File "/usr/lib/python3.6/site-packages/cinderclient/base.py", line 302, in _create
    resp, body = self.api.client.post(url, body=body)
  File "/usr/lib/python3.6/site-packages/cinderclient/client.py", line 217, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/usr/lib/python3.6/site-packages/cinderclient/client.py", line 205, in _cs_request
    return self.request(url, method, **kwargs)
  File "/usr/lib/python3.6/site-packages/cinderclient/client.py", line 191, in request
    raise exceptions.from_response(resp, body)
cinderclient.exceptions.BadRequest: Invalid input for field/attribute host. Value: hostgroup@tripleo_netapp#[dead:beef::cafe]:/remus_cinder_01. 'hostgroup@tripleo_netapp#[dead:beef::cafe]:/remus_cinder_01' does not match '^[a-zA-Z0-9-._#@:/+]*$' (HTTP 400) (Request-ID: req-2aafd9a5-3f3e-44cd-9e97-e9391636822f)
DEBUG:cinderclient.shell:Invalid input for field/attribute host. Value: hostgroup@tripleo_netapp#[dead:beef::cafe]:/remus_cinder_01. 'hostgroup@tripleo_netapp#[dead:beef::cafe]:/remus_cinder_01' does not match '^[a-zA-Z0-9-._#@:/+]*$' (HTTP 400) (Request-ID: req-2aafd9a5-3f3e-44cd-9e97-e9391636822f)
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cinderclient/shell.py", line 1017, in main
    OpenStackCinderShell().main(sys.argv[1:])
  File "/usr/lib/python3.6/site-packages/cinderclient/shell.py", line 790, in main
    args.func(self.cs, args)
  File "/usr/lib/python3.6/site-packages/cinderclient/v3/shell.py", line 1265, in do_manage
    cluster=getattr(args, 'cluster', None))
  File "/usr/lib/python3.6/site-packages/cinderclient/v3/volumes.py", line 247, in manage
    return self._create('/os-volume-manage', body, 'volume')
  File "/usr/lib/python3.6/site-packages/cinderclient/base.py", line 302, in _create
    resp, body = self.api.client.post(url, body=body)
  File "/usr/lib/python3.6/site-packages/cinderclient/client.py", line 217, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/usr/lib/python3.6/site-packages/cinderclient/client.py", line 205, in _cs_request
    return self.request(url, method, **kwargs)
  File "/usr/lib/python3.6/site-packages/cinderclient/client.py", line 191, in request
    raise exceptions.from_response(resp, body)
cinderclient.exceptions.BadRequest: Invalid input for field/attribute host. Value: hostgroup@tripleo_netapp#[dead:beef::cafe]:/remus_cinder_01. 'hostgroup@tripleo_netapp#[dead:beef::cafe]:/remus_cinder_01' does not match '^[a-zA-Z0-9-._#@:/+]*$' (HTTP 400) (Request-ID: req-2aafd9a5-3f3e-44cd-9e97-e9391636822f)
ERROR: Invalid input for field/attribute host. Value: hostgroup@tripleo_netapp#[dead:beef::cafe]:/remus_cinder_01. 'hostgroup@tripleo_netapp#[dead:beef::cafe]:/remus_cinder_01' does not match '^[a-zA-Z0-9-._#@:/+]*$' (HTTP 400) (Request-ID: req-2aafd9a5-3f3e-44cd-9e97-e9391636822f)
~~~

Comment 11 errata-xmlrpc 2021-05-26 13:52:31 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 (Red Hat OpenStack Platform 16.1.6 bug fix and enhancement 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-2021:2097


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