yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #96027
[Bug 2114819] [NEW] "tag" plugin is not case sensitive
Public bug reported:
The Neutron API accepts tags with upper and lower case and stores them.
The problem is that, by default, the character set and collation of a
table is not defined in Neutron and uses the default one provided in the
database configuration. That means if we try to update a resource with a
similar tag that only changes the upper/lower cases, it will fail like
this [1].
How to reproduce:
$ openstack port create --network private port_tags
$ openstack port set --tag tag1 port_tags
$ openstack port set --tag Tag1 port_tags # this command will fail with the following message:
ConflictException: 409: Client Error for url:
http://192.168.10.100/networking/v2.0/ports/21788aea-98b7-4606-bcf4-5f963ce62fed/tags,
Failed to create a duplicate Tag: for attribute(s) ['tags.PRIMARY'] with
value(s) 47-Tag1
How to fix that. There are two alternatives:
* To change the charset and collation of the table. We don't do this in Neutron and I don't see any other place in OpenStack where the charset and collation are enforced.
* To make the "tag" plugin case insensitive. All tags passed to a resource, will be lowered and stored this way. Any new API call will have an input sanitize phase where all tags will be lowered too. That will avoid the database exception.
[1]https://paste.opendev.org/show/bUImqR7KE9d0NRgn9rfa/
** Affects: neutron
Importance: Medium
Assignee: Rodolfo Alonso (rodolfo-alonso-hernandez)
Status: New
** Changed in: neutron
Assignee: (unassigned) => Rodolfo Alonso (rodolfo-alonso-hernandez)
** Changed in: neutron
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2114819
Title:
"tag" plugin is not case sensitive
Status in neutron:
New
Bug description:
The Neutron API accepts tags with upper and lower case and stores
them. The problem is that, by default, the character set and collation
of a table is not defined in Neutron and uses the default one provided
in the database configuration. That means if we try to update a
resource with a similar tag that only changes the upper/lower cases,
it will fail like this [1].
How to reproduce:
$ openstack port create --network private port_tags
$ openstack port set --tag tag1 port_tags
$ openstack port set --tag Tag1 port_tags # this command will fail with the following message:
ConflictException: 409: Client Error for url:
http://192.168.10.100/networking/v2.0/ports/21788aea-98b7-4606-bcf4-5f963ce62fed/tags,
Failed to create a duplicate Tag: for attribute(s) ['tags.PRIMARY']
with value(s) 47-Tag1
How to fix that. There are two alternatives:
* To change the charset and collation of the table. We don't do this in Neutron and I don't see any other place in OpenStack where the charset and collation are enforced.
* To make the "tag" plugin case insensitive. All tags passed to a resource, will be lowered and stored this way. Any new API call will have an input sanitize phase where all tags will be lowered too. That will avoid the database exception.
[1]https://paste.opendev.org/show/bUImqR7KE9d0NRgn9rfa/
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2114819/+subscriptions