Activity log for bug #1153926

Date Who What changed Old value New value Message
2013-03-12 06:55:16 melanie witt bug added bug
2013-03-12 06:57:23 melanie witt description An instance type is created by: return db.instance_type_create(context.get_admin_context(), kwargs) which uses the read_deleted="no" from the admin context. This means, as seen in nova/tests/test_instance_types.py: def test_read_deleted_false_converting_flavorid(self): """ Ensure deleted instance types are not returned when not needed (for example when creating a server and attempting to translate from flavorid to instance_type_id. """ instance_types.create("instance_type1", 256, 1, 120, 100, "test1") instance_types.destroy("instance_type1") instance_types.create("instance_type1_redo", 256, 1, 120, 100, "test1") instance_type = instance_types.get_instance_type_by_flavor_id( "test1", read_deleted="no") self.assertEqual("instance_type1_redo", instance_type["name"]) flavors with colliding ids can exist in the database. From the test we see this looks intended, however it results in undesirable results if we consider the following scenario. For 'show' in the flavors api, it uses read_deleted="yes". The reason for this is if a vm was created in the past with a now-deleted flavor, 'nova show' can still show the flavor name that was specified for that vm creation. The flavor name is retrieved using the flavor id stored with the instance. Well, if there are colliding flavor ids in the database, the first of the duplicates will be picked, and it may not be the correct flavor for the vm. This leads me to believe that maybe at flavor create time, colliding ids should not be allowed, i.e. use return db.instance_type_create(context.get_admin_context(read_deleted="yes"), kwargs) to prevent the possibility of colliding flavor ids. An instance type is created by: return db.instance_type_create(context.get_admin_context(), kwargs) which uses the read_deleted="no" from the admin context. This means, as seen in nova/tests/test_instance_types.py: def test_read_deleted_false_converting_flavorid(self):     """     Ensure deleted instance types are not returned when not needed (for     example when creating a server and attempting to translate from     flavorid to instance_type_id.     """     instance_types.create("instance_type1", 256, 1, 120, 100, "test1")     instance_types.destroy("instance_type1")     instance_types.create("instance_type1_redo", 256, 1, 120, 100, "test1")     instance_type = instance_types.get_instance_type_by_flavor_id(             "test1", read_deleted="no")     self.assertEqual("instance_type1_redo", instance_type["name"]) flavors with colliding ids can exist in the database. From the test we see this looks intended, however it results in undesirable results if we consider the following scenario. For 'show' in the flavors api, it uses read_deleted="yes". The reason for this is if a vm was created in the past with a now-deleted flavor, 'nova show' can still show the flavor name that was specified for that vm creation. The flavor name is retrieved using the flavor id stored with the instance. Well, if there are colliding flavor ids in the database, the first of the duplicates will be picked, and it may not be the correct flavor for the vm. This leads me to believe that maybe at flavor create time, colliding ids should not be allowed, i.e. use return db.instance_type_create(context.get_admin_context(read_deleted="yes"), kwargs) to prevent the possibility of colliding flavor ids.
2013-03-13 20:34:03 Vish Ishaya nova: status New Triaged
2013-03-13 20:34:12 Vish Ishaya nova: importance Undecided Wishlist
2013-03-13 20:34:43 Vish Ishaya summary instance_types.create() allows flavor id collision flavor show shouldn't read deleted flavors.
2013-11-15 10:11:22 Rohan nova: assignee Rohan (kanaderohan)
2013-11-18 06:22:58 Shrirang Phadke nova: assignee Rohan (kanaderohan) Shrirang Phadke (shrirangphadke)
2013-11-27 07:19:54 Rohan nova: assignee Shrirang Phadke (shrirangphadke) Rohan (kanaderohan)
2013-12-03 13:59:02 Rohan bug task added python-novaclient
2013-12-03 14:00:51 Rohan python-novaclient: assignee Rohan (kanaderohan)
2013-12-03 15:11:28 Rohan bug task added horizon
2013-12-03 15:11:36 Rohan horizon: assignee Rohan (kanaderohan)
2013-12-03 22:58:37 OpenStack Infra nova: status Triaged In Progress
2013-12-03 22:59:14 OpenStack Infra python-novaclient: status New In Progress
2013-12-03 23:08:40 OpenStack Infra horizon: status New In Progress
2013-12-04 10:24:20 Rohan bug task added tempest
2013-12-04 10:24:40 Rohan tempest: assignee Rohan (kanaderohan)
2013-12-04 11:00:13 OpenStack Infra tempest: status New In Progress
2013-12-10 12:00:29 Abhishek Chanda python-novaclient: importance Undecided Wishlist
2013-12-12 15:21:06 Sean Dague bug task deleted tempest
2014-01-09 14:55:09 Julie Pichon bug task added ceilometer
2014-01-09 16:07:32 David Kranz bug added subscriber David Kranz
2014-01-10 07:12:39 Rohan ceilometer: assignee Rohan (kanaderohan)
2014-02-15 04:08:29 wingwj bug added subscriber wingwj
2014-03-20 12:58:50 Julien Danjou ceilometer: status New Triaged
2014-07-10 17:28:33 Joe Gordon nova: status In Progress New
2014-07-10 17:28:37 Joe Gordon nova: assignee Rohan (kanaderohan)
2014-07-10 17:28:40 Joe Gordon nova: importance Wishlist Undecided
2014-07-16 00:42:30 melanie witt python-novaclient: importance Wishlist Undecided
2014-07-16 00:42:30 melanie witt python-novaclient: status In Progress New
2014-07-16 00:42:30 melanie witt python-novaclient: assignee Rohan (kanaderohan)
2014-07-16 16:29:29 Tracy Jones tags api
2014-09-03 11:19:32 Sean Dague nova: status New Triaged
2014-09-03 11:19:44 Sean Dague nova: importance Undecided Low
2014-09-03 11:19:48 Sean Dague python-novaclient: importance Undecided Low
2014-09-03 11:19:51 Sean Dague python-novaclient: status New Triaged
2014-09-17 04:35:42 Abhishek Talwar nova: assignee Abhishek Talwar (abhishek-talwar)
2014-09-17 04:35:57 Abhishek Talwar python-novaclient: assignee Abhishek Talwar (abhishek-talwar)
2014-09-18 12:23:20 Sean Dague marked as duplicate 1246017