)]}'
{"nova/cmd/manage.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"727ef642f9062fada0580b925557eed41f7b4cd2","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"    @args(\u0027--transport-url\u0027, metavar\u003d\u0027\u003ctransport url\u003e\u0027, required\u003dTrue,"},{"line_number":1316,"context_line":"          dest\u003d\u0027transport_url\u0027,"},{"line_number":1317,"context_line":"          help\u003d\u0027The transport url for the cell message queue\u0027)"},{"line_number":1318,"context_line":"    def in_the_darkness_bind_them(self, transport_url):"},{"line_number":1319,"context_line":"        self.map_cell0()"},{"line_number":1320,"context_line":"        cell_uuid \u003d self.map_cell_and_hosts(transport_url, return_uuid\u003dTrue)"},{"line_number":1321,"context_line":"        self.map_instances(cell_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_5d99a21e","line":1318,"updated":"2016-04-05 21:21:11.000000000","message":"An open question for others: For those deployers who need customization should they be required to run these commands separately in order to pass custom arguments in, or should those arguments be added here?","commit_id":"ed153e6c9e410a59919fe6b51da3a5d47cc8e8fb"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"4b940e4c3f38daa8e6933ccfa0a3fdf3683798fd","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"    @args(\u0027--transport-url\u0027, metavar\u003d\u0027\u003ctransport url\u003e\u0027, required\u003dTrue,"},{"line_number":1316,"context_line":"          dest\u003d\u0027transport_url\u0027,"},{"line_number":1317,"context_line":"          help\u003d\u0027The transport url for the cell message queue\u0027)"},{"line_number":1318,"context_line":"    def in_the_darkness_bind_them(self, transport_url):"},{"line_number":1319,"context_line":"        self.map_cell0()"},{"line_number":1320,"context_line":"        cell_uuid \u003d self.map_cell_and_hosts(transport_url, return_uuid\u003dTrue)"},{"line_number":1321,"context_line":"        self.map_instances(cell_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_507172a7","line":1318,"in_reply_to":"9a061dce_1d556a1c","updated":"2016-04-06 10:12:04.000000000","message":"actually, I would be more in favor of the simple command not taking the complex arguments. As there is less chance someone does the command they don\u0027t want.\n\nnova-manage simple-db-sync \n\nvs. all the rest of the commands.","commit_id":"ed153e6c9e410a59919fe6b51da3a5d47cc8e8fb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"676dda2faaa4e0801731d8aab7554e6b246b4f52","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"    @args(\u0027--transport-url\u0027, metavar\u003d\u0027\u003ctransport url\u003e\u0027, required\u003dTrue,"},{"line_number":1316,"context_line":"          dest\u003d\u0027transport_url\u0027,"},{"line_number":1317,"context_line":"          help\u003d\u0027The transport url for the cell message queue\u0027)"},{"line_number":1318,"context_line":"    def in_the_darkness_bind_them(self, transport_url):"},{"line_number":1319,"context_line":"        self.map_cell0()"},{"line_number":1320,"context_line":"        cell_uuid \u003d self.map_cell_and_hosts(transport_url, return_uuid\u003dTrue)"},{"line_number":1321,"context_line":"        self.map_instances(cell_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_1d556a1c","line":1318,"in_reply_to":"9a061dce_5d99a21e","updated":"2016-04-05 21:24:06.000000000","message":"Fewer commands seems better to me. Even if you have to make the complicated command take a --one-cell argument to get the defaults, that\u0027s okay with me. I just think anything we can automate should be automated. If it can be parameterized and automated for complex cases, and defaulted/automated for simple ones, then that\u0027s a win to me.","commit_id":"ed153e6c9e410a59919fe6b51da3a5d47cc8e8fb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4bda32da3cc49ac56aea7104219a49e27f8972b4","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"            # created. This should also mean that there are no instances."},{"line_number":1194,"context_line":"            return 1"},{"line_number":1195,"context_line":"        self.map_cell0()"},{"line_number":1196,"context_line":"        self.map_instances(cell_uuid)"},{"line_number":1197,"context_line":"        return 0"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"    @args(\u0027--database_connection\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_cb3a33e7","line":1196,"updated":"2016-08-03 09:54:12.000000000","message":"Should we not actually be doing\n\n  return self.map_instances(cell_uuid)\n\nI think here we will be returning success even if map_instances has failed horribly?","commit_id":"a86d78f5f048e11ddb7e375f2d6cc707108b9478"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"457ae1fcd88fffc57cefd26c7f8d1439ef81f98f","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"            # created. This should also mean that there are no instances."},{"line_number":1194,"context_line":"            return 1"},{"line_number":1195,"context_line":"        self.map_cell0()"},{"line_number":1196,"context_line":"        self.map_instances(cell_uuid)"},{"line_number":1197,"context_line":"        return 0"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"    @args(\u0027--database_connection\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_e8153ae5","line":1196,"in_reply_to":"bacf61ea_569a4a6f","updated":"2016-08-04 10:38:39.000000000","message":"OK, yeah, that makes sense.","commit_id":"a86d78f5f048e11ddb7e375f2d6cc707108b9478"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"af38c3f780c194cf657ea7062e0d51d2c27f342b","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"            # created. This should also mean that there are no instances."},{"line_number":1194,"context_line":"            return 1"},{"line_number":1195,"context_line":"        self.map_cell0()"},{"line_number":1196,"context_line":"        self.map_instances(cell_uuid)"},{"line_number":1197,"context_line":"        return 0"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"    @args(\u0027--database_connection\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_569a4a6f","line":1196,"in_reply_to":"bacf61ea_cb3a33e7","updated":"2016-08-03 17:50:58.000000000","message":"If map_instances fails it should raise an exception which the nova-manage framework handles and converts to a user visible error. Because we call map_instances and use the default max_count\u003dNone argument it can only return 0. It will map everything.","commit_id":"a86d78f5f048e11ddb7e375f2d6cc707108b9478"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4bda32da3cc49ac56aea7104219a49e27f8972b4","unresolved":false,"context_lines":[{"line_number":1234,"context_line":"                ctxt, uuid\u003dobjects.CellMapping.CELL0_UUID, name\u003d\"cell0\","},{"line_number":1235,"context_line":"                transport_url\u003d\"none:///\","},{"line_number":1236,"context_line":"                database_connection\u003ddbc)"},{"line_number":1237,"context_line":"        cell_mapping.create()"},{"line_number":1238,"context_line":""},{"line_number":1239,"context_line":"    def _get_and_map_instances(self, ctxt, cell_mapping, limit, marker):"},{"line_number":1240,"context_line":"        filters \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_ab489f88","line":1237,"updated":"2016-08-03 09:54:12.000000000","message":"Should we not check here if the cell0 is already created. I guess we get some obscure error? Thats fine normally, but it will stop us running map_instances if someone has already run this command by accident, I guess?\n\n\nI am thinking about nova db sync, its a common pattern to run that to see if you need to do it again. I guess its idempotent.","commit_id":"a86d78f5f048e11ddb7e375f2d6cc707108b9478"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"af38c3f780c194cf657ea7062e0d51d2c27f342b","unresolved":false,"context_lines":[{"line_number":1234,"context_line":"                ctxt, uuid\u003dobjects.CellMapping.CELL0_UUID, name\u003d\"cell0\","},{"line_number":1235,"context_line":"                transport_url\u003d\"none:///\","},{"line_number":1236,"context_line":"                database_connection\u003ddbc)"},{"line_number":1237,"context_line":"        cell_mapping.create()"},{"line_number":1238,"context_line":""},{"line_number":1239,"context_line":"    def _get_and_map_instances(self, ctxt, cell_mapping, limit, marker):"},{"line_number":1240,"context_line":"        filters \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_b65d86ee","line":1237,"in_reply_to":"bacf61ea_ab489f88","updated":"2016-08-03 17:50:58.000000000","message":"This migration command is not really setup to be idempotent. The db sync is intended to be run multiple times, either within one release or at each release, so it makes sense to be idempotent. This command should only ever be run once. It feels more like setting up an aggregate or adding a flavor, duplicate runs are expected to either error or do nothing.\n\nThere is a unique constraint on the uuid in the database so this cell_mapping.create() will fail on that if cell0 already exists. But the only way that will be the case is if this has been run multiple times (not supported) or map_cell0 was run directly in which case it is not acceptable to then run the simple migration command.\n\nHaving said all of that I can look at what would be necessary in order to make it possible to safely run these commands multiple times. But I don\u0027t want to encourage users to do that. And I think it should be a separate patch as it\u0027s somewhat orthogonal to what this patch is doing.","commit_id":"a86d78f5f048e11ddb7e375f2d6cc707108b9478"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"457ae1fcd88fffc57cefd26c7f8d1439ef81f98f","unresolved":false,"context_lines":[{"line_number":1234,"context_line":"                ctxt, uuid\u003dobjects.CellMapping.CELL0_UUID, name\u003d\"cell0\","},{"line_number":1235,"context_line":"                transport_url\u003d\"none:///\","},{"line_number":1236,"context_line":"                database_connection\u003ddbc)"},{"line_number":1237,"context_line":"        cell_mapping.create()"},{"line_number":1238,"context_line":""},{"line_number":1239,"context_line":"    def _get_and_map_instances(self, ctxt, cell_mapping, limit, marker):"},{"line_number":1240,"context_line":"        filters \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_e867fab4","line":1237,"in_reply_to":"bacf61ea_b65d86ee","updated":"2016-08-04 10:38:39.000000000","message":"I think it would be easier if it just said, \"hey your done, go away\". But you are right, thats totally a separate patch.","commit_id":"a86d78f5f048e11ddb7e375f2d6cc707108b9478"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4bda32da3cc49ac56aea7104219a49e27f8972b4","unresolved":false,"context_lines":[{"line_number":1320,"context_line":"            next_marker \u003d next_marker.replace(\u0027-\u0027, \u0027 \u0027)"},{"line_number":1321,"context_line":"            objects.InstanceMapping(ctxt, instance_uuid\u003dnext_marker,"},{"line_number":1322,"context_line":"                    project_id\u003dmarker_project_id).create()"},{"line_number":1323,"context_line":"            return 1"},{"line_number":1324,"context_line":"        return 0"},{"line_number":1325,"context_line":""},{"line_number":1326,"context_line":"    def _map_cell_and_hosts(self, transport_url, name\u003dNone, verbose\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_1de48e39","line":1323,"updated":"2016-08-03 09:54:12.000000000","message":"I think this is the case we want to return? Maybe thats not possible in the short case?","commit_id":"a86d78f5f048e11ddb7e375f2d6cc707108b9478"}]}
