)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"fc53a20dfcceef446e830f7e570174fe70c35b03","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"For example, when a volume creation is requested, the volume is first"},{"line_number":19,"context_line":"created in the database and its status is set to \u0027creating\u0027. Then the"},{"line_number":20,"context_line":"scheduler will pick an available volume node and send the task to it. If"},{"line_number":21,"context_line":"the driver has not been initialized, the volume status will be left as"},{"line_number":22,"context_line":"\u0027creating\u0027 instead of \u0027error\u0027."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2FEf0%3D","line":20,"updated":"2014-01-17 18:29:40.000000000","message":"If the driver isn\u0027t properly initialized, the volume manager won\u0027t publish itself as \u0027available\u0027 candidate.  Thus scheduler won\u0027t pick this corrupted node to serve the request unless scheduler still holds an old stats from this very backend and that stats is still considered as valid (new stats hasn\u0027t come in and old stats.last_updated + service_down_time \u003e now() ), which is really a corner case and should barely happen.  But if I understand correctly the bug, this patch wasn\u0027t made to fix the corner case above.  So please fix the description.","commit_id":"ead229184d61773c6aae71b78dd1372e4248b128"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"a5bb8fa7ecc28d2e62ea9b7ff6dcb7363b41c14c","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"For example, when a volume creation is requested, the volume is first"},{"line_number":19,"context_line":"created in the database and its status is set to \u0027creating\u0027. Then the"},{"line_number":20,"context_line":"scheduler will pick an available volume node and send the task to it. If"},{"line_number":21,"context_line":"the driver has not been initialized, the volume status will be left as"},{"line_number":22,"context_line":"\u0027creating\u0027 instead of \u0027error\u0027."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2Bc68%3D","line":20,"in_reply_to":"AAAAUH%2F%2BkM8%3D","updated":"2014-01-26 05:05:48.000000000","message":"Hi Flavio,\n\nYes, I am aware that this is a backport of your fix to trunk.  I\u0027m sorry that I didn\u0027t review your fix for master branch, but if I did, I would raise the same question.\n\nLet me explain a little bit more on the workflow of creating a volume:  1) User sends request to Cinder API service; 2) API creates a DB entry for the volume and marks its status to \u0027creating\u0027 (https://github.com/openstack/cinder/blob/stable/havana/cinder/volume/flows/create_volume/__init__.py#L545) and sends a RPC message to scheduler; 3) scheduler picks up the message and makes placement decision and if a back-end is available, it sends the request via RPC to volume service; 4) volume service picks up the message to perform the real job creating a volume for user.\n\nThere are multiple cases in which a volume\u0027s status can be stuck in \u0027creating\u0027: \n\na) something wrong happened during RPC message being processed by scheduler (e.g. scheduler service is down - related to this change \u0026 bug: https://review.openstack.org/#/c/64014/, message is lost, scheduler service goes down while scheduler processing the message); \n\nb) something went wrong AFTER backend is chosen, which means scheduler successfully sends out the message to target back-end, possible errors are: RPC message lost, back-end driver isn\u0027t initialized correctly.  The latter case can be very rare for the reason I mentioned in previous comment (if the driver isn\u0027t properly initialized, the volume manager won\u0027t publish itself as \u0027available\u0027 candidate. https://github.com/openstack/cinder/blob/stable/havana/cinder/volume/manager.py#L803  Thus scheduler won\u0027t pick this corrupted node to serve the request _UNLESS_ scheduler still holds an old stats from this very backend and that stats is still considered as valid (new stats hasn\u0027t come in and old stats.last_updated + service_down_time \u003e now() ).\n\nIf you are fixing the really rare case where scheduler somehow picks up a corrupted node (it could happen within \u003c60 sec short window if new request comes in after someone made a bad change on back-end configuration and restarted volume-service), I fine with that.  But please make it clear that you are fixing this rare case because current commit message sounds like a improperly initialized driver always causes volume stuck in \u0027creating\u0027 status, which is not the case IMH.","commit_id":"ead229184d61773c6aae71b78dd1372e4248b128"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"cd1326421dd46108c751cb1862a7ecf7c9968c57","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"For example, when a volume creation is requested, the volume is first"},{"line_number":19,"context_line":"created in the database and its status is set to \u0027creating\u0027. Then the"},{"line_number":20,"context_line":"scheduler will pick an available volume node and send the task to it. If"},{"line_number":21,"context_line":"the driver has not been initialized, the volume status will be left as"},{"line_number":22,"context_line":"\u0027creating\u0027 instead of \u0027error\u0027."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2BkM8%3D","line":20,"in_reply_to":"AAAAUH%2F%2FEf0%3D","updated":"2014-01-24 10:43:59.000000000","message":"Hey Huang,\n\nThanks for your comment. Please, notice that this is a backport to a stable branch. The patch in master was already merged. That said, could you please point me to the part of code where this actually happens?\n\nBased on the tests I did, this was not the case and the node was available anyway. Nonetheless, the patch is still necessary because regardless how the driver ended up in that state, the volume status shouldn\u0027t be compromised.","commit_id":"ead229184d61773c6aae71b78dd1372e4248b128"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"fc53a20dfcceef446e830f7e570174fe70c35b03","unresolved":false,"context_lines":[{"line_number":21,"context_line":"the driver has not been initialized, the volume status will be left as"},{"line_number":22,"context_line":"\u0027creating\u0027 instead of \u0027error\u0027."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"This patch fixes that issue by moving the driver initialization check"},{"line_number":25,"context_line":"into the various manager\u0027s methods. In some cases this check is done at"},{"line_number":26,"context_line":"the very beginning of the method, in some others - either to avoid code"},{"line_number":27,"context_line":"duplication or because the lines above the check made sense to be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2FEfQ%3D","line":24,"updated":"2014-01-17 18:29:40.000000000","message":"Given the fact that volume nodes won\u0027t be considered as available candidates if they were not properly initialized, it seems moving the checks can\u0027t really solve the problem.","commit_id":"ead229184d61773c6aae71b78dd1372e4248b128"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"cd1326421dd46108c751cb1862a7ecf7c9968c57","unresolved":false,"context_lines":[{"line_number":21,"context_line":"the driver has not been initialized, the volume status will be left as"},{"line_number":22,"context_line":"\u0027creating\u0027 instead of \u0027error\u0027."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"This patch fixes that issue by moving the driver initialization check"},{"line_number":25,"context_line":"into the various manager\u0027s methods. In some cases this check is done at"},{"line_number":26,"context_line":"the very beginning of the method, in some others - either to avoid code"},{"line_number":27,"context_line":"duplication or because the lines above the check made sense to be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2BkM4%3D","line":24,"in_reply_to":"AAAAUH%2F%2FEfQ%3D","updated":"2014-01-24 10:43:59.000000000","message":"ditto","commit_id":"ead229184d61773c6aae71b78dd1372e4248b128"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"82c67349ab0346a093fd76829f97284bc850844d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"straightforward."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Conflicts:"},{"line_number":37,"context_line":"\tcinder/tests/test_volume.py"},{"line_number":38,"context_line":"\tcinder/utils.py"},{"line_number":39,"context_line":"\tcinder/volume/flows/create_volume/__init__.py"},{"line_number":40,"context_line":"\tcinder/volume/manager.py"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2Bcy4%3D","line":37,"updated":"2014-01-26 06:11:55.000000000","message":"tabs","commit_id":"ead229184d61773c6aae71b78dd1372e4248b128"}]}
