)]}'
{"cinder/volume/manager.py":[{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"ba7e1c40f761a59b63c0441918e5f05035370041","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                                    instance_uuid,"},{"line_number":527,"context_line":"                                    host_name_sanitized,"},{"line_number":528,"context_line":"                                    mountpoint)"},{"line_number":529,"context_line":"            volume \u003d self.db.volume_get(context, volume_id)"},{"line_number":530,"context_line":"            self._notify_about_volume_usage(context, volume, \"attach.end\")"},{"line_number":531,"context_line":"        return do_attach()"},{"line_number":532,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FDXA%3D","line":529,"updated":"2013-11-15 06:05:12.000000000","message":"Looks like we already get the volume object on line 506.","commit_id":"6874cdeeac27b701610667a4cdd5769372a554fd"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"7a9e451c6d0eff74acfbc65841381d5311afb805","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                                    instance_uuid,"},{"line_number":527,"context_line":"                                    host_name_sanitized,"},{"line_number":528,"context_line":"                                    mountpoint)"},{"line_number":529,"context_line":"            volume \u003d self.db.volume_get(context, volume_id)"},{"line_number":530,"context_line":"            self._notify_about_volume_usage(context, volume, \"attach.end\")"},{"line_number":531,"context_line":"        return do_attach()"},{"line_number":532,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BWO0%3D","line":529,"in_reply_to":"AAAATn%2F%2B4ow%3D","updated":"2013-11-27 03:49:12.000000000","message":"You could always change volume_attached to give an updated vol_ref. At the very least I\u0027d recommend using db.volume_update, which uses the same session in the vol ref fetching it does, so you\u0027re not establishing another database connection.","commit_id":"6874cdeeac27b701610667a4cdd5769372a554fd"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"97b5801602325b03a1af2c3af05d8c14c763c065","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                                    instance_uuid,"},{"line_number":527,"context_line":"                                    host_name_sanitized,"},{"line_number":528,"context_line":"                                    mountpoint)"},{"line_number":529,"context_line":"            volume \u003d self.db.volume_get(context, volume_id)"},{"line_number":530,"context_line":"            self._notify_about_volume_usage(context, volume, \"attach.end\")"},{"line_number":531,"context_line":"        return do_attach()"},{"line_number":532,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BKBE%3D","line":529,"in_reply_to":"AAAATn%2F%2BWO0%3D","updated":"2013-12-01 00:33:16.000000000","message":"Done. Thanks for the suggestion!","commit_id":"6874cdeeac27b701610667a4cdd5769372a554fd"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"4e04c6c0105a8e7456a48906ba9751d7b8052ee7","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                                    instance_uuid,"},{"line_number":527,"context_line":"                                    host_name_sanitized,"},{"line_number":528,"context_line":"                                    mountpoint)"},{"line_number":529,"context_line":"            volume \u003d self.db.volume_get(context, volume_id)"},{"line_number":530,"context_line":"            self._notify_about_volume_usage(context, volume, \"attach.end\")"},{"line_number":531,"context_line":"        return do_attach()"},{"line_number":532,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B4ow%3D","line":529,"in_reply_to":"AAAATn%2F%2FDXA%3D","updated":"2013-11-18 23:56:32.000000000","message":"My concern and need is to have the latest volume state. self.db.volume_attached does update the state and I wish to have this information in the notification.\n\nUnfortunately, although cinder.db.api.volume_attached suggests the updated volume is returned, the actual implementation made by cinder.db.api.sqlalchemy.api.volume_attached does not return the updated volume. This is why I used volume.get to get the latest state.","commit_id":"6874cdeeac27b701610667a4cdd5769372a554fd"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"ba7e1c40f761a59b63c0441918e5f05035370041","unresolved":false,"context_lines":[{"line_number":527,"context_line":"                                    host_name_sanitized,"},{"line_number":528,"context_line":"                                    mountpoint)"},{"line_number":529,"context_line":"            volume \u003d self.db.volume_get(context, volume_id)"},{"line_number":530,"context_line":"            self._notify_about_volume_usage(context, volume, \"attach.end\")"},{"line_number":531,"context_line":"        return do_attach()"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    @utils.require_driver_initialized"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FDTU%3D","line":530,"updated":"2013-11-15 06:05:12.000000000","message":"I think this changes what do_attach would return. Following up the chain _notify_about_volume_usage calls volume.utils.notify_about_volume_usage, which would return whatever comes from the call of cinder.openstack.common.notifier.api.notify(). However notify() doesn\u0027t return anything. Originally, do_attach was returning the return result from self.db.volume_attached. I double checked and it doesn\u0027t look like anything is evaluating this methods return, but something to keep in mind.","commit_id":"6874cdeeac27b701610667a4cdd5769372a554fd"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"4e04c6c0105a8e7456a48906ba9751d7b8052ee7","unresolved":false,"context_lines":[{"line_number":527,"context_line":"                                    host_name_sanitized,"},{"line_number":528,"context_line":"                                    mountpoint)"},{"line_number":529,"context_line":"            volume \u003d self.db.volume_get(context, volume_id)"},{"line_number":530,"context_line":"            self._notify_about_volume_usage(context, volume, \"attach.end\")"},{"line_number":531,"context_line":"        return do_attach()"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    @utils.require_driver_initialized"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B4pA%3D","line":530,"in_reply_to":"AAAATn%2F%2FDTU%3D","updated":"2013-11-18 23:56:32.000000000","message":"There is no return clause in do_attach() and Python does not implicitly return the last evaluated value. I do however understand your concern and will keep it in mind.","commit_id":"6874cdeeac27b701610667a4cdd5769372a554fd"}]}
