)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"27e2479e4ac7cbf0ac8c3a0e929cd6a37045338c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This change adds allow_availability_zone_fallback, which allows Cinder"},{"line_number":10,"context_line":"to fall back to an already configured availability zone if the"},{"line_number":11,"context_line":"requested availability zone is unavailable."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Id6b43fc3243b4de82241cfab34ff10953b537874"},{"line_number":14,"context_line":"Closes-Bug: #1489575"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da20952f_235ed176","line":12,"updated":"2015-08-27 19:43:07.000000000","message":"Need DocImpact here.","commit_id":"16552afb0c17c4d3de317e98eddd03d09ca326e0"}],"cinder/common/config.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"20245cfbcbc82e38a5b6a3d46e6bff47964ccc09","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                    \u0027the storage_availability_zone option value is used as \u0027"},{"line_number":142,"context_line":"                    \u0027the default for new volumes.\u0027),"},{"line_number":143,"context_line":"    cfg.BoolOpt(\u0027allow_availability_zone_fallback\u0027,"},{"line_number":144,"context_line":"                default\u003dFalse,"},{"line_number":145,"context_line":"                help\u003d\u0027If the requested Cinder availability zone is \u0027"},{"line_number":146,"context_line":"                     \u0027unavailable, fall back to the value of \u0027"},{"line_number":147,"context_line":"                     \u0027default_availability_zone, then \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_7d491830","line":144,"updated":"2015-09-01 12:24:54.000000000","message":"Would be good to have it as the default behavior, i.e. default\u003dTrue, but I understand it is not to keep in line with existing behavior.","commit_id":"8fa6300c003df050043651e5068979bb09dfef04"}],"cinder/tests/unit/volume/flows/test_create_volume_flow.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"6e56425678e143fa0410fb7974c40ecaa93aabad","unresolved":false,"context_lines":[{"line_number":227,"context_line":"    @mock.patch(\u0027cinder.volume.flows.api.create_volume.\u0027"},{"line_number":228,"context_line":"                \u0027ExtractVolumeRequestTask.\u0027"},{"line_number":229,"context_line":"                \u0027_get_volume_type_id\u0027)"},{"line_number":230,"context_line":"    def test_extract_availability_zone_with_fallback("},{"line_number":231,"context_line":"            self,"},{"line_number":232,"context_line":"            fake_get_type_id,"},{"line_number":233,"context_line":"            fake_get_qos,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_60ec928f","line":230,"updated":"2015-08-28 14:55:40.000000000","message":"I would love to have a test falling back to default_availability_zone and another one to storage_availability_zone. This isn\u0027t however blocking.","commit_id":"3926509339b1876049b4313032208a95d2b7bb22"}],"cinder/volume/flows/api/create_volume.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"27e2479e4ac7cbf0ac8c3a0e929cd6a37045338c","unresolved":false,"context_lines":[{"line_number":283,"context_line":"                    CONF.default_availability_zone or"},{"line_number":284,"context_line":"                    CONF.storage_availability_zone)"},{"line_number":285,"context_line":"                msg \u003d _(\"Availability zone \u0027%s\u0027 not found, falling back to \""},{"line_number":286,"context_line":"                        \"\u0027%s\u0027\" % (original_az, availability_zone))"},{"line_number":287,"context_line":"                LOG.warning(msg)"},{"line_number":288,"context_line":"            else:"},{"line_number":289,"context_line":"                msg \u003d _((\"Availability zone \u0027%s\u0027 is invalid\") %"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_231011a8","line":286,"updated":"2015-08-27 19:43:07.000000000","message":". at EOL please.  Also you can just do this as LOG.warning(_LW()) since you are not also doing an exception.","commit_id":"16552afb0c17c4d3de317e98eddd03d09ca326e0"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"27e2479e4ac7cbf0ac8c3a0e929cd6a37045338c","unresolved":false,"context_lines":[{"line_number":286,"context_line":"                        \"\u0027%s\u0027\" % (original_az, availability_zone))"},{"line_number":287,"context_line":"                LOG.warning(msg)"},{"line_number":288,"context_line":"            else:"},{"line_number":289,"context_line":"                msg \u003d _((\"Availability zone \u0027%s\u0027 is invalid\") %"},{"line_number":290,"context_line":"                        (availability_zone))"},{"line_number":291,"context_line":"                LOG.warning(msg)"},{"line_number":292,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_8378fdf3","line":289,"updated":"2015-08-27 19:43:07.000000000","message":". at EOL please.","commit_id":"16552afb0c17c4d3de317e98eddd03d09ca326e0"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"20245cfbcbc82e38a5b6a3d46e6bff47964ccc09","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                LOG.warning(msg, {\u0027s_az\u0027: original_az,"},{"line_number":288,"context_line":"                                  \u0027s_fallback_az\u0027: availability_zone})"},{"line_number":289,"context_line":"            else:"},{"line_number":290,"context_line":"                msg \u003d _LW(\"Availability zone \u0027%(s_az)s\u0027 is invalid.\")"},{"line_number":291,"context_line":"                LOG.warning(msg, {\u0027s_az\u0027: availability_zone})"},{"line_number":292,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_dd9dc4bc","line":290,"updated":"2015-09-01 12:24:54.000000000","message":"msg should just use _(), since it is passed to an exception later on.","commit_id":"8fa6300c003df050043651e5068979bb09dfef04"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"cdd1a3885ffd2b2eaeb670ceefe74a7d5b84b231","unresolved":false,"context_lines":[{"line_number":285,"context_line":"                msg \u003d _LW(\"Availability zone \u0027%(s_az)s\u0027 not found, falling \""},{"line_number":286,"context_line":"                          \"back to \u0027%(s_fallback_az)s\u0027.\")"},{"line_number":287,"context_line":"                LOG.warning(msg, {\u0027s_az\u0027: original_az,"},{"line_number":288,"context_line":"                                  \u0027s_fallback_az\u0027: availability_zone})"},{"line_number":289,"context_line":"            else:"},{"line_number":290,"context_line":"                msg \u003d _(\"Availability zone \u0027%(s_az)s\u0027 is invalid.\")"},{"line_number":291,"context_line":"                msg \u003d msg % {\u0027s_az\u0027: availability_zone}"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_703b639d","line":288,"updated":"2015-09-01 21:36:38.000000000","message":"Please use the resource tag here with the volume to make the logging consistent.","commit_id":"a11ecc2ca3df197f079409396d672e41b22b5d15"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"9f0e2d5e1d7937684af9efa5e720850717d4002d","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                availability_zone \u003d ("},{"line_number":283,"context_line":"                    CONF.default_availability_zone or"},{"line_number":284,"context_line":"                    CONF.storage_availability_zone)"},{"line_number":285,"context_line":"                if snapshot:"},{"line_number":286,"context_line":"                    volume \u003d snapshot[\u0027volume\u0027]"},{"line_number":287,"context_line":"                else:"},{"line_number":288,"context_line":"                    volume \u003d source_volume"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_57de086e","line":285,"updated":"2015-09-03 09:00:38.000000000","message":"Logic in lines 285-288 isn\u0027t correct. In line #294 we want to pass the volume we\u0027re *currently creating* and not the snapshot origin volume (#286) or source volume #288. Moreover we may be creating a raw volume, so both snapshot and source_volume will be None.\n\nAt this point we don\u0027t have the volume row created in the DB (ExtractVolumeRequestTask is executed before EntryCreateTask), so I don\u0027t think we can log a resource here.","commit_id":"2a50dea89e29db3efef0510f23fabc772b3453f8"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"4ce7ae04f2b86f715d704d06e598d0ad4026879f","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                availability_zone \u003d ("},{"line_number":283,"context_line":"                    CONF.default_availability_zone or"},{"line_number":284,"context_line":"                    CONF.storage_availability_zone)"},{"line_number":285,"context_line":"                if snapshot:"},{"line_number":286,"context_line":"                    volume \u003d snapshot[\u0027volume\u0027]"},{"line_number":287,"context_line":"                else:"},{"line_number":288,"context_line":"                    volume \u003d source_volume"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_2eca116f","line":285,"in_reply_to":"da20952f_0b1ce0bf","updated":"2015-09-03 13:48:27.000000000","message":"Yes, but we\u0027re working on creating a new volume here. If we want to log resource here it should be the volume we\u0027re creating and not it\u0027s origin volume (or snapshot\u0027s origin). That\u0027s my understanding of logging a resource tag.","commit_id":"2a50dea89e29db3efef0510f23fabc772b3453f8"},{"author":{"_account_id":16421,"name":"Edmund Rhudy","email":"erhudy@bloomberg.net","username":"erhudy"},"change_message_id":"5c0e6774e217e5b3ac695a7d9191bfefde0f42a5","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                availability_zone \u003d ("},{"line_number":283,"context_line":"                    CONF.default_availability_zone or"},{"line_number":284,"context_line":"                    CONF.storage_availability_zone)"},{"line_number":285,"context_line":"                if snapshot:"},{"line_number":286,"context_line":"                    volume \u003d snapshot[\u0027volume\u0027]"},{"line_number":287,"context_line":"                else:"},{"line_number":288,"context_line":"                    volume \u003d source_volume"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_9ae037ce","line":285,"in_reply_to":"da20952f_2eca116f","updated":"2015-09-03 15:03:40.000000000","message":"Okay, I understand your point, but to accomplish that ExtractVolumeRequestTask will need to also get create_what passed in to have access to the requested name of the volume (which could be None). It can\u0027t have access to the new volume ID because this task fires before EntryCreateTask. I can do that refactoring (and already tested it out locally), but doing so will substantially increase the blast radius of this change. Right now everything\u0027s localized to this single method, but reworking the class init will require more scrutiny.","commit_id":"2a50dea89e29db3efef0510f23fabc772b3453f8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"9b1fa0a34fad5f23bf0ba52b19c8489be5d2f6ea","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                availability_zone \u003d ("},{"line_number":283,"context_line":"                    CONF.default_availability_zone or"},{"line_number":284,"context_line":"                    CONF.storage_availability_zone)"},{"line_number":285,"context_line":"                if snapshot:"},{"line_number":286,"context_line":"                    volume \u003d snapshot[\u0027volume\u0027]"},{"line_number":287,"context_line":"                else:"},{"line_number":288,"context_line":"                    volume \u003d source_volume"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_1fcad96e","line":285,"in_reply_to":"da20952f_2eca116f","updated":"2015-09-03 14:43:39.000000000","message":"So you\u0027re both \"right\" kinda IMO.\n\nIt would in fact be more correct/better for this to be the created resource (which we don\u0027t have a handle for here).  I\u0027m ok with filing a bug and coming back to this and figuring out a good way to clean it up.","commit_id":"2a50dea89e29db3efef0510f23fabc772b3453f8"},{"author":{"_account_id":16421,"name":"Edmund Rhudy","email":"erhudy@bloomberg.net","username":"erhudy"},"change_message_id":"785d04d1724ac345c42d2768afe12167c2375f33","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                availability_zone \u003d ("},{"line_number":283,"context_line":"                    CONF.default_availability_zone or"},{"line_number":284,"context_line":"                    CONF.storage_availability_zone)"},{"line_number":285,"context_line":"                if snapshot:"},{"line_number":286,"context_line":"                    volume \u003d snapshot[\u0027volume\u0027]"},{"line_number":287,"context_line":"                else:"},{"line_number":288,"context_line":"                    volume \u003d source_volume"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_0b1ce0bf","line":285,"in_reply_to":"da20952f_57de086e","updated":"2015-09-03 13:12:32.000000000","message":"Based on my reading of the logging code (https://github.com/openstack/oslo.log/blob/master/oslo_log/log.py#L173 and onward), it\u0027s highly pessimistic about what gets passed in via resource, and the whole code path is set up to expect None. If both snapshot and source_volume are None, then the else should catch it and set volume to None, and the logger should then not act on it on account of the \"if resource:\" clause in the logger itself.","commit_id":"2a50dea89e29db3efef0510f23fabc772b3453f8"}]}
