)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds a new config option to control the maximum number of disk"},{"line_number":10,"context_line":"devices allowed to attach to a single instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It also updates the behavior of the volume attach API to raise a 403"},{"line_number":13,"context_line":"forbidden exception if the device limit is exceeded instead of the"},{"line_number":14,"context_line":"current behavior of returning a 500 to the user."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The server create API returns a 500 error to the user because any"},{"line_number":17,"context_line":"failure that occurs during instance build in nova-compute will raise"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bfdaf3ff_04747167","line":14,"range":{"start_line":12,"start_character":0,"end_line":14,"end_character":48},"updated":"2019-01-15 21:37:34.000000000","message":"Seems this would be worthwhile to fix as a bug so we could backport it...looks like for the libvirt driver that originates here:\n\nhttps://github.com/openstack/nova/blob/89c2d1056b3f37bad243c7468d974ded71336a0f/nova/virt/libvirt/blockinfo.py#L195\n\nCouldn\u0027t we add a new type of exception (which extends InternalError if we care, or just use your new TooManyDiskDevices) and then handle that in the API layer? Arguably we could re-use InstanceInvalidState which is already handled as a 409 (I\u0027m not sure how much debate went into the decision of 403 vs 409 in the spec review, but 409 also seems legit for this case).\n\nIf we didn\u0027t want to raise something straight from blockinfo.py to the API, we could translate a lower-level exception in https://github.com/openstack/nova/blob/89c2d1056b3f37bad243c7468d974ded71336a0f/nova/compute/manager.py#L1589.\n\nAnyway, just a thought on a way to break this up and handle an existing API 500 error bug which could be backported.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9973e831980476522b835f285a12eb0b1c313b49","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds a new config option to control the maximum number of disk"},{"line_number":10,"context_line":"devices allowed to attach to a single instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It also updates the behavior of the volume attach API to raise a 403"},{"line_number":13,"context_line":"forbidden exception if the device limit is exceeded instead of the"},{"line_number":14,"context_line":"current behavior of returning a 500 to the user."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The server create API returns a 500 error to the user because any"},{"line_number":17,"context_line":"failure that occurs during instance build in nova-compute will raise"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bfdaf3ff_50122f0b","line":14,"range":{"start_line":12,"start_character":0,"end_line":14,"end_character":48},"in_reply_to":"bfdaf3ff_04747167","updated":"2019-01-16 01:01:51.000000000","message":"This is fair, but I guess I didn\u0027t think about fixing it separately since it\u0027s been broken in this way forever.\n\nThere wasn\u0027t any debate on the spec about 403 vs 409 for the error code. I selected 403 because of other \"TooMany\" errors (albeit quota-related) use 403. I don\u0027t have a strong opinion about it.\n\nI can break up this change for backporting, and use 409 instead of 403 if you think it\u0027s worthwhile.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"f4897c34857628651561548cf692883dd135cdce","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds a new config option to control the maximum number of disk"},{"line_number":10,"context_line":"devices allowed to attach to a single instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It also updates the behavior of the volume attach API to raise a 403"},{"line_number":13,"context_line":"forbidden exception if the device limit is exceeded instead of the"},{"line_number":14,"context_line":"current behavior of returning a 500 to the user."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The server create API returns a 500 error to the user because any"},{"line_number":17,"context_line":"failure that occurs during instance build in nova-compute will raise"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bfdaf3ff_f011d1ad","line":14,"range":{"start_line":12,"start_character":0,"end_line":14,"end_character":48},"in_reply_to":"bfdaf3ff_2435e3f7","updated":"2019-01-16 19:31:07.000000000","message":"Without any background, it should be a 409. But given the existing use of 403 for quota overages, it would be very odd to have some quota violations return 403 and others return 409. \nSo my vote would be for consistency over purity, and make this a 403.\nI hope this doesn\u0027t disappoint those who were looking forward to laughing at one of us. I\u0027m sure there will be other occasions.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d43f5c0c0bc0d98d741b5a473b2e36bd947df9b3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds a new config option to control the maximum number of disk"},{"line_number":10,"context_line":"devices allowed to attach to a single instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It also updates the behavior of the volume attach API to raise a 403"},{"line_number":13,"context_line":"forbidden exception if the device limit is exceeded instead of the"},{"line_number":14,"context_line":"current behavior of returning a 500 to the user."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The server create API returns a 500 error to the user because any"},{"line_number":17,"context_line":"failure that occurs during instance build in nova-compute will raise"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bfdaf3ff_ae6f7490","line":14,"range":{"start_line":12,"start_character":0,"end_line":14,"end_character":48},"in_reply_to":"bfdaf3ff_50122f0b","updated":"2019-01-16 15:24:36.000000000","message":"\u003e This is fair, but I guess I didn\u0027t think about fixing it separately since it\u0027s been broken in this way forever.\n\nI thought the same later that given how latent the 500 is I\u0027m not sure if it\u0027s worth the trouble of fixing that separately and trying to backport.\n\n\u003e There wasn\u0027t any debate on the spec about 403 vs 409 for the error code. I selected 403 because of other \"TooMany\" errors (albeit quota-related) use 403. I don\u0027t have a strong opinion about it.\n\nI generally get the opinion of cdent and edleafe when it comes to this due to their involvement in the API SIG. 403 just seems weird to me in this case but it\u0027s not a strong objection.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7fc830adf934ddd5641f6e4ceb35d3ef06f45ef6","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds a new config option to control the maximum number of disk"},{"line_number":10,"context_line":"devices allowed to attach to a single instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It also updates the behavior of the volume attach API to raise a 403"},{"line_number":13,"context_line":"forbidden exception if the device limit is exceeded instead of the"},{"line_number":14,"context_line":"current behavior of returning a 500 to the user."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The server create API returns a 500 error to the user because any"},{"line_number":17,"context_line":"failure that occurs during instance build in nova-compute will raise"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bfdaf3ff_2435e3f7","line":14,"range":{"start_line":12,"start_character":0,"end_line":14,"end_character":48},"in_reply_to":"bfdaf3ff_ae6f7490","updated":"2019-01-16 16:58:04.000000000","message":"Hrmmm. Tricky. I think 409 would be fairly obviously correct if there was some kind of absolute limited inherent to the system that was being broached. However, what\u0027s happened here is that some human has configured the system to say \"this is the max limit we are going to allow\". Which makes it kind of like a quota, but one that applies to everyone.\n\nAnd 403 is what we\u0027ve declared to be just and true for quota violations: http://specs.openstack.org/openstack/api-sig/guidelines/http/response-codes.html#failure-code-clarifications\n\nOn the other hand 409 is \"server won\u0027t do it because there\u0027s a mismatch between what you want to do and what the server can do, if you make a tweak you might be able to get it to work.\"\n\nIf we didn\u0027t already have the quota as 403 precedent, I\u0027d probably choose 409 here, but consistency is valuable too.\n\nWith any luck Ed will respond with something different and we can take which you choose as an implicit vote on which one of us you like better and that one can point and laugh at the other. It\u0027ll be grand.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"65d295ce9baf84a8281b98a36b97eaded7781e68","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds a new config option to control the maximum number of disk"},{"line_number":10,"context_line":"devices allowed to attach to a single instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It also updates the behavior of the volume attach API to raise a 403"},{"line_number":13,"context_line":"forbidden exception if the device limit is exceeded instead of the"},{"line_number":14,"context_line":"current behavior of returning a 500 to the user."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The server create API returns a 500 error to the user because any"},{"line_number":17,"context_line":"failure that occurs during instance build in nova-compute will raise"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bfdaf3ff_3f55e5c6","line":14,"range":{"start_line":12,"start_character":0,"end_line":14,"end_character":48},"in_reply_to":"bfdaf3ff_bf579502","updated":"2019-01-16 22:38:49.000000000","message":"I think it was the vast weight of pre-existing behaviors in openstack apis. The original actions of the api-wg was to document the commonalities in the openstack apis and try to trend things towards some measure of \"the same\".\n\nThen as that stuff matured, it became more oriented towards making the \"correct\" behaviors a bit more well known and documented.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f897c06dd9272dd423d2af1a91b87164fe666869","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds a new config option to control the maximum number of disk"},{"line_number":10,"context_line":"devices allowed to attach to a single instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It also updates the behavior of the volume attach API to raise a 403"},{"line_number":13,"context_line":"forbidden exception if the device limit is exceeded instead of the"},{"line_number":14,"context_line":"current behavior of returning a 500 to the user."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The server create API returns a 500 error to the user because any"},{"line_number":17,"context_line":"failure that occurs during instance build in nova-compute will raise"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bfdaf3ff_bf579502","line":14,"range":{"start_line":12,"start_character":0,"end_line":14,"end_character":48},"in_reply_to":"bfdaf3ff_f011d1ad","updated":"2019-01-16 22:30:38.000000000","message":"Thanks Chris and Ed. I see how 403 is supposed to mean \"you\u0027re never allowed to do this\" whereas 409 means \"you can\u0027t do this right now but may be able to do it, if the state of the system changes\". Given that, I\u0027m not sure why 403 was chosen for quota violations in API SIG land. Seems like 409 would have been more appropriate there.\n\nAnyway, thanks for the help in thinking about this. I\u0027ll stick with 403 for consistency sake.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":13,"context_line":"forbidden exception if the device limit is exceeded instead of the"},{"line_number":14,"context_line":"current behavior of returning a 500 to the user."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The server create API returns a 500 error to the user because any"},{"line_number":17,"context_line":"failure that occurs during instance build in nova-compute will raise"},{"line_number":18,"context_line":"a BuildAbortException, which is treated as a 500."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Part of blueprint conf-max-attach-volumes"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bfdaf3ff_64121d0c","line":18,"range":{"start_line":16,"start_character":0,"end_line":18,"end_character":49},"updated":"2019-01-15 21:37:34.000000000","message":"For server create, wouldn\u0027t we have responded to the user with a 202 by this point? The BuildAbortException in nova-compute is way after we\u0027ve RPC cast from conductor (and the API for that matter), so this comment is invalid.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9973e831980476522b835f285a12eb0b1c313b49","unresolved":false,"context_lines":[{"line_number":13,"context_line":"forbidden exception if the device limit is exceeded instead of the"},{"line_number":14,"context_line":"current behavior of returning a 500 to the user."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The server create API returns a 500 error to the user because any"},{"line_number":17,"context_line":"failure that occurs during instance build in nova-compute will raise"},{"line_number":18,"context_line":"a BuildAbortException, which is treated as a 500."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Part of blueprint conf-max-attach-volumes"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bfdaf3ff_3028cb32","line":18,"range":{"start_line":16,"start_character":0,"end_line":18,"end_character":49},"in_reply_to":"bfdaf3ff_64121d0c","updated":"2019-01-16 01:01:51.000000000","message":"Yes, sorry. I used the word \"return\" loosely meaning that the user will see the 500 error code in the \u0027fault\u0027 field of their server after it falls into ERROR state. I\u0027ll reword this (or remove it if I break up this change for the 500 error returned from the API in the attach volume case).","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4633d0881912b19f8fc5b037c590824740315b4d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"maximum is exceeded during an attach volume request, the request fails"},{"line_number":19,"context_line":"fast in the API with a 403 error."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The configured maximum on the destination is not enforced before cold"},{"line_number":22,"context_line":"migrate because the maximum is enforced in-place only (the destination"},{"line_number":23,"context_line":"is not checked over RPC). The configured maximum is also not enforced"},{"line_number":24,"context_line":"on shelved offloaded servers because they have no compute host, and the"},{"line_number":25,"context_line":"option is implemented at the nova-compute level."},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9fdfeff1_04dbc37b","line":23,"range":{"start_line":21,"start_character":0,"end_line":23,"end_character":25},"updated":"2019-01-29 14:51:54.000000000","message":"Where does the check come into play wrt cold migrate? I\u0027m guessing something in migrate_disk_and_power_off which runs on the source host? Or are you saying during a cold migrate we just don\u0027t check / enforce the maximum on the destination since we don\u0027t rebuild that information from the blockinfo module, i.e. if you start resize with 30 volumes attached then that\u0027s what you get on the destination regardless of configuration.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"}],"doc/source/user/block-device-mapping.rst":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a74b191e984e56b14a8dbf76e0a839e04ad6a257","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"   The maximum limit on the number of disk devices allowed to attach to"},{"line_number":54,"context_line":"   a single server is configurable wth the option"},{"line_number":55,"context_line":"   :oslo.config.option:`compute.max_disk_devices_to_attach`."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Data format and its history"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9fdfeff1_5b9c945c","line":55,"range":{"start_line":55,"start_character":3,"end_line":55,"end_character":23},"updated":"2019-01-24 11:22:52.000000000","message":"this should be \n\n    :oslo.config:option:","commit_id":"ced9a92117946ab8fa544540fe8f3b6ede76665d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"cfcd8d8f5b125c7c3f3134ab1ae557e0f3bef98c","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"   The maximum limit on the number of disk devices allowed to attach to"},{"line_number":54,"context_line":"   a single server is configurable wth the option"},{"line_number":55,"context_line":"   :oslo.config.option:`compute.max_disk_devices_to_attach`."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Data format and its history"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9fdfeff1_43502a33","line":55,"range":{"start_line":55,"start_character":3,"end_line":55,"end_character":23},"in_reply_to":"9fdfeff1_5b9c945c","updated":"2019-01-24 16:17:49.000000000","message":"A-ha, thank you.","commit_id":"ced9a92117946ab8fa544540fe8f3b6ede76665d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4633d0881912b19f8fc5b037c590824740315b4d","unresolved":false,"context_lines":[{"line_number":48,"context_line":"   virt driver code). We will refer to this format as \u0027Driver BDMs\u0027 from now"},{"line_number":49,"context_line":"   on."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":".. note::"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"   The maximum limit on the number of disk devices allowed to attach to"},{"line_number":54,"context_line":"   a single server is configurable wth the option"}],"source_content_type":"text/x-rst","patch_set":11,"id":"9fdfeff1_84d8137b","line":51,"updated":"2019-01-29 14:51:54.000000000","message":"nit: this might fit more naturally in the \"Intermezzo - problem with device names\" section below.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"035a353293bccf539930976aca6b69aa4da61b70","unresolved":false,"context_lines":[{"line_number":48,"context_line":"   virt driver code). We will refer to this format as \u0027Driver BDMs\u0027 from now"},{"line_number":49,"context_line":"   on."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":".. note::"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"   The maximum limit on the number of disk devices allowed to attach to"},{"line_number":54,"context_line":"   a single server is configurable wth the option"}],"source_content_type":"text/x-rst","patch_set":11,"id":"9fdfeff1_a719997a","line":51,"in_reply_to":"9fdfeff1_84d8137b","updated":"2019-01-29 15:22:35.000000000","message":"Actually I don\u0027t know, so I\u0027ll just leave this here. I guess we could add an \"Other\" section or something for things that don\u0027t fit nicely into the existing sections.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"caeb07977a14dfafa269a0b61471f34fe5d98d68","unresolved":false,"context_lines":[{"line_number":51,"context_line":".. note::"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"   The maximum limit on the number of disk devices allowed to attach to"},{"line_number":54,"context_line":"   a single server is configurable wth the option"},{"line_number":55,"context_line":"   :oslo.config:option:`compute.max_disk_devices_to_attach`."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"9fdfeff1_05540b20","line":54,"range":{"start_line":54,"start_character":35,"end_line":54,"end_character":38},"updated":"2019-01-30 15:41:11.000000000","message":"nit: with","commit_id":"ff4c7959b06425cf39f4fcd1111de589ad5d4ff3"}],"doc/source/user/launch-instance-from-volume.rst":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"caeb07977a14dfafa269a0b61471f34fe5d98d68","unresolved":false,"context_lines":[{"line_number":42,"context_line":".. note::"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"   The maximum limit on the number of disk devices allowed to attach to"},{"line_number":45,"context_line":"   a single server is configurable wth the option"},{"line_number":46,"context_line":"   :oslo.config:option:`compute.max_disk_devices_to_attach`."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":".. _Boot_instance_from_image_and_attach_non-bootable_volume:"}],"source_content_type":"text/x-rst","patch_set":12,"id":"9fdfeff1_653877ed","line":45,"range":{"start_line":45,"start_character":35,"end_line":45,"end_character":38},"updated":"2019-01-30 15:41:11.000000000","message":"nit: with","commit_id":"ff4c7959b06425cf39f4fcd1111de589ad5d4ff3"}],"nova/api/openstack/compute/volumes.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                exception.MultiattachToShelvedNotSupported) as e:"},{"line_number":354,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":355,"context_line":"        except exception.TooManyDiskDevices as e:"},{"line_number":356,"context_line":"            raise exc.HTTPForbidden(explanation\u003de.format_message())"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"        # The attach is async"},{"line_number":359,"context_line":"        attachment \u003d {}"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_e4160df2","line":356,"range":{"start_line":356,"start_character":22,"end_line":356,"end_character":35},"updated":"2019-01-15 21:37:34.000000000","message":"How much thought went into this over a 409? 403 means you\u0027re not allowed to do something, whereas 409 means you can do the thing just not in the current state of the system (which in this case is because there are too many volumes attached to the server), so the user could detach other volumes if necessary to \"make room\", or contact their cloud support team to increase the amount of devices they need attached to their server...","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9973e831980476522b835f285a12eb0b1c313b49","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                exception.MultiattachToShelvedNotSupported) as e:"},{"line_number":354,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":355,"context_line":"        except exception.TooManyDiskDevices as e:"},{"line_number":356,"context_line":"            raise exc.HTTPForbidden(explanation\u003de.format_message())"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"        # The attach is async"},{"line_number":359,"context_line":"        attachment \u003d {}"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_d0161ff2","line":356,"range":{"start_line":356,"start_character":22,"end_line":356,"end_character":35},"in_reply_to":"bfdaf3ff_e4160df2","updated":"2019-01-16 01:01:51.000000000","message":"I did this based on other \"TooMany\" errors, like for quota. TooManyInstances, for example. Isn\u0027t that also a state-related \"you can\u0027t do this?\" I don\u0027t have a strong opinion on what code to use, just that I thought 403 is consistent with the other \"you can\u0027t do this until you make room\" error codes that I\u0027m aware of.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"}],"nova/block_device.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ce9bccb8536b07ec43f403044b27309ea4d67355","unresolved":false,"context_lines":[{"line_number":524,"context_line":"       i.e."},{"line_number":525,"context_line":"       index \u003d     0,   1,..., 18277"},{"line_number":526,"context_line":"       results \u003d a, b,..., zzz"},{"line_number":527,"context_line":"    \"\"\""},{"line_number":528,"context_line":"    base \u003d ord(\u0027z\u0027) - ord(\u0027a\u0027) + 1"},{"line_number":529,"context_line":"    unitdevname \u003d \"\""},{"line_number":530,"context_line":"    while index \u003e\u003d 0:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dfd5e7cf_7b1e660d","line":527,"updated":"2019-01-08 16:47:57.000000000","message":"I think this change should be done in the previous patch that introduce generate_device_name()","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"040962d27c3a43cfaf6932d56bb2b23b9e69f7f2","unresolved":false,"context_lines":[{"line_number":524,"context_line":"       i.e."},{"line_number":525,"context_line":"       index \u003d     0,   1,..., 18277"},{"line_number":526,"context_line":"       results \u003d a, b,..., zzz"},{"line_number":527,"context_line":"    \"\"\""},{"line_number":528,"context_line":"    base \u003d ord(\u0027z\u0027) - ord(\u0027a\u0027) + 1"},{"line_number":529,"context_line":"    unitdevname \u003d \"\""},{"line_number":530,"context_line":"    while index \u003e\u003d 0:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_22cc1a69","line":527,"in_reply_to":"bfdaf3ff_c29e6eb7","updated":"2019-01-15 05:10:25.000000000","message":"(later) The other method \u0027generate_device_name\u0027 wasn\u0027t used yet in the previous patch either, so now I see what you mean to be consistent with that. I will move this to the previous patch.","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6d6ebf3d64e7d77b09a7edafb3aa5c1b3550134e","unresolved":false,"context_lines":[{"line_number":524,"context_line":"       i.e."},{"line_number":525,"context_line":"       index \u003d     0,   1,..., 18277"},{"line_number":526,"context_line":"       results \u003d a, b,..., zzz"},{"line_number":527,"context_line":"    \"\"\""},{"line_number":528,"context_line":"    base \u003d ord(\u0027z\u0027) - ord(\u0027a\u0027) + 1"},{"line_number":529,"context_line":"    unitdevname \u003d \"\""},{"line_number":530,"context_line":"    while index \u003e\u003d 0:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_c29e6eb7","line":527,"in_reply_to":"dfd5e7cf_7b1e660d","updated":"2019-01-15 04:47:07.000000000","message":"OK, I had been thinking not to introduce this \u0027generate_device_letter\u0027 method until it is used. But I can move it if everyone thinks that makes more sense.","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":1600,"context_line":"        \"\"\"Verify that all the devices have the device_name set. If not,"},{"line_number":1601,"context_line":"        provide a default name."},{"line_number":1602,"context_line":""},{"line_number":1603,"context_line":"        It also ensures that there is a root_device_name and is set to the"},{"line_number":1604,"context_line":"        first block device in the boot sequence (boot_index\u003d0)."},{"line_number":1605,"context_line":"        \"\"\""},{"line_number":1606,"context_line":"        root_bdm \u003d block_device.get_root_bdm(block_devices)"},{"line_number":1607,"context_line":"        if not root_bdm:"},{"line_number":1608,"context_line":"            return"},{"line_number":1609,"context_line":""},{"line_number":1610,"context_line":"        # Get the root_device_name from the root BDM or the instance"},{"line_number":1611,"context_line":"        root_device_name \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_84a141ac","line":1608,"range":{"start_line":1603,"start_character":8,"end_line":1608,"end_character":18},"updated":"2019-01-15 21:37:34.000000000","message":"Heh, the comment doesn\u0027t seem to align with the code here. This was written in 2013 though so I\u0027m not sure what the thought process was at the time (ndipanov wouldn\u0027t be around to answer).","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a635db7268cb312c5c00aa542f7005092fefeede","unresolved":false,"context_lines":[{"line_number":1644,"context_line":"        # booting from an image-backed volume). So, this means we will not"},{"line_number":1645,"context_line":"        # create any volumes if we exceed the configured maximum number of"},{"line_number":1646,"context_line":"        # disk devices allowed to attach to a single instance."},{"line_number":1647,"context_line":"        self._default_device_names_for_instance(instance,"},{"line_number":1648,"context_line":"                                                root_device_name,"},{"line_number":1649,"context_line":"                                                ephemerals,"},{"line_number":1650,"context_line":"                                                swap,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_0fe7afe6","line":1647,"updated":"2019-01-15 19:22:42.000000000","message":"Note: if we raise TooManyDiskDevices here, it will propagate up to _build_resources.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":1644,"context_line":"        # booting from an image-backed volume). So, this means we will not"},{"line_number":1645,"context_line":"        # create any volumes if we exceed the configured maximum number of"},{"line_number":1646,"context_line":"        # disk devices allowed to attach to a single instance."},{"line_number":1647,"context_line":"        self._default_device_names_for_instance(instance,"},{"line_number":1648,"context_line":"                                                root_device_name,"},{"line_number":1649,"context_line":"                                                ephemerals,"},{"line_number":1650,"context_line":"                                                swap,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_2479752e","line":1647,"in_reply_to":"bfdaf3ff_0fe7afe6","updated":"2019-01-15 21:37:34.000000000","message":"Hmm, interesting that we call both _default_block_device_names and _add_missing_dev_names (from _prep_block_device) - I\u0027m not sure why we need both, but they\u0027ve been around forever. This method exits early if there is no root BDM, but I think by the time we get here we always have one even for image-backed servers because I believe the API creates a root BDM in that case with source_type\u003dimage and destination_type\u003dlocal:\n\nhttps://github.com/openstack/nova/blob/89c2d1056b3f37bad243c7468d974ded71336a0f/nova/block_device.py#L369\n\nhttps://github.com/openstack/nova/blob/89c2d1056b3f37bad243c7468d974ded71336a0f/nova/block_device.py#L267\n\nAnyway, yeah, weird, probably inefficient, very legacy, tightly coupled and likely very brittle to change anything at this point.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9973e831980476522b835f285a12eb0b1c313b49","unresolved":false,"context_lines":[{"line_number":1644,"context_line":"        # booting from an image-backed volume). So, this means we will not"},{"line_number":1645,"context_line":"        # create any volumes if we exceed the configured maximum number of"},{"line_number":1646,"context_line":"        # disk devices allowed to attach to a single instance."},{"line_number":1647,"context_line":"        self._default_device_names_for_instance(instance,"},{"line_number":1648,"context_line":"                                                root_device_name,"},{"line_number":1649,"context_line":"                                                ephemerals,"},{"line_number":1650,"context_line":"                                                swap,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_70d3b339","line":1647,"in_reply_to":"bfdaf3ff_2479752e","updated":"2019-01-16 01:01:51.000000000","message":"Yup... I realized the same thing and have the same thoughts as you.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a635db7268cb312c5c00aa542f7005092fefeede","unresolved":false,"context_lines":[{"line_number":1688,"context_line":"            # booting from an image-backed volume). So, this means we will not"},{"line_number":1689,"context_line":"            # create any volumes if we exceed the configured maximum number of"},{"line_number":1690,"context_line":"            # disk devices allowed to attach to a single instance."},{"line_number":1691,"context_line":"            self._add_missing_dev_names(bdms, instance)"},{"line_number":1692,"context_line":"            block_device_info \u003d driver.get_block_device_info(instance, bdms)"},{"line_number":1693,"context_line":"            mapping \u003d driver.block_device_info_get_mapping(block_device_info)"},{"line_number":1694,"context_line":"            driver_block_device.attach_block_devices("}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_0f000f67","line":1691,"updated":"2019-01-15 19:22:42.000000000","message":"Note: if we raise TooManyDiskDevices here, we will raise InvalidBDM up to _build_resources.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":1688,"context_line":"            # booting from an image-backed volume). So, this means we will not"},{"line_number":1689,"context_line":"            # create any volumes if we exceed the configured maximum number of"},{"line_number":1690,"context_line":"            # disk devices allowed to attach to a single instance."},{"line_number":1691,"context_line":"            self._add_missing_dev_names(bdms, instance)"},{"line_number":1692,"context_line":"            block_device_info \u003d driver.get_block_device_info(instance, bdms)"},{"line_number":1693,"context_line":"            mapping \u003d driver.block_device_info_get_mapping(block_device_info)"},{"line_number":1694,"context_line":"            driver_block_device.attach_block_devices("}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_04cc7168","line":1691,"in_reply_to":"bfdaf3ff_0f000f67","updated":"2019-01-15 21:37:34.000000000","message":"Point being InvalidBDM is handled in _build_resources and will raise BuildAbortException with the specific TooManyDiskDevices  error message which goes into an instance fault so the user can see why it failed.\n\nTechnically for boot from volume, one could argue that we could reschedule in this case and potentially hit another compute that is configured with a higher number of max devices, but currently we don\u0027t reschedule on _prep_block_device failures and adding that support in is a bigger change.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a635db7268cb312c5c00aa542f7005092fefeede","unresolved":false,"context_lines":[{"line_number":1711,"context_line":"            # booting from volume, and will be recorded as an instance fault."},{"line_number":1712,"context_line":"            # Maintain the original exception message which most likely has"},{"line_number":1713,"context_line":"            # useful details which the standard InvalidBDM error message lacks."},{"line_number":1714,"context_line":"            raise exception.InvalidBDM(six.text_type(ex))"},{"line_number":1715,"context_line":""},{"line_number":1716,"context_line":"    def _update_instance_after_spawn(self, context, instance):"},{"line_number":1717,"context_line":"        instance.power_state \u003d self._get_power_state(context, instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_4f2b77ea","line":1714,"updated":"2019-01-15 19:22:42.000000000","message":"This is how TooManyDiskDevices gets converted to InvalidBDM.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"11de05a733e0ac6bcd5ef7a0139fb86d865c760e","unresolved":false,"context_lines":[{"line_number":1711,"context_line":"            # booting from volume, and will be recorded as an instance fault."},{"line_number":1712,"context_line":"            # Maintain the original exception message which most likely has"},{"line_number":1713,"context_line":"            # useful details which the standard InvalidBDM error message lacks."},{"line_number":1714,"context_line":"            raise exception.InvalidBDM(six.text_type(ex))"},{"line_number":1715,"context_line":""},{"line_number":1716,"context_line":"    def _update_instance_after_spawn(self, context, instance):"},{"line_number":1717,"context_line":"        instance.power_state \u003d self._get_power_state(context, instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_96d63ec3","line":1714,"in_reply_to":"bfdaf3ff_44e7d9e5","updated":"2019-01-16 20:23:03.000000000","message":"Yeah, OK. In either case, the error code in the server fault will be 500 because BuildAbortException is the last exception in the chain.\n\n1) I thought it might be weird/unexpected to have a Forbidden exception derive from a Invalid one. 2) I thought it might be best to have consistency in what\u0027s raised from methods that encountered TooManyDiskDevices (TooManyDiskDevices vs conversion to InvalidBDM) but maybe I\u0027m overthinking it.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"be4f7459c9b29d98ca556a19b25c32daf587c5db","unresolved":false,"context_lines":[{"line_number":1711,"context_line":"            # booting from volume, and will be recorded as an instance fault."},{"line_number":1712,"context_line":"            # Maintain the original exception message which most likely has"},{"line_number":1713,"context_line":"            # useful details which the standard InvalidBDM error message lacks."},{"line_number":1714,"context_line":"            raise exception.InvalidBDM(six.text_type(ex))"},{"line_number":1715,"context_line":""},{"line_number":1716,"context_line":"    def _update_instance_after_spawn(self, context, instance):"},{"line_number":1717,"context_line":"        instance.power_state \u003d self._get_power_state(context, instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_af4a23a9","line":1714,"in_reply_to":"bfdaf3ff_4f2b77ea","updated":"2019-01-15 19:27:53.000000000","message":"Maybe I should just catch TooManyDiskDevices in a separate block and re-raise it, to avoid confusion. I wasn\u0027t sure about making TooManyDiskDevices extend InvalidBDM because Invalid is a 400 and TooMany is a 403 and I wasn\u0027t sure if that would be confusing or a bad fit.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":1711,"context_line":"            # booting from volume, and will be recorded as an instance fault."},{"line_number":1712,"context_line":"            # Maintain the original exception message which most likely has"},{"line_number":1713,"context_line":"            # useful details which the standard InvalidBDM error message lacks."},{"line_number":1714,"context_line":"            raise exception.InvalidBDM(six.text_type(ex))"},{"line_number":1715,"context_line":""},{"line_number":1716,"context_line":"    def _update_instance_after_spawn(self, context, instance):"},{"line_number":1717,"context_line":"        instance.power_state \u003d self._get_power_state(context, instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_44e7d9e5","line":1714,"in_reply_to":"bfdaf3ff_af4a23a9","updated":"2019-01-15 21:37:34.000000000","message":"For the server create case (or rebuild - which uses _prep_block_device) I\u0027m not sure the internal code on the exception matters. In the attach case, we don\u0027t hit this code, and the API handles TooManyDiskDevices and can send whatever error response code back it wants to, be that 400, 403 or 409.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":2332,"context_line":"                self.driver.failed_spawn_cleanup(instance)"},{"line_number":2333,"context_line":"        except (exception.UnexpectedTaskStateError,"},{"line_number":2334,"context_line":"                exception.OverQuota, exception.InvalidBDM,"},{"line_number":2335,"context_line":"                exception.TooManyDiskDevices) as e:"},{"line_number":2336,"context_line":"            # Make sure the async call finishes"},{"line_number":2337,"context_line":"            if network_info is not None:"},{"line_number":2338,"context_line":"                network_info.wait(do_raise\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_44b279e8","line":2335,"range":{"start_line":2335,"start_character":26,"end_line":2335,"end_character":44},"updated":"2019-01-15 21:37:34.000000000","message":"I guess we need this because of _default_block_device_names raising TooManyDiskDevices. If TooManyDiskDevices extended InvalidBDM then we could just get this handling for free, but it\u0027s a nit. Might be better (saner) to have the more explicit exception type getting handled.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"11de05a733e0ac6bcd5ef7a0139fb86d865c760e","unresolved":false,"context_lines":[{"line_number":2332,"context_line":"                self.driver.failed_spawn_cleanup(instance)"},{"line_number":2333,"context_line":"        except (exception.UnexpectedTaskStateError,"},{"line_number":2334,"context_line":"                exception.OverQuota, exception.InvalidBDM,"},{"line_number":2335,"context_line":"                exception.TooManyDiskDevices) as e:"},{"line_number":2336,"context_line":"            # Make sure the async call finishes"},{"line_number":2337,"context_line":"            if network_info is not None:"},{"line_number":2338,"context_line":"                network_info.wait(do_raise\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_76d15afb","line":2335,"range":{"start_line":2335,"start_character":26,"end_line":2335,"end_character":44},"in_reply_to":"bfdaf3ff_44b279e8","updated":"2019-01-16 20:23:03.000000000","message":"Correct, this is needed because of _default_block_device_names raising TooManyDiskDevices.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":5419,"context_line":"            # we exceed the configured maximum allowed, via"},{"line_number":5420,"context_line":"            # get_device_name_for_instance. The reserve_block_device_name"},{"line_number":5421,"context_line":"            # method is a synchronous RPC call from the API as part of the"},{"line_number":5422,"context_line":"            # attach_volume flow, so if we exceed the configured maximum here,"},{"line_number":5423,"context_line":"            # we will fail fast in the API."},{"line_number":5424,"context_line":"            new_bdm.device_name \u003d self._get_device_name_for_instance("},{"line_number":5425,"context_line":"                    instance, bdms, new_bdm)"},{"line_number":5426,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_a409e595","line":5423,"range":{"start_line":5422,"start_character":12,"end_line":5423,"end_character":43},"updated":"2019-01-15 21:37:34.000000000","message":"Unless of course we\u0027re attaching a volume to a shelved offloaded server, in which case the BDM is created in the API (reserve_block_device_name is not called because the instance doesn\u0027t have a host to call), and that means we\u0027d fail the configured max check only on unshelve when _prep_block_device is called during unshelve. Just FYI...","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66b9eb40f55ee16999f448a86db8c056d9c09ea8","unresolved":false,"context_lines":[{"line_number":1578,"context_line":"        :raises: InternalError, TooManyDiskDevices"},{"line_number":1579,"context_line":"        \"\"\""},{"line_number":1580,"context_line":"        try:"},{"line_number":1581,"context_line":"            return self.driver.default_root_device_name(instance,"},{"line_number":1582,"context_line":"                                                        image_meta,"},{"line_number":1583,"context_line":"                                                        root_bdm)"},{"line_number":1584,"context_line":"        except NotImplementedError:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_246a87ec","line":1581,"range":{"start_line":1581,"start_character":31,"end_line":1581,"end_character":55},"updated":"2019-01-29 15:09:10.000000000","message":"Adding the raises to the driver interface docstring would be good.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66b9eb40f55ee16999f448a86db8c056d9c09ea8","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"        :raises: InternalError, TooManyDiskDevices"},{"line_number":1598,"context_line":"        \"\"\""},{"line_number":1599,"context_line":"        try:"},{"line_number":1600,"context_line":"            self.driver.default_device_names_for_instance(instance,"},{"line_number":1601,"context_line":"                                                          root_device_name,"},{"line_number":1602,"context_line":"                                                          *block_device_lists)"},{"line_number":1603,"context_line":"        except NotImplementedError:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_64640f23","line":1600,"range":{"start_line":1600,"start_character":24,"end_line":1600,"end_character":57},"updated":"2019-01-29 15:09:10.000000000","message":"Putting the docstring on the driver interface would also be good.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66b9eb40f55ee16999f448a86db8c056d9c09ea8","unresolved":false,"context_lines":[{"line_number":1620,"context_line":"        # NOTE(ndipanov): Copy obj to avoid changing the original"},{"line_number":1621,"context_line":"        block_device_obj \u003d block_device_obj.obj_clone()"},{"line_number":1622,"context_line":"        try:"},{"line_number":1623,"context_line":"            return self.driver.get_device_name_for_instance("},{"line_number":1624,"context_line":"                instance, bdms, block_device_obj)"},{"line_number":1625,"context_line":"        except NotImplementedError:"},{"line_number":1626,"context_line":"            return compute_utils.get_device_name_for_instance("}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_a47d17b3","line":1623,"range":{"start_line":1623,"start_character":31,"end_line":1623,"end_character":59},"updated":"2019-01-29 15:09:10.000000000","message":"Same - would be good to add the TooManyDiskDevices raises to the docstring for this driver interface.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"}],"nova/compute/utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"59ba2947fc8bc25233987aa21a0b7f1fce0a0fe9","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            used_letters.add(\u0027c\u0027)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    if not req_letter:"},{"line_number":204,"context_line":"        check_max_disk_devices_to_attach(len(used_letters) + 1)"},{"line_number":205,"context_line":"        req_letter \u003d _get_unused_letter(used_letters)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    if req_letter in used_letters:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_edff18ae","line":204,"updated":"2018-12-12 16:31:13.000000000","message":"I don\u0027t think this will cut it for the libvirt driver during boot from volume.\n\nWe get close to this code during bfv here:\n\nhttps://github.com/openstack/nova/blob/ba163cd5fd3e6ea9a42f0b8082e8e096885f0c57/nova/compute/manager.py#L1682\n\nbut if the bdm has a device_name specified, we skip that one:\n\nhttps://github.com/openstack/nova/blob/ba163cd5fd3e6ea9a42f0b8082e8e096885f0c57/nova/compute/manager.py#L1670\n\nfurthermore, if the bdm doesn\u0027t have a device_name set, we\u0027d call the driver:\n\nhttps://github.com/openstack/nova/blob/ba163cd5fd3e6ea9a42f0b8082e8e096885f0c57/nova/compute/manager.py#L1598\n\nand the libvirt driver implements that method:\n\nhttps://github.com/openstack/nova/blob/ba163cd5fd3e6ea9a42f0b8082e8e096885f0c57/nova/virt/libvirt/driver.py#L8984\n\nSo you should definitely set the max to like 1 and then try to bfv with 2 bdms with devstack and libvirt and make sure I\u0027m not missing something, but if you can do that and it doesn\u0027t fail, it\u0027s likely because _prep_block_device isn\u0027t hitting this code path during bfv so we\u0027re not enforcing the limit.","commit_id":"97865392e4d22960a455901a5428a9995b93c90e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"21e6c665d255e6cdc84dbbe8a422293cdaba42be","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            used_letters.add(\u0027c\u0027)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    if not req_letter:"},{"line_number":204,"context_line":"        check_max_disk_devices_to_attach(len(used_letters) + 1)"},{"line_number":205,"context_line":"        req_letter \u003d _get_unused_letter(used_letters)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    if req_letter in used_letters:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_be737da2","line":204,"in_reply_to":"3f79a3b5_edff18ae","updated":"2018-12-13 00:15:56.000000000","message":"Adding a note here that I did some tests with devstack and the test scenario with max\u003d1 and bfv with 2 bdms did fail from hitting the new limit code in this patch. The instance fell into ERROR state with \"Failure prepping block device.\" for the instance.fault.\n\nI\u0027m adding a patch underneath these to augment the BuildAbortException message which ends up in the instance.fault, so that it tells what actually failed inside _prep_block_device.\n\nNext step, I\u0027m going to get the func tests for this written and added to this patch. Going to rebase this first to get it out of merge conflict for now.","commit_id":"97865392e4d22960a455901a5428a9995b93c90e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6d6ebf3d64e7d77b09a7edafb3aa5c1b3550134e","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    fault_obj.create()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"def get_device_name_for_instance(instance, bdms, device):"},{"line_number":115,"context_line":"    \"\"\"Validates (or generates) a device name for instance."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    This method is a wrapper for get_next_device_name that gets the list"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_c2874e61","line":114,"updated":"2019-01-15 04:47:07.000000000","message":"This is a method that drivers can override (see nova/compute/manager.py).","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6d6ebf3d64e7d77b09a7edafb3aa5c1b3550134e","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def default_device_names_for_instance(instance, root_device_name,"},{"line_number":126,"context_line":"                                      *block_device_lists):"},{"line_number":127,"context_line":"    \"\"\"Generate missing device names for an instance.\"\"\""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    dev_list \u003d [bdm.device_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_627ea26c","line":126,"updated":"2019-01-15 04:47:07.000000000","message":"This is a method that drivers can override (see nova/compute/manager.py).","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ce9bccb8536b07ec43f403044b27309ea4d67355","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        if flavor.swap:"},{"line_number":205,"context_line":"            used_letters.add(\u0027c\u0027)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    if not req_letter:"},{"line_number":208,"context_line":"        check_max_disk_devices_to_attach(len(used_letters) + 1)"},{"line_number":209,"context_line":"        req_letter \u003d _get_unused_letter(used_letters)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"dfd5e7cf_7b9f4650","line":207,"updated":"2019-01-08 16:47:57.000000000","message":"Why don\u0027t we check the number of disks if req_letter has already been set at this point?","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6d6ebf3d64e7d77b09a7edafb3aa5c1b3550134e","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        if flavor.swap:"},{"line_number":205,"context_line":"            used_letters.add(\u0027c\u0027)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    if not req_letter:"},{"line_number":208,"context_line":"        check_max_disk_devices_to_attach(len(used_letters) + 1)"},{"line_number":209,"context_line":"        req_letter \u003d _get_unused_letter(used_letters)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_e21cd26b","line":207,"in_reply_to":"dfd5e7cf_7b9f4650","updated":"2019-01-15 04:47:07.000000000","message":"Hm, I think I made a mistake here. I think it should be checked either way. Will fix.","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"960f17ada4fde04fc9dcb4f836d0130ed58191d9","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            used_letters.add(\u0027c\u0027)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    if not req_letter:"},{"line_number":208,"context_line":"        check_max_disk_devices_to_attach(len(used_letters) + 1)"},{"line_number":209,"context_line":"        req_letter \u003d _get_unused_letter(used_letters)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    if req_letter in used_letters:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f769fc5_f3463022","line":208,"updated":"2018-12-21 23:48:41.000000000","message":"The reason why here doesn\u0027t consider the type \u0027ide\u0027 (which maximum number is fixed with 4 without configuration in this patch) is this method is not called in \u0027ide\u0027 condition, right?","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6d6ebf3d64e7d77b09a7edafb3aa5c1b3550134e","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            used_letters.add(\u0027c\u0027)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    if not req_letter:"},{"line_number":208,"context_line":"        check_max_disk_devices_to_attach(len(used_letters) + 1)"},{"line_number":209,"context_line":"        req_letter \u003d _get_unused_letter(used_letters)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    if req_letter in used_letters:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_223c1ac7","line":208,"in_reply_to":"1f769fc5_f3463022","updated":"2019-01-15 04:47:07.000000000","message":"This method is not called if the driver is \u0027libvirt\u0027 (which is where the maximum number is fixed with 4 for \u0027ide\u0027). This method is the default implementation, which will be called if the driver has not overridden the methods called default_device_names_for_instance\u0027 or \u0027default_device_names_for_instance\u0027. The other drivers (hyperv, powervm, xenapi, etc) call these compute/utils default methods.","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    name is valid but applicable to a different backend (for example"},{"line_number":162,"context_line":"    /dev/vdc is specified but the backend uses /dev/xvdc), the device"},{"line_number":163,"context_line":"    name will be converted to the appropriate format."},{"line_number":164,"context_line":"    \"\"\""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    req_prefix \u003d None"},{"line_number":167,"context_line":"    req_letter \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_440ef98d","line":164,"updated":"2019-01-15 21:37:34.000000000","message":"nit: might want to add a short blurb about this method also doing max device validation.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"}],"nova/conf/compute.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"e7ff0b061e222aa407ff477ffbca193fe8577336","unresolved":false,"context_lines":[{"line_number":803,"context_line":"        default\u003d-1,"},{"line_number":804,"context_line":"        min\u003d-1,"},{"line_number":805,"context_line":"        help\u003d\"\"\""},{"line_number":806,"context_line":"Maximum number of disk devices allowed to attach to a single instance."},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"Possible values:"},{"line_number":809,"context_line":"* Negative integer means unlimited"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_f43d02ba","line":806,"updated":"2018-12-20 14:22:41.000000000","message":"Perhaps adding a small note to inform operators that the number of disks supported by instance depends of the bus used, and perhaps we could refer the hw_disk_bus option.","commit_id":"1f10b84a8690c7bf0146e180329d3dffcfcc4730"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d150306651bbf91b0e7d889ed03ac05baad03fc2","unresolved":false,"context_lines":[{"line_number":803,"context_line":"        default\u003d-1,"},{"line_number":804,"context_line":"        min\u003d-1,"},{"line_number":805,"context_line":"        help\u003d\"\"\""},{"line_number":806,"context_line":"Maximum number of disk devices allowed to attach to a single instance."},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"Possible values:"},{"line_number":809,"context_line":"* Negative integer means unlimited"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_ba91b0f8","line":806,"in_reply_to":"3f79a3b5_f43d02ba","updated":"2018-12-20 19:16:15.000000000","message":"Sure, can do.","commit_id":"1f10b84a8690c7bf0146e180329d3dffcfcc4730"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a1f00e88779277dc0c524f3178a864fc236d2f2","unresolved":false,"context_lines":[{"line_number":812,"context_line":"Possible values:"},{"line_number":813,"context_line":"* Negative integer means unlimited"},{"line_number":814,"context_line":"* Any integer \u003e\u003d 0 represents the maximum allowed"},{"line_number":815,"context_line":"\"\"\"),"},{"line_number":816,"context_line":"]"},{"line_number":817,"context_line":""},{"line_number":818,"context_line":"interval_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_e1de94d5","line":815,"updated":"2018-12-21 09:29:35.000000000","message":"++ Thanks","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":803,"context_line":"too high then response time suffers."},{"line_number":804,"context_line":"The default value of 0 means no limit."},{"line_number":805,"context_line":" \"\"\"),"},{"line_number":806,"context_line":"    cfg.IntOpt(\u0027max_disk_devices_to_attach\u0027,"},{"line_number":807,"context_line":"        default\u003d-1,"},{"line_number":808,"context_line":"        min\u003d-1,"},{"line_number":809,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_b76355dc","line":806,"updated":"2019-01-15 21:37:34.000000000","message":"I think you\u0027d want to mention in here that operators should be careful about changing this on a compute service that is hosting instances because that could cause rebuilds to fail (rebuild on the compute calls _prep_block_device which will do the max check, so if I\u0027ve got an existing server with 26 volumes attached, the operator thinks 20 is a good max number for some reason, and then I rebuild my server, it\u0027s going to fail - similarly but probably less annoying to the user would be if evacuation fails because moving from one host to another fails because the target host is configured with a lower number).\n\nNow that I\u0027m thinking about evacuate (move operations), I don\u0027t see anything in here that enforces this for migrate operations so I could create a server with let\u0027s say 25 volumes on host A, and then be migrated to host B which is configured with max\u003d10, and it would work even though my server is violating that constraint. Granted, if you\u0027re going to set this ever, you\u0027re probably going to do it universally, or at least on hosts with similar hardware and grouped into aggregates or something similar, so it\u0027s less of a concern. I could just see someone reporting a bug about that in the future.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f338720195b405aed200373b922c5dd1777b058c","unresolved":false,"context_lines":[{"line_number":803,"context_line":"too high then response time suffers."},{"line_number":804,"context_line":"The default value of 0 means no limit."},{"line_number":805,"context_line":" \"\"\"),"},{"line_number":806,"context_line":"    cfg.IntOpt(\u0027max_disk_devices_to_attach\u0027,"},{"line_number":807,"context_line":"        default\u003d-1,"},{"line_number":808,"context_line":"        min\u003d-1,"},{"line_number":809,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_f7f9dd7f","line":806,"in_reply_to":"bfdaf3ff_77064d89","updated":"2019-01-15 21:50:54.000000000","message":"\u003e Might also be worth trying to work this into https://docs.openstack.org/nova/latest/user/launch-instance-from-volume.html\n \u003e somehow, just as a note that there can be a configured limit on the\n \u003e number of devices that can be attached to a server on any given\n \u003e compute host (and link to the option in the docs). I\u0027ve been trying\n \u003e to incorporate config options into the docs where appropriate as\n \u003e much as possible lately since it\u0027s hard to find the options (and\n \u003e context) by just reading through the config option docs with a\n \u003e billion options listed.\n\nAlternatively: https://docs.openstack.org/nova/latest/user/block-device-mapping.html","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fb6898de23ce31a1790db16cf20442b23e264afc","unresolved":false,"context_lines":[{"line_number":803,"context_line":"too high then response time suffers."},{"line_number":804,"context_line":"The default value of 0 means no limit."},{"line_number":805,"context_line":" \"\"\"),"},{"line_number":806,"context_line":"    cfg.IntOpt(\u0027max_disk_devices_to_attach\u0027,"},{"line_number":807,"context_line":"        default\u003d-1,"},{"line_number":808,"context_line":"        min\u003d-1,"},{"line_number":809,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_77064d89","line":806,"in_reply_to":"bfdaf3ff_b76355dc","updated":"2019-01-15 21:49:59.000000000","message":"Might also be worth trying to work this into https://docs.openstack.org/nova/latest/user/launch-instance-from-volume.html somehow, just as a note that there can be a configured limit on the number of devices that can be attached to a server on any given compute host (and link to the option in the docs). I\u0027ve been trying to incorporate config options into the docs where appropriate as much as possible lately since it\u0027s hard to find the options (and context) by just reading through the config option docs with a billion options listed.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d17edc0f936559be011e13aad9eecfc26f5b1f8c","unresolved":false,"context_lines":[{"line_number":803,"context_line":"too high then response time suffers."},{"line_number":804,"context_line":"The default value of 0 means no limit."},{"line_number":805,"context_line":" \"\"\"),"},{"line_number":806,"context_line":"    cfg.IntOpt(\u0027max_disk_devices_to_attach\u0027,"},{"line_number":807,"context_line":"        default\u003d-1,"},{"line_number":808,"context_line":"        min\u003d-1,"},{"line_number":809,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_8909adde","line":806,"in_reply_to":"bfdaf3ff_b76355dc","updated":"2019-01-24 00:17:10.000000000","message":"OK, so evacuate is a rebuild (in compute/manager), so it will call _prep_block_device and will enforce the max (right?). Live migration calls pre_live_migration, which calls get_info_from_bdm (IF there are volumes), which calls find_disk_dev_for_disk_bus, which raises TooManyDiskDevices. So live migration enforces the max, if there are volumes in the BDM.\n\nSo what\u0027s left... cold migrate. Cold migrate will not enforce the max. Kind of surprising that nothing in that path calls any of the BDM prep stuff, considering that live migrate does.\n\n(later) I see that cold migrate updates volume attachments, but it doesn\u0027t handle volumes in the same way (in the driver) as live migrate does. Doesn\u0027t call the same methods, namely get_info_from_bdm (which will enforce the max).\n\nAll of that is to say, agreed, we do have a bug vector here for cold migrate.\n\nAfter ruminating about this for a long time, I\u0027m thinking it\u0027s best to add a known issue note about it with the config option help and the release note.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d17edc0f936559be011e13aad9eecfc26f5b1f8c","unresolved":false,"context_lines":[{"line_number":803,"context_line":"too high then response time suffers."},{"line_number":804,"context_line":"The default value of 0 means no limit."},{"line_number":805,"context_line":" \"\"\"),"},{"line_number":806,"context_line":"    cfg.IntOpt(\u0027max_disk_devices_to_attach\u0027,"},{"line_number":807,"context_line":"        default\u003d-1,"},{"line_number":808,"context_line":"        min\u003d-1,"},{"line_number":809,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_9f9e7161","line":806,"in_reply_to":"bfdaf3ff_f7f9dd7f","updated":"2019-01-24 00:17:10.000000000","message":"Done","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":810,"context_line":"Maximum number of disk devices allowed to attach to a single instance. Note"},{"line_number":811,"context_line":"that the number of disks supported by an instance depends on the bus used."},{"line_number":812,"context_line":""},{"line_number":813,"context_line":"See https://docs.openstack.org/glance/latest/admin/useful-image-properties.html"},{"line_number":814,"context_line":"for more information about the ``hw_disk_bus`` image property."},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"Possible values:"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_a4ca4517","line":813,"range":{"start_line":813,"start_character":4,"end_line":813,"end_character":79},"updated":"2019-01-15 21:37:34.000000000","message":"This doesn\u0027t really give much useful information, but that could be fleshed out later I guess.\n\nThat doc also says it\u0027s only used by the libvirt driver but it looks like the vmware driver uses it also (so a bug in the glance docs):\n\nhttps://github.com/openstack/nova/blob/89c2d1056b3f37bad243c7468d974ded71336a0f/nova/virt/vmwareapi/images.py#L152","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6de1589734c8d7d20ae8341d569c01bcbe8b8bcf","unresolved":false,"context_lines":[{"line_number":810,"context_line":"Maximum number of disk devices allowed to attach to a single instance. Note"},{"line_number":811,"context_line":"that the number of disks supported by an instance depends on the bus used."},{"line_number":812,"context_line":""},{"line_number":813,"context_line":"See https://docs.openstack.org/glance/latest/admin/useful-image-properties.html"},{"line_number":814,"context_line":"for more information about the ``hw_disk_bus`` image property."},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"Possible values:"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_977c11ec","line":813,"range":{"start_line":813,"start_character":4,"end_line":813,"end_character":79},"in_reply_to":"bfdaf3ff_a4ca4517","updated":"2019-01-15 21:54:30.000000000","message":"Glance bug 1811897 reported.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":812,"context_line":""},{"line_number":813,"context_line":"See https://docs.openstack.org/glance/latest/admin/useful-image-properties.html"},{"line_number":814,"context_line":"for more information about the ``hw_disk_bus`` image property."},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"Possible values:"},{"line_number":817,"context_line":"* Negative integer means unlimited"},{"line_number":818,"context_line":"* Any integer \u003e\u003d 0 represents the maximum allowed"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_0489d1c8","line":815,"updated":"2019-01-15 21:37:34.000000000","message":"Not sure if you\u0027d want to mention that this doesn\u0027t apply when attaching volumes to a shelved offloaded instance and is only enforced in that case when the server is unshelved. That might be too much detail for this though.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":814,"context_line":"for more information about the ``hw_disk_bus`` image property."},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"Possible values:"},{"line_number":817,"context_line":"* Negative integer means unlimited"},{"line_number":818,"context_line":"* Any integer \u003e\u003d 0 represents the maximum allowed"},{"line_number":819,"context_line":"\"\"\"),"},{"line_number":820,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_2468951f","line":817,"updated":"2019-01-15 21:37:34.000000000","message":"This won\u0027t render in rst properly, needs to be:\n\nPossible values:\n\n* Negative integer means unlimited\n* Any integer \u003e\u003d 0 represents the maximum allowed\n\nhttp://logs.openstack.org/77/616777/7/check/openstack-tox-docs/749c290/html/configuration/config.html#compute.max_disk_devices_to_attach","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d17edc0f936559be011e13aad9eecfc26f5b1f8c","unresolved":false,"context_lines":[{"line_number":814,"context_line":"for more information about the ``hw_disk_bus`` image property."},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"Possible values:"},{"line_number":817,"context_line":"* Negative integer means unlimited"},{"line_number":818,"context_line":"* Any integer \u003e\u003d 0 represents the maximum allowed"},{"line_number":819,"context_line":"\"\"\"),"},{"line_number":820,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_9ffd113c","line":817,"in_reply_to":"bfdaf3ff_2468951f","updated":"2019-01-24 00:17:10.000000000","message":"Ah, thanks. I had the misfortune of copying image_cache_manager_interval below, which also does not render properly.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4633d0881912b19f8fc5b037c590824740315b4d","unresolved":false,"context_lines":[{"line_number":821,"context_line":"see https://docs.openstack.org/glance/latest/admin/useful-image-properties.html"},{"line_number":822,"context_line":"for more information about the ``hw_disk_bus`` image property."},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"The configured maximum is enforced during server create, rebuild, evacuate,"},{"line_number":825,"context_line":"unshelve, live migrate, and attach volume."},{"line_number":826,"context_line":""},{"line_number":827,"context_line":"Operators changing the ``[compute]/max_disk_devices_to_attach`` on a compute"},{"line_number":828,"context_line":"service that is hosting servers should be aware that it could cause rebuilds to"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_a4c67767","line":825,"range":{"start_line":824,"start_character":0,"end_line":825,"end_character":42},"updated":"2019-01-29 14:51:54.000000000","message":"You already mentioned this in the first paragraph.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"035a353293bccf539930976aca6b69aa4da61b70","unresolved":false,"context_lines":[{"line_number":821,"context_line":"see https://docs.openstack.org/glance/latest/admin/useful-image-properties.html"},{"line_number":822,"context_line":"for more information about the ``hw_disk_bus`` image property."},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"The configured maximum is enforced during server create, rebuild, evacuate,"},{"line_number":825,"context_line":"unshelve, live migrate, and attach volume."},{"line_number":826,"context_line":""},{"line_number":827,"context_line":"Operators changing the ``[compute]/max_disk_devices_to_attach`` on a compute"},{"line_number":828,"context_line":"service that is hosting servers should be aware that it could cause rebuilds to"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_c72ffd85","line":825,"range":{"start_line":824,"start_character":0,"end_line":825,"end_character":42},"in_reply_to":"9fdfeff1_a4c67767","updated":"2019-01-29 15:22:35.000000000","message":"Done","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4633d0881912b19f8fc5b037c590824740315b4d","unresolved":false,"context_lines":[{"line_number":837,"context_line":"and the destination is not checked before the move. This means if an operator"},{"line_number":838,"context_line":"has set a maximum of 26 on compute host A and a maximum of 20 on compute host"},{"line_number":839,"context_line":"B, a cold migration of a server with 26 attached devices from compute host A to"},{"line_number":840,"context_line":"compute host B will succeed. Then, once the server is on compute host B, a"},{"line_number":841,"context_line":"subsequent request to rebuild the server will fail and go into ERROR state"},{"line_number":842,"context_line":"because 26 devices are already attached and exceed the configured maximum of 20"},{"line_number":843,"context_line":"on compute host B."},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"The configured maximum is not enforced on shelved offloaded servers, as they"},{"line_number":846,"context_line":"have no compute host."}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_04cae34c","line":843,"range":{"start_line":840,"start_character":29,"end_line":843,"end_character":18},"updated":"2019-01-29 14:51:54.000000000","message":"I was wondering if we should actually put the server into ERROR status on rebuild since there are some cases where we can fail in rebuild without actually touching the guest, but this isn\u0027t one of those cases and ERROR is correct because with the default rebuild implementation, we\u0027ll detach volumes and then destroy the guest before calling _prep_block_device which is the thing that would raise TooManyDiskDevices - so in that case the guest was destroyed and the instance should be in ERROR status.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"826d28a627a9799659b8a04a720e31614bbf5e88","unresolved":false,"context_lines":[{"line_number":847,"context_line":""},{"line_number":848,"context_line":"Possible values:"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"* Negative integer means unlimited"},{"line_number":851,"context_line":"* Any integer \u003e\u003d 0 represents the maximum allowed"},{"line_number":852,"context_line":"\"\"\"),"},{"line_number":853,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_164d7199","line":850,"range":{"start_line":850,"start_character":1,"end_line":850,"end_character":34},"updated":"2019-01-25 08:00:15.000000000","message":"seems the only allowed negative integer is -1? so should we be more specific here to avoid possible misleading?","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"4a7ecc0c9fbec113c70c13eb5f92ff350bb9890d","unresolved":false,"context_lines":[{"line_number":847,"context_line":""},{"line_number":848,"context_line":"Possible values:"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"* Negative integer means unlimited"},{"line_number":851,"context_line":"* Any integer \u003e\u003d 0 represents the maximum allowed"},{"line_number":852,"context_line":"\"\"\"),"},{"line_number":853,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_4aeca5f2","line":850,"range":{"start_line":850,"start_character":1,"end_line":850,"end_character":34},"in_reply_to":"9fdfeff1_164d7199","updated":"2019-01-25 16:36:07.000000000","message":"Yeah, good point. I\u0027ll change it to -1 when I respin.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"035a353293bccf539930976aca6b69aa4da61b70","unresolved":false,"context_lines":[{"line_number":847,"context_line":""},{"line_number":848,"context_line":"Possible values:"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"* Negative integer means unlimited"},{"line_number":851,"context_line":"* Any integer \u003e\u003d 0 represents the maximum allowed"},{"line_number":852,"context_line":"\"\"\"),"},{"line_number":853,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_674e5170","line":850,"range":{"start_line":850,"start_character":1,"end_line":850,"end_character":34},"in_reply_to":"9fdfeff1_4aeca5f2","updated":"2019-01-29 15:22:35.000000000","message":"Done","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"}],"nova/exception.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"197cf2753d9a6c7b02a5c35a9591d417567fcea6","unresolved":false,"context_lines":[{"line_number":2351,"context_line":"                \u0027only be a one-to-one mapping.\u0027)"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":""},{"line_number":2354,"context_line":"class TooManyDiskDevices(NovaException):"},{"line_number":2355,"context_line":"    msg_fmt \u003d _(\u0027The maximum allowed number of disk devices to attach to a \u0027"},{"line_number":2356,"context_line":"                \u0027single instance has been exceeded\u0027)"},{"line_number":2357,"context_line":"    code \u003d 403"},{"line_number":2358,"context_line":""},{"line_number":2359,"context_line":""},{"line_number":2360,"context_line":"class CertificateValidationFailed(NovaException):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_c0d99d53","line":2357,"range":{"start_line":2354,"start_character":0,"end_line":2357,"end_character":14},"updated":"2018-12-14 01:56:07.000000000","message":"could it be better if we show what the limit is in the error message? Otherwise as an user, I may have to test out what the limit is.","commit_id":"e06ce8d3ce0a2152b0314808b29166620c971b1b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"b0ae3f83acfbeca4ff508061e99ebd3a701f5272","unresolved":false,"context_lines":[{"line_number":2351,"context_line":"                \u0027only be a one-to-one mapping.\u0027)"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":""},{"line_number":2354,"context_line":"class TooManyDiskDevices(NovaException):"},{"line_number":2355,"context_line":"    msg_fmt \u003d _(\u0027The maximum allowed number of disk devices to attach to a \u0027"},{"line_number":2356,"context_line":"                \u0027single instance has been exceeded\u0027)"},{"line_number":2357,"context_line":"    code \u003d 403"},{"line_number":2358,"context_line":""},{"line_number":2359,"context_line":""},{"line_number":2360,"context_line":"class CertificateValidationFailed(NovaException):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_be53f208","line":2357,"range":{"start_line":2354,"start_character":0,"end_line":2357,"end_character":14},"in_reply_to":"3f79a3b5_c0d99d53","updated":"2018-12-20 05:43:17.000000000","message":"Yeah, good idea. Will add.","commit_id":"e06ce8d3ce0a2152b0314808b29166620c971b1b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1ff2516f72a1d566c54bf659eda5b24f05135a68","unresolved":false,"context_lines":[{"line_number":2353,"context_line":"                \u0027only be a one-to-one mapping.\u0027)"},{"line_number":2354,"context_line":""},{"line_number":2355,"context_line":""},{"line_number":2356,"context_line":"class TooManyDiskDevices(NovaException):"},{"line_number":2357,"context_line":"    msg_fmt \u003d _(\u0027The maximum allowed number of disk devices: %(maximum)d to \u0027"},{"line_number":2358,"context_line":"                \u0027attach to a single instance has been exceeded\u0027)"},{"line_number":2359,"context_line":"    code \u003d 403"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfdaf3ff_8f639fdc","line":2356,"range":{"start_line":2356,"start_character":25,"end_line":2356,"end_character":38},"updated":"2019-01-15 18:59:20.000000000","message":"If you made this extend InvalidBDM, then you could drop https://review.openstack.org/#/c/624832/5/nova/compute/manager.py since this will handle it:\n\nhttps://review.openstack.org/#/c/624832/5/nova/compute/manager.py@2320","commit_id":"58ead788aac71adf85ea38533ae10a33a8a48b0b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2c373cd031e1d198e8a0b6c21736d51b3975c60f","unresolved":false,"context_lines":[{"line_number":2354,"context_line":""},{"line_number":2355,"context_line":""},{"line_number":2356,"context_line":"class TooManyDiskDevices(NovaException):"},{"line_number":2357,"context_line":"    msg_fmt \u003d _(\u0027The maximum allowed number of disk devices: %(maximum)d to \u0027"},{"line_number":2358,"context_line":"                \u0027attach to a single instance has been exceeded\u0027)"},{"line_number":2359,"context_line":"    code \u003d 403"},{"line_number":2360,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_f7da3de7","line":2357,"range":{"start_line":2357,"start_character":59,"end_line":2357,"end_character":60},"updated":"2019-01-15 21:57:35.000000000","message":"nit: drop the colon in the middle of a sentence, it looks weird when rendered in the functional test (as an example). Maybe just do:\n\n\"The maximum allowed number of disk devices (%(maximum)d) to attach to a single instance has been exceeded.\"","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":2355,"context_line":""},{"line_number":2356,"context_line":"class TooManyDiskDevices(NovaException):"},{"line_number":2357,"context_line":"    msg_fmt \u003d _(\u0027The maximum allowed number of disk devices: %(maximum)d to \u0027"},{"line_number":2358,"context_line":"                \u0027attach to a single instance has been exceeded\u0027)"},{"line_number":2359,"context_line":"    code \u003d 403"},{"line_number":2360,"context_line":""},{"line_number":2361,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_248415b1","line":2358,"range":{"start_line":2358,"start_character":54,"end_line":2358,"end_character":62},"updated":"2019-01-15 21:37:34.000000000","message":"nit: period","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"}],"nova/tests/functional/test_conf_max_attach_disk_devices.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ce9bccb8536b07ec43f403044b27309ea4d67355","unresolved":false,"context_lines":[{"line_number":26,"context_line":"            nova_fixtures.CinderFixtureNewAttachFlow(self))"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def _wait_for_volume_attach(self, server_id, volume_id):"},{"line_number":29,"context_line":"        timeout \u003d 0.0"},{"line_number":30,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":31,"context_line":"        attached_vols \u003d [vol[\u0027id\u0027] for vol in"},{"line_number":32,"context_line":"                         server[\u0027os-extended-volumes:volumes_attached\u0027]]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        while volume_id not in attached_vols and timeout \u003c 10.0:"},{"line_number":35,"context_line":"            time.sleep(.1)"},{"line_number":36,"context_line":"            timeout +\u003d .1"},{"line_number":37,"context_line":"            server \u003d self.api.get_server(server_id)"},{"line_number":38,"context_line":"            attached_vols \u003d [vol[\u0027id\u0027] for vol in"},{"line_number":39,"context_line":"                             server[\u0027os-extended-volumes:volumes_attached\u0027]]"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        if volume_id not in attached_vols:"},{"line_number":42,"context_line":"            self.fail(\u0027Timed out waiting for volume %s to be attached to \u0027"},{"line_number":43,"context_line":"                      \u0027server %s. Currently attached volumes: %s\u0027 %"},{"line_number":44,"context_line":"                      (volume_id, server_id, attached_vols))"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_boot_from_volume(self):"},{"line_number":47,"context_line":"        # Set the maximum to 1 and boot from 1 volume. This should pass."}],"source_content_type":"text/x-python","patch_set":6,"id":"dfd5e7cf_3b8f7ecd","line":44,"range":{"start_line":29,"start_character":1,"end_line":44,"end_character":60},"updated":"2019-01-08 16:47:57.000000000","message":"This can be a bit simplified:\n\n        for i in range(0, 100):\n            server \u003d self.api.get_server(server_id)\n            attached_vols \u003d [vol[\u0027id\u0027] for vol in\n                             server[\u0027os-extended-volumes:volumes_attached\u0027]]\n            if volume_id in attached_vols:\n                return\n\n            time.sleep(.1)\n\n        self.fail(\u0027Timed out waiting for volume %s to be attached to \u0027\n                  \u0027server %s. Currently attached volumes: %s\u0027 %\n                  (volume_id, server_id, attached_vols))","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6d6ebf3d64e7d77b09a7edafb3aa5c1b3550134e","unresolved":false,"context_lines":[{"line_number":26,"context_line":"            nova_fixtures.CinderFixtureNewAttachFlow(self))"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def _wait_for_volume_attach(self, server_id, volume_id):"},{"line_number":29,"context_line":"        timeout \u003d 0.0"},{"line_number":30,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":31,"context_line":"        attached_vols \u003d [vol[\u0027id\u0027] for vol in"},{"line_number":32,"context_line":"                         server[\u0027os-extended-volumes:volumes_attached\u0027]]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        while volume_id not in attached_vols and timeout \u003c 10.0:"},{"line_number":35,"context_line":"            time.sleep(.1)"},{"line_number":36,"context_line":"            timeout +\u003d .1"},{"line_number":37,"context_line":"            server \u003d self.api.get_server(server_id)"},{"line_number":38,"context_line":"            attached_vols \u003d [vol[\u0027id\u0027] for vol in"},{"line_number":39,"context_line":"                             server[\u0027os-extended-volumes:volumes_attached\u0027]]"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        if volume_id not in attached_vols:"},{"line_number":42,"context_line":"            self.fail(\u0027Timed out waiting for volume %s to be attached to \u0027"},{"line_number":43,"context_line":"                      \u0027server %s. Currently attached volumes: %s\u0027 %"},{"line_number":44,"context_line":"                      (volume_id, server_id, attached_vols))"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_boot_from_volume(self):"},{"line_number":47,"context_line":"        # Set the maximum to 1 and boot from 1 volume. This should pass."}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_82f626f9","line":44,"range":{"start_line":29,"start_character":1,"end_line":44,"end_character":60},"in_reply_to":"dfd5e7cf_3b8f7ecd","updated":"2019-01-15 04:47:07.000000000","message":"OK, I think I must have copied this from some other func test because I can\u0027t remember it now. :P Can change.","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ce9bccb8536b07ec43f403044b27309ea4d67355","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self._wait_for_state_change(self.api, created_server, \u0027ERROR\u0027)"},{"line_number":80,"context_line":"        # Verify the instance fault"},{"line_number":81,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":82,"context_line":"        # If anything fails during _prep_block_device, a 500 internal server"},{"line_number":83,"context_line":"        # error is raised."},{"line_number":84,"context_line":"        self.assertEqual(500, server[\u0027fault\u0027][\u0027code\u0027])"},{"line_number":85,"context_line":"        expected \u003d (\u0027Build of instance %s aborted: Failure prepping block \u0027"},{"line_number":86,"context_line":"                    \u0027device. The maximum allowed number of disk devices: 1 to \u0027"},{"line_number":87,"context_line":"                    \u0027attach to a single instance has been exceeded\u0027 %"}],"source_content_type":"text/x-python","patch_set":6,"id":"dfd5e7cf_7b73c6e8","line":84,"range":{"start_line":82,"start_character":1,"end_line":84,"end_character":54},"updated":"2019-01-08 16:47:57.000000000","message":"According to the commit message, shouldn\u0027t this be 403?","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"caeb07977a14dfafa269a0b61471f34fe5d98d68","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self._wait_for_state_change(self.api, created_server, \u0027ERROR\u0027)"},{"line_number":80,"context_line":"        # Verify the instance fault"},{"line_number":81,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":82,"context_line":"        # If anything fails during _prep_block_device, a 500 internal server"},{"line_number":83,"context_line":"        # error is raised."},{"line_number":84,"context_line":"        self.assertEqual(500, server[\u0027fault\u0027][\u0027code\u0027])"},{"line_number":85,"context_line":"        expected \u003d (\u0027Build of instance %s aborted: Failure prepping block \u0027"},{"line_number":86,"context_line":"                    \u0027device. The maximum allowed number of disk devices: 1 to \u0027"},{"line_number":87,"context_line":"                    \u0027attach to a single instance has been exceeded\u0027 %"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_e019b579","line":84,"range":{"start_line":82,"start_character":1,"end_line":84,"end_character":54},"in_reply_to":"bfdaf3ff_3d3c3bbe","updated":"2019-01-30 15:41:11.000000000","message":"thanks for the explanation.","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"944d3fdbed7e56d993bd1716da874bd661a7c788","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self._wait_for_state_change(self.api, created_server, \u0027ERROR\u0027)"},{"line_number":80,"context_line":"        # Verify the instance fault"},{"line_number":81,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":82,"context_line":"        # If anything fails during _prep_block_device, a 500 internal server"},{"line_number":83,"context_line":"        # error is raised."},{"line_number":84,"context_line":"        self.assertEqual(500, server[\u0027fault\u0027][\u0027code\u0027])"},{"line_number":85,"context_line":"        expected \u003d (\u0027Build of instance %s aborted: Failure prepping block \u0027"},{"line_number":86,"context_line":"                    \u0027device. The maximum allowed number of disk devices: 1 to \u0027"},{"line_number":87,"context_line":"                    \u0027attach to a single instance has been exceeded\u0027 %"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_3d3c3bbe","line":84,"range":{"start_line":82,"start_character":1,"end_line":84,"end_character":54},"in_reply_to":"bfdaf3ff_a237aab0","updated":"2019-01-15 06:15:10.000000000","message":"(later) I tried to do this in nova/compute/manager.py but since all failures during instance build result in a BuildAbortException and that exception is always treated as a 500, the instance will end up with a 500 in the instance fault. AFAICT there\u0027s no way to modify this without a more involved change, but I could be wrong.","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6d6ebf3d64e7d77b09a7edafb3aa5c1b3550134e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self._wait_for_state_change(self.api, created_server, \u0027ERROR\u0027)"},{"line_number":80,"context_line":"        # Verify the instance fault"},{"line_number":81,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":82,"context_line":"        # If anything fails during _prep_block_device, a 500 internal server"},{"line_number":83,"context_line":"        # error is raised."},{"line_number":84,"context_line":"        self.assertEqual(500, server[\u0027fault\u0027][\u0027code\u0027])"},{"line_number":85,"context_line":"        expected \u003d (\u0027Build of instance %s aborted: Failure prepping block \u0027"},{"line_number":86,"context_line":"                    \u0027device. The maximum allowed number of disk devices: 1 to \u0027"},{"line_number":87,"context_line":"                    \u0027attach to a single instance has been exceeded\u0027 %"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_a237aab0","line":84,"range":{"start_line":82,"start_character":1,"end_line":84,"end_character":54},"in_reply_to":"dfd5e7cf_7b73c6e8","updated":"2019-01-15 04:47:07.000000000","message":"No, there\u0027s actually two ways a 500 can happen. _prep_block_device (which is the server create path) and reserve_block_device_name (which is the volume attach path). The one I\u0027m changing from 500 \u003d\u003e 403 is reserve_block_device_name.\n\nI was unsure about changing _prep_block_device. Maybe it makes sense to change it at least in the context of this TooManyDiskDevices error? I can change it and see what everyone thinks.","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"0d24b7c991c17ccc1da66b1e5686c0fde9c22f3f","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        self.assertEqual(403, ex.response.status_code)"},{"line_number":115,"context_line":"        expected \u003d (\u0027The maximum allowed number of disk devices: 2 to attach \u0027"},{"line_number":116,"context_line":"                    \u0027to a single instance has been exceeded\u0027)"},{"line_number":117,"context_line":"        self.assertIn(expected, ex.message)"},{"line_number":118,"context_line":"        # Verify only one volume is attached (this is a generator)"},{"line_number":119,"context_line":"        attached_vols \u003d list(self.cinder.volume_ids_for_instance(server_id))"},{"line_number":120,"context_line":"        self.assertIn(vol_id, attached_vols)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f769fc5_73d6a052","line":117,"updated":"2018-12-21 23:42:54.000000000","message":"The functional test fails here like\n\nTraceback (most recent call last):\n  File \"/home/zuul/src/git.openstack.org/openstack/nova/nova/tests/functional/test_conf_max_attach_disk_devices.py\", line 117, in test_attach\n    self.assertIn(expected, ex.message)\nAttributeError: \u0027OpenStackApiException\u0027 object has no attribute \u0027message\u0027\n\nand the wsgi seems to return as here expects:\n\n nova.exception.TooManyDiskDevices: The maximum allowed number of disk devices: 2 to attach to a single instance has been exceeded\n 2018-12-20 19:51:26,107 INFO [nova.api.openstack.wsgi] HTTP exception thrown: The maximum allowed number of disk devices: 2 to attach to a single instance has been exceeded\n\nMaybe here should be\n\n self.assertIn(expected, ex.response.text)","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ce9bccb8536b07ec43f403044b27309ea4d67355","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        self.assertEqual(403, ex.response.status_code)"},{"line_number":115,"context_line":"        expected \u003d (\u0027The maximum allowed number of disk devices: 2 to attach \u0027"},{"line_number":116,"context_line":"                    \u0027to a single instance has been exceeded\u0027)"},{"line_number":117,"context_line":"        self.assertIn(expected, ex.message)"},{"line_number":118,"context_line":"        # Verify only one volume is attached (this is a generator)"},{"line_number":119,"context_line":"        attached_vols \u003d list(self.cinder.volume_ids_for_instance(server_id))"},{"line_number":120,"context_line":"        self.assertIn(vol_id, attached_vols)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dfd5e7cf_7b24260e","line":117,"in_reply_to":"1f769fc5_73d6a052","updated":"2019-01-08 16:47:57.000000000","message":"But the root cause is happens a bit earlier in the test during the first volumeAttach call:\n\n2018-12-20 19:51:26,106 ERROR [oslo_messaging.rpc.server] Exception during message handling\nTraceback (most recent call last):\n  File \"/home/zuul/src/git.openstack.org/openstack/nova/nova/compute/manager.py\", line 1594, in _get_device_name_for_instance\n    instance, bdms, block_device_obj)\n  File \"/home/zuul/src/git.openstack.org/openstack/nova/nova/virt/driver.py\", line 1732, in get_device_name_for_instance\n    raise NotImplementedError()\nNotImplementedError","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6d5db9c9ea7676dbb01539a91c26494b237208e7","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        self.assertEqual(403, ex.response.status_code)"},{"line_number":115,"context_line":"        expected \u003d (\u0027The maximum allowed number of disk devices: 2 to attach \u0027"},{"line_number":116,"context_line":"                    \u0027to a single instance has been exceeded\u0027)"},{"line_number":117,"context_line":"        self.assertIn(expected, ex.message)"},{"line_number":118,"context_line":"        # Verify only one volume is attached (this is a generator)"},{"line_number":119,"context_line":"        attached_vols \u003d list(self.cinder.volume_ids_for_instance(server_id))"},{"line_number":120,"context_line":"        self.assertIn(vol_id, attached_vols)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_5df33f0b","line":117,"in_reply_to":"bfdaf3ff_8244e61c","updated":"2019-01-15 06:20:22.000000000","message":"(later) The NotImplementedError is normal and expected because the nova.virt.fake.FakeDriver does not override the get_device_name_for_instance method, so the code will fall back on the default implementation in nova/compute/utils.py.\n\nThen, the TooManyDiskDevices exception is raised (as expected for this part of the test) but we fail because the exception is a OpenStackApiException, like Ken\u0027ichi pointed out and I\u0027m not accessing the text correctly.","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6d6ebf3d64e7d77b09a7edafb3aa5c1b3550134e","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        self.assertEqual(403, ex.response.status_code)"},{"line_number":115,"context_line":"        expected \u003d (\u0027The maximum allowed number of disk devices: 2 to attach \u0027"},{"line_number":116,"context_line":"                    \u0027to a single instance has been exceeded\u0027)"},{"line_number":117,"context_line":"        self.assertIn(expected, ex.message)"},{"line_number":118,"context_line":"        # Verify only one volume is attached (this is a generator)"},{"line_number":119,"context_line":"        attached_vols \u003d list(self.cinder.volume_ids_for_instance(server_id))"},{"line_number":120,"context_line":"        self.assertIn(vol_id, attached_vols)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bfdaf3ff_8244e61c","line":117,"in_reply_to":"dfd5e7cf_7b24260e","updated":"2019-01-15 04:47:07.000000000","message":"Oh, oops, didn\u0027t realize there\u0027s a problem here. Let me look into it, thanks.","commit_id":"444441ec30e089761b7f4db68787b7b4e4dcf606"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        self.cinder \u003d self.useFixture("},{"line_number":26,"context_line":"            nova_fixtures.CinderFixtureNewAttachFlow(self))"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def _wait_for_volume_attach(self, server_id, volume_id):"},{"line_number":29,"context_line":"        for i in range(0, 100):"},{"line_number":30,"context_line":"            server \u003d self.api.get_server(server_id)"},{"line_number":31,"context_line":"            attached_vols \u003d [vol[\u0027id\u0027] for vol in"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_c459895a","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":31},"updated":"2019-01-15 21:37:34.000000000","message":"Similar to TestLocalDeleteAttachedVolumes - could move into InstanceHelperMixin later and DRY that up (TestLocalDeleteAttachedVolumes would have to be changed to use that mixin, so maybe not worth it).","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        created_server \u003d self.api.post_server({\"server\": server})"},{"line_number":52,"context_line":"        self._wait_for_state_change(self.api, created_server, \u0027ACTIVE\u0027)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def test_boot_from_volume_plus_attach_fail(self):"},{"line_number":55,"context_line":"        # Set the maximum to 1, boot from 1 volume, and attach one volume."},{"line_number":56,"context_line":"        # This should fail because it\u0027s trying to attach 2 disk devices."},{"line_number":57,"context_line":"        self.flags(max_disk_devices_to_attach\u003d1, group\u003d\u0027compute\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_64177d53","line":54,"updated":"2019-01-15 21:37:34.000000000","message":"It would also be good to have a negative scenario where the max is 1 and the user tries to boot with two volumes (a root OS image volume and an empty data volume with no boot_index set for example).\n\nActually, reading this further, that\u0027s the scenario I described, it\u0027s booting from volume with 2 volumes. The name of the test and comment is a bit misleading.\n\nMaybe just call it test_boot_from_volume_max_exceeded.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        self.assertEqual(403, ex.response.status_code)"},{"line_number":108,"context_line":"        expected \u003d (\u0027The maximum allowed number of disk devices: 2 to attach \u0027"},{"line_number":109,"context_line":"                    \u0027to a single instance has been exceeded\u0027)"},{"line_number":110,"context_line":"        self.assertIn(expected, ex.response.text)"},{"line_number":111,"context_line":"        # Verify only one volume is attached (this is a generator)"},{"line_number":112,"context_line":"        attached_vols \u003d list(self.cinder.volume_ids_for_instance(server_id))"},{"line_number":113,"context_line":"        self.assertIn(vol_id, attached_vols)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_d73059eb","line":110,"range":{"start_line":110,"start_character":32,"end_line":110,"end_character":48},"updated":"2019-01-15 21:37:34.000000000","message":"nit: I think you can just six.text_type(ex) this to avoid the internals.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d17edc0f936559be011e13aad9eecfc26f5b1f8c","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        self.assertEqual(403, ex.response.status_code)"},{"line_number":108,"context_line":"        expected \u003d (\u0027The maximum allowed number of disk devices: 2 to attach \u0027"},{"line_number":109,"context_line":"                    \u0027to a single instance has been exceeded\u0027)"},{"line_number":110,"context_line":"        self.assertIn(expected, ex.response.text)"},{"line_number":111,"context_line":"        # Verify only one volume is attached (this is a generator)"},{"line_number":112,"context_line":"        attached_vols \u003d list(self.cinder.volume_ids_for_instance(server_id))"},{"line_number":113,"context_line":"        self.assertIn(vol_id, attached_vols)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_3e04757b","line":110,"range":{"start_line":110,"start_character":32,"end_line":110,"end_character":48},"in_reply_to":"bfdaf3ff_d73059eb","updated":"2019-01-24 00:17:10.000000000","message":"I think maybe I should leave this consistent with the other check on L107 ex.response.status_code.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"92f235ea84d8ac07ee8e3ff23d1c1cd1c27d300a","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        self.assertEqual(403, ex.response.status_code)"},{"line_number":108,"context_line":"        expected \u003d (\u0027The maximum allowed number of disk devices (2) to attach \u0027"},{"line_number":109,"context_line":"                    \u0027to a single instance has been exceeded.\u0027)"},{"line_number":110,"context_line":"        self.assertIn(expected, ex.response.text)"},{"line_number":111,"context_line":"        # Verify only one volume is attached (this is a generator)"},{"line_number":112,"context_line":"        attached_vols \u003d list(self.cinder.volume_ids_for_instance(server_id))"},{"line_number":113,"context_line":"        self.assertIn(vol_id, attached_vols)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_4ac5855a","line":110,"range":{"start_line":110,"start_character":32,"end_line":110,"end_character":49},"updated":"2019-01-25 16:37:59.000000000","message":"Note to self: change this to six.text_type(ex) during respin, since there are other tests use ex.response.status_code alongside six.text_type(ex) to do the same thing.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"035a353293bccf539930976aca6b69aa4da61b70","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        self.assertEqual(403, ex.response.status_code)"},{"line_number":108,"context_line":"        expected \u003d (\u0027The maximum allowed number of disk devices (2) to attach \u0027"},{"line_number":109,"context_line":"                    \u0027to a single instance has been exceeded.\u0027)"},{"line_number":110,"context_line":"        self.assertIn(expected, ex.response.text)"},{"line_number":111,"context_line":"        # Verify only one volume is attached (this is a generator)"},{"line_number":112,"context_line":"        attached_vols \u003d list(self.cinder.volume_ids_for_instance(server_id))"},{"line_number":113,"context_line":"        self.assertIn(vol_id, attached_vols)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_677731a2","line":110,"range":{"start_line":110,"start_character":32,"end_line":110,"end_character":49},"in_reply_to":"9fdfeff1_4ac5855a","updated":"2019-01-29 15:22:35.000000000","message":"Done","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"}],"nova/virt/libvirt/blockinfo.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d43f5c0c0bc0d98d741b5a473b2e36bd947df9b3","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    while True:"},{"line_number":192,"context_line":"        if max_dev is not None and idx \u003e\u003d max_dev:"},{"line_number":193,"context_line":"            raise exception.TooManyDiskDevices(maximum\u003dmax_dev)"},{"line_number":194,"context_line":"        disk_dev \u003d block_device.generate_device_name(dev_prefix, idx)"},{"line_number":195,"context_line":"        if not has_disk_dev(mapping, disk_dev):"},{"line_number":196,"context_line":"            if disk_dev not in assigned_devices:"},{"line_number":197,"context_line":"                return disk_dev"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_0e8b201f","line":194,"updated":"2019-01-16 15:24:36.000000000","message":"Is there a chance that we could have an upgrade impact where a user reboot a server with volumes already attached and then the device names change? Or should the device name calculation be consistent with what we had before, with the addition of allowing more devices (the patch below this one in the series)?\n\nThe reason I ask about the device name changing for existing attached BDMs is because virtual device tags for volumes are linked via the device name, so I\u0027m wondering if we could have a case where a user creates a server, attaches some volumes with tags, we upgrade, and then the user can\u0027t correlate the device tags to the bdms in the metadata API anymore.\n\nhttps://github.com/openstack/nova/blob/e5b55245976293e0cb53089cc1efad6cc1edfa17/nova/virt/libvirt/driver.py#L8791\n\nhttps://github.com/openstack/nova/blob/e5b55245976293e0cb53089cc1efad6cc1edfa17/nova/api/metadata/base.py#L441\n\nWhy we used device name as the correlation key there I can\u0027t remember, Artom might. Seems like using bdm uuid would have been better but maybe that didn\u0027t exist when that code was written.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4cea15d8d272c6d272e73c4db3634846cc68253","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    while True:"},{"line_number":192,"context_line":"        if max_dev is not None and idx \u003e\u003d max_dev:"},{"line_number":193,"context_line":"            raise exception.TooManyDiskDevices(maximum\u003dmax_dev)"},{"line_number":194,"context_line":"        disk_dev \u003d block_device.generate_device_name(dev_prefix, idx)"},{"line_number":195,"context_line":"        if not has_disk_dev(mapping, disk_dev):"},{"line_number":196,"context_line":"            if disk_dev not in assigned_devices:"},{"line_number":197,"context_line":"                return disk_dev"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_210955dc","line":194,"in_reply_to":"bfdaf3ff_0e8b201f","updated":"2019-01-16 15:51:51.000000000","message":"Looking over the libvirt driver code, we only build the device metadata (the stuff for tagged devices) when attaching a device (attach volume/interface) or when building a config drive, so during spawn (server create, unshelve and rebuild) or resize. At that point the bdms should already have device_name set and used to correlate the tagged devices.\n\nAnd on something like unshelve or rebuild where compute manager calls _prep_block_device, we\u0027d call _add_missing_dev_names but that noops if the bdm already has a device_name, which it will after the initial spawn or attach, so I think that\u0027s all to say we are probably OK here.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"11de05a733e0ac6bcd5ef7a0139fb86d865c760e","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    while True:"},{"line_number":192,"context_line":"        if max_dev is not None and idx \u003e\u003d max_dev:"},{"line_number":193,"context_line":"            raise exception.TooManyDiskDevices(maximum\u003dmax_dev)"},{"line_number":194,"context_line":"        disk_dev \u003d block_device.generate_device_name(dev_prefix, idx)"},{"line_number":195,"context_line":"        if not has_disk_dev(mapping, disk_dev):"},{"line_number":196,"context_line":"            if disk_dev not in assigned_devices:"},{"line_number":197,"context_line":"                return disk_dev"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_96907e50","line":194,"in_reply_to":"bfdaf3ff_0e8b201f","updated":"2019-01-16 20:23:03.000000000","message":"To your question, \"should the device name calculation be consistent with what we had before, with the addition of allowing more devices?\" The answer is yes, the name calculation should be consistent with the old way, just without the artificial limit of 26 letters. So even if names were re-generated, they should generate the same names as before.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"}],"releasenotes/notes/conf-max-attach-disk-devices-82dc1e0825e00b35.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    used. See"},{"line_number":9,"context_line":"    https://docs.openstack.org/glance/latest/admin/useful-image-properties.html"},{"line_number":10,"context_line":"    for more information about the ``hw_disk_bus`` image property."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    When the configured maximum is exceeded during server create, the server"},{"line_number":13,"context_line":"    will go into ``ERROR`` state and the instance fault message will indicate"},{"line_number":14,"context_line":"    the failure reason. When the configured maximum is exceeded during server"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"bfdaf3ff_77372db2","line":11,"updated":"2019-01-15 21:37:34.000000000","message":"I was going to say you should mention that by default this is backward compatible, but I\u0027m not sure that\u0027s true in the libvirt case since we used to hard-code to 26 for non-ide disk bus but now we\u0027ll allow up to whatever the new unlimited value is, right? I don\u0027t know if that should be noted as an upgrade impact or not.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    https://docs.openstack.org/glance/latest/admin/useful-image-properties.html"},{"line_number":10,"context_line":"    for more information about the ``hw_disk_bus`` image property."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    When the configured maximum is exceeded during server create, the server"},{"line_number":13,"context_line":"    will go into ``ERROR`` state and the instance fault message will indicate"},{"line_number":14,"context_line":"    the failure reason. When the configured maximum is exceeded during server"},{"line_number":15,"context_line":"    volume attach API, the request will fail with a ``403 HTTPForbidden``"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"bfdaf3ff_17d8217d","line":12,"range":{"start_line":12,"start_character":58,"end_line":12,"end_character":64},"updated":"2019-01-15 21:37:34.000000000","message":"Technically create, rebuild or unshelve.","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9280479b1a71303a4d35c5bc4cd3509fdede4c8","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    When the configured maximum is exceeded during server create, the server"},{"line_number":13,"context_line":"    will go into ``ERROR`` state and the instance fault message will indicate"},{"line_number":14,"context_line":"    the failure reason. When the configured maximum is exceeded during server"},{"line_number":15,"context_line":"    volume attach API, the request will fail with a ``403 HTTPForbidden``"},{"line_number":16,"context_line":"    error."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"bfdaf3ff_d7e1392c","line":15,"range":{"start_line":15,"start_character":18,"end_line":15,"end_character":21},"updated":"2019-01-15 21:37:34.000000000","message":"API operation?","commit_id":"75f96dad42ca60435a66c7710e5a2513ac700eb6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4633d0881912b19f8fc5b037c590824740315b4d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    device, and the virtualization type. However, disk bus"},{"line_number":13,"context_line":"    can also be specified via a block device mapping or an image property."},{"line_number":14,"context_line":"    See the ``disk_bus`` field in"},{"line_number":15,"context_line":"    https://docs.openstack.org/nova/latest/user/launch-instance-from-volume.html"},{"line_number":16,"context_line":"    for more information about specifying disk bus in a block device mapping,"},{"line_number":17,"context_line":"    and see"},{"line_number":18,"context_line":"    https://docs.openstack.org/glance/latest/admin/useful-image-properties.html"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"9fdfeff1_04cf4356","line":15,"range":{"start_line":15,"start_character":4,"end_line":15,"end_character":80},"updated":"2019-01-29 14:51:54.000000000","message":"I think you meant https://docs.openstack.org/nova/latest/user/block-device-mapping.html?","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"035a353293bccf539930976aca6b69aa4da61b70","unresolved":false,"context_lines":[{"line_number":51,"context_line":"upgrade:"},{"line_number":52,"context_line":"  - |"},{"line_number":53,"context_line":"    The new configuration option, ``[compute]/max_disk_devices_to_attach``"},{"line_number":54,"context_line":"    defaults to ``-1`` (unlimited). Users of the libvirt driver should be"},{"line_number":55,"context_line":"    advised that the default limit has changed from 26 to unlimited, upon"},{"line_number":56,"context_line":"    upgrade to Stein."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"9fdfeff1_07966594","line":56,"range":{"start_line":54,"start_character":36,"end_line":56,"end_character":21},"updated":"2019-01-29 15:22:35.000000000","message":"Technically 26 is for non-ide disk buses.","commit_id":"3885bb228a7eea6e14dbea21d3c14d45068364e2"}]}
