)]}'
{"nova/compute/api.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c907c8690ef02f1953dc59e55eeb3a48fb4adddf","unresolved":false,"context_lines":[{"line_number":3018,"context_line":"        to override it."},{"line_number":3019,"context_line":"        \"\"\""},{"line_number":3020,"context_line":"        volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":3021,"context_line":"        self.volume_api.check_attach(context, volume, instance\u003dinstance)"},{"line_number":3022,"context_line":""},{"line_number":3023,"context_line":"        # NOTE(vish): This is done on the compute host because we want"},{"line_number":3024,"context_line":"        #             to avoid a race where two devices are requested at"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab921fb_5dcb99a5","line":3021,"updated":"2015-04-24 16:28:08.000000000","message":"Check attach really makes no sense at all - it\u0027s racy by definition reserve_volume should always be used instead.\n\nThe reason however that this never got changed is that check_attach  also checks the availabilty zone of the volume and the instance match.\n\nThinking about it now - it may be OK to leave this check racy as AZs ov volumes are unlikely to change. Attach status however has to be test-and-set to really avoid races.","commit_id":"813ade51b58e700b0077b91a26a1a20e086b93f0"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"81869f73fb5543c6ebb8a125abac63b072715639","unresolved":false,"context_lines":[{"line_number":3018,"context_line":"        to override it."},{"line_number":3019,"context_line":"        \"\"\""},{"line_number":3020,"context_line":"        volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":3021,"context_line":"        self.volume_api.check_attach(context, volume, instance\u003dinstance)"},{"line_number":3022,"context_line":""},{"line_number":3023,"context_line":"        # NOTE(vish): This is done on the compute host because we want"},{"line_number":3024,"context_line":"        #             to avoid a race where two devices are requested at"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_9cedbcb9","line":3021,"in_reply_to":"bab921fb_5dcb99a5","updated":"2015-08-10 15:14:06.000000000","message":"so check_attach and reserve_volume should be both used \nand reserve_volume is the one who did real job? thanks","commit_id":"813ade51b58e700b0077b91a26a1a20e086b93f0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b1c3a2cbe63ef6e632ae785ec2470fd6c9d6297e","unresolved":false,"context_lines":[{"line_number":3050,"context_line":""},{"line_number":3051,"context_line":"        # NOTE(vish): This is done on the compute host because we want"},{"line_number":3052,"context_line":"        #             to avoid a race where two devices are requested at"},{"line_number":3053,"context_line":"        #             the same time. When db access is removed from"},{"line_number":3054,"context_line":"        #             compute, the bdm will be created here and we will"},{"line_number":3055,"context_line":"        #             have to make sure that they are assigned atomically."},{"line_number":3056,"context_line":"        volume_bdm \u003d self.compute_rpcapi.reserve_block_device_name("}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_2cf53d82","line":3053,"updated":"2015-08-19 10:06:04.000000000","message":"Don\u0027t you break this bug fix with this change?","commit_id":"173dab1a8a819e600cf2facc6bebacc371a680bf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"55fb031ecc99baccc22a94d88aa21ec57da1c660","unresolved":false,"context_lines":[{"line_number":3050,"context_line":""},{"line_number":3051,"context_line":"        # NOTE(vish): This is done on the compute host because we want"},{"line_number":3052,"context_line":"        #             to avoid a race where two devices are requested at"},{"line_number":3053,"context_line":"        #             the same time. When db access is removed from"},{"line_number":3054,"context_line":"        #             compute, the bdm will be created here and we will"},{"line_number":3055,"context_line":"        #             have to make sure that they are assigned atomically."},{"line_number":3056,"context_line":"        volume_bdm \u003d self.compute_rpcapi.reserve_block_device_name("}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_ac994d21","line":3053,"in_reply_to":"fa1b9901_2cf53d82","updated":"2015-08-19 10:07:27.000000000","message":"Yeah, this is the code that is stopping the race described here:\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L4453","commit_id":"173dab1a8a819e600cf2facc6bebacc371a680bf"}]}
