)]}'
{"cinder/scheduler/filter_scheduler.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"91b6f3f88c02c617f0f66cdc73ae58ecb6d468a8","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        # takes \u0027resource_XX\u0027 and \u0027volume_XX\u0027 as input respectively, copying"},{"line_number":288,"context_line":"        # \u0027volume_XX\u0027 to \u0027resource_XX\u0027 will make both filters happy."},{"line_number":289,"context_line":"        volume_type \u003d request_spec.get(\"volume_type\")"},{"line_number":290,"context_line":"        if volume_type is None:"},{"line_number":291,"context_line":"            volume_type \u003d {}"},{"line_number":292,"context_line":"        resource_type \u003d volume_type"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_aa6eeb61","line":290,"updated":"2019-12-13 22:35:46.000000000","message":"Maybe I\u0027m missing something, but this code looks like a functionally equivalent longer form. The original oneliner had basically the reverse with a longer form being:\n\nif volume_type is not None:\n    resource_type \u003d volume_type\nelse:\n    resource_type \u003d {}\n\nWhat am I missing here?","commit_id":"3241010670b18e453eab378b4e607d6d64de9896"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"43b7ee16acbd03190dcdf436b2258e007b0b71bd","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        # takes \u0027resource_XX\u0027 and \u0027volume_XX\u0027 as input respectively, copying"},{"line_number":288,"context_line":"        # \u0027volume_XX\u0027 to \u0027resource_XX\u0027 will make both filters happy."},{"line_number":289,"context_line":"        volume_type \u003d request_spec.get(\"volume_type\")"},{"line_number":290,"context_line":"        if volume_type is None:"},{"line_number":291,"context_line":"            volume_type \u003d {}"},{"line_number":292,"context_line":"        resource_type \u003d volume_type"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_1c1ac97b","line":290,"in_reply_to":"3fa7e38b_2b5e6113","updated":"2019-12-17 12:44:12.000000000","message":"But as I showed in the paste, this is just doing the same thing as it was before to make sure that the assignment to resource_type doesn\u0027t end up being None. It\u0027s just taking a more verbose way to do so.","commit_id":"3241010670b18e453eab378b4e607d6d64de9896"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"76ca8df2da71b3f2d97573cd41301fd91f48cf93","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        # takes \u0027resource_XX\u0027 and \u0027volume_XX\u0027 as input respectively, copying"},{"line_number":288,"context_line":"        # \u0027volume_XX\u0027 to \u0027resource_XX\u0027 will make both filters happy."},{"line_number":289,"context_line":"        volume_type \u003d request_spec.get(\"volume_type\")"},{"line_number":290,"context_line":"        if volume_type is None:"},{"line_number":291,"context_line":"            volume_type \u003d {}"},{"line_number":292,"context_line":"        resource_type \u003d volume_type"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_d30c3e3c","line":290,"in_reply_to":"3fa7e38b_aa6eeb61","updated":"2019-12-14 06:41:54.000000000","message":"So the previous fixes (as mentioned in the commit msg) fixed the issue with the \u0027resource_type\u0027 variable which caused error at L#317 (resource_type.get(\u0027extra_specs\u0027, {}))\nHowever the \u0027filter_properties\u0027 dict is updated with \u0027volume_type\u0027 at L#306 (not resource_type) and is passed to the filter[1] set in cinder.conf\nThe bug points here[2] and yes we could fix it there but this is the origin of the issue and it doesn\u0027t seem like a DriverFilter issue (also is a general fix for all filters IMO)\nThe same issue would\u0027ve occurred in capacity_filter but it is handled better there[3] (None or {})\n\n[1] https://github.com/openstack/cinder/tree/master/cinder/scheduler/filters\n[2] https://github.com/openstack/cinder/blob/master/cinder/scheduler/filters/driver_filter.py#L127\n[3] https://github.com/openstack/cinder/blob/master/cinder/scheduler/filters/capacity_filter.py#L115","commit_id":"3241010670b18e453eab378b4e607d6d64de9896"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"9edae02c3d472b5f7e0d6dd5907c4a54fe0fa798","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        # takes \u0027resource_XX\u0027 and \u0027volume_XX\u0027 as input respectively, copying"},{"line_number":288,"context_line":"        # \u0027volume_XX\u0027 to \u0027resource_XX\u0027 will make both filters happy."},{"line_number":289,"context_line":"        volume_type \u003d request_spec.get(\"volume_type\")"},{"line_number":290,"context_line":"        if volume_type is None:"},{"line_number":291,"context_line":"            volume_type \u003d {}"},{"line_number":292,"context_line":"        resource_type \u003d volume_type"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_df44354b","line":290,"in_reply_to":"3fa7e38b_d30c3e3c","updated":"2019-12-16 13:46:48.000000000","message":"Location is probably fine. My point is that this isn\u0027t changing what the code does.\n\nhttp://paste.openstack.org/show/787632/","commit_id":"3241010670b18e453eab378b4e607d6d64de9896"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"dccafb33114cee9ba317d1d36cf1b921e9f41422","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        # takes \u0027resource_XX\u0027 and \u0027volume_XX\u0027 as input respectively, copying"},{"line_number":288,"context_line":"        # \u0027volume_XX\u0027 to \u0027resource_XX\u0027 will make both filters happy."},{"line_number":289,"context_line":"        volume_type \u003d request_spec.get(\"volume_type\")"},{"line_number":290,"context_line":"        if volume_type is None:"},{"line_number":291,"context_line":"            volume_type \u003d {}"},{"line_number":292,"context_line":"        resource_type \u003d volume_type"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_2b5e6113","line":290,"in_reply_to":"3fa7e38b_df44354b","updated":"2019-12-17 07:37:56.000000000","message":"The change is in \u0027volume_type\u0027 (None -\u003e {}) and not \u0027resource_type\u0027\nI modified the resource_type line just to make it clean","commit_id":"3241010670b18e453eab378b4e607d6d64de9896"}]}
