)]}'
{"etc/rootwrap.conf":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"040a9f2d21ebf43e737b1bcd2530d939cef58133","unresolved":false,"context_lines":[{"line_number":3,"context_line":""},{"line_number":4,"context_line":"[DEFAULT]"},{"line_number":5,"context_line":"# List of directories to load filter definitions from (separated by \u0027,\u0027)."},{"line_number":6,"context_line":"# These directories MUST all be only writeable by root !"},{"line_number":7,"context_line":"filters_path\u003d/etc/glance/rootwrap.d,/usr/share/glance/rootwrap"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"# List of directories to search executables in, in case filters do not"}],"source_content_type":"text/plain","patch_set":17,"id":"fa69d971_9b7651d7","line":6,"range":{"start_line":6,"start_character":20,"end_line":6,"end_character":24},"updated":"2016-01-07 16:36:25.000000000","message":"Is this checked in the code (be it cinder or oslo.rootwrap)?","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"aa13b4a24c7ef583af00c2c8c0918e97b20ae1b6","unresolved":false,"context_lines":[{"line_number":3,"context_line":""},{"line_number":4,"context_line":"[DEFAULT]"},{"line_number":5,"context_line":"# List of directories to load filter definitions from (separated by \u0027,\u0027)."},{"line_number":6,"context_line":"# These directories MUST all be only writeable by root !"},{"line_number":7,"context_line":"filters_path\u003d/etc/glance/rootwrap.d,/usr/share/glance/rootwrap"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"# List of directories to search executables in, in case filters do not"}],"source_content_type":"text/plain","patch_set":17,"id":"fa69d971_52117dae","line":6,"range":{"start_line":6,"start_character":20,"end_line":6,"end_character":24},"in_reply_to":"fa69d971_9b7651d7","updated":"2016-01-08 02:11:42.000000000","message":"No. Although this message is written in rootwrap.conf in every project, oslo_rootwrap doesn\u0027t check it. Actually devstack will install the file for tempest tests with \u0027stack\u0027 user as the owner in some projects, it works (passes the tests).","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"}],"etc/rootwrap.d/cinder_store.filters":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"ec659eeeb3069729a8ade60dab7f8c8797c4af79","unresolved":false,"context_lines":[{"line_number":13,"context_line":"iscsiadm: CommandFilter, iscsiadm, root"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# cinder store driver"},{"line_number":16,"context_line":"chown: CommandFilter, chown, root"}],"source_content_type":"application/octet-stream","patch_set":14,"id":"fa1b9901_d80a7bd2","line":16,"updated":"2015-08-18 09:11:30.000000000","message":"It seems that this command is too permissive (https://security.openstack.org/guidelines/dg_use-oslo-rootwrap-securely.html). Any chance replace this command and others with RegExpFilters?","commit_id":"46d20549b589b37898210068c42c43df310f6944"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"337169a18ab432a11fc7a462df6fc66f34231fe1","unresolved":false,"context_lines":[{"line_number":13,"context_line":"iscsiadm: CommandFilter, iscsiadm, root"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# cinder store driver"},{"line_number":16,"context_line":"chown: CommandFilter, chown, root"}],"source_content_type":"application/octet-stream","patch_set":14,"id":"fa1b9901_bda68051","line":16,"in_reply_to":"fa1b9901_d80a7bd2","updated":"2015-08-18 17:04:43.000000000","message":"Done","commit_id":"46d20549b589b37898210068c42c43df310f6944"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e464e2cc8efbbcb7d3b7ef614f4d10aa391cbbaf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"3a57f1b5_ce04e916","updated":"2016-02-10 14:52:56.000000000","message":"Can we rename this file to `glance_cinder_store.filters` ?","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"9d621b792b3db1498177541ae92c417ff6c34aea","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"3a57f1b5_7c24245f","in_reply_to":"3a57f1b5_ce04e916","updated":"2016-02-12 06:06:18.000000000","message":"No problem. Will change in a next revision.","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"}],"glance_store/_drivers/cinder.py":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"9d48a1ca52cd567ea9304519d4229b7e0205340a","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def get_cinderclient(conf, context\u003dNone):"},{"line_number":91,"context_line":"    glance_store \u003d conf.glance_store"},{"line_number":92,"context_line":"    uesr_overriden \u003d all([glance_store.get(\u0027cinder_store_\u0027 + key)"},{"line_number":93,"context_line":"                          for key in [\u0027user_name\u0027, \u0027password\u0027,"},{"line_number":94,"context_line":"                                      \u0027tenant_name\u0027, \u0027auth_address\u0027]])"},{"line_number":95,"context_line":"    if uesr_overriden:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a41bdd9_f12cd403","line":92,"updated":"2015-07-15 02:01:39.000000000","message":"is this supposed to be \u0027user_overriden\u0027?","commit_id":"19d8a37a49eac72db9873523d35ee01ba61ae9b0"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"65c05eada6576770d43dc90d92c427f99effb9ef","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def get_cinderclient(conf, context\u003dNone):"},{"line_number":91,"context_line":"    glance_store \u003d conf.glance_store"},{"line_number":92,"context_line":"    uesr_overriden \u003d all([glance_store.get(\u0027cinder_store_\u0027 + key)"},{"line_number":93,"context_line":"                          for key in [\u0027user_name\u0027, \u0027password\u0027,"},{"line_number":94,"context_line":"                                      \u0027tenant_name\u0027, \u0027auth_address\u0027]])"},{"line_number":95,"context_line":"    if uesr_overriden:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a41bdd9_8985f8cf","line":92,"in_reply_to":"9a41bdd9_f12cd403","updated":"2015-07-15 16:41:01.000000000","message":"Yes. Will fix in next revision.","commit_id":"19d8a37a49eac72db9873523d35ee01ba61ae9b0"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"9d48a1ca52cd567ea9304519d4229b7e0205340a","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        tries \u003d 0"},{"line_number":229,"context_line":"        while volume.status \u003d\u003d status:"},{"line_number":230,"context_line":"            tries +\u003d 1"},{"line_number":231,"context_line":"            if tries \u003e 50:"},{"line_number":232,"context_line":"                msg \u003d (_(\u0027Timeout while waiting the status of volume \u0027"},{"line_number":233,"context_line":"                         \u0027%(volume_id)s to be %(status)s.\u0027)"},{"line_number":234,"context_line":"                       % {\u0027volume_id\u0027: volume.id, \u0027status\u0027: status})"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a41bdd9_d18510cf","line":231,"updated":"2015-07-15 02:01:39.000000000","message":"would it make sense to have a config option for this to specify how long it should wait for volumes?","commit_id":"19d8a37a49eac72db9873523d35ee01ba61ae9b0"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"65c05eada6576770d43dc90d92c427f99effb9ef","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        tries \u003d 0"},{"line_number":229,"context_line":"        while volume.status \u003d\u003d status:"},{"line_number":230,"context_line":"            tries +\u003d 1"},{"line_number":231,"context_line":"            if tries \u003e 50:"},{"line_number":232,"context_line":"                msg \u003d (_(\u0027Timeout while waiting the status of volume \u0027"},{"line_number":233,"context_line":"                         \u0027%(volume_id)s to be %(status)s.\u0027)"},{"line_number":234,"context_line":"                       % {\u0027volume_id\u0027: volume.id, \u0027status\u0027: status})"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a41bdd9_690bd47d","line":231,"in_reply_to":"9a41bdd9_d18510cf","updated":"2015-07-15 16:41:01.000000000","message":"Agreed. I\u0027ll make this to a config option.","commit_id":"19d8a37a49eac72db9873523d35ee01ba61ae9b0"},{"author":{"_account_id":16683,"name":"Alexey Galkin","email":"agalkin@mirantis.com","username":"agalkin"},"change_message_id":"ab00058a79fe38efc18147af4348cf25c9883c43","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        checksum \u003d hashlib.md5()"},{"line_number":409,"context_line":"        bytes_written \u003d 0"},{"line_number":410,"context_line":"        size_gb \u003d int((image_size + units.Gi - 1) / units.Gi)"},{"line_number":411,"context_line":"        if size_gb \u003d\u003d 0:"},{"line_number":412,"context_line":"            size_gb \u003d 1"},{"line_number":413,"context_line":"        name \u003d \"image-%s\" % image_id"},{"line_number":414,"context_line":"        owner \u003d context.tenant"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a29b11f_a9ce7b81","line":411,"updated":"2015-10-18 20:27:35.000000000","message":"You can use a simpler and more beautiful expression:\n\nsize_gb \u003d 1 if (size_gb \u003d\u003d 0)","commit_id":"2c21c30cdec455ae71cc333adbff200b094246f2"},{"author":{"_account_id":9352,"name":"Charles Crouch","email":"charles.crouch@gmail.com","username":"ccrouch"},"change_message_id":"356c02810e52ff91f72bd666a8459b3900bd9656","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        checksum \u003d hashlib.md5()"},{"line_number":409,"context_line":"        bytes_written \u003d 0"},{"line_number":410,"context_line":"        size_gb \u003d int((image_size + units.Gi - 1) / units.Gi)"},{"line_number":411,"context_line":"        if size_gb \u003d\u003d 0:"},{"line_number":412,"context_line":"            size_gb \u003d 1"},{"line_number":413,"context_line":"        name \u003d \"image-%s\" % image_id"},{"line_number":414,"context_line":"        owner \u003d context.tenant"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a26ad4f_3ef26d70","line":411,"in_reply_to":"3a29b11f_a9ce7b81","updated":"2015-10-29 03:31:51.000000000","message":"This doesn\u0027t seem like a significant problem with this current change? If this is an important change perhaps it could be done in a follow on patch?","commit_id":"2c21c30cdec455ae71cc333adbff200b094246f2"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9847714cfd34e8068aaa37e0696419637bbef4c8","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"_CINDER_OPTS \u003d ["},{"line_number":48,"context_line":"    cfg.StrOpt(\u0027cinder_catalog_info\u0027,"},{"line_number":49,"context_line":"               default\u003d\u0027volumev2:cinder:publicURL\u0027,"},{"line_number":50,"context_line":"               help\u003d_(\u0027Info to match when looking for cinder in the service \u0027"},{"line_number":51,"context_line":"                      \u0027catalog. Format is : separated values of the form: \u0027"},{"line_number":52,"context_line":"                      \u0027\u003cservice_type\u003e:\u003cservice_name\u003e:\u003cendpoint_type\u003e\u0027)),"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_3eb5e130","line":49,"range":{"start_line":49,"start_character":49,"end_line":49,"end_character":51},"updated":"2016-01-07 13:38:32.000000000","message":"I don\u0027t think we need name (\u0027cinder\u0027) here. The service_type should be unique and consistent between deployments. I don\u0027t think the name is guaranteed to be consistent between deployments (eg our cloud has \u0027Block Storage\u0027), so forcing a match may cause deployers issues figuring out why their cinder store isn\u0027t working.\n\nI\u0027d also be inclined to separate the endpoint type (publicURL) into a separate variable rather than have one variable trying to do two things. (That\u0027s what we have for the swift store).","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f7dc496b88331b196cdaf7a87e3d430183b36495","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"_CINDER_OPTS \u003d ["},{"line_number":48,"context_line":"    cfg.StrOpt(\u0027cinder_catalog_info\u0027,"},{"line_number":49,"context_line":"               default\u003d\u0027volumev2:cinder:publicURL\u0027,"},{"line_number":50,"context_line":"               help\u003d_(\u0027Info to match when looking for cinder in the service \u0027"},{"line_number":51,"context_line":"                      \u0027catalog. Format is : separated values of the form: \u0027"},{"line_number":52,"context_line":"                      \u0027\u003cservice_type\u003e:\u003cservice_name\u003e:\u003cendpoint_type\u003e\u0027)),"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_39faadbe","line":49,"range":{"start_line":49,"start_character":49,"end_line":49,"end_character":51},"in_reply_to":"da6ed579_b831bcee","updated":"2016-01-12 17:03:31.000000000","message":"Here\u0027s what\u0027s in nova:\n\n    cfg.StrOpt(\u0027catalog_info\u0027,\n            default\u003d\u0027volumev2:cinderv2:publicURL\u0027,\n            help\u003d\u0027Info to match when looking for cinder in the service \u0027\n                 \u0027catalog. Format is: separated values of the form: \u0027\n                 \u0027\u003cservice_type\u003e:\u003cservice_name\u003e:\u003cendpoint_type\u003e\u0027),\n\nthe name is different to what\u0027s used here (cinderv2 versus cinder).\n\nIn cinder:\n\n    cfg.StrOpt(\u0027swift_catalog_info\u0027,\n               default\u003d\u0027object-store:swift:publicURL\u0027,\n               help\u003d\u0027Info to match when looking for swift in the service \u0027\n               \u0027catalog. Format is: separated values of the form: \u0027\n               \u0027\u003cservice_type\u003e:\u003cservice_name\u003e:\u003cendpoint_type\u003e - \u0027\n               \u0027Only used if backup_swift_url is unset\u0027),\n    cfg.StrOpt(\u0027keystone_catalog_info\u0027,\n               default\u003d\u0027identity:Identity Service:publicURL\u0027,\n               help\u003d\u0027Info to match when looking for keystone in the service \u0027\n               \u0027catalog. Format is: separated values of the form: \u0027\n               \u0027\u003cservice_type\u003e:\u003cservice_name\u003e:\u003cendpoint_type\u003e - \u0027\n               \u0027Only used if backup_swift_auth_url is unset\u0027),\n\nagain the names don\u0027t seem consistent (project name for swift, service function for keystone). In devstack, keystone\u0027s name is \u0027keystone\u0027, not \"Identity Service\". Basically, the names seem all over the place!\n\nBut if we want to be consistent, that\u0027s fine. (I\u0027d love to know if there was a reason for using all three.)","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"aa13b4a24c7ef583af00c2c8c0918e97b20ae1b6","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"_CINDER_OPTS \u003d ["},{"line_number":48,"context_line":"    cfg.StrOpt(\u0027cinder_catalog_info\u0027,"},{"line_number":49,"context_line":"               default\u003d\u0027volumev2:cinder:publicURL\u0027,"},{"line_number":50,"context_line":"               help\u003d_(\u0027Info to match when looking for cinder in the service \u0027"},{"line_number":51,"context_line":"                      \u0027catalog. Format is : separated values of the form: \u0027"},{"line_number":52,"context_line":"                      \u0027\u003cservice_type\u003e:\u003cservice_name\u003e:\u003cendpoint_type\u003e\u0027)),"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_97f047cb","line":49,"range":{"start_line":49,"start_character":49,"end_line":49,"end_character":51},"in_reply_to":"fa69d971_3eb5e130","updated":"2016-01-08 02:11:42.000000000","message":"Agreed. I will omit \u0027cinder\u0027 from defalut, and disable filtering when the name is not provided.\n\nI\u0027m ok with split these into 2 options, but IIUC that will require deprecation process of cinder_catalog_info.","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"34694e162388ddd594b27af754c355053246c200","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"_CINDER_OPTS \u003d ["},{"line_number":48,"context_line":"    cfg.StrOpt(\u0027cinder_catalog_info\u0027,"},{"line_number":49,"context_line":"               default\u003d\u0027volumev2:cinder:publicURL\u0027,"},{"line_number":50,"context_line":"               help\u003d_(\u0027Info to match when looking for cinder in the service \u0027"},{"line_number":51,"context_line":"                      \u0027catalog. Format is : separated values of the form: \u0027"},{"line_number":52,"context_line":"                      \u0027\u003cservice_type\u003e:\u003cservice_name\u003e:\u003cendpoint_type\u003e\u0027)),"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_b831bcee","line":49,"range":{"start_line":49,"start_character":49,"end_line":49,"end_character":51},"in_reply_to":"fa69d971_97f047cb","updated":"2016-01-12 15:58:31.000000000","message":"This colon separated pattern for matching catalog entries is used in both cinder and nova, might be better to stay with the common pattern?","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9847714cfd34e8068aaa37e0696419637bbef4c8","unresolved":false,"context_lines":[{"line_number":54,"context_line":"               help\u003d_(\u0027Override service catalog lookup with template for \u0027"},{"line_number":55,"context_line":"                      \u0027cinder endpoint e.g. \u0027"},{"line_number":56,"context_line":"                      \u0027http://localhost:8776/v2/%(tenant)s\u0027)),"},{"line_number":57,"context_line":"    cfg.StrOpt(\u0027os_region_name\u0027,"},{"line_number":58,"context_line":"               help\u003d_(\u0027Region name of this node\u0027)),"},{"line_number":59,"context_line":"    cfg.StrOpt(\u0027cinder_ca_certificates_file\u0027,"},{"line_number":60,"context_line":"               help\u003d_(\u0027Location of ca certicates file to use for cinder \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_7eca7970","line":57,"range":{"start_line":57,"start_character":16,"end_line":57,"end_character":30},"updated":"2016-01-07 13:38:32.000000000","message":"The current region is potentially useful for non-cinder stores also.\n\nIt may be better to define this globally so if multiple stores are enabled and both require it it doesn\u0027t need to be defined in two different places.","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"aa13b4a24c7ef583af00c2c8c0918e97b20ae1b6","unresolved":false,"context_lines":[{"line_number":54,"context_line":"               help\u003d_(\u0027Override service catalog lookup with template for \u0027"},{"line_number":55,"context_line":"                      \u0027cinder endpoint e.g. \u0027"},{"line_number":56,"context_line":"                      \u0027http://localhost:8776/v2/%(tenant)s\u0027)),"},{"line_number":57,"context_line":"    cfg.StrOpt(\u0027os_region_name\u0027,"},{"line_number":58,"context_line":"               help\u003d_(\u0027Region name of this node\u0027)),"},{"line_number":59,"context_line":"    cfg.StrOpt(\u0027cinder_ca_certificates_file\u0027,"},{"line_number":60,"context_line":"               help\u003d_(\u0027Location of ca certicates file to use for cinder \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_57a08fa5","line":57,"range":{"start_line":57,"start_character":16,"end_line":57,"end_character":30},"in_reply_to":"fa69d971_7eca7970","updated":"2016-01-08 02:11:42.000000000","message":"OK, I will move this to backend.py.","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9847714cfd34e8068aaa37e0696419637bbef4c8","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                LOG.exception(_LE(\u0027Failed to terminate connection of volume \u0027"},{"line_number":304,"context_line":"                                  \u0027%(volume_id)s\u0027), {\u0027volume_id\u0027: volume.id})"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"            client.volumes.detach(volume)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def _cinder_volume_data_iterator(self, client, volume, max_size, offset\u003d0,"},{"line_number":309,"context_line":"                                     chunk_size\u003d4096, partial_length\u003dNone):"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_5e53f56c","line":306,"range":{"start_line":306,"start_character":27,"end_line":306,"end_character":33},"updated":"2016-01-07 13:38:32.000000000","message":"If the process is killed is there anything that will clean up attached volumes?","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"aa13b4a24c7ef583af00c2c8c0918e97b20ae1b6","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                LOG.exception(_LE(\u0027Failed to terminate connection of volume \u0027"},{"line_number":304,"context_line":"                                  \u0027%(volume_id)s\u0027), {\u0027volume_id\u0027: volume.id})"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"            client.volumes.detach(volume)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def _cinder_volume_data_iterator(self, client, volume, max_size, offset\u003d0,"},{"line_number":309,"context_line":"                                     chunk_size\u003d4096, partial_length\u003dNone):"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_77cb531f","line":306,"range":{"start_line":306,"start_character":27,"end_line":306,"end_character":33},"in_reply_to":"fa69d971_5e53f56c","updated":"2016-01-08 02:11:42.000000000","message":"Usually the glaceful shutdown feature provided by oslo_service is helpful to avoid such situations.\nBut still operators can kill the service forcibly, which causes inconsistency everywhere.","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"040a9f2d21ebf43e737b1bcd2530d939cef58133","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        (for reading the image file) and image_size"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        :param location `glance_store.location.Location` object, supplied"},{"line_number":342,"context_line":"                        from glance_store.location.get_location_from_uri()"},{"line_number":343,"context_line":"        :raises `glance_store.exceptions.NotFound` if image does not exist"},{"line_number":344,"context_line":"        \"\"\""},{"line_number":345,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_1836e7b4","line":342,"range":{"start_line":342,"start_character":0,"end_line":342,"end_character":24},"updated":"2016-01-07 16:36:25.000000000","message":"Would be nice to document *all* the parameters.","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"aa13b4a24c7ef583af00c2c8c0918e97b20ae1b6","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        (for reading the image file) and image_size"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        :param location `glance_store.location.Location` object, supplied"},{"line_number":342,"context_line":"                        from glance_store.location.get_location_from_uri()"},{"line_number":343,"context_line":"        :raises `glance_store.exceptions.NotFound` if image does not exist"},{"line_number":344,"context_line":"        \"\"\""},{"line_number":345,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_37715be1","line":342,"range":{"start_line":342,"start_character":0,"end_line":342,"end_character":24},"in_reply_to":"fa69d971_1836e7b4","updated":"2016-01-08 02:11:42.000000000","message":"I will add them.","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"040a9f2d21ebf43e737b1bcd2530d939cef58133","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        checksum \u003d hashlib.md5()"},{"line_number":412,"context_line":"        bytes_written \u003d 0"},{"line_number":413,"context_line":"        size_gb \u003d int((image_size + units.Gi - 1) / units.Gi)"},{"line_number":414,"context_line":"        if size_gb \u003d\u003d 0:"},{"line_number":415,"context_line":"            size_gb \u003d 1"},{"line_number":416,"context_line":"        name \u003d \"image-%s\" % image_id"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_78e1239a","line":413,"range":{"start_line":413,"start_character":36,"end_line":413,"end_character":41},"updated":"2016-01-07 16:36:25.000000000","message":"If image_size is 1, then size_gb will be 1, which seems odd to me. Is this an error? If not, would you care to explain the exact purpose of \"size_gb\"?","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"aa13b4a24c7ef583af00c2c8c0918e97b20ae1b6","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        checksum \u003d hashlib.md5()"},{"line_number":412,"context_line":"        bytes_written \u003d 0"},{"line_number":413,"context_line":"        size_gb \u003d int((image_size + units.Gi - 1) / units.Gi)"},{"line_number":414,"context_line":"        if size_gb \u003d\u003d 0:"},{"line_number":415,"context_line":"            size_gb \u003d 1"},{"line_number":416,"context_line":"        name \u003d \"image-%s\" % image_id"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_92bdb504","line":413,"range":{"start_line":413,"start_character":36,"end_line":413,"end_character":41},"in_reply_to":"fa69d971_78e1239a","updated":"2016-01-08 02:11:42.000000000","message":"It is rounding up the image size to GiB, because Cinder manages the volume size in GiB unit, that is, the minimum size of the volume is 1 GiB. To store the 1 byte image, cinder will require 1GiB volume (note that actual disk space consumption will be just 1 block \u003d 512byte/4K/or whatever when the volume backend supports thin provisioning).","commit_id":"ba59fb8e924bc4446b14e4f08848d784f706bea5"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"3fae1b7b744de45370cb297cf04522912a00e16a","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            raise exceptions.BadStoreConfiguration(store_name\u003d\"cinder\","},{"line_number":229,"context_line":"                                                   reason\u003dreason)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def _wait_while_volume_status_is(self, status, volume):"},{"line_number":232,"context_line":"        timeout \u003d self.conf.glance_store.cinder_state_transition_timeout"},{"line_number":233,"context_line":"        volume \u003d volume.manager.get(volume.id)"},{"line_number":234,"context_line":"        tries \u003d 0"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_18b488f0","line":231,"range":{"start_line":231,"start_character":51,"end_line":231,"end_character":57},"updated":"2016-01-14 17:10:29.000000000","message":"Probably worth changing this to \u0027wait_until_status_is\u0027, and have a list of allowed waiting states, so that error cases are more easily caught - see comments further down.","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"1aa5f70cda97527f25be7a1baa6b006eb00f5a9e","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            raise exceptions.BadStoreConfiguration(store_name\u003d\"cinder\","},{"line_number":229,"context_line":"                                                   reason\u003dreason)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def _wait_while_volume_status_is(self, status, volume):"},{"line_number":232,"context_line":"        timeout \u003d self.conf.glance_store.cinder_state_transition_timeout"},{"line_number":233,"context_line":"        volume \u003d volume.manager.get(volume.id)"},{"line_number":234,"context_line":"        tries \u003d 0"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_73e606ea","line":231,"range":{"start_line":231,"start_character":51,"end_line":231,"end_character":57},"in_reply_to":"da6ed579_18b488f0","updated":"2016-01-19 01:58:50.000000000","message":"OK.\nThere 2 states we need to care after starting asynchronous operations.\nFor example on create(), [1] creating -\u003e [2] available\n\nI will extend this to pass both [1] and [2] as args, and if it goes to unexpected state, raise an exception.","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"3fae1b7b744de45370cb297cf04522912a00e16a","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            LOG.error(msg)"},{"line_number":265,"context_line":"            raise exceptions.BackendException(msg)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        volume.reserve(volume)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        try:"},{"line_number":270,"context_line":"            connection_info \u003d volume.initialize_connection(volume, properties)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_5de4a9df","line":267,"range":{"start_line":267,"start_character":29,"end_line":267,"end_character":30},"updated":"2016-01-14 17:10:29.000000000","message":"This call can fail (you\u0027ll get an exception), if the volume status isn\u0027t available, should handle that? It can race against the above check if something changes the status between the above check and the reserve call. I\u0027d recommend just calling reserve rather than checking, and handle the failure for reserve as the failure of the above status check.\n\nNote that nova has races like this with cinder that are known to cause issues and that we are trying to fix.","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"1aa5f70cda97527f25be7a1baa6b006eb00f5a9e","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            LOG.error(msg)"},{"line_number":265,"context_line":"            raise exceptions.BackendException(msg)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        volume.reserve(volume)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        try:"},{"line_number":270,"context_line":"            connection_info \u003d volume.initialize_connection(volume, properties)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_3010774e","line":267,"range":{"start_line":267,"start_character":29,"end_line":267,"end_character":30},"in_reply_to":"da6ed579_5de4a9df","updated":"2016-01-19 01:58:50.000000000","message":"Thanks. I will just call reserve without status checking, and catch the exception.","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"3fae1b7b744de45370cb297cf04522912a00e16a","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            LOG.debug(\u0027Opening host device \"%s\"\u0027, device[\u0027path\u0027])"},{"line_number":277,"context_line":"            with temporary_chown(device[\u0027path\u0027]), \\"},{"line_number":278,"context_line":"                    open(device[\u0027path\u0027], mode) as f:"},{"line_number":279,"context_line":"                yield f"},{"line_number":280,"context_line":"        except Exception:"},{"line_number":281,"context_line":"            LOG.exception(_LE(\u0027Exception while accessing to cinder volume \u0027"},{"line_number":282,"context_line":"                              \u0027%(volume_id)s\u0027), {\u0027volume_id\u0027: volume.id})"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_9d7c61b6","line":279,"range":{"start_line":279,"start_character":16,"end_line":279,"end_character":21},"updated":"2016-01-14 17:10:29.000000000","message":"Doing this as a context manager is really nice, I like it.","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"3fae1b7b744de45370cb297cf04522912a00e16a","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                LOG.exception(_LE(\u0027Failed to terminate connection of volume \u0027"},{"line_number":302,"context_line":"                                  \u0027%(volume_id)s\u0027), {\u0027volume_id\u0027: volume.id})"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"            client.volumes.detach(volume)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def _cinder_volume_data_iterator(self, client, volume, max_size, offset\u003d0,"},{"line_number":307,"context_line":"                                     chunk_size\u003d4096, partial_length\u003dNone):"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_f8a24bfb","line":304,"range":{"start_line":304,"start_character":0,"end_line":304,"end_character":12},"updated":"2016-01-14 17:10:29.000000000","message":"Technically this can raise an exception too, though only if an admin has done reset-state while the volume was in-use - probably just catch and log and continue in that case.","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"1aa5f70cda97527f25be7a1baa6b006eb00f5a9e","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                LOG.exception(_LE(\u0027Failed to terminate connection of volume \u0027"},{"line_number":302,"context_line":"                                  \u0027%(volume_id)s\u0027), {\u0027volume_id\u0027: volume.id})"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"            client.volumes.detach(volume)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def _cinder_volume_data_iterator(self, client, volume, max_size, offset\u003d0,"},{"line_number":307,"context_line":"                                     chunk_size\u003d4096, partial_length\u003dNone):"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_b02a277d","line":304,"range":{"start_line":304,"start_character":0,"end_line":304,"end_character":12},"in_reply_to":"da6ed579_f8a24bfb","updated":"2016-01-19 01:58:50.000000000","message":"Done","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"3fae1b7b744de45370cb297cf04522912a00e16a","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                            \"resize-before-write for each GB which \""},{"line_number":427,"context_line":"                            \"will be considerably slower than normal.\"))"},{"line_number":428,"context_line":"        volume \u003d client.volumes.create(size_gb, name\u003dname, metadata\u003dmetadata)"},{"line_number":429,"context_line":"        volume \u003d self._wait_while_volume_status_is(\u0027creating\u0027, volume)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        failed \u003d True"},{"line_number":432,"context_line":"        need_extend \u003d True"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_781e5bbc","line":429,"range":{"start_line":429,"start_character":52,"end_line":429,"end_character":60},"updated":"2016-01-14 17:10:29.000000000","message":"What you really meant here is wait_until_status_is(\u0027available\u0027) - it can go from creating to error if there\u0027s a backend problem.","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"1aa5f70cda97527f25be7a1baa6b006eb00f5a9e","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                            \"resize-before-write for each GB which \""},{"line_number":427,"context_line":"                            \"will be considerably slower than normal.\"))"},{"line_number":428,"context_line":"        volume \u003d client.volumes.create(size_gb, name\u003dname, metadata\u003dmetadata)"},{"line_number":429,"context_line":"        volume \u003d self._wait_while_volume_status_is(\u0027creating\u0027, volume)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        failed \u003d True"},{"line_number":432,"context_line":"        need_extend \u003d True"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_b0bea7d2","line":429,"range":{"start_line":429,"start_character":52,"end_line":429,"end_character":60},"in_reply_to":"da6ed579_781e5bbc","updated":"2016-01-19 01:58:50.000000000","message":"OK. In next revision, _wait_volume_status(\u0027creating\u0027, \u0027available\u0027) will check if the final volume status is \u0027available\u0027.","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"3fae1b7b744de45370cb297cf04522912a00e16a","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                    LOG.debug(\"Extending volume %(volume_id)s to %(size)s GB\","},{"line_number":456,"context_line":"                              {\u0027volume_id\u0027: volume.id, \u0027size\u0027: size_gb})"},{"line_number":457,"context_line":"                    volume.extend(volume, size_gb)"},{"line_number":458,"context_line":"                    volume \u003d self._wait_while_volume_status_is(\u0027extending\u0027,"},{"line_number":459,"context_line":"                                                               volume)"},{"line_number":460,"context_line":"                    if volume.status !\u003d \u0027available\u0027:"},{"line_number":461,"context_line":"                        raise exceptions.StorageFull()"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_b88b73c2","line":458,"range":{"start_line":458,"start_character":64,"end_line":458,"end_character":73},"updated":"2016-01-14 17:10:29.000000000","message":"One minor usability issue you\u0027ll get if you\u0027re storing these volumes in the tenant\u0027s account (i.e. if the username config option is not set) is that there\u0027s a small window where the tenant can attach the volume while it available before / after each extend. Not sure what you can do about that though give there is currently no functioning online extend - it is planned for cinder but there are many technical wrinkles that mean it is unlikely to happen any time soon.","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"3fae1b7b744de45370cb297cf04522912a00e16a","unresolved":false,"context_lines":[{"line_number":510,"context_line":"            volume \u003d get_cinderclient(self.conf,"},{"line_number":511,"context_line":"                                      context).volumes.get(loc.volume_id)"},{"line_number":512,"context_line":"            volume.delete()"},{"line_number":513,"context_line":"        except cinder_exception.NotFound:"},{"line_number":514,"context_line":"            raise exceptions.NotFound(image\u003dloc.volume_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_8ced10b9","line":513,"range":{"start_line":513,"start_character":15,"end_line":513,"end_character":31},"updated":"2016-01-14 17:10:29.000000000","message":"Worth logging other exceptions here - you can get back other errors (And the volume status will be error_deleting, requiring cleanup actions)","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"1aa5f70cda97527f25be7a1baa6b006eb00f5a9e","unresolved":false,"context_lines":[{"line_number":510,"context_line":"            volume \u003d get_cinderclient(self.conf,"},{"line_number":511,"context_line":"                                      context).volumes.get(loc.volume_id)"},{"line_number":512,"context_line":"            volume.delete()"},{"line_number":513,"context_line":"        except cinder_exception.NotFound:"},{"line_number":514,"context_line":"            raise exceptions.NotFound(image\u003dloc.volume_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6ed579_a1c097e1","line":513,"range":{"start_line":513,"start_character":15,"end_line":513,"end_character":31},"in_reply_to":"da6ed579_8ced10b9","updated":"2016-01-19 01:58:50.000000000","message":"Done","commit_id":"142e30f2b2d4f0e537e854446b19b4fa8dd9ee18"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"ea9a8a2afc9c13e869536ef2c126521f7b17a73e","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                LOG.error(msg)"},{"line_number":242,"context_line":"                raise exceptions.BackendException(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"            wait \u003d min(0.5 * 2 ** tries, 15)"},{"line_number":245,"context_line":"            time.sleep(wait)"},{"line_number":246,"context_line":"            tries +\u003d 1"},{"line_number":247,"context_line":"            elapsed +\u003d wait"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a68dd71_deb74f38","line":244,"range":{"start_line":244,"start_character":43,"end_line":244,"end_character":44},"updated":"2016-01-22 19:31:40.000000000","message":"Could we have a constant with a meaningful name rather than \"15\"?","commit_id":"bf0b97d15bc66e2762de3e999f9c7298f25a9bde"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"7da134e62bd153ce04dd06130644cb49939615a9","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                LOG.error(msg)"},{"line_number":242,"context_line":"                raise exceptions.BackendException(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"            wait \u003d min(0.5 * 2 ** tries, 15)"},{"line_number":245,"context_line":"            time.sleep(wait)"},{"line_number":246,"context_line":"            tries +\u003d 1"},{"line_number":247,"context_line":"            elapsed +\u003d wait"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a68dd71_e8482fce","line":244,"range":{"start_line":244,"start_character":43,"end_line":244,"end_character":44},"in_reply_to":"9a68dd71_deb74f38","updated":"2016-01-25 01:46:31.000000000","message":"Will name this MAX_RECHECK_WAIT on next update.","commit_id":"bf0b97d15bc66e2762de3e999f9c7298f25a9bde"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"ea9a8a2afc9c13e869536ef2c126521f7b17a73e","unresolved":false,"context_lines":[{"line_number":280,"context_line":"            volume.attach(None, None, attach_mode, host_name\u003dhost)"},{"line_number":281,"context_line":"            volume \u003d self._wait_volume_status(volume, \u0027attaching\u0027, \u0027in-use\u0027)"},{"line_number":282,"context_line":"            LOG.debug(\u0027Opening host device \"%s\"\u0027, device[\u0027path\u0027])"},{"line_number":283,"context_line":"            with temporary_chown(device[\u0027path\u0027]), \\"},{"line_number":284,"context_line":"                    open(device[\u0027path\u0027], mode) as f:"},{"line_number":285,"context_line":"                yield f"},{"line_number":286,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a68dd71_159e2563","line":283,"range":{"start_line":283,"start_character":50,"end_line":283,"end_character":51},"updated":"2016-01-22 19:31:40.000000000","message":"Style issue: I believe \"\\\" are frowned upon in OpenStack, maybe you should use parentheses instead, otehrwise people will keep nitpicking about this :)","commit_id":"bf0b97d15bc66e2762de3e999f9c7298f25a9bde"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"7da134e62bd153ce04dd06130644cb49939615a9","unresolved":false,"context_lines":[{"line_number":280,"context_line":"            volume.attach(None, None, attach_mode, host_name\u003dhost)"},{"line_number":281,"context_line":"            volume \u003d self._wait_volume_status(volume, \u0027attaching\u0027, \u0027in-use\u0027)"},{"line_number":282,"context_line":"            LOG.debug(\u0027Opening host device \"%s\"\u0027, device[\u0027path\u0027])"},{"line_number":283,"context_line":"            with temporary_chown(device[\u0027path\u0027]), \\"},{"line_number":284,"context_line":"                    open(device[\u0027path\u0027], mode) as f:"},{"line_number":285,"context_line":"                yield f"},{"line_number":286,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a68dd71_e876ef04","line":283,"range":{"start_line":283,"start_character":50,"end_line":283,"end_character":51},"in_reply_to":"9a68dd71_159e2563","updated":"2016-01-25 01:46:31.000000000","message":"Unfortunately there is no good way to avoid \u0027\\\u0027 in multiple with statement parentheses are not accepted by python2\u00263 AFAIK... maybe just nesting deeply?","commit_id":"bf0b97d15bc66e2762de3e999f9c7298f25a9bde"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"a03f37caf63e1745d71aaaa2f721cc53b99e4b75","unresolved":false,"context_lines":[{"line_number":80,"context_line":"               default\u003dNone,"},{"line_number":81,"context_line":"               help\u003d_(\u0027Password for the user authenticating against Cinder. \u0027"},{"line_number":82,"context_line":"                      \u0027If \u003cNone\u003e, the current context auth token is used.\u0027)),"},{"line_number":83,"context_line":"    cfg.StrOpt(\u0027cinder_store_tenant_name\u0027,"},{"line_number":84,"context_line":"               default\u003dNone,"},{"line_number":85,"context_line":"               help\u003d_(\u0027Tenant name where the image is stored in Cinder. \u0027"},{"line_number":86,"context_line":"                      \u0027If \u003cNone\u003e, the tenant in current context is used.\u0027)),"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_ddbb41c3","line":83,"updated":"2016-02-10 14:41:00.000000000","message":"Looks like no domain_id is supported by cinderclient. So it shoule be ok.","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"a03f37caf63e1745d71aaaa2f721cc53b99e4b75","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            # nova/context.py."},{"line_number":127,"context_line":"            compat_catalog \u003d {"},{"line_number":128,"context_line":"                \u0027access\u0027: {\u0027serviceCatalog\u0027: context.service_catalog or []}}"},{"line_number":129,"context_line":"            sc \u003d service_catalog.ServiceCatalog(compat_catalog)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"            url \u003d sc.url_for(attr\u003dattr,"},{"line_number":132,"context_line":"                             filter_value\u003dfilter_value,"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_8020009d","line":129,"updated":"2016-02-10 14:41:00.000000000","message":"You also can use ServiceCatalogV2 from keystoneclient for the same purposes because it seems that cinder service catalog cannot work with V3 SC but whatever\u003d)","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"a03f37caf63e1745d71aaaa2f721cc53b99e4b75","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                                                   reason\u003dreason)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def _wait_volume_status(self, volume, status_transition, status_expected):"},{"line_number":232,"context_line":"        max_recheck_wait \u003d 15"},{"line_number":233,"context_line":"        timeout \u003d self.conf.glance_store.cinder_state_transition_timeout"},{"line_number":234,"context_line":"        volume \u003d volume.manager.get(volume.id)"},{"line_number":235,"context_line":"        tries \u003d 0"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_202d8ca7","line":232,"range":{"start_line":232,"start_character":27,"end_line":232,"end_character":29},"updated":"2016-02-10 14:41:00.000000000","message":"Are we sure that\u0027s enough for big volumes? Do we need to make this configurable?","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"9d621b792b3db1498177541ae92c417ff6c34aea","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                                                   reason\u003dreason)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def _wait_volume_status(self, volume, status_transition, status_expected):"},{"line_number":232,"context_line":"        max_recheck_wait \u003d 15"},{"line_number":233,"context_line":"        timeout \u003d self.conf.glance_store.cinder_state_transition_timeout"},{"line_number":234,"context_line":"        volume \u003d volume.manager.get(volume.id)"},{"line_number":235,"context_line":"        tries \u003d 0"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_c1be9364","line":232,"range":{"start_line":232,"start_character":27,"end_line":232,"end_character":29},"in_reply_to":"3a57f1b5_202d8ca7","updated":"2016-02-12 06:06:18.000000000","message":"This is just a maximum wait time until rechecking volume status. The actual timeout for volume state changes can be configured by \"cinder_state_transition_timeout\".","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"a03f37caf63e1745d71aaaa2f721cc53b99e4b75","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                              {\u0027volume_id\u0027: volume.id})"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _cinder_volume_data_iterator(self, client, volume, max_size, offset\u003d0,"},{"line_number":318,"context_line":"                                     chunk_size\u003d4096, partial_length\u003dNone):"},{"line_number":319,"context_line":"        partial \u003d partial_length is not None"},{"line_number":320,"context_line":"        with self._open_cinder_volume(client, volume, \u0027rb\u0027) as fp:"},{"line_number":321,"context_line":"            if offset:"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_ae4ded73","line":318,"updated":"2016-02-10 14:41:00.000000000","message":"Do we need this to be configurable for users or not? Will this parameter increase data transfer speed?","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"9d621b792b3db1498177541ae92c417ff6c34aea","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                              {\u0027volume_id\u0027: volume.id})"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _cinder_volume_data_iterator(self, client, volume, max_size, offset\u003d0,"},{"line_number":318,"context_line":"                                     chunk_size\u003d4096, partial_length\u003dNone):"},{"line_number":319,"context_line":"        partial \u003d partial_length is not None"},{"line_number":320,"context_line":"        with self._open_cinder_volume(client, volume, \u0027rb\u0027) as fp:"},{"line_number":321,"context_line":"            if offset:"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_1c5e5012","line":318,"in_reply_to":"3a57f1b5_ae4ded73","updated":"2016-02-12 06:06:18.000000000","message":"Ah, this should use READCHUNK_SIZE. Will change in next revision.","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"a03f37caf63e1745d71aaaa2f721cc53b99e4b75","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            LOG.error(reason)"},{"line_number":373,"context_line":"            raise exceptions.NotFound(reason)"},{"line_number":374,"context_line":"        except Exception:"},{"line_number":375,"context_line":"            LOG.exception(_LE(\"Failed to get image due to internal error\"))"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"    def get_size(self, location, context\u003dNone):"},{"line_number":378,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_83824aff","line":375,"updated":"2016-02-10 14:41:00.000000000","message":"That\u0027s pretty dangerous, are we going to mask exceptions intentionally and return None to glance?","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"9d621b792b3db1498177541ae92c417ff6c34aea","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            LOG.error(reason)"},{"line_number":373,"context_line":"            raise exceptions.NotFound(reason)"},{"line_number":374,"context_line":"        except Exception:"},{"line_number":375,"context_line":"            LOG.exception(_LE(\"Failed to get image due to internal error\"))"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"    def get_size(self, location, context\u003dNone):"},{"line_number":378,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_7cf18400","line":375,"in_reply_to":"3a57f1b5_83824aff","updated":"2016-02-12 06:06:18.000000000","message":"Right.. will add raise exceptions.BackendException(...) here. Thank you for catching this.","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"618253c9f60f17e10763b295d53c06f62b9e3319","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    if not user_overriden and context.auth_token:"},{"line_number":153,"context_line":"        c.client.auth_token \u003d context.auth_token"},{"line_number":154,"context_line":"    else:"},{"line_number":155,"context_line":"        c.client.auth_token \u003d \u0027%s:%s\u0027 % (username, tenant)"},{"line_number":156,"context_line":"    c.client.management_url \u003d url"},{"line_number":157,"context_line":"    return c"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_f980f24b","line":155,"updated":"2016-02-19 06:45:40.000000000","message":"Looks like this should be corrected. If I define username and password I expect user token to be requested by cinder client using my credentials. Otherwise I can use user token from request context. \nSo no auth if valid only if not user_overriden and auth_token is None.","commit_id":"61c617f48edd8ea87259081ba38425c08c446a47"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"a6e52972a4db4e311da15eb65c6c8a8b1b5f5c1f","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    if not user_overriden and context.auth_token:"},{"line_number":153,"context_line":"        c.client.auth_token \u003d context.auth_token"},{"line_number":154,"context_line":"    else:"},{"line_number":155,"context_line":"        c.client.auth_token \u003d \u0027%s:%s\u0027 % (username, tenant)"},{"line_number":156,"context_line":"    c.client.management_url \u003d url"},{"line_number":157,"context_line":"    return c"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"bae84128_37a4fca4","line":155,"in_reply_to":"dae33548_f980f24b","updated":"2016-02-20 02:40:05.000000000","message":"Done","commit_id":"61c617f48edd8ea87259081ba38425c08c446a47"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"618253c9f60f17e10763b295d53c06f62b9e3319","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                    \u0027image_owner\u0027: owner}"},{"line_number":443,"context_line":"        LOG.debug(\u0027Creating a new volume: image_size\u003d%d size_gb\u003d%d\u0027,"},{"line_number":444,"context_line":"                  image_size, size_gb)"},{"line_number":445,"context_line":"        if image_size \u003d\u003d 0:"},{"line_number":446,"context_line":"            LOG.warning(_LW(\"Since image size is zero, we will be doing \""},{"line_number":447,"context_line":"                            \"resize-before-write for each GB which \""},{"line_number":448,"context_line":"                            \"will be considerably slower than normal.\"))"}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_39c9baad","line":445,"updated":"2016-02-19 06:45:40.000000000","message":"Not reason for -1. Glance do not provide a image_size for v2. Looks like we better start to calculate for v2 or change log level to info.","commit_id":"61c617f48edd8ea87259081ba38425c08c446a47"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"a6e52972a4db4e311da15eb65c6c8a8b1b5f5c1f","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                    \u0027image_owner\u0027: owner}"},{"line_number":443,"context_line":"        LOG.debug(\u0027Creating a new volume: image_size\u003d%d size_gb\u003d%d\u0027,"},{"line_number":444,"context_line":"                  image_size, size_gb)"},{"line_number":445,"context_line":"        if image_size \u003d\u003d 0:"},{"line_number":446,"context_line":"            LOG.warning(_LW(\"Since image size is zero, we will be doing \""},{"line_number":447,"context_line":"                            \"resize-before-write for each GB which \""},{"line_number":448,"context_line":"                            \"will be considerably slower than normal.\"))"}],"source_content_type":"text/x-python","patch_set":22,"id":"bae84128_9794e837","line":445,"in_reply_to":"dae33548_39c9baad","updated":"2016-02-20 02:40:05.000000000","message":"Changed to LOG.info(_LI(...)).","commit_id":"61c617f48edd8ea87259081ba38425c08c446a47"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"618253c9f60f17e10763b295d53c06f62b9e3319","unresolved":false,"context_lines":[{"line_number":465,"context_line":"                            need_extend \u003d False"},{"line_number":466,"context_line":"                            break"},{"line_number":467,"context_line":"                        checksum.update(buf)"},{"line_number":468,"context_line":"                        if verifier:"},{"line_number":469,"context_line":"                            verifier.update(buf)"},{"line_number":470,"context_line":"                        if (bytes_written + len(buf) \u003e size_gb * units.Gi and"},{"line_number":471,"context_line":"                                image_size \u003d\u003d 0):"}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_59c0fe7c","line":468,"updated":"2016-02-19 06:45:40.000000000","message":"good, you consider verifier!","commit_id":"61c617f48edd8ea87259081ba38425c08c446a47"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"b0159833e551d63aaed333fb03a52da6c592fe9d","unresolved":false,"context_lines":[{"line_number":83,"context_line":"               default\u003dNone,"},{"line_number":84,"context_line":"               help\u003d_(\u0027Password for the user authenticating against Cinder. \u0027"},{"line_number":85,"context_line":"                      \u0027If \u003cNone\u003e, the current context auth token is used.\u0027)),"},{"line_number":86,"context_line":"    cfg.StrOpt(\u0027cinder_store_tenant_name\u0027,"},{"line_number":87,"context_line":"               default\u003dNone,"},{"line_number":88,"context_line":"               help\u003d_(\u0027Tenant name where the image is stored in Cinder. \u0027"},{"line_number":89,"context_line":"                      \u0027If \u003cNone\u003e, the tenant in current context is used.\u0027)),"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_5928199a","line":86,"updated":"2016-02-24 14:59:53.000000000","message":"During the latest message in OS dev it would be perfect to rename this to project.","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"ee744d0fd31a3c9eeeb455069931c992bbe32e15","unresolved":false,"context_lines":[{"line_number":83,"context_line":"               default\u003dNone,"},{"line_number":84,"context_line":"               help\u003d_(\u0027Password for the user authenticating against Cinder. \u0027"},{"line_number":85,"context_line":"                      \u0027If \u003cNone\u003e, the current context auth token is used.\u0027)),"},{"line_number":86,"context_line":"    cfg.StrOpt(\u0027cinder_store_tenant_name\u0027,"},{"line_number":87,"context_line":"               default\u003dNone,"},{"line_number":88,"context_line":"               help\u003d_(\u0027Tenant name where the image is stored in Cinder. \u0027"},{"line_number":89,"context_line":"                      \u0027If \u003cNone\u003e, the tenant in current context is used.\u0027)),"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_cd538a6b","line":86,"in_reply_to":"bae84128_5928199a","updated":"2016-02-25 11:18:03.000000000","message":"Changed to cinder_store_project_name","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"b0159833e551d63aaed333fb03a52da6c592fe9d","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            #        It actually contains the entire access blob."},{"line_number":128,"context_line":"            # Only needed parts of the service catalog are passed in, see"},{"line_number":129,"context_line":"            # nova/context.py."},{"line_number":130,"context_line":"            compat_catalog \u003d {"},{"line_number":131,"context_line":"                \u0027access\u0027: {\u0027serviceCatalog\u0027: context.service_catalog or []}}"},{"line_number":132,"context_line":"            sc \u003d service_catalog.ServiceCatalog(compat_catalog)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_7c66abbb","line":130,"updated":"2016-02-24 14:59:53.000000000","message":"Not reason for -1 but looks like you can use Keystone client to receive url instead of using custom Catalog format.\nSee: https://github.com/openstack/glance_store/blob/master/glance_store/_drivers/swift/store.py#L885","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"ee744d0fd31a3c9eeeb455069931c992bbe32e15","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            #        It actually contains the entire access blob."},{"line_number":128,"context_line":"            # Only needed parts of the service catalog are passed in, see"},{"line_number":129,"context_line":"            # nova/context.py."},{"line_number":130,"context_line":"            compat_catalog \u003d {"},{"line_number":131,"context_line":"                \u0027access\u0027: {\u0027serviceCatalog\u0027: context.service_catalog or []}}"},{"line_number":132,"context_line":"            sc \u003d service_catalog.ServiceCatalog(compat_catalog)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_adfe0636","line":130,"in_reply_to":"bae84128_7c66abbb","updated":"2016-02-25 11:18:03.000000000","message":"Thanks for the link. I have reworked this with keystone service catalog.","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"b0159833e551d63aaed333fb03a52da6c592fe9d","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                             service_name\u003dservice_name,"},{"line_number":138,"context_line":"                             endpoint_type\u003dendpoint_type)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    LOG.debug(\u0027Cinderclient connection created for user %(user)s using URL: \u0027"},{"line_number":141,"context_line":"              \u0027%(url)s.\u0027, {\u0027user\u0027: username, \u0027url\u0027: url})"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    c \u003d cinderclient.Client(username,"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_5ca647ae","line":140,"updated":"2016-02-24 14:59:53.000000000","message":"I think it must be logged after client initialization to show the user that the connection has been created.","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"ee744d0fd31a3c9eeeb455069931c992bbe32e15","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                             service_name\u003dservice_name,"},{"line_number":138,"context_line":"                             endpoint_type\u003dendpoint_type)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    LOG.debug(\u0027Cinderclient connection created for user %(user)s using URL: \u0027"},{"line_number":141,"context_line":"              \u0027%(url)s.\u0027, {\u0027user\u0027: username, \u0027url\u0027: url})"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    c \u003d cinderclient.Client(username,"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_edf80e4c","line":140,"in_reply_to":"bae84128_5ca647ae","updated":"2016-02-25 11:18:03.000000000","message":"Done","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"b0159833e551d63aaed333fb03a52da6c592fe9d","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                existed"},{"line_number":427,"context_line":"        \"\"\""},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"        self._check_context(context)"},{"line_number":430,"context_line":"        client \u003d get_cinderclient(self.conf, context)"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        checksum \u003d hashlib.md5()"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_bc1dd374","line":429,"updated":"2016-02-24 14:59:53.000000000","message":"Do we require context to be specified?\nIf cinder user is specified then we don\u0027t need context. So I am wondering if we need to check that.","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"ee744d0fd31a3c9eeeb455069931c992bbe32e15","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                existed"},{"line_number":427,"context_line":"        \"\"\""},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"        self._check_context(context)"},{"line_number":430,"context_line":"        client \u003d get_cinderclient(self.conf, context)"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        checksum \u003d hashlib.md5()"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_2878248f","line":429,"in_reply_to":"bae84128_bc1dd374","updated":"2016-02-25 11:18:03.000000000","message":"Right, we don\u0027t actually need context for get and delete. For add, as we are recording owner as cinder volume metadata to track who created the volume (that all may be placed in the specified service project), we need the context.\n\nI\u0027ve modified _check_context() to allow context\u003dNone for get and delete.","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"b0159833e551d63aaed333fb03a52da6c592fe9d","unresolved":false,"context_lines":[{"line_number":485,"context_line":"                        raise exceptions.StorageFull()"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"            failed \u003d False"},{"line_number":488,"context_line":"        except IOError as e:"},{"line_number":489,"context_line":"            errors \u003d {errno.EFBIG: exceptions.StorageFull(),"},{"line_number":490,"context_line":"                      errno.ENOSPC: exceptions.StorageFull(),"},{"line_number":491,"context_line":"                      errno.EACCES: exceptions.StorageWriteDenied()}"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_7f669dbb","line":488,"updated":"2016-02-24 14:59:53.000000000","message":"How about Unauthorized error? F.e. what will happen if token is expired?","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"ee744d0fd31a3c9eeeb455069931c992bbe32e15","unresolved":false,"context_lines":[{"line_number":485,"context_line":"                        raise exceptions.StorageFull()"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"            failed \u003d False"},{"line_number":488,"context_line":"        except IOError as e:"},{"line_number":489,"context_line":"            errors \u003d {errno.EFBIG: exceptions.StorageFull(),"},{"line_number":490,"context_line":"                      errno.ENOSPC: exceptions.StorageFull(),"},{"line_number":491,"context_line":"                      errno.EACCES: exceptions.StorageWriteDenied()}"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_e8babc09","line":488,"in_reply_to":"bae84128_7f669dbb","updated":"2016-02-25 11:18:03.000000000","message":"That will raise an Unauthorized exception.\nFor IOError here, it is remapping the glance store exceptions based on the reason in IOError. I\u0027ve added the comment about this.","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"b3c734b0427ab0d6cfa3d937dc4fef2d2d00b936","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                                 root_helper\u003dget_root_helper())"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"class Store(glance_store.driver.Store):"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    \"\"\"Cinder backend store adapter.\"\"\""},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9aed3d3a_a54e4a94","line":202,"updated":"2016-02-25 17:35:39.000000000","message":"Can we mark this store as experimental? Just print a warning saying it\u0027s experimental on load.","commit_id":"3da5331c88e781a372055cb6022d0882a5595c71"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"431c4d9a241c56ce01328c5e9d3f10fc1c4fef2c","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                                 root_helper\u003dget_root_helper())"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"class Store(glance_store.driver.Store):"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    \"\"\"Cinder backend store adapter.\"\"\""},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9aed3d3a_0149ca5f","line":202,"in_reply_to":"9aed3d3a_a54e4a94","updated":"2016-02-26 05:31:15.000000000","message":"Added the experimental message.","commit_id":"3da5331c88e781a372055cb6022d0882a5595c71"}],"glance_store/backend.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e464e2cc8efbbcb7d3b7ef614f4d10aa391cbbaf","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                      \"seconds elapsed and an operation of store has \""},{"line_number":50,"context_line":"                      \"triggered. The feature will be enabled only when \""},{"line_number":51,"context_line":"                      \"the option value greater then zero.\")),"},{"line_number":52,"context_line":"    cfg.StrOpt(\u0027os_region_name\u0027,"},{"line_number":53,"context_line":"               help\u003d_(\u0027Region name of this node. Will be used to locate \u0027"},{"line_number":54,"context_line":"                      \u0027OpenStack services for stores.\u0027)),"},{"line_number":55,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_aebacddf","line":52,"updated":"2016-02-10 14:52:56.000000000","message":"Why do we need a config option for this? Is this something we can get from the request context?","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"9d621b792b3db1498177541ae92c417ff6c34aea","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                      \"seconds elapsed and an operation of store has \""},{"line_number":50,"context_line":"                      \"triggered. The feature will be enabled only when \""},{"line_number":51,"context_line":"                      \"the option value greater then zero.\")),"},{"line_number":52,"context_line":"    cfg.StrOpt(\u0027os_region_name\u0027,"},{"line_number":53,"context_line":"               help\u003d_(\u0027Region name of this node. Will be used to locate \u0027"},{"line_number":54,"context_line":"                      \u0027OpenStack services for stores.\u0027)),"},{"line_number":55,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_fc01f4af","line":52,"in_reply_to":"3a57f1b5_4f397ef1","updated":"2016-02-12 06:06:18.000000000","message":"I\u0027ve moved this from original cinder store option based on Stuart\u0027s comment at https://review.openstack.org/#/c/166414/17/glance_store/_drivers/cinder.py@57 .\n\nShould we keep this in cinder.py and/or rename this to \u0027cinder_os_region_name\u0027 (by following the deprecation procedure)?","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"8db34c5880becc1a4057f50fd8de8324d7485f38","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                      \"seconds elapsed and an operation of store has \""},{"line_number":50,"context_line":"                      \"triggered. The feature will be enabled only when \""},{"line_number":51,"context_line":"                      \"the option value greater then zero.\")),"},{"line_number":52,"context_line":"    cfg.StrOpt(\u0027os_region_name\u0027,"},{"line_number":53,"context_line":"               help\u003d_(\u0027Region name of this node. Will be used to locate \u0027"},{"line_number":54,"context_line":"                      \u0027OpenStack services for stores.\u0027)),"},{"line_number":55,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_4f397ef1","line":52,"in_reply_to":"3a57f1b5_aebacddf","updated":"2016-02-11 20:58:01.000000000","message":"In case of unauthenticated context we need to rely on glance_store configuration but I am not sure if this should be common config and not the cinder specific because we don\u0027t need this for sheepdog or ceph.","commit_id":"370ed7dc5bc74eff4925f2ae23b00ada28263b11"}],"glance_store/common/config.py":[{"author":{"_account_id":16683,"name":"Alexey Galkin","email":"agalkin@mirantis.com","username":"agalkin"},"change_message_id":"ab00058a79fe38efc18147af4348cf25c9883c43","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    cfg.StrOpt(\u0027pydev_worker_debug_host\u0027, default\u003dNone,"},{"line_number":110,"context_line":"               help\u003d_(\u0027The hostname/IP of the pydev process listening for \u0027"},{"line_number":111,"context_line":"                      \u0027debug connections\u0027)),"},{"line_number":112,"context_line":"    cfg.IntOpt(\u0027pydev_worker_debug_port\u0027, default\u003d5678,"},{"line_number":113,"context_line":"               help\u003d_(\u0027The port on which a pydev process is listening for \u0027"},{"line_number":114,"context_line":"                      \u0027connections.\u0027)),"},{"line_number":115,"context_line":"    cfg.StrOpt(\u0027metadata_encryption_key\u0027, secret\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a29b11f_49a6c7c2","line":112,"range":{"start_line":112,"start_character":8,"end_line":112,"end_character":14},"updated":"2015-10-18 20:27:35.000000000","message":"You should be use oslo_config PortOpt.\n\nThe oslo_config library provide PortOpt type to validate\nthe port of range now.\n\nReferences:\nhttps://review.openstack.org/#/c/231257/","commit_id":"2c21c30cdec455ae71cc333adbff200b094246f2"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"ad4a9b401ec442cf2e1e3a0f8e0ec5e313b14955","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    cfg.StrOpt(\u0027pydev_worker_debug_host\u0027, default\u003dNone,"},{"line_number":110,"context_line":"               help\u003d_(\u0027The hostname/IP of the pydev process listening for \u0027"},{"line_number":111,"context_line":"                      \u0027debug connections\u0027)),"},{"line_number":112,"context_line":"    cfg.IntOpt(\u0027pydev_worker_debug_port\u0027, default\u003d5678,"},{"line_number":113,"context_line":"               help\u003d_(\u0027The port on which a pydev process is listening for \u0027"},{"line_number":114,"context_line":"                      \u0027connections.\u0027)),"},{"line_number":115,"context_line":"    cfg.StrOpt(\u0027metadata_encryption_key\u0027, secret\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a29b11f_69aaa31b","line":112,"in_reply_to":"3a29b11f_49a6c7c2","updated":"2015-10-18 21:18:15.000000000","message":"That\u0027s not related to this change and is an addition that can be made later.","commit_id":"2c21c30cdec455ae71cc333adbff200b094246f2"}],"glance_store/common/utils.py":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"b0159833e551d63aaed333fb03a52da6c592fe9d","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        return cooperative_iter(self.fd.__iter__())"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"def get_root_helper():"},{"line_number":147,"context_line":"    return \u0027sudo glance-rootwrap %s\u0027 % CONF.glance_store.rootwrap_config"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_d939c9a5","line":146,"updated":"2016-02-24 14:59:53.000000000","message":"Not reason for -1 and can be fixed later.\nI guess this needs to be part of cinder.py.\nTo understand the goal of this function I have to review cinder.py and find rootwrap_config. After that I need to realize where it is used (I found only cinder.py). So get_root_helper() is too global and can be localized in cinder.py.","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"ee744d0fd31a3c9eeeb455069931c992bbe32e15","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        return cooperative_iter(self.fd.__iter__())"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"def get_root_helper():"},{"line_number":147,"context_line":"    return \u0027sudo glance-rootwrap %s\u0027 % CONF.glance_store.rootwrap_config"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_485da8eb","line":146,"in_reply_to":"bae84128_d939c9a5","updated":"2016-02-25 11:18:03.000000000","message":"OK, I\u0027ve moved this to cinder.py.","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"}],"releasenotes/notes/support-cinder-upload-c85849d9c88bbd7e.yaml":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"16106ebd0bfaa89aeb515453dc3d4531f9f79a99","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Implemented image uploading, downloading and deletion for cinder store."},{"line_number":4,"context_line":"    It also supports new settings to put image volumes into a specific project"},{"line_number":5,"context_line":"    to hide them from users and to control them based on ACL of the images."}],"source_content_type":"text/x-yaml","patch_set":27,"id":"9aed3d3a_30ab721f","line":4,"updated":"2016-02-26 08:03:56.000000000","message":"I guess the most important is notify users about experimental implementation in release notes.","commit_id":"d4b6144279da8c05907be28886887206a93b5aa9"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"ebf157dafdb10fb3d18f762999071831834d4032","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Implemented image uploading, downloading and deletion for cinder store."},{"line_number":4,"context_line":"    It also supports new settings to put image volumes into a specific project"},{"line_number":5,"context_line":"    to hide them from users and to control them based on ACL of the images."}],"source_content_type":"text/x-yaml","patch_set":27,"id":"9aed3d3a_e7f9514f","line":4,"in_reply_to":"9aed3d3a_30ab721f","updated":"2016-02-26 08:47:07.000000000","message":"Done","commit_id":"d4b6144279da8c05907be28886887206a93b5aa9"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"3c903091070e25bacf49518ef42e448a9f3b3b46","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    to hide them from users and to control them based on ACL of the images."},{"line_number":6,"context_line":"    Note that cinder store is currently considered experimental, so"},{"line_number":7,"context_line":"    current deployers should be aware that the use of it in production right"},{"line_number":8,"context_line":"    now may be riscky."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"9aed3d3a_56c26434","line":8,"range":{"start_line":8,"start_character":15,"end_line":8,"end_character":21},"updated":"2016-02-26 11:28:23.000000000","message":"typo: risky","commit_id":"410747822c9433c83fd4aec547d3e4c288502f90"}],"setup.cfg":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"b0159833e551d63aaed333fb03a52da6c592fe9d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"  python-swiftclient\u003e\u003d2.2.0 # Apache-2.0"},{"line_number":65,"context_line":"cinder \u003d"},{"line_number":66,"context_line":"  python-cinderclient\u003e\u003d1.3.1 # Apache-2.0"},{"line_number":67,"context_line":"  os-brick # Apache-2.0"},{"line_number":68,"context_line":"  oslo.rootwrap\u003e\u003d2.0.0 # Apache-2.0"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"[build_sphinx]"}],"source_content_type":"text/x-ttcn-cfg","patch_set":25,"id":"bae84128_36ae022e","line":67,"updated":"2016-02-24 14:59:53.000000000","message":"os-brick\u003e\u003d1.0.0 ???","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"ee744d0fd31a3c9eeeb455069931c992bbe32e15","unresolved":false,"context_lines":[{"line_number":64,"context_line":"  python-swiftclient\u003e\u003d2.2.0 # Apache-2.0"},{"line_number":65,"context_line":"cinder \u003d"},{"line_number":66,"context_line":"  python-cinderclient\u003e\u003d1.3.1 # Apache-2.0"},{"line_number":67,"context_line":"  os-brick # Apache-2.0"},{"line_number":68,"context_line":"  oslo.rootwrap\u003e\u003d2.0.0 # Apache-2.0"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"[build_sphinx]"}],"source_content_type":"text/x-ttcn-cfg","patch_set":25,"id":"bae84128_e868fc89","line":67,"in_reply_to":"bae84128_36ae022e","updated":"2016-02-25 11:18:03.000000000","message":"That sounds reasonable to make this consistent with global-requirements. I\u0027ve added the version.","commit_id":"b799c9598efc714f5b226ca52eed6269ab1270f4"}],"test-requirements.txt":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"9d48a1ca52cd567ea9304519d4229b7e0205340a","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# Cinder backend"},{"line_number":42,"context_line":"python-cinderclient\u003e\u003d1.2.2"},{"line_number":43,"context_line":"os-brick"}],"source_content_type":"text/plain","patch_set":12,"id":"9a41bdd9_710e843c","line":43,"updated":"2015-07-15 02:01:39.000000000","message":"Shouldn\u0027t this be in the non-test requirements.txt file?","commit_id":"19d8a37a49eac72db9873523d35ee01ba61ae9b0"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"65c05eada6576770d43dc90d92c427f99effb9ef","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# Cinder backend"},{"line_number":42,"context_line":"python-cinderclient\u003e\u003d1.2.2"},{"line_number":43,"context_line":"os-brick"}],"source_content_type":"text/plain","patch_set":12,"id":"9a41bdd9_29438cb3","line":43,"in_reply_to":"9a41bdd9_710e843c","updated":"2015-07-15 16:41:01.000000000","message":"Requirements for all the optional cinder_store\u0027s are now placed in test-requirements.txt.","commit_id":"19d8a37a49eac72db9873523d35ee01ba61ae9b0"}]}
