)]}'
{"nova/block_device.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"fc592b59df8842c49ce0f92302ff4b809e2a57c7","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":190,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":191,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"},{"line_number":192,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_name \u003d\u003d \u0027vda\u0027:"},{"line_number":193,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":194,"context_line":"                    details\u003d_(\"Invalid device name.\"))"},{"line_number":195,"context_line":"            elif source_type !\u003d \u0027blank\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aca2d91_c6b6103d","line":192,"updated":"2015-05-06 17:39:07.000000000","message":"I don\u0027t think this is the best place to reject this kind of request - if I understand what the problem is - it\u0027s that this is attmepting to set a blank volume as a bootable device?!\n\nI think the right place to put this kind of check is validate_bdms() in nova.compute.api","commit_id":"a5c93c8b2d36cb42ea9d54e903976a379278c1b4"},{"author":{"_account_id":3211,"name":"zhangjialong","email":"zhangjl@awcloud.com","username":"zhangjl"},"change_message_id":"59783763ee4788b1b9c68dd7097e262950add629","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":190,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":191,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"},{"line_number":192,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_name \u003d\u003d \u0027vda\u0027:"},{"line_number":193,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":194,"context_line":"                    details\u003d_(\"Invalid device name.\"))"},{"line_number":195,"context_line":"            elif source_type !\u003d \u0027blank\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9af37de9_11045f7c","line":192,"in_reply_to":"1aca2d91_121b1474","updated":"2015-05-11 02:45:28.000000000","message":"Agree with @Eli Qiao","commit_id":"a5c93c8b2d36cb42ea9d54e903976a379278c1b4"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"87e49970f978bf5a336843d3d195781e6047a81e","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":190,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":191,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"},{"line_number":192,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_name \u003d\u003d \u0027vda\u0027:"},{"line_number":193,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":194,"context_line":"                    details\u003d_(\"Invalid device name.\"))"},{"line_number":195,"context_line":"            elif source_type !\u003d \u0027blank\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aca2d91_121b1474","line":192,"in_reply_to":"1aca2d91_c6b6103d","updated":"2015-05-07 00:38:28.000000000","message":"hi Nikola,\nyes, I meant to create 2 disk, first one is an local disk and second one is an newly create blank volume(by mistake I specify vda for the second one), nova only create 1 disk (an \u0027blank\u0027 volume disk, but it can boot up).\n\nvalidate_bdms() will come later than from_api, validate_bdms() will be check in _provision_instances, and from_api is called in REST API layer, it will be early then _provision_instances, I think it\u0027s better to error out early ?\nthe earlier the better?\n\n- Eli","commit_id":"a5c93c8b2d36cb42ea9d54e903976a379278c1b4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"af837611786c57277a2511a1206279fd34240556","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":190,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":191,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"},{"line_number":192,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_name \u003d\u003d \u0027vda\u0027:"},{"line_number":193,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":194,"context_line":"                    details\u003d_(\"Invalid device name.\"))"},{"line_number":195,"context_line":"            elif source_type !\u003d \u0027blank\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_7d1c8d6a","line":192,"in_reply_to":"9af37de9_11045f7c","updated":"2015-05-26 09:20:56.000000000","message":"The thing is - I don\u0027t think we have enough information here to make this decision (we are not considering block devices from the image for example) and also - \u0027vda\u0027 does not mean root - actually with the current block device syntax - you\u0027re encouraged to not specify the device name in the API at all and use boot_index instead.\n\nAlso your argument about doing it as early as possible is kind of moot since _validate_bdms is also called inside handling of the same request so I really see no benefit it making a vague guess that can be wrong in order to save a few milliseconds.","commit_id":"a5c93c8b2d36cb42ea9d54e903976a379278c1b4"}],"nova/compute/api.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"4db8069bdb11e2e1722890ee31f7f44d5137da17","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"                        bdm.device_name in (\u0027/dev/vda\u0027, \u0027/dev/hda\u0027, \u0027dev/sda\u0027,"},{"line_number":1272,"context_line":"                                            \u0027/dev/xvda\u0027)):"},{"line_number":1273,"context_line":"                    raise exception.InvalidBDM(message\u003d_(\"Blank volumes \""},{"line_number":1274,"context_line":"                        \"can not be used as boot device\"))"},{"line_number":1275,"context_line":""},{"line_number":1276,"context_line":"        ephemeral_size \u003d sum(bdm.volume_size or 0"},{"line_number":1277,"context_line":"                for bdm in all_mappings"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_31a168aa","line":1274,"updated":"2015-07-20 04:28:36.000000000","message":"I think that the problem is wider than that what you fix.\n\nThe problem is:\n\nA user can specify a non bootable device as a root device. Non bootable devices are: blank volumes, ephemeral and swap disks, probably non bootable volumes (bootable flag is off). The user can specify it explicitly or implicitly. The explicit way is parameters of boot operation, the implicit way is block_device_mapping and mappings properties of the specified image. Since the user could update properties of an image he owns, the implicit way is also actual.\n\nI think if we want to fix it, we have to fix it completely, not only the one custom case. Otherwise Nova behavior will not be consistent.","commit_id":"537b9a6fcbdf51fd236344f546acfd775152063a"}]}
