[openstack-dev] [nova] Different length limit for tags in object definition and db model definition
Matt Riedemann
mriedem at linux.vnet.ibm.com
Tue Jan 17 02:26:22 UTC 2017
On 1/16/2017 7:12 PM, Zhenyu Zheng wrote:
> Hi Nova,
>
> I just discovered something interesting, the tag has a limited length,
> and in the current implementation, it is 60 in the tag object definition:
> http://git.openstack.org/cgit/openstack/nova/tree/nova/objects/tag.py#n18
>
> but 80 in the db model:
> http://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/models.py#n1464
>
> As asked in the IRC and some of the cores responded(thanks to Matt and
> Jay), it seems to be an
> oversight and has no particular reason to do it this way.
>
> Since we have already created a 80 long space in DB and the current
> implementation might be confusing, maybe we should expand the
> limitation in tag object definition to 80. Besides, users can enjoy
> longer tags.
>
> And the question could be, does anyone know why it is 60 in object but
> 80 in DB model? is it an oversight or we have some particular reason?
>
> If we could expand it to be the same as DB model (80 for both), it is ok
> to do this tiny change without microversion?
>
> Thanks,
>
> Kevin Zheng
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
As I said in IRC, the tags feature took a long time to land (several
releases) so between the time that the spec was written and then the
data model patch and finally the REST API change, we might have just
totally missed that the length of the column in the DB was different
than what was allowed in the REST API.
I'm not aware of any technical reason why they are different. I'm hoping
that Sergey Nikitin might remember something about this. But even
looking at the spec:
https://specs.openstack.org/openstack/nova-specs/specs/liberty/approved/tag-instances.html
The column was meant to be 60 so my guess is someone noticed that in the
REST API review but missed it in the data model review.
As for needing a microversion of changing this, I tend to think we don't
need a microversion because we're not restricting the schema in the REST
API, we're just increasing it to match the length in the data model. But
I'd like opinions from the API subteam about that.
--
Thanks,
Matt Riedemann
More information about the OpenStack-dev
mailing list