)]}'
{"cinder/volume/manager.py":[{"author":{"_account_id":11903,"name":"Anthony Lee","email":"anthony.mic.lee@hpe.com","username":"leeantho"},"change_message_id":"0887b21b14dd13eac56bfc34310ec6d5bbe63a18","unresolved":false,"context_lines":[{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"        attachment \u003d self.db.volume_attachment_get_by_host(context.elevated(),"},{"line_number":1087,"context_line":"                                                           volume[\u0027id\u0027],"},{"line_number":1088,"context_line":"                                                           connector[\u0027host\u0027])"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"        if not attachment:"},{"line_number":1091,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_0214ec4a","line":1088,"updated":"2015-08-14 20:38:56.000000000","message":"During testing of this patch it seems like this call to the database always returns None. This means the if statement below will always be entered and create_export never skipped.\n\nInvestigating the cause revealed that this call always returns None because the \u0027attached_host\u0027 field in the cinder-\u003evolume_attachment MySQL table is always set to NULL even after an attachment has occurred.\n\nLooking at Nova it looks like when it calls the attach API in the cinderclient it does not specify the optional host_name argument and it defaults to None. Eventually this leads to \u0027attached_host\u0027 being NULL in the database for that attachment.\n\nCode section references for nova and the cinderclient:\n\nhttps://github.com/openstack/nova/blob/master/nova/virt/block_device.py#L279\n\nhttps://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/volumes.py#L48","commit_id":"0af72be488f10e8331ff0d5e8689856a685bedd3"}]}
