)]}'
{"nova/virt/libvirt/blockinfo.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d57b23d0d2dee94647a8e091baeb55e89b9850e5","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            dev_prefix \u003d get_dev_prefix_for_disk_bus(disk_bus)"},{"line_number":464,"context_line":"            if not root_device_name.startswith(dev_prefix):"},{"line_number":465,"context_line":"                letter \u003d block_device.get_device_letter(root_device_name)"},{"line_number":466,"context_line":"                root_device_name \u003d \u0027%s%s\u0027 % (dev_prefix, letter)"},{"line_number":467,"context_line":"        root_bdm[\u0027device_name\u0027] \u003d root_device_name"},{"line_number":468,"context_line":"    return get_info_from_bdm(instance, virt_type, image_meta,"},{"line_number":469,"context_line":"                             root_bdm, {}, disk_bus)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_7b0b5924","line":466,"updated":"2017-01-31 14:24:13.000000000","message":"Something tells me the BDM should get updated here:\nhttps://github.com/openstack/nova/blob/c9eb9530314d047f5013941ebcfd5ef0192a9dc3/nova/block_device.py#L513\nor here:\nhttps://github.com/openstack/nova/blob/master/nova/compute/api.py#L747\n\nThis feels like it will leave reality and the BDM out of sync, which is likely to cause another issue.\n\nHaving said that, this fixes the bug, and stop stops the bleeding, while we can take time to work out what else is needed.","commit_id":"12485c74faf317dfe2c05ee0b4877412002893d6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"542e9009b42550fa41123678a03e0d4d79101eb4","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            dev_prefix \u003d get_dev_prefix_for_disk_bus(disk_bus)"},{"line_number":464,"context_line":"            if not root_device_name.startswith(dev_prefix):"},{"line_number":465,"context_line":"                letter \u003d block_device.get_device_letter(root_device_name)"},{"line_number":466,"context_line":"                root_device_name \u003d \u0027%s%s\u0027 % (dev_prefix, letter)"},{"line_number":467,"context_line":"        root_bdm[\u0027device_name\u0027] \u003d root_device_name"},{"line_number":468,"context_line":"    return get_info_from_bdm(instance, virt_type, image_meta,"},{"line_number":469,"context_line":"                             root_bdm, {}, disk_bus)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_a1b82f76","line":466,"in_reply_to":"3a461143_612c8799","updated":"2017-01-31 16:25:35.000000000","message":"\u003e Place the onus on the user to specify the a correct root_device_name\n\nDoesn\u0027t that go against the desire we have to remove device_name from the block_device_mapping_v2 schema in the REST API since the libvirt driver ignores it anyway?","commit_id":"12485c74faf317dfe2c05ee0b4877412002893d6"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"09b116539b60093c958bcccf60ac42194a5e604f","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            dev_prefix \u003d get_dev_prefix_for_disk_bus(disk_bus)"},{"line_number":464,"context_line":"            if not root_device_name.startswith(dev_prefix):"},{"line_number":465,"context_line":"                letter \u003d block_device.get_device_letter(root_device_name)"},{"line_number":466,"context_line":"                root_device_name \u003d \u0027%s%s\u0027 % (dev_prefix, letter)"},{"line_number":467,"context_line":"        root_bdm[\u0027device_name\u0027] \u003d root_device_name"},{"line_number":468,"context_line":"    return get_info_from_bdm(instance, virt_type, image_meta,"},{"line_number":469,"context_line":"                             root_bdm, {}, disk_bus)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_7bea7975","line":466,"in_reply_to":"3a461143_7b0b5924","updated":"2017-01-31 14:36:22.000000000","message":"The first case does not work since this is a case for xenapi driver, but here is libvirt driver.\n\nThe second case does not work since \u0027vda\u0027 is directly specified in the test.","commit_id":"12485c74faf317dfe2c05ee0b4877412002893d6"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1715e6a08fbc6b0c687894df984e4bc6b9e97782","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            dev_prefix \u003d get_dev_prefix_for_disk_bus(disk_bus)"},{"line_number":464,"context_line":"            if not root_device_name.startswith(dev_prefix):"},{"line_number":465,"context_line":"                letter \u003d block_device.get_device_letter(root_device_name)"},{"line_number":466,"context_line":"                root_device_name \u003d \u0027%s%s\u0027 % (dev_prefix, letter)"},{"line_number":467,"context_line":"        root_bdm[\u0027device_name\u0027] \u003d root_device_name"},{"line_number":468,"context_line":"    return get_info_from_bdm(instance, virt_type, image_meta,"},{"line_number":469,"context_line":"                             root_bdm, {}, disk_bus)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_612c8799","line":466,"in_reply_to":"3a461143_7bea7975","updated":"2017-01-31 16:06:10.000000000","message":"I am not in favour of adding more of this kind of if block. Every one of these increases the context required to reason about anything combinatorially. Now the caller needs to remember that root_bdm[\u0027device_name\u0027] might not be the thing they passed in, but only in a niche corner case which will soon be forgotten. I far prefer John\u0027s suggestion of fixing it during the initial api call. Maybe not that exactly as Feodor points out, but something along those lines.\n\nIt seems this has been broken for a long time, so we\u0027re not regressing here. I don\u0027t think we need to rush this: we can just leave the tempest test disabled. Before taking a change like this I\u0027d like to see a justification of why we can\u0027t fix it robustly before we get here.\n\nAt a higher level, there are 2 ways to go here:\n\n1. Interpret \u0027vda\u0027 to mean \u0027the first disk\u0027 at the api level, and ensure during initial boot that this is updated in the BDM to reflect  reality.\n\n2. Place the onus on the user to specify the a correct root_device_name, and fail if it is incorrect (and also work out what the xvda bug is).\n\nI intuitively feel like option 2 would be simpler, but either would be acceptable to me.","commit_id":"12485c74faf317dfe2c05ee0b4877412002893d6"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"cd6174fc9590c861aafcb562a740140d11822a9f","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            dev_prefix \u003d get_dev_prefix_for_disk_bus(disk_bus)"},{"line_number":464,"context_line":"            if not root_device_name.startswith(dev_prefix):"},{"line_number":465,"context_line":"                letter \u003d block_device.get_device_letter(root_device_name)"},{"line_number":466,"context_line":"                root_device_name \u003d \u0027%s%s\u0027 % (dev_prefix, letter)"},{"line_number":467,"context_line":"        root_bdm[\u0027device_name\u0027] \u003d root_device_name"},{"line_number":468,"context_line":"    return get_info_from_bdm(instance, virt_type, image_meta,"},{"line_number":469,"context_line":"                             root_bdm, {}, disk_bus)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_b7d14d25","line":466,"in_reply_to":"3a461143_a1b82f76","updated":"2017-01-31 17:04:11.000000000","message":"I didn\u0027t check that code path carefully. I was hoping that Thomas might do that whilst justifying (or not) the decision to make the change here rather than elsewhere.\n\nMy primary concern is that I feel this should have been addressed before we got here, and fixing it here is a maintenance burden and likely to be fragile. I haven\u0027t looked into the details, yet.\n\nHow does it get defaulted currently if there\u0027s no device_name? Can we co-opt that code path somehow to resolve this problem?","commit_id":"12485c74faf317dfe2c05ee0b4877412002893d6"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"60e92c0d9474042885be8ffc5a0d1bed3aff52df","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            dev_prefix \u003d get_dev_prefix_for_disk_bus(disk_bus)"},{"line_number":464,"context_line":"            if not root_device_name.startswith(dev_prefix):"},{"line_number":465,"context_line":"                letter \u003d block_device.get_device_letter(root_device_name)"},{"line_number":466,"context_line":"                root_device_name \u003d \u0027%s%s\u0027 % (dev_prefix, letter)"},{"line_number":467,"context_line":"        root_bdm[\u0027device_name\u0027] \u003d root_device_name"},{"line_number":468,"context_line":"    return get_info_from_bdm(instance, virt_type, image_meta,"},{"line_number":469,"context_line":"                             root_bdm, {}, disk_bus)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_1b0b2bd7","line":466,"in_reply_to":"3a461143_b7d14d25","updated":"2017-01-31 18:05:17.000000000","message":"If you remove device_name from bdmv2, we\u0027ll lose the ability to overwrite a device specification during instance launch. If an image has bdm, but we want to adjust it (e.g. increase the volume size), we can specify adjusted bdm with the same device name, and Nova will use it instead the old bdm. Also, as i understand, some other drivers support device names.\n\nAs for where to fix device names - i\u0027d propose default_device_names function here. It is a function which generates (indirectly) and persists unassigned names. It\u0027d be sensible to do this change there as well. This function is called for libvirt driver only (unlike bdm -\u003e bdm v2 conversion). And it\u0027s called once for a device set: at initial stage, at device attach, etc (unlike get_root_info).","commit_id":"12485c74faf317dfe2c05ee0b4877412002893d6"}]}
