yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #87122
[Bug 1943135] Re: Metadef Resource types are not getting flushing out from DB
I think this is not a bug and by design from the beginning. If
metadef_resource_types are not associated with any namespaces then they
will remain in metadef_resource_types table forever.
If any resource type is associated with metadef_namespaces then new
entry will be added in 'metadef_namespace_resource_types' and while de-
associating it will delete the resource type from that table but keeps
it in metadef_resource_types table so that if anyone wants to use that
in future then that can be asoociated to with same or different
namespace.
But if without deassociating the resource type from the namespace if you
delete the namespace then that record will be removed from both the
tables.
If we want to delete the resource type from the metadef_resource_types on deassociation then I think that will be API change and requires a spec for further discussion.
** Changed in: glance
Status: New => Opinion
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1943135
Title:
Metadef Resource types are not getting flushing out from DB
Status in Glance:
Opinion
Bug description:
The resource types are not getting deleted form database even after
deleting from CLI
$ glance md-resource-type-associate my-test-for-rs-deletion --name test-resource-type-in-db
+------------+--------------------------+
| Property | Value |
+------------+--------------------------+
| created_at | 2021-09-09T12:46:18Z |
| name | test-resource-type-in-db |
| updated_at | 2021-09-09T12:46:18Z |
+------------+--------------------------+
$ glance md-resource-type-deassociate my-test-for-rs-deletion test-resource-type-in-db
$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16967
Server version: 5.7.35-0ubuntu0.18.04.1 (Ubuntu)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
mysql> use glance;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from metadef_resource_types WHERE name="test-resource-type-in-db";
+------+--------------------------+-----------+---------------------+---------------------+
| id | name | protected | created_at | updated_at |
+------+--------------------------+-----------+---------------------+---------------------+
| 4 | test-resource-type-in-db | 0 | 2021-09-09 12:46:18 | 2021-09-09 12:46:18 |
+------+--------------------------+-----------+---------------------+---------------------+
The resource type needs to be deleted from the db.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1943135/+subscriptions
References