)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e657e21802aaaab7979efa70b4bd5568cff522b5","unresolved":false,"context_lines":[{"line_number":10,"context_line":"There is no method for a deployer to create a cell0 yet so that needs to"},{"line_number":11,"context_line":"be built.  And Instances need to be written to the instance table in"},{"line_number":12,"context_line":"cell0 on failure, as well as relations like bdms/security_groups/etc..."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I3fb28f5a22c0aeb1403b9abc39da2b42581b3443"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1af94dfe_8411ba54","line":13,"updated":"2016-03-18 17:32:06.000000000","message":"Link to bp/cells-cell0","commit_id":"cc18e482b342d0a5d1402b5370256595afe3a4c3"}],"nova/compute/api.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"163db536c735fe2ce2875fea165a30e7331af93e","unresolved":false,"context_lines":[{"line_number":1586,"context_line":"                        mapping \u003d \\"},{"line_number":1587,"context_line":"                          objects.InstanceMapping.get_by_instance_uuid(context,"},{"line_number":1588,"context_line":"                                                                 instance.uuid)"},{"line_number":1589,"context_line":"                        mapping.destroy()"},{"line_number":1590,"context_line":"                    except exception.InstanceMappingNotFound:"},{"line_number":1591,"context_line":"                        pass"},{"line_number":1592,"context_line":"                    instance.destroy()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aed3d3a_e8af8792","line":1589,"updated":"2016-02-25 17:41:21.000000000","message":"We shouldn\u0027t remove the mapping at this point. The instance record still exists within the cell db at this point because of our soft-delete policy. There\u0027s a long history around this but as long as the instance record exists the mapping should exist. When the instance record is removed through an nova-manage archive command or a future effort that removes soft-delete then the mapping should be cleaned up.","commit_id":"e17b7818a20c20cfa22e66399d863855d96ab808"}],"nova/conductor/manager.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"3caabab11435222a144903ec6841877cdf2abab3","unresolved":false,"context_lines":[{"line_number":401,"context_line":"                                    instance_uuid\u003dinstance.uuid,"},{"line_number":402,"context_line":"                                    project_id\u003dinstance.project_id,"},{"line_number":403,"context_line":"                                    cell_id \u003d cell_mapping.id)"},{"line_number":404,"context_line":"                inst_mapping.create()"},{"line_number":405,"context_line":"            return"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_237609d7","line":404,"updated":"2016-02-29 18:02:10.000000000","message":"I\u0027m now realizing that we don\u0027t have anything which places the instance in cell0 right now. Before we set up this mapping we need to write the instance there.","commit_id":"dfbee0c42c2c72c17d7994518ce62e17449ae574"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"c6487073edb1c177a5b2ba3031fd26a3a175d02a","unresolved":false,"context_lines":[{"line_number":401,"context_line":"                                    instance_uuid\u003dinstance.uuid,"},{"line_number":402,"context_line":"                                    project_id\u003dinstance.project_id,"},{"line_number":403,"context_line":"                                    cell_id \u003d cell_mapping.id)"},{"line_number":404,"context_line":"                inst_mapping.create()"},{"line_number":405,"context_line":"            return"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7af24918_2e52e813","line":404,"in_reply_to":"9aed3d3a_00c3f6ed","updated":"2016-03-01 21:52:08.000000000","message":"I\u0027d be concerned about duplicating the entry and trying to ensure we clean up the duplication later.","commit_id":"dfbee0c42c2c72c17d7994518ce62e17449ae574"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"bbc5907f8de4f2f1b6cfd9f081ca229d0c1cd927","unresolved":false,"context_lines":[{"line_number":401,"context_line":"                                    instance_uuid\u003dinstance.uuid,"},{"line_number":402,"context_line":"                                    project_id\u003dinstance.project_id,"},{"line_number":403,"context_line":"                                    cell_id \u003d cell_mapping.id)"},{"line_number":404,"context_line":"                inst_mapping.create()"},{"line_number":405,"context_line":"            return"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_00c3f6ed","line":404,"in_reply_to":"9aed3d3a_237609d7","updated":"2016-02-29 19:00:40.000000000","message":"Should we duplicate the instance entry in the cell0 db and the nova db?","commit_id":"dfbee0c42c2c72c17d7994518ce62e17449ae574"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"ac6ca87aaf2abbce242ff1d69aef70471a1f5bb6","unresolved":false,"context_lines":[{"line_number":435,"context_line":"                self._cleanup_allocated_networks("},{"line_number":436,"context_line":"                    context, instance, requested_networks)"},{"line_number":437,"context_line":"                try:"},{"line_number":438,"context_line":"                    cell_mapping \u003d objects.CellMapping.get_by_uuid(context,"},{"line_number":439,"context_line":"                                                objects.CellMapping.CELL0_UUID)"},{"line_number":440,"context_line":"                    try:"},{"line_number":441,"context_line":"                        inst_mapping \u003d \\"}],"source_content_type":"text/x-python","patch_set":23,"id":"7aa08908_f4cefe58","line":438,"updated":"2016-06-06 14:05:57.000000000","message":"It would be better to move getting of cell_mapping out of the cycle.","commit_id":"84d14c5255de959ef4126d66d99c70a26909284d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2bec49046c0724eaa5e6f65cafb4b77012f517e7","unresolved":false,"context_lines":[{"line_number":435,"context_line":"                self._cleanup_allocated_networks("},{"line_number":436,"context_line":"                    context, instance, requested_networks)"},{"line_number":437,"context_line":"                try:"},{"line_number":438,"context_line":"                    cell_mapping \u003d objects.CellMapping.get_by_uuid(context,"},{"line_number":439,"context_line":"                                                objects.CellMapping.CELL0_UUID)"},{"line_number":440,"context_line":"                    try:"},{"line_number":441,"context_line":"                        inst_mapping \u003d \\"}],"source_content_type":"text/x-python","patch_set":23,"id":"7aa08908_a9610d07","line":438,"in_reply_to":"7aa08908_f4cefe58","updated":"2016-06-08 20:52:52.000000000","message":"Yep, good call.","commit_id":"84d14c5255de959ef4126d66d99c70a26909284d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9baf862243a6e66ca95be31a4a7ca1d2683238b3","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                    context, instance, requested_networks)"},{"line_number":455,"context_line":"                try:"},{"line_number":456,"context_line":"                    cell_mapping \u003d objects.CellMapping.get_by_uuid(context,"},{"line_number":457,"context_line":"                                                objects.CellMapping.CELL0_UUID)"},{"line_number":458,"context_line":"                    try:"},{"line_number":459,"context_line":"                        inst_mapping \u003d \\"},{"line_number":460,"context_line":"                            objects.InstanceMapping.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":24,"id":"7aa08908_ef9d9267","line":457,"updated":"2016-06-15 20:21:46.000000000","message":"We should only ever do this once, right? It\u0027ll never change, AFAIK, so we should cache it on self or something methinks.","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"da4a5297ac44051c30fe8300d69cf5c5d5a6ac9b","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                    context, instance, requested_networks)"},{"line_number":455,"context_line":"                try:"},{"line_number":456,"context_line":"                    cell_mapping \u003d objects.CellMapping.get_by_uuid(context,"},{"line_number":457,"context_line":"                                                objects.CellMapping.CELL0_UUID)"},{"line_number":458,"context_line":"                    try:"},{"line_number":459,"context_line":"                        inst_mapping \u003d \\"},{"line_number":460,"context_line":"                            objects.InstanceMapping.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":24,"id":"7aa08908_fdfc0574","line":457,"in_reply_to":"7aa08908_af0a6a25","updated":"2016-06-16 14:18:15.000000000","message":"Cache cell0 mapping on the manager object? OK sounds good to me.","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"9d7e14024c544e3e5d14fd4e5da14e8fbf7d2c6c","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                    context, instance, requested_networks)"},{"line_number":455,"context_line":"                try:"},{"line_number":456,"context_line":"                    cell_mapping \u003d objects.CellMapping.get_by_uuid(context,"},{"line_number":457,"context_line":"                                                objects.CellMapping.CELL0_UUID)"},{"line_number":458,"context_line":"                    try:"},{"line_number":459,"context_line":"                        inst_mapping \u003d \\"},{"line_number":460,"context_line":"                            objects.InstanceMapping.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":24,"id":"7aa08908_af0a6a25","line":457,"in_reply_to":"7aa08908_ef9d9267","updated":"2016-06-15 20:37:25.000000000","message":"Right, the mapping for cell0 should not change. At least not without enough other changes that a restart would probably be warranted.","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9baf862243a6e66ca95be31a4a7ca1d2683238b3","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                except exception.CellMappingNotFound:"},{"line_number":473,"context_line":"                    # Cell0 mapping has not yet been written. Not yet"},{"line_number":474,"context_line":"                    # Updated to CellsV2."},{"line_number":475,"context_line":"                    pass"},{"line_number":476,"context_line":"            return"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":24,"id":"7aa08908_4f85c605","line":475,"updated":"2016-06-15 20:21:46.000000000","message":"Log a warning maybe?","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"49d71fbde003cb1f4bcfac3664e5192d32c972df","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                except exception.CellMappingNotFound:"},{"line_number":473,"context_line":"                    # Cell0 mapping has not yet been written. Not yet"},{"line_number":474,"context_line":"                    # Updated to CellsV2."},{"line_number":475,"context_line":"                    pass"},{"line_number":476,"context_line":"            return"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1aa78d24_21bc7aba","line":475,"in_reply_to":"1aa78d24_08a1ada3","updated":"2016-07-11 17:45:09.000000000","message":"Sounds good, thanks for the explanation.","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7f664e41fd38b63aaf2386898909209354e8d5d4","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                except exception.CellMappingNotFound:"},{"line_number":473,"context_line":"                    # Cell0 mapping has not yet been written. Not yet"},{"line_number":474,"context_line":"                    # Updated to CellsV2."},{"line_number":475,"context_line":"                    pass"},{"line_number":476,"context_line":"            return"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1aa78d24_08a1ada3","line":475,"in_reply_to":"3aaa91ec_1871d876","updated":"2016-07-05 18:08:37.000000000","message":"Brian: Close. In the case of a scheduling failure and a missing cell0 mapping the instance exists in the build_requests table. However that is intended purely for ephemeral build request info and the instance needs to move out into a proper instances table as soon as possible. So in the failure case we assume that a local db still exists and write it there.\n\nLater when cellsv2 is mandatory the lack of a cell0 mapping is a critical failure, to the point where service start could be blocked on it.","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"651b061d3c3297b14023b311d7721b1f1eccff28","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                except exception.CellMappingNotFound:"},{"line_number":473,"context_line":"                    # Cell0 mapping has not yet been written. Not yet"},{"line_number":474,"context_line":"                    # Updated to CellsV2."},{"line_number":475,"context_line":"                    pass"},{"line_number":476,"context_line":"            return"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3aaa91ec_1871d876","line":475,"in_reply_to":"7aa08908_479d6dba","updated":"2016-06-29 19:11:37.000000000","message":"If I\u0027m understanding this discussion, you guys are saying that in the case of scheduling failure and a missing cell0 mapping, the instance has *not* been written to the DB yet. (we are just holding an instance object in memory)  Is that right?\n\nIf so, yeah I feel like in that case we\u0027d want to save the instance to the existing local DB with appropriate failure state set so that it can be queried via the API.  \n\nLater when you make cellsv2 mandatory that behavior can be removed by simply barfing when the cell0 mapping is missing.  You can probably even do that on startup.","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"9d7e14024c544e3e5d14fd4e5da14e8fbf7d2c6c","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                except exception.CellMappingNotFound:"},{"line_number":473,"context_line":"                    # Cell0 mapping has not yet been written. Not yet"},{"line_number":474,"context_line":"                    # Updated to CellsV2."},{"line_number":475,"context_line":"                    pass"},{"line_number":476,"context_line":"            return"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":24,"id":"7aa08908_d22f9d86","line":475,"in_reply_to":"7aa08908_4f85c605","updated":"2016-06-15 20:37:25.000000000","message":"If someone things they\u0027ve migrated to cellsv2 and this exception is raise then a warning is definitely appropriate. Are you thinking that we should start warning that someone has not migrated yet?","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"31583495953d1b43568bade12b7713ba736feb7b","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                except exception.CellMappingNotFound:"},{"line_number":473,"context_line":"                    # Cell0 mapping has not yet been written. Not yet"},{"line_number":474,"context_line":"                    # Updated to CellsV2."},{"line_number":475,"context_line":"                    pass"},{"line_number":476,"context_line":"            return"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":24,"id":"7aa08908_ed83a5a7","line":475,"in_reply_to":"7aa08908_5dbef9ae","updated":"2016-06-16 17:48:31.000000000","message":"So, let\u0027s say we can\u0027t do this because of the missing mapping. That means we leave the api side bits in there but without writing them anywhere, right? Will we have something later to map those failed instances? I guess we\u0027ll know they need to go into cell0 because they\u0027re still in scheduling state or something?","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"da4a5297ac44051c30fe8300d69cf5c5d5a6ac9b","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                except exception.CellMappingNotFound:"},{"line_number":473,"context_line":"                    # Cell0 mapping has not yet been written. Not yet"},{"line_number":474,"context_line":"                    # Updated to CellsV2."},{"line_number":475,"context_line":"                    pass"},{"line_number":476,"context_line":"            return"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":24,"id":"7aa08908_5dbef9ae","line":475,"in_reply_to":"7aa08908_d22f9d86","updated":"2016-06-16 14:18:15.000000000","message":"Ok, I will log a warning here. I don\u0027t want people looking at the logs to think that this warning has anything to do with their failure to schedule an instance though. I\u0027ll have to make it super specific. :)\n\n\"Couldn\u0027t write instance to Cell0 - Have you upgraded to CellsV2? NOTE: This has NOTHING to do with the failure to schedule an instance\"","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"321ba0835ed07e1f78f863dbe5751c1ebfb2f88c","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                except exception.CellMappingNotFound:"},{"line_number":473,"context_line":"                    # Cell0 mapping has not yet been written. Not yet"},{"line_number":474,"context_line":"                    # Updated to CellsV2."},{"line_number":475,"context_line":"                    pass"},{"line_number":476,"context_line":"            return"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        for (instance, host) in six.moves.zip(instances, hosts):"}],"source_content_type":"text/x-python","patch_set":24,"id":"7aa08908_479d6dba","line":475,"in_reply_to":"7aa08908_ed83a5a7","updated":"2016-06-16 21:01:52.000000000","message":"That would be one way to do it, but the way I had it in my head is that in this situation we would write the instance to the one cell db we have as if cellsv2 wasn\u0027t a thing yet.\n\nI\u0027m planning for there to be a check at some point which requires migrating to cellsv2 to get past, sort of like the db migrations checking if an online migration has run. And multiple cell support won\u0027t happen until after that check. So if we hit this case here we know we can still write to the one cell db and it will just work, and then when the migration is run it will pick it up and handle it appropriately.\n\nI\u0027d really like BuildRequests to be pretty ephemeral so I would prefer to do what I described above rather than keep these failures in the api db until the migration happens.","commit_id":"ae3705785aea0fd4a9b734f0613a043637aaa7ef"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"ac6ca87aaf2abbce242ff1d69aef70471a1f5bb6","unresolved":false,"context_lines":[{"line_number":725,"context_line":""},{"line_number":726,"context_line":"    @mock.patch(\u0027nova.scheduler.chance.ChanceScheduler._filter_hosts\u0027,"},{"line_number":727,"context_line":"                return_value\u003d[])"},{"line_number":728,"context_line":"    def test_create_server_with_failed_schedule(self, mock_host_passes):"},{"line_number":729,"context_line":"        # Create a server which will enter error state."},{"line_number":730,"context_line":"        fake_network.set_stub_network_methods(self)"},{"line_number":731,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"7aa08908_1a96534c","line":728,"updated":"2016-06-06 14:05:57.000000000","message":"It\u0027s not clear for me how this related to cell0. Could you explain, please?","commit_id":"84d14c5255de959ef4126d66d99c70a26909284d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2bec49046c0724eaa5e6f65cafb4b77012f517e7","unresolved":false,"context_lines":[{"line_number":725,"context_line":""},{"line_number":726,"context_line":"    @mock.patch(\u0027nova.scheduler.chance.ChanceScheduler._filter_hosts\u0027,"},{"line_number":727,"context_line":"                return_value\u003d[])"},{"line_number":728,"context_line":"    def test_create_server_with_failed_schedule(self, mock_host_passes):"},{"line_number":729,"context_line":"        # Create a server which will enter error state."},{"line_number":730,"context_line":"        fake_network.set_stub_network_methods(self)"},{"line_number":731,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"7aa08908_54592034","line":728,"in_reply_to":"7aa08908_1a96534c","updated":"2016-06-08 20:52:52.000000000","message":"Since the ChangeScheduler has been mocked to return no hosts the instance should be put in cell0. At this level of testing it\u0027s not really appropriate to check that it actually went to cell0 because I would have to query the db for that and this is an API test. I\u0027m just checking that when a boot request occurs and scheduling fails that the instance can still be queried through the API.","commit_id":"84d14c5255de959ef4126d66d99c70a26909284d"}]}
