)]}'
{"nova/api/openstack/compute/volumes.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc8b27b4fdb54f5ec3af746d55518ecb696b568f","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":328,"context_line":"        except exception.InstanceIsLocked as e:"},{"line_number":329,"context_line":"            raise exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":330,"context_line":"        except exception.DevicePathInUse as e:"},{"line_number":331,"context_line":"            raise exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":332,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":333,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_f46099d1","line":330,"range":{"start_line":330,"start_character":8,"end_line":330,"end_character":46},"updated":"2016-10-06 21:01:21.000000000","message":"OK, this comes from:\n\nhttps://github.com/openstack/nova/blob/7c3fd3c59da133bb4fb832dde3a47d3eb38748b8/nova/compute/utils.py#L190\n\nWhich is from an RPC call to the compute from the API in the attach volume case:\n\nhttps://github.com/openstack/nova/blob/7c3fd3c59da133bb4fb832dde3a47d3eb38748b8/nova/compute/api.py#L3370\n\nSo this is a good fix. We\u0027ve talked about doing a microversion to remove the ability to specify a device path when attaching a volume, but that doesn\u0027t have any impact here, it just gives more reason why we shouldn\u0027t allow this in the first place.","commit_id":"e2f1b3fe629aca1a3c29f57d51e95a51082a0193"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"db16ba882c36235cebb180b50e44a5f3d84ee380","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        except exception.InstanceIsLocked as e:"},{"line_number":329,"context_line":"            raise exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":330,"context_line":"        except exception.DevicePathInUse as e:"},{"line_number":331,"context_line":"            raise exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":332,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":333,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":334,"context_line":"                    \u0027attach_volume\u0027, server_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_422582a9","line":331,"updated":"2016-10-04 21:05:23.000000000","message":"There are two guidelines related to 409 on api-wg guideline.\n\n 1. If a request attempts to put a resource into a state\n    which it is already in (for example, locking an instance\n    which is already locked), the return code should be in\n    the 2xx Successful range (usually matching the return\n    code which would be given if the state had changed).\n    It is not appropriate to use 409 Conflict when the\n    resulting state of the resource is as the user requested.\n\n 2. If a request is made which attempts to perform an action\n    on a resource which is already performing that action and\n    therefore the request cannot be fulfilled (for example,\n    snapshotting an instance which is already in the process\n    of snapshotting), the return code should be 409 Conflict.\n\nIn this case, the previous attach-volume operation has been already done. So this case seems the above case 1. However, we are not sure the \"device\" also is the same as the first one when this exception happens.\nSo if returning 2XX as the case 1, users would distinguish the request is succeeded as they expected but actually not sure. So 409 is good for this case, I think now.","commit_id":"e2f1b3fe629aca1a3c29f57d51e95a51082a0193"}],"nova/tests/unit/api/openstack/compute/test_volumes.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc8b27b4fdb54f5ec3af746d55518ecb696b568f","unresolved":false,"context_lines":[{"line_number":641,"context_line":""},{"line_number":642,"context_line":"        body \u003d {"},{"line_number":643,"context_line":"            \u0027volumeAttachment\u0027: {"},{"line_number":644,"context_line":"                \u0027device\u0027: None,"},{"line_number":645,"context_line":"                \u0027volumeId\u0027: FAKE_UUID_A,"},{"line_number":646,"context_line":"            }"},{"line_number":647,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_d4955d87","line":644,"range":{"start_line":644,"start_character":26,"end_line":644,"end_character":30},"updated":"2016-10-06 21:01:21.000000000","message":"nit: wouldn\u0027t this be more realistic if it were \"/dev/sda\"? :)","commit_id":"e2f1b3fe629aca1a3c29f57d51e95a51082a0193"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0464a3f7fa9168515d1da61c537bb0f78e17b0b7","unresolved":false,"context_lines":[{"line_number":641,"context_line":""},{"line_number":642,"context_line":"        body \u003d {"},{"line_number":643,"context_line":"            \u0027volumeAttachment\u0027: {"},{"line_number":644,"context_line":"                \u0027device\u0027: None,"},{"line_number":645,"context_line":"                \u0027volumeId\u0027: FAKE_UUID_A,"},{"line_number":646,"context_line":"            }"},{"line_number":647,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_b510b95a","line":644,"range":{"start_line":644,"start_character":26,"end_line":644,"end_character":30},"in_reply_to":"1a95cdbc_57678f4c","updated":"2016-10-07 11:06:33.000000000","message":"yea, thx :)","commit_id":"e2f1b3fe629aca1a3c29f57d51e95a51082a0193"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"57c140f6e7ae17f53f04d3e49a6ed23e836ae0f8","unresolved":false,"context_lines":[{"line_number":641,"context_line":""},{"line_number":642,"context_line":"        body \u003d {"},{"line_number":643,"context_line":"            \u0027volumeAttachment\u0027: {"},{"line_number":644,"context_line":"                \u0027device\u0027: None,"},{"line_number":645,"context_line":"                \u0027volumeId\u0027: FAKE_UUID_A,"},{"line_number":646,"context_line":"            }"},{"line_number":647,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_57678f4c","line":644,"range":{"start_line":644,"start_character":26,"end_line":644,"end_character":30},"in_reply_to":"1a95cdbc_d4955d87","updated":"2016-10-06 21:30:23.000000000","message":"yeah, /dev/sda seems more realistic and I prefer.","commit_id":"e2f1b3fe629aca1a3c29f57d51e95a51082a0193"}]}
