)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"802126d2a37a19f42c525cfe19705cc46b57bb2b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Tim Pownall \u003cpownalltim@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-16 22:51:42 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Updated _create_vm_record and _attach_disks to pull vm_mode and"},{"line_number":8,"context_line":"auto_disk_config values from the image_ref during rescue mode."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Change-Id: I29c89e9a17f9a170dbe61e4fe14672d481c4fb78"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a80dd14_18644348","line":7,"updated":"2015-03-17 14:55:11.000000000","message":"The first line here should be a simple title, \u003c 52 chars is recommended.  Something like \"xenapi: pull vm_mode and auto_disk_config from image during rescue\".\n\nThen add the more descriptive text in a body paragraph.","commit_id":"75b9a9a903332ab37103fd8f986037622c146bec"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"27f85898675a04787397dbd9b87b275d9eae44cb","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Tim Pownall \u003cpownalltim@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-17 19:03:24 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Updated determine_vm_mode and _attach_disks to pull vm_mode and"},{"line_number":8,"context_line":"auto_disk_config values from the image_ref during rescue mode."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Change-Id: I29c89e9a17f9a170dbe61e4fe14672d481c4fb78"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a80dd14_285a5e83","line":7,"updated":"2015-03-18 15:06:30.000000000","message":"This should be reworked.  See my comments on patchset 1.","commit_id":"2c196e0768f85ce171bdd351af0783a7393f472c"}],"nova/tests/unit/virt/xenapi/test_vmops.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"802126d2a37a19f42c525cfe19705cc46b57bb2b","unresolved":false,"context_lines":[{"line_number":959,"context_line":"        mock_determine_vm_mode.return_value \u003d \"vm_mode\""},{"line_number":960,"context_line":""},{"line_number":961,"context_line":"        self.vmops._create_vm_record(context, instance, name_label,"},{"line_number":962,"context_line":"            disk_image_type, kernel_file, ramdisk_file, image_meta, rescue)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"        mock_get_vm_device_id.assert_called_with(session, image_properties)"},{"line_number":965,"context_line":"        mock_create_vm.assert_called_with(session, instance, name_label,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_fb868915","line":962,"updated":"2015-03-17 14:55:11.000000000","message":"rescue doesn\u0027t seem to be defined here.","commit_id":"75b9a9a903332ab37103fd8f986037622c146bec"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f2d109d751b14705fdbe198ed4a1ac9e03f45499","unresolved":false,"context_lines":[{"line_number":480,"context_line":"        vm_ref \u003d \"fake_vm_ref\""},{"line_number":481,"context_line":"        self.vmops._create_vm_record(context, instance, name_label,"},{"line_number":482,"context_line":"                di_type, kernel_file,"},{"line_number":483,"context_line":"                ramdisk_file, image_meta, rescue).AndReturn(vm_ref)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"        if resize_instance:"},{"line_number":486,"context_line":"            self.vmops._resize_up_vdis(instance, vdis)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_a8de133c","line":483,"updated":"2015-03-19 14:56:12.000000000","message":"rescue is not defined here.","commit_id":"bb4f7db8be9e19fa4295825f2e8dcf1a578a9b13"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f2d109d751b14705fdbe198ed4a1ac9e03f45499","unresolved":false,"context_lines":[{"line_number":961,"context_line":"        mock_determine_vm_mode.return_value \u003d \"vm_mode\""},{"line_number":962,"context_line":""},{"line_number":963,"context_line":"        self.vmops._create_vm_record(context, instance, name_label,"},{"line_number":964,"context_line":"            disk_image_type, kernel_file, ramdisk_file, image_meta, rescue)"},{"line_number":965,"context_line":""},{"line_number":966,"context_line":"        mock_get_vm_device_id.assert_called_with(session, image_properties)"},{"line_number":967,"context_line":"        mock_create_vm.assert_called_with(session, instance, name_label,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_08163ff2","line":964,"updated":"2015-03-19 14:56:12.000000000","message":"rescue is not defined here.","commit_id":"bb4f7db8be9e19fa4295825f2e8dcf1a578a9b13"}],"nova/virt/xenapi/vm_utils.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"27f85898675a04787397dbd9b87b275d9eae44cb","unresolved":false,"context_lines":[{"line_number":1638,"context_line":"    # NOTE(tpownall): If rescue mode then we should try to pull the vm_mode"},{"line_number":1639,"context_line":"    # value from the image properties to ensure the vm is built properly."},{"line_number":1640,"context_line":"    if rescue:"},{"line_number":1641,"context_line":"        rescue_mode \u003d image_meta[\u0027properties\u0027].get(\u0027vm_mode\u0027, None)"},{"line_number":1642,"context_line":"        if rescue_mode is None:"},{"line_number":1643,"context_line":"            LOG.debug(\"Unable to pull vm_mode from rescue image.\")"},{"line_number":1644,"context_line":"    \telse:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_63e63918","line":1641,"updated":"2015-03-18 15:06:30.000000000","message":"I\u0027m going to backtrack a little on my earlier comments, sorry.  I didn\u0027t realize that image_meta was necessary here as most of the logic is around os_type or disk_image_type.  The reality seems to be that current_mode is derived from image_meta properties early on and that\u0027s what is used.  Since the logic after line #1648 doesn\u0027t seem to come into play you should move this back out to vmops.py.","commit_id":"2c196e0768f85ce171bdd351af0783a7393f472c"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"27f85898675a04787397dbd9b87b275d9eae44cb","unresolved":false,"context_lines":[{"line_number":1641,"context_line":"        rescue_mode \u003d image_meta[\u0027properties\u0027].get(\u0027vm_mode\u0027, None)"},{"line_number":1642,"context_line":"        if rescue_mode is None:"},{"line_number":1643,"context_line":"            LOG.debug(\"Unable to pull vm_mode from rescue image.\")"},{"line_number":1644,"context_line":"    \telse:"},{"line_number":1645,"context_line":"            current_mode \u003d rescue_mode"},{"line_number":1646,"context_line":""},{"line_number":1647,"context_line":"    if current_mode \u003d\u003d vm_mode.XEN or current_mode \u003d\u003d vm_mode.HVM:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_c8f6225d","line":1644,"updated":"2015-03-18 15:06:30.000000000","message":"Tab.","commit_id":"2c196e0768f85ce171bdd351af0783a7393f472c"}],"nova/virt/xenapi/vmops.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"802126d2a37a19f42c525cfe19705cc46b57bb2b","unresolved":false,"context_lines":[{"line_number":652,"context_line":"        \"\"\""},{"line_number":653,"context_line":"        "},{"line_number":654,"context_line":"        if rescue:"},{"line_number":655,"context_line":"        \ttry:"},{"line_number":656,"context_line":"        \t\tmode \u003d image_meta[\u0027properties\u0027][\u0027vm_mode\u0027]"},{"line_number":657,"context_line":"        \texcept KeyError:"},{"line_number":658,"context_line":"        \t\tLOG.debug(\"Unable to read vm_mode from image.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_f8ba0f70","line":655,"updated":"2015-03-17 14:55:11.000000000","message":"I\u0027m guessing, based on the red arrows here, that you\u0027re using tabs rather than spaces.  You should update your editor to make a tab into 4 spaces and change these to use spaces.","commit_id":"75b9a9a903332ab37103fd8f986037622c146bec"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"802126d2a37a19f42c525cfe19705cc46b57bb2b","unresolved":false,"context_lines":[{"line_number":657,"context_line":"        \texcept KeyError:"},{"line_number":658,"context_line":"        \t\tLOG.debug(\"Unable to read vm_mode from image.\")"},{"line_number":659,"context_line":"                mode \u003d vm_utils.determine_vm_mode(instance, disk_image_type)"},{"line_number":660,"context_line":"        else:"},{"line_number":661,"context_line":"        \tmode \u003d vm_utils.determine_vm_mode(instance, disk_image_type)"},{"line_number":662,"context_line":"        \tif instance.vm_mode !\u003d mode:"},{"line_number":663,"context_line":"            \t# Update database with normalized (or determined) value"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_fb03e9bb","line":660,"updated":"2015-03-17 14:55:11.000000000","message":"This logic is fine, but could be written a little more succinctly.  I would recommend something like:\n\n    mode \u003d vm_utils.determine_vm_mode(instance, disk_image_type)\n    if rescue:\n        rescue_vm_mode \u003d image_meta[\u0027properties\u0027].get(\u0027vm_mode\u0027)\n        if rescue_vm_mode is not None:\n            mode \u003d rescue_mode\n        else:\n            LOG.debug(\"Unable to read vm_mode from rescue image\u0027)\n    ...","commit_id":"75b9a9a903332ab37103fd8f986037622c146bec"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"802126d2a37a19f42c525cfe19705cc46b57bb2b","unresolved":false,"context_lines":[{"line_number":695,"context_line":"            # If rescue mode handle auto_disk_config differently"},{"line_number":696,"context_line":"            if rescue:"},{"line_number":697,"context_line":"            \ttry:"},{"line_number":698,"context_line":"            \t\tauto_disk_config \u003d image_meta[\u0027properties\u0027][\u0027vm_mode\u0027]"},{"line_number":699,"context_line":"            \texcept KeyError:"},{"line_number":700,"context_line":"            \t\tLOG.debug(\"No auto_disk_config value found.\")"},{"line_number":701,"context_line":"            \t\tauto_disk_config \u003d instance[\u0027auto_disk_config\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_dbec65f6","line":698,"updated":"2015-03-17 14:55:11.000000000","message":"This should be \u0027auto_disk_config\u0027 rather than \u0027vm_mode\u0027.","commit_id":"75b9a9a903332ab37103fd8f986037622c146bec"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"802126d2a37a19f42c525cfe19705cc46b57bb2b","unresolved":false,"context_lines":[{"line_number":700,"context_line":"            \t\tLOG.debug(\"No auto_disk_config value found.\")"},{"line_number":701,"context_line":"            \t\tauto_disk_config \u003d instance[\u0027auto_disk_config\u0027]"},{"line_number":702,"context_line":"            else: "},{"line_number":703,"context_line":"            \tauto_disk_config \u003d instance[\u0027auto_disk_config\u0027]"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"            if auto_disk_config:"},{"line_number":706,"context_line":"                LOG.debug(\"Auto configuring disk, attempting to \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_1b30bd9d","line":703,"updated":"2015-03-17 14:55:11.000000000","message":"Same thing here.  Set auto_disk_config and then override it if it\u0027s found in image_meta.","commit_id":"75b9a9a903332ab37103fd8f986037622c146bec"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"264e1615c0b1de8f354f504f01e0007ad7f0ef1a","unresolved":false,"context_lines":[{"line_number":658,"context_line":"            if rescue_vm_mode is None:"},{"line_number":659,"context_line":"                LOG.debug(\"Failed to pull vm_mode from rescue_image_ref.\")"},{"line_number":660,"context_line":"            else:"},{"line_number":661,"context_line":"                mode \u003d rescue_vm_mode"},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"        if instance.vm_mode !\u003d mode:"},{"line_number":664,"context_line":"            # Update database with normalized (or determined) value"}],"source_content_type":"text/x-python","patch_set":11,"id":"9aa53dc9_4b8fbb23","line":661,"updated":"2015-04-06 22:27:13.000000000","message":"mode \u003d vm_mode.canonicalize(rescue_vm_mode) should be used.  Otherwise there\u0027s a chance of having an image property that doesn\u0027t do what\u0027s expected.","commit_id":"c72d2fcb31a698b0fa180c94674165086c20fa3c"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"264e1615c0b1de8f354f504f01e0007ad7f0ef1a","unresolved":false,"context_lines":[{"line_number":703,"context_line":"                if rescue_auto_disk_config is None:"},{"line_number":704,"context_line":"                    LOG.debug(\"Failed to pull auto_disk_config value from\""},{"line_number":705,"context_line":"                              \"image. Using instance auto_disk_config\""},{"line_number":706,"context_line":"                              \"value...\")"},{"line_number":707,"context_line":"                else:"},{"line_number":708,"context_line":"                    auto_disk_config \u003d rescue_auto_disk_config"},{"line_number":709,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9aa53dc9_4b88db22","line":706,"updated":"2015-04-06 22:27:13.000000000","message":"You should remove the final sentence, or populate the auto_disk_config value in the log line.","commit_id":"c72d2fcb31a698b0fa180c94674165086c20fa3c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f3aafbd09fbdb48bd2637214075acabada7c6170","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        if rescue:"},{"line_number":657,"context_line":"            rescue_vm_mode \u003d image_meta[\u0027properties\u0027].get(\u0027vm_mode\u0027, None)"},{"line_number":658,"context_line":"            if rescue_vm_mode is None:"},{"line_number":659,"context_line":"                LOG.debug(\"Failed to pull vm_mode from rescue_image_ref.\")"},{"line_number":660,"context_line":"            else:"},{"line_number":661,"context_line":"                mode \u003d vm_mode.canonicalize(rescue_vm_mode)"},{"line_number":662,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9aa53dc9_727d7d6d","line":659,"updated":"2015-04-08 14:57:39.000000000","message":"Not sure the above debug message is useful. In fact, it could be harmful in that it may cause an admin to pause, thinking there\u0027s something wrong going on here. If you absolutely need to add this debug message, consider changing the message to something like:\n\n \"vm_mode not found in original instance image properties. Setting vm_mode to\n XXX\"","commit_id":"31f208423405ed50bb5b32977071f917ac3ce26d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f3aafbd09fbdb48bd2637214075acabada7c6170","unresolved":false,"context_lines":[{"line_number":702,"context_line":"                                                \u0027auto_disk_config\u0027, None)"},{"line_number":703,"context_line":"                if rescue_auto_disk_config is None:"},{"line_number":704,"context_line":"                    LOG.debug(\"Failed to pull auto_disk_config value from\""},{"line_number":705,"context_line":"                              \"image.\")"},{"line_number":706,"context_line":"                else:"},{"line_number":707,"context_line":"                    auto_disk_config \u003d rescue_auto_disk_config"},{"line_number":708,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9aa53dc9_f2918d9a","line":705,"updated":"2015-04-08 14:57:39.000000000","message":"Similar to above about log message...","commit_id":"31f208423405ed50bb5b32977071f917ac3ce26d"}]}
