)]}'
{"nova/cmd/manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"61778c43ebe8e17dc62731b50431e5343bcf101d","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"        try:"},{"line_number":1230,"context_line":"            cell0_mapping \u003d self.map_cell0()"},{"line_number":1231,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":1232,"context_line":"            print(_(\u0027Cell0 is already setup\u0027))"},{"line_number":1233,"context_line":"            cell0_mapping \u003d objects.CellMapping.get_by_uuid("},{"line_number":1234,"context_line":"                ctxt, objects.CellMapping.CELL0_UUID)"},{"line_number":1235,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_c41a7517","line":1232,"updated":"2016-12-13 02:59:08.000000000","message":"In a grenade run with this change we see this here:\n\nhttp://logs.openstack.org/90/409890/1/check/gate-grenade-dsvm-neutron-ubuntu-xenial/102de6c/logs/grenade.sh.txt.gz#_2016-12-12_22_27_30_012\n\nAnd then it runs the DB schema migration which I wasn\u0027t expecting since it\u0027s already setup...","commit_id":"34761e678f286cce2479d320356c9196d67cc4fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"61778c43ebe8e17dc62731b50431e5343bcf101d","unresolved":false,"context_lines":[{"line_number":1240,"context_line":"            except db_exc.DBError as ex:"},{"line_number":1241,"context_line":"                print(_(\u0027Unable to sync cell0 schema: %s\u0027) % ex)"},{"line_number":1242,"context_line":""},{"line_number":1243,"context_line":"        cell_uuid \u003d self._map_cell_and_hosts(transport_url)"},{"line_number":1244,"context_line":"        if cell_uuid is None:"},{"line_number":1245,"context_line":"            # There are no compute hosts which means no cell_mapping was"},{"line_number":1246,"context_line":"            # created. This should also mean that there are no instances."}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_c4f195cf","line":1243,"updated":"2016-12-13 02:59:08.000000000","message":"Then we get here and it says we\u0027ve already mapped all of the hosts:\n\nhttp://logs.openstack.org/90/409890/1/check/gate-grenade-dsvm-neutron-ubuntu-xenial/102de6c/logs/grenade.sh.txt.gz#_2016-12-12_22_27_43_547\n\n--\n\nThen we run again and again it says cell0 is already setup:\n\nhttp://logs.openstack.org/90/409890/1/check/gate-grenade-dsvm-neutron-ubuntu-xenial/102de6c/logs/grenade.sh.txt.gz#_2016-12-12_22_28_12_441\n\nBut that time it doesn\u0027t run the DB schema migration.\n\n--\n\nSo in total in that job simple_cell_setup gets run 3 times, the cell0 mapping is only done once in the API DB, but the schema migration is run twice, which is odd, but I think it\u0027s because in grenade when upgrading from newton we recreate the cell0 database:\n\nhttp://git.openstack.org/cgit/openstack-dev/grenade/tree/projects/60_nova/from-newton/upgrade-nova#n8\n\nSo that accounts for the 2 schema migrations since we had two fresh cell0 databases in this run, which Sean pointed out when we landed that from-newton patch, and as nothing was using cell0 in Newton it wasn\u0027t a big deal.","commit_id":"34761e678f286cce2479d320356c9196d67cc4fb"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"44314a095fe0b8a0e59f94e8e5e1e208e8d81343","unresolved":false,"context_lines":[{"line_number":1240,"context_line":"            except db_exc.DBError as ex:"},{"line_number":1241,"context_line":"                print(_(\u0027Unable to sync cell0 schema: %s\u0027) % ex)"},{"line_number":1242,"context_line":""},{"line_number":1243,"context_line":"        cell_uuid \u003d self._map_cell_and_hosts(transport_url)"},{"line_number":1244,"context_line":"        if cell_uuid is None:"},{"line_number":1245,"context_line":"            # There are no compute hosts which means no cell_mapping was"},{"line_number":1246,"context_line":"            # created. This should also mean that there are no instances."}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_b8da8de6","line":1243,"in_reply_to":"1a6eadb0_c4f195cf","updated":"2016-12-14 21:59:38.000000000","message":"Yeah, agreed, I don\u0027t think it\u0027s a problem - and that\u0027s only a grenade problem, right? I mean, that\u0027s because we recreate the cell0 database in Grenade, not because of that method.","commit_id":"34761e678f286cce2479d320356c9196d67cc4fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7c455e6f2e82d38c4242dbc70f36ba68578cf371","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"                ctxt, uuid\u003dobjects.CellMapping.CELL0_UUID, name\u003d\"cell0\","},{"line_number":1287,"context_line":"                transport_url\u003d\"none:///\","},{"line_number":1288,"context_line":"                database_connection\u003ddbc)"},{"line_number":1289,"context_line":"        cell_mapping.create()"},{"line_number":1290,"context_line":"        return cell_mapping"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"    def _get_and_map_instances(self, ctxt, cell_mapping, limit, marker):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_a4dad976","line":1289,"updated":"2016-12-13 02:49:37.000000000","message":"Would it be useful to make this idempotent? We could either handle the DBDuplicateEntry here, or check to see if the cell0 mapping already exists and just return it.","commit_id":"34761e678f286cce2479d320356c9196d67cc4fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53f4a8f69d5a272c15e7a611f4245b9352dded0d","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"                ctxt, uuid\u003dobjects.CellMapping.CELL0_UUID, name\u003d\"cell0\","},{"line_number":1287,"context_line":"                transport_url\u003d\"none:///\","},{"line_number":1288,"context_line":"                database_connection\u003ddbc)"},{"line_number":1289,"context_line":"        cell_mapping.create()"},{"line_number":1290,"context_line":"        return cell_mapping"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"    def _get_and_map_instances(self, ctxt, cell_mapping, limit, marker):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a57fde8_ed9032ef","line":1289,"in_reply_to":"1a6eadb0_38383def","updated":"2017-01-12 16:14:08.000000000","message":"Alright I\u0027m tracking this with bug 1656017.","commit_id":"34761e678f286cce2479d320356c9196d67cc4fb"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"44314a095fe0b8a0e59f94e8e5e1e208e8d81343","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"                ctxt, uuid\u003dobjects.CellMapping.CELL0_UUID, name\u003d\"cell0\","},{"line_number":1287,"context_line":"                transport_url\u003d\"none:///\","},{"line_number":1288,"context_line":"                database_connection\u003ddbc)"},{"line_number":1289,"context_line":"        cell_mapping.create()"},{"line_number":1290,"context_line":"        return cell_mapping"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"    def _get_and_map_instances(self, ctxt, cell_mapping, limit, marker):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_38383def","line":1289,"in_reply_to":"1a6eadb0_5d5b662e","updated":"2016-12-14 21:59:38.000000000","message":"Well, simple_cell_setup was created *after* map_cell0 IIRC, so that\u0027s why there is some weirdness.\n\nThat said, I agree with you folks, we should possibly add a followup trying to split that CLI method with an helper so that we could just call the helper by simple_cell_setup()","commit_id":"34761e678f286cce2479d320356c9196d67cc4fb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f6e1dc948c56022c8ed246652f6d5aee6e2ca031","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"                ctxt, uuid\u003dobjects.CellMapping.CELL0_UUID, name\u003d\"cell0\","},{"line_number":1287,"context_line":"                transport_url\u003d\"none:///\","},{"line_number":1288,"context_line":"                database_connection\u003ddbc)"},{"line_number":1289,"context_line":"        cell_mapping.create()"},{"line_number":1290,"context_line":"        return cell_mapping"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"    def _get_and_map_instances(self, ctxt, cell_mapping, limit, marker):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_e4d3c836","line":1289,"in_reply_to":"1a6eadb0_a4dad976","updated":"2016-12-13 18:26:03.000000000","message":"TBH we probably should break this out so that we can make the CLI interface return a consistent return code if people run this from a script. I think right now it will always return non-null and thus probably return with 1.","commit_id":"34761e678f286cce2479d320356c9196d67cc4fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9be819b568a0d183be884014c3693e4a50f8c130","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"                ctxt, uuid\u003dobjects.CellMapping.CELL0_UUID, name\u003d\"cell0\","},{"line_number":1287,"context_line":"                transport_url\u003d\"none:///\","},{"line_number":1288,"context_line":"                database_connection\u003ddbc)"},{"line_number":1289,"context_line":"        cell_mapping.create()"},{"line_number":1290,"context_line":"        return cell_mapping"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"    def _get_and_map_instances(self, ctxt, cell_mapping, limit, marker):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_5d5b662e","line":1289,"in_reply_to":"1a6eadb0_e4d3c836","updated":"2016-12-13 21:49:12.000000000","message":"I was thinking the same thing about the return value, this is really treated like a function for simple_cell_setup, but it\u0027s also setup as a CLI, so it\u0027s wonky.","commit_id":"34761e678f286cce2479d320356c9196d67cc4fb"}]}
