)]}'
{"nova/compute/api.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"632c57d013a6f3e10b64917def7eff1bc430ce16","unresolved":false,"context_lines":[{"line_number":2887,"context_line":""},{"line_number":2888,"context_line":"        # Check to see if the image is changing and we have a volume-backed"},{"line_number":2889,"context_line":"        # server."},{"line_number":2890,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2891,"context_line":"        if is_volume_backed:"},{"line_number":2892,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2893,"context_line":"            # query the image from the volume."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_bee61de8","line":2890,"range":{"start_line":2890,"start_character":7,"end_line":2890,"end_character":70},"updated":"2017-11-21 04:23:17.000000000","message":"can we reuse \nhttps://github.com/openstack/nova/blob/master/nova/compute/utils.py#L211 ?","commit_id":"868e033b1842fbc4f2ada4ee81a4dabeabbad625"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"52c8a359c4f01393d0f58d5cdd93eb4624fc76e3","unresolved":false,"context_lines":[{"line_number":2887,"context_line":""},{"line_number":2888,"context_line":"        # Check to see if the image is changing and we have a volume-backed"},{"line_number":2889,"context_line":"        # server."},{"line_number":2890,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2891,"context_line":"        if is_volume_backed:"},{"line_number":2892,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2893,"context_line":"            # query the image from the volume."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_7d92a54d","line":2890,"range":{"start_line":2890,"start_character":7,"end_line":2890,"end_character":70},"in_reply_to":"ff82abbf_bee61de8","updated":"2017-11-22 16:55:17.000000000","message":"We could but it would mean redoing the work to get \"root_bdm\".  Here we already have it, so it seems silly not to use it.  Also it would likely mean modifying a bunch of testcases.","commit_id":"868e033b1842fbc4f2ada4ee81a4dabeabbad625"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0b4dea6a95dac5f3c2862961905c6ee638cc5534","unresolved":false,"context_lines":[{"line_number":2879,"context_line":""},{"line_number":2880,"context_line":"        # Check to see if the image is changing and we have a volume-backed"},{"line_number":2881,"context_line":"        # server."},{"line_number":2882,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2883,"context_line":"        if is_volume_backed:"},{"line_number":2884,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2885,"context_line":"            # query the image from the volume."}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_a12ab17b","line":2882,"updated":"2017-11-29 16:10:44.000000000","message":"Personally I\u0027d prefer to just use the compute utils method for doing this even though it does duplicate a little work. We\u0027re not in a critical path here and the work to re-find the root bdm is pretty minor.","commit_id":"3172b015744b6e2b8977d91950706ad11bdcddd7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"29394c478036d3c5d0011b6491d156a6223d89bf","unresolved":false,"context_lines":[{"line_number":2879,"context_line":""},{"line_number":2880,"context_line":"        # Check to see if the image is changing and we have a volume-backed"},{"line_number":2881,"context_line":"        # server."},{"line_number":2882,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2883,"context_line":"        if is_volume_backed:"},{"line_number":2884,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2885,"context_line":"            # query the image from the volume."}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_b7519338","line":2882,"in_reply_to":"ff82abbf_a12ab17b","updated":"2017-11-29 17:55:54.000000000","message":"Alright.","commit_id":"3172b015744b6e2b8977d91950706ad11bdcddd7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f2ed422bb5086ea2db492d4f3bc590d112193f2","unresolved":false,"context_lines":[{"line_number":2879,"context_line":""},{"line_number":2880,"context_line":"        # Check to see if the image is changing and we have a volume-backed"},{"line_number":2881,"context_line":"        # server."},{"line_number":2882,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2883,"context_line":"        if is_volume_backed:"},{"line_number":2884,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2885,"context_line":"            # query the image from the volume."}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_12a5eda1","line":2882,"in_reply_to":"ff82abbf_b7519338","updated":"2017-11-29 18:20:35.000000000","message":"Using compute_utils.is_volume_backed here tickles a weird edge case tested by nova.tests.unit.compute.test_compute.ComputeAPITestCase.test_rebuild_no_image where there are no bdms for the instance, so no root_bdm, but the instance.image_ref is \u0027\u0027, so compute_utils.is_volume_backed returns True but then \"volume_id \u003d root_bdm.volume_id\" fails because there is no root_bdm. I don\u0027t know if this could actually ever happen, if we have a volume-backed instance but no root bdm, something has gone wrong. I\u0027m guessing we just log an error in that case and keep going with orig_image_ref being \u0027\u0027, which would send this through the scheduler.\n\nAlternatively, we could just fail with a 500 because it\u0027s definitely an internal error if you\u0027ve got a volume-backed instance with no root bdm.","commit_id":"3172b015744b6e2b8977d91950706ad11bdcddd7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0b4dea6a95dac5f3c2862961905c6ee638cc5534","unresolved":false,"context_lines":[{"line_number":2889,"context_line":"            vol_image_ref \u003d volume_image_metadata.get(\u0027image_id\u0027)"},{"line_number":2890,"context_line":"            if vol_image_ref \u003d\u003d image_href:"},{"line_number":2891,"context_line":"                # Store this for later to skip calling the scheduler."},{"line_number":2892,"context_line":"                orig_image_ref \u003d vol_image_ref"},{"line_number":2893,"context_line":""},{"line_number":2894,"context_line":"        self._checks_for_create_and_rebuild(context, image_id, image,"},{"line_number":2895,"context_line":"                flavor, metadata, files_to_inject, root_bdm)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_86330314","line":2892,"updated":"2017-11-29 16:10:44.000000000","message":"Wonder if it would be better to do this here:\n\n else:\n     orig_image_ref \u003d instance.image_ref or \u0027\u0027\n\nfrom above? Setting it early and then overriding it later is kinda icky... It also means we could get orig_image_ref\u003d\u0027\u0027 for a while, and if we were to fall past this for some reason...","commit_id":"3172b015744b6e2b8977d91950706ad11bdcddd7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"29394c478036d3c5d0011b6491d156a6223d89bf","unresolved":false,"context_lines":[{"line_number":2889,"context_line":"            vol_image_ref \u003d volume_image_metadata.get(\u0027image_id\u0027)"},{"line_number":2890,"context_line":"            if vol_image_ref \u003d\u003d image_href:"},{"line_number":2891,"context_line":"                # Store this for later to skip calling the scheduler."},{"line_number":2892,"context_line":"                orig_image_ref \u003d vol_image_ref"},{"line_number":2893,"context_line":""},{"line_number":2894,"context_line":"        self._checks_for_create_and_rebuild(context, image_id, image,"},{"line_number":2895,"context_line":"                flavor, metadata, files_to_inject, root_bdm)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_776eab00","line":2892,"in_reply_to":"ff82abbf_86330314","updated":"2017-11-29 17:55:54.000000000","message":"You\u0027d have to do:\n\nelse:\n     orig_image_ref \u003d instance.image_ref or \u0027\u0027\n\nIn two places then, once in here and once if it\u0027s not a volume-backed server. What\u0027s here doesn\u0027t really bother me, but it could be changed.","commit_id":"3172b015744b6e2b8977d91950706ad11bdcddd7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6b44ee5f2689de7f182c05decd500f5fba35a4e","unresolved":false,"context_lines":[{"line_number":2885,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2886,"context_line":"            # query the image from the volume."},{"line_number":2887,"context_line":"            if root_bdm is None:"},{"line_number":2888,"context_line":"                # This shouldn\u0027t happen and is really an error, but"},{"line_number":2889,"context_line":"                # is_volume_backed_instance will consider the instance to be"},{"line_number":2890,"context_line":"                # volume-backed if there is no instance.image_ref. Log an error"},{"line_number":2891,"context_line":"                # and proceed as if we couldn\u0027t determine the image."},{"line_number":2892,"context_line":"                LOG.error(\u0027There is no root block device mapping for \u0027"},{"line_number":2893,"context_line":"                          \u0027volume-backed instance.\u0027, instance\u003dinstance)"},{"line_number":2894,"context_line":"                vol_image_ref \u003d None"},{"line_number":2895,"context_line":"            else:"},{"line_number":2896,"context_line":"                volume \u003d self.volume_api.get(context, root_bdm.volume_id)"},{"line_number":2897,"context_line":"                volume_image_metadata \u003d volume.get(\u0027volume_image_metadata\u0027, {})"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_37a9ea8f","line":2894,"range":{"start_line":2888,"start_character":16,"end_line":2894,"end_character":36},"updated":"2017-11-30 14:41:07.000000000","message":"Need to decide is we just make this a hard failure and 500 from the API.","commit_id":"97280f1882edb972b1cb04f3346fe2d4a4e4f08a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ac120176323d0efe7d8515f3bd548aff61955ec8","unresolved":false,"context_lines":[{"line_number":2901,"context_line":"                # Store this for later to skip calling the scheduler."},{"line_number":2902,"context_line":"                orig_image_ref \u003d vol_image_ref"},{"line_number":2903,"context_line":"            else:"},{"line_number":2904,"context_line":"                orig_image_ref \u003d instance.image_ref or \u0027\u0027"},{"line_number":2905,"context_line":"        else:"},{"line_number":2906,"context_line":"            orig_image_ref \u003d instance.image_ref"},{"line_number":2907,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_94e24ad4","line":2904,"updated":"2017-11-29 19:05:28.000000000","message":"When does this ever make sense?","commit_id":"97280f1882edb972b1cb04f3346fe2d4a4e4f08a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5ba6a57c945f5b921bc9ec49b1b6ba897e29422d","unresolved":false,"context_lines":[{"line_number":2901,"context_line":"                # Store this for later to skip calling the scheduler."},{"line_number":2902,"context_line":"                orig_image_ref \u003d vol_image_ref"},{"line_number":2903,"context_line":"            else:"},{"line_number":2904,"context_line":"                orig_image_ref \u003d instance.image_ref or \u0027\u0027"},{"line_number":2905,"context_line":"        else:"},{"line_number":2906,"context_line":"            orig_image_ref \u003d instance.image_ref"},{"line_number":2907,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_f7571857","line":2904,"in_reply_to":"ff82abbf_94e24ad4","updated":"2017-11-29 19:47:49.000000000","message":"Isn\u0027t this what you asked for in the earlier patch set?\n\nWhat this will do is make us run the scheduler on the new image because L2972 will be True:\n\n  if orig_image_ref !\u003d image_href:\n\nMaybe you\u0027re just asking that we always do this:\n\n  orig_image_ref \u003d vol_image_ref\n\nWhich makes more sense after moving \"orig_image_ref \u003d instance.image_ref\" down from where it was.","commit_id":"97280f1882edb972b1cb04f3346fe2d4a4e4f08a"}]}
