)]}'
{"nova/cmd/manage.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1484223b94c97cbb9ed04218c623a854836dc31d","unresolved":false,"context_lines":[{"line_number":1498,"context_line":"        else:"},{"line_number":1499,"context_line":"            mappings \u003d [mapping for mapping in"},{"line_number":1500,"context_line":"                        objects.CellMappingList.get_all(context)]"},{"line_number":1501,"context_line":"            cell_mappings.extend(mappings)"},{"line_number":1502,"context_line":""},{"line_number":1503,"context_line":"        for cell_mapping in cell_mappings:"},{"line_number":1504,"context_line":"            # TODO(alaski): Factor this into helper method on CellMapping"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_6432f7f3","line":1501,"updated":"2016-08-29 21:05:02.000000000","message":"Why collect it and then extend the existing list? Also, why the listcomp?","commit_id":"541be8ad49b19660392599c4d6beac9e1c892f14"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"6e96f79527c49f23e4ee69954aab99df32718e20","unresolved":false,"context_lines":[{"line_number":1498,"context_line":"        else:"},{"line_number":1499,"context_line":"            mappings \u003d [mapping for mapping in"},{"line_number":1500,"context_line":"                        objects.CellMappingList.get_all(context)]"},{"line_number":1501,"context_line":"            cell_mappings.extend(mappings)"},{"line_number":1502,"context_line":""},{"line_number":1503,"context_line":"        for cell_mapping in cell_mappings:"},{"line_number":1504,"context_line":"            # TODO(alaski): Factor this into helper method on CellMapping"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_a4b79fd6","line":1501,"in_reply_to":"fa7ab95a_6432f7f3","updated":"2016-08-29 21:11:41.000000000","message":"Iirc the listcomp is because get_all returns a CellMappingList object and the listcomp decomposes it into a list of mappings. I guess that\u0027s not really necessary since the iteration on line 1503 will work just fine if cell_mappings was a CellMappingList object.\n\nThe list extension came from an early approach I never revisited. I can clean all of this up.","commit_id":"541be8ad49b19660392599c4d6beac9e1c892f14"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b2f029311b3422a182ef6b15b777921c90c24e3f","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"    @args(\u0027--cell_uuid\u0027, metavar\u003d\u0027\u003ccell_uuid\u003e\u0027, dest\u003d\u0027cell_uuid\u0027,"},{"line_number":1482,"context_line":"          help\u003d\u0027If provided only this cell will be searched for new hosts to \u0027"},{"line_number":1483,"context_line":"               \u0027map.\u0027)"},{"line_number":1484,"context_line":"    def discover_hosts(self, cell_uuid\u003dNone):"},{"line_number":1485,"context_line":"        \"\"\"Searches cells, or a single cell, and maps found hosts."},{"line_number":1486,"context_line":""},{"line_number":1487,"context_line":"        When a new host is added to a deployment it will add a service entry"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_b4409508","line":1484,"updated":"2016-08-30 09:19:55.000000000","message":"So, while I think it\u0027s reasonable to merge that for Newton, I think we should discuss on some way to have computes automatically discovering the cell they belong to so it would create a HostMapping\n\nYeah, I know, it would mean a northbound call to the API from the compute, which is something I really want to avoid, but I think it\u0027s a very specific case that is required for operators if they don\u0027t want to be bored running the above periodically (or they could even end up running it in a cron, I guess)","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6a2945f3853c66b47063f048b18fb423cd96b649","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"    @args(\u0027--cell_uuid\u0027, metavar\u003d\u0027\u003ccell_uuid\u003e\u0027, dest\u003d\u0027cell_uuid\u0027,"},{"line_number":1482,"context_line":"          help\u003d\u0027If provided only this cell will be searched for new hosts to \u0027"},{"line_number":1483,"context_line":"               \u0027map.\u0027)"},{"line_number":1484,"context_line":"    def discover_hosts(self, cell_uuid\u003dNone):"},{"line_number":1485,"context_line":"        \"\"\"Searches cells, or a single cell, and maps found hosts."},{"line_number":1486,"context_line":""},{"line_number":1487,"context_line":"        When a new host is added to a deployment it will add a service entry"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_9f147e4d","line":1484,"in_reply_to":"fa7ab95a_4d824fc9","updated":"2016-08-30 13:00:15.000000000","message":"Yeah, I think it\u0027s understandable to have this for Newton, and maybe deprecating it for Ocata in case we have this automatic call created.","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"9470849559121d982521650302a199855e1226f7","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"    @args(\u0027--cell_uuid\u0027, metavar\u003d\u0027\u003ccell_uuid\u003e\u0027, dest\u003d\u0027cell_uuid\u0027,"},{"line_number":1482,"context_line":"          help\u003d\u0027If provided only this cell will be searched for new hosts to \u0027"},{"line_number":1483,"context_line":"               \u0027map.\u0027)"},{"line_number":1484,"context_line":"    def discover_hosts(self, cell_uuid\u003dNone):"},{"line_number":1485,"context_line":"        \"\"\"Searches cells, or a single cell, and maps found hosts."},{"line_number":1486,"context_line":""},{"line_number":1487,"context_line":"        When a new host is added to a deployment it will add a service entry"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_4d824fc9","line":1484,"in_reply_to":"fa7ab95a_b4409508","updated":"2016-08-30 12:46:45.000000000","message":"My first thought was to have automatic registration like you suggest. I\u0027m very much in favor of the idea but as you point out it means an upwards call to the API db which we\u0027d like to avoid. So I\u0027d like to give some more thought on a clean way to accomplish it, but it would be a good improvement to have.","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fa87a881a36458f2e7484534096fb9b450d7a661","unresolved":false,"context_lines":[{"line_number":1504,"context_line":"                compute_nodes \u003d objects.ComputeNodeList.get_all(ctxt)"},{"line_number":1505,"context_line":"            for compute in compute_nodes:"},{"line_number":1506,"context_line":"                try:"},{"line_number":1507,"context_line":"                    objects.HostMapping.get_by_host(ctxt, compute.host)"},{"line_number":1508,"context_line":"                except exception.HostMappingNotFound:"},{"line_number":1509,"context_line":"                    host_mapping \u003d objects.HostMapping("},{"line_number":1510,"context_line":"                        ctxt, host\u003dcompute.host,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_04711276","line":1507,"updated":"2016-08-30 08:43:55.000000000","message":"So this needs to happen on the API cell. I think thats fine, I just wonder if we could give a nicer error message when this is actually run in the child context? (Or if in that context we should reverse that logic, which is probably too confusing really)","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b2f029311b3422a182ef6b15b777921c90c24e3f","unresolved":false,"context_lines":[{"line_number":1504,"context_line":"                compute_nodes \u003d objects.ComputeNodeList.get_all(ctxt)"},{"line_number":1505,"context_line":"            for compute in compute_nodes:"},{"line_number":1506,"context_line":"                try:"},{"line_number":1507,"context_line":"                    objects.HostMapping.get_by_host(ctxt, compute.host)"},{"line_number":1508,"context_line":"                except exception.HostMappingNotFound:"},{"line_number":1509,"context_line":"                    host_mapping \u003d objects.HostMapping("},{"line_number":1510,"context_line":"                        ctxt, host\u003dcompute.host,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_545d8913","line":1507,"in_reply_to":"fa7ab95a_04711276","updated":"2016-08-30 09:19:55.000000000","message":"That\u0027s indeed a good point, we should somehow agree on if we should be defensive on API commands that would be run within cells.\nI tend to see that as :\n- for Newton, just be clear where to run in docs\n- for Ocata (with a 2nd cell being a reality), be more defensive in code by logging a warning","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"9470849559121d982521650302a199855e1226f7","unresolved":false,"context_lines":[{"line_number":1504,"context_line":"                compute_nodes \u003d objects.ComputeNodeList.get_all(ctxt)"},{"line_number":1505,"context_line":"            for compute in compute_nodes:"},{"line_number":1506,"context_line":"                try:"},{"line_number":1507,"context_line":"                    objects.HostMapping.get_by_host(ctxt, compute.host)"},{"line_number":1508,"context_line":"                except exception.HostMappingNotFound:"},{"line_number":1509,"context_line":"                    host_mapping \u003d objects.HostMapping("},{"line_number":1510,"context_line":"                        ctxt, host\u003dcompute.host,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_9f0b9e23","line":1507,"in_reply_to":"fa7ab95a_545d8913","updated":"2016-08-30 12:46:45.000000000","message":"If this were run in a cell without API db credentials configured it would fail because the CellMapping and CellMappingList lookups require access to the API db, as well as this HostMapping lookup and create. I\u0027ll make a note to improve this in the future. If the API db credentials are configured then it really doesn\u0027t matter that it\u0027s run in a cell.","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e84d50f2c31648fbccb96f6408f1b9780b304703","unresolved":false,"context_lines":[{"line_number":1504,"context_line":"                compute_nodes \u003d objects.ComputeNodeList.get_all(ctxt)"},{"line_number":1505,"context_line":"            for compute in compute_nodes:"},{"line_number":1506,"context_line":"                try:"},{"line_number":1507,"context_line":"                    objects.HostMapping.get_by_host(ctxt, compute.host)"},{"line_number":1508,"context_line":"                except exception.HostMappingNotFound:"},{"line_number":1509,"context_line":"                    host_mapping \u003d objects.HostMapping("},{"line_number":1510,"context_line":"                        ctxt, host\u003dcompute.host,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_1f014e06","line":1507,"in_reply_to":"fa7ab95a_9f0b9e23","updated":"2016-08-30 12:57:55.000000000","message":"Ah, so I missed the latter bit, bauzas filled me in on that.\n\nI am OK just documenting this for this cycle.","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6a2945f3853c66b47063f048b18fb423cd96b649","unresolved":false,"context_lines":[{"line_number":1504,"context_line":"                compute_nodes \u003d objects.ComputeNodeList.get_all(ctxt)"},{"line_number":1505,"context_line":"            for compute in compute_nodes:"},{"line_number":1506,"context_line":"                try:"},{"line_number":1507,"context_line":"                    objects.HostMapping.get_by_host(ctxt, compute.host)"},{"line_number":1508,"context_line":"                except exception.HostMappingNotFound:"},{"line_number":1509,"context_line":"                    host_mapping \u003d objects.HostMapping("},{"line_number":1510,"context_line":"                        ctxt, host\u003dcompute.host,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_a27e8567","line":1507,"in_reply_to":"fa7ab95a_9f0b9e23","updated":"2016-08-30 13:00:15.000000000","message":"Yup, I think it\u0027s okay for that, given the same problem is for all the cellsv2 nova-manage commands.","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"}],"releasenotes/notes/cells-discover-hosts-06a3079ba687e092.yaml":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fa87a881a36458f2e7484534096fb9b450d7a661","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    added to a cell. If a deployment has migrated to cellsv2 using either the"},{"line_number":5,"context_line":"    simple_cell_setup or the map_cell0/map_cell_and_hosts/map_instances combo"},{"line_number":6,"context_line":"    then anytime a new host is added to a cell this new"},{"line_number":7,"context_line":"    \"nova-manage cell_v2 discover_hosts\" needs to be run before instances can"},{"line_number":8,"context_line":"    be booted on that host. If multiple hosts are added at one time the command"},{"line_number":9,"context_line":"    only needs to be run one time to discover all of them."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"fa7ab95a_64b9fecb","line":7,"range":{"start_line":7,"start_character":40,"end_line":7,"end_character":56},"updated":"2016-08-30 08:43:55.000000000","message":"I think we need to say it has to be run on a note that is configured to talk to the API database.","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fa87a881a36458f2e7484534096fb9b450d7a661","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    command. This is because the scheduler will quickly become aware of the"},{"line_number":23,"context_line":"    host but nova-api will not know how to route the request to that host until"},{"line_number":24,"context_line":"    it has been \"discovered\". In order to avoid that it is advised that"},{"line_number":25,"context_line":"    new computes are disabled until the discover command has been run."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"fa7ab95a_a48146fd","line":25,"updated":"2016-08-30 08:43:55.000000000","message":"I wonder if we want to flip the default of auto-added hosts being disabled: https://github.com/openstack/nova/blob/master/nova/conf/compute.py#L638\n\nAnyways, thats a separate change.","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"88b7c18cc547a2ec0a6c8e90482438ec3cb6c8e9","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    command. This is because the scheduler will quickly become aware of the"},{"line_number":23,"context_line":"    host but nova-api will not know how to route the request to that host until"},{"line_number":24,"context_line":"    it has been \"discovered\". In order to avoid that it is advised that"},{"line_number":25,"context_line":"    new computes are disabled until the discover command has been run."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"fa7ab95a_bf44e249","line":25,"in_reply_to":"fa7ab95a_a48146fd","updated":"2016-08-30 12:47:40.000000000","message":"I\u0027ll point to that config option specifically here. But yeah, don\u0027t want to change that default here.","commit_id":"c032792bbbb9cf9447415d91b0fa68cc040418e2"}]}
