yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #96088
[Bug 2114819] Re: "tag" plugin is not case sensitive
Reviewed: https://review.opendev.org/c/openstack/neutron/+/952819
Committed: https://opendev.org/openstack/neutron/commit/8990dd598f84b9da976d72672c6fd6037fc0d125
Submitter: "Zuul (22348)"
Branch: master
commit 8990dd598f84b9da976d72672c6fd6037fc0d125
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date: Wed Jun 18 01:31:02 2025 +0000
Make resource "tag" case sensitive
According to [1], any resource "tag" should be case sensitive. This
patch is changing the "tags" table character set and collation to
a case sensitive one.
[1]https://specs.openstack.org/openstack/api-wg/guidelines/tags.html
Closes-Bug: #2114819
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Change-Id: I81b23839053aaa99083b03e69215a602464a8c37
** Changed in: neutron
Status: In Progress => Fix Released
--
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:
Fix Released
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
References