)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2fc4b9368795b429dd305e4a845c8c35c3f9e90b","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This fix assigns a name for a volume in that cases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1485198"},{"line_number":17,"context_line":"Related-Bug: #1224972"},{"line_number":18,"context_line":"Change-Id: I77482ea91ce41d541ce3b5fef62574347aff1e34"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_6138faee","line":16,"updated":"2015-08-25 19:50:00.000000000","message":"Remove this one, it was fixed in Cinder.","commit_id":"3e8d469ced1d73747bcb7d7f03eca9071db04d33"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"bd8271c6194aa1c397fe07135765ae904bbb197b","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This fix assigns a name for a volume in that cases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1485198"},{"line_number":17,"context_line":"Related-Bug: #1224972"},{"line_number":18,"context_line":"Change-Id: I77482ea91ce41d541ce3b5fef62574347aff1e34"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da20952f_02d8b052","line":16,"in_reply_to":"fa1b9901_6138faee","updated":"2015-08-26 16:34:51.000000000","message":"Done","commit_id":"3e8d469ced1d73747bcb7d7f03eca9071db04d33"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2fc4b9368795b429dd305e4a845c8c35c3f9e90b","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This fix assigns a name for a volume in that cases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1485198"},{"line_number":17,"context_line":"Related-Bug: #1224972"},{"line_number":18,"context_line":"Change-Id: I77482ea91ce41d541ce3b5fef62574347aff1e34"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_212762cb","line":17,"updated":"2015-08-25 19:50:00.000000000","message":"This should be Closes-Bug right?","commit_id":"3e8d469ced1d73747bcb7d7f03eca9071db04d33"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"bd8271c6194aa1c397fe07135765ae904bbb197b","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This fix assigns a name for a volume in that cases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1485198"},{"line_number":17,"context_line":"Related-Bug: #1224972"},{"line_number":18,"context_line":"Change-Id: I77482ea91ce41d541ce3b5fef62574347aff1e34"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da20952f_a2dc6447","line":17,"in_reply_to":"fa1b9901_212762cb","updated":"2015-08-26 16:34:51.000000000","message":"Done","commit_id":"3e8d469ced1d73747bcb7d7f03eca9071db04d33"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5551788c8b254591a79530207d5e48d80255c73c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Feodor Tersin \u003cftersin@hotmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-26 19:09:31 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix creation of volumes during block device mapping stage"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently Nova does not name volumes when it creates it from bdm for"},{"line_number":10,"context_line":"image-\u003evolume and snapshot-\u003evolume mappings. As a result the user does"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da20952f_0c377ab1","line":7,"updated":"2015-08-26 20:40:10.000000000","message":"You should rename this commit, this isn\u0027t actually what this change is doing anymore, it\u0027s providing a name for the volumes that nova creates.","commit_id":"09765a9f303adf2a9c09a7c0e1126320c09dba21"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"6a94d3234c2416342313a28a08872f24174e082f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Feodor Tersin \u003cftersin@hotmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-26 19:09:31 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix creation of volumes during block device mapping stage"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently Nova does not name volumes when it creates it from bdm for"},{"line_number":10,"context_line":"image-\u003evolume and snapshot-\u003evolume mappings. As a result the user does"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ba15a1d1_8cc4ac40","line":7,"in_reply_to":"da20952f_0c377ab1","updated":"2015-09-22 13:38:38.000000000","message":"Done","commit_id":"09765a9f303adf2a9c09a7c0e1126320c09dba21"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"2a4dce8e20880e0a3040a44124e30cf5738cc78b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Feodor Tersin \u003cftersin@hotmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-26 19:09:31 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix creation of volumes during block device mapping stage"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently Nova does not name volumes when it creates it from bdm for"},{"line_number":10,"context_line":"image-\u003evolume and snapshot-\u003evolume mappings. As a result the user does"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da20952f_958dc033","line":7,"in_reply_to":"da20952f_0c377ab1","updated":"2015-08-27 06:12:27.000000000","message":"Forgot about the header. Will do.","commit_id":"09765a9f303adf2a9c09a7c0e1126320c09dba21"}],"nova/tests/unit/virt/test_block_device.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"33ed4cbc4b8d30624a788959596282a1c93459d9","unresolved":false,"context_lines":[{"line_number":607,"context_line":"            self.context, 3, \u0027nova-bdm-0-for-None\u0027,"},{"line_number":608,"context_line":"            \u0027This volume is auto-created by nova-compute service from \u0027"},{"line_number":609,"context_line":"            \u0027fake-snapshot-id-1 snapshot during block device mapping stage of \u0027"},{"line_number":610,"context_line":"            \u0027instance fake_uuid\u0027,"},{"line_number":611,"context_line":"            snapshot, availability_zone\u003dNone).AndReturn(volume)"},{"line_number":612,"context_line":"        wait_func(self.context, \u0027fake-volume-id-2\u0027).AndReturn(None)"},{"line_number":613,"context_line":"        instance, expected_conn_info \u003d self._test_volume_attach("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_052f30a2","line":610,"updated":"2015-10-02 11:24:49.000000000","message":"A bit weird to have to hardcode this like this in the test but I guess it\u0027s OK since it\u0027s only in a handful of places","commit_id":"4749a07e21ed7f141f8132beba430d06b31d25fd"}],"nova/virt/block_device.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5551788c8b254591a79530207d5e48d80255c73c","unresolved":false,"context_lines":[{"line_number":330,"context_line":"               virt_driver, wait_func\u003dNone, do_check_attach\u003dTrue):"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if not self.volume_id:"},{"line_number":333,"context_line":"            vol_name \u003d instance.uuid + \u0027-snapshot-vol\u0027"},{"line_number":334,"context_line":"            av_zone \u003d instance.availability_zone"},{"line_number":335,"context_line":"            snapshot \u003d volume_api.get_snapshot(context,"},{"line_number":336,"context_line":"                                               self.snapshot_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_8ca38a9e","line":333,"updated":"2015-08-26 20:40:10.000000000","message":"You probably want nova or the az (which defaults to \u0027nova\u0027) in the name.\n\nMaybe:\n\nnova-instance.uuid-snapshot-bdm\n\n?\n\nRemember that whatever you do, this is actually the display_name of the volume and the user can change that.  And the length restriction in cinder is 255 so if you start using a bunch of random fields you have to make sure they are \u003c\u003d255.\n\nNote that you could also put some more detailed information in the volume description if you wanted to, like \"This volume snapshot was auto-created by the nova-compute service for instance \u003cuuid\u003e\"","commit_id":"09765a9f303adf2a9c09a7c0e1126320c09dba21"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"2a4dce8e20880e0a3040a44124e30cf5738cc78b","unresolved":false,"context_lines":[{"line_number":330,"context_line":"               virt_driver, wait_func\u003dNone, do_check_attach\u003dTrue):"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if not self.volume_id:"},{"line_number":333,"context_line":"            vol_name \u003d instance.uuid + \u0027-snapshot-vol\u0027"},{"line_number":334,"context_line":"            av_zone \u003d instance.availability_zone"},{"line_number":335,"context_line":"            snapshot \u003d volume_api.get_snapshot(context,"},{"line_number":336,"context_line":"                                               self.snapshot_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_b8e7993f","line":333,"in_reply_to":"da20952f_8ca38a9e","updated":"2015-08-27 06:12:27.000000000","message":"I like \u0027nova\u0027 part in the name, because it explicitly points to the OS component, which created the volume.\n\nAs i wrote in a root level comment, an uuid is not a user friednly part of the name. I know that the user can change instance name. But he can do it only after instance and its volumes have been created. And this is an explicit operation. So he may remember that previously \u0027xxx\u0027 instance was \u0027yyy\u0027. Also the user can detach the volume, attach it to another instance.\n\nSo probably nova-autocreated-for-\u003cinstance-name\u003e? nova-bdm-autocreated-for-\u003cinstance-name\u003e\n\nAnd put the details (like instance uuid, source type and source uuid) to the description:\n\n\u0027This volume was auto-created by nova-compute service ( from \u003csource_type\u003e \u003csource_uuid\u003e | as blank volume } during block device mapping stage of instance \u003cinstance_uuid\u003e.\u0027","commit_id":"09765a9f303adf2a9c09a7c0e1126320c09dba21"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab0de8908486bbc422e93167985c78e79bfe7a8b","unresolved":false,"context_lines":[{"line_number":330,"context_line":"               virt_driver, wait_func\u003dNone, do_check_attach\u003dTrue):"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if not self.volume_id:"},{"line_number":333,"context_line":"            vol_name \u003d instance.uuid + \u0027-snapshot-vol\u0027"},{"line_number":334,"context_line":"            av_zone \u003d instance.availability_zone"},{"line_number":335,"context_line":"            snapshot \u003d volume_api.get_snapshot(context,"},{"line_number":336,"context_line":"                                               self.snapshot_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_6d03580e","line":333,"in_reply_to":"da20952f_987e55e3","updated":"2015-08-27 18:39:43.000000000","message":"I\u0027d think that you\u0027d want unique names for multiple bdm\u0027s auto-created by nova for the same instance, but I\u0027m not exactly sure how you\u0027d distinguish them if, for example, the source_type is the same, then what\u0027s different?  boot_index?  Probably a good question for ndipanov.","commit_id":"09765a9f303adf2a9c09a7c0e1126320c09dba21"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"a39448275fa4c298d4061103f4ae22275d8dd4e6","unresolved":false,"context_lines":[{"line_number":330,"context_line":"               virt_driver, wait_func\u003dNone, do_check_attach\u003dTrue):"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if not self.volume_id:"},{"line_number":333,"context_line":"            vol_name \u003d instance.uuid + \u0027-snapshot-vol\u0027"},{"line_number":334,"context_line":"            av_zone \u003d instance.availability_zone"},{"line_number":335,"context_line":"            snapshot \u003d volume_api.get_snapshot(context,"},{"line_number":336,"context_line":"                                               self.snapshot_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_987e55e3","line":333,"in_reply_to":"da20952f_b8e7993f","updated":"2015-08-27 06:23:35.000000000","message":"Also we should understand that an instance can have more than one volume comes from bdm.\n\nDo we want to give them distinguished names?","commit_id":"09765a9f303adf2a9c09a7c0e1126320c09dba21"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab0de8908486bbc422e93167985c78e79bfe7a8b","unresolved":false,"context_lines":[{"line_number":330,"context_line":"               virt_driver, wait_func\u003dNone, do_check_attach\u003dTrue):"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if not self.volume_id:"},{"line_number":333,"context_line":"            vol_name \u003d instance.uuid + \u0027-snapshot-vol\u0027"},{"line_number":334,"context_line":"            av_zone \u003d instance.availability_zone"},{"line_number":335,"context_line":"            snapshot \u003d volume_api.get_snapshot(context,"},{"line_number":336,"context_line":"                                               self.snapshot_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_2a71c6e0","line":333,"in_reply_to":"da20952f_b8e7993f","updated":"2015-08-27 18:39:43.000000000","message":"Hmm, if I\u0027m booting an instance from a volume snapshot and rely on nova to provide the backing volume, wouldn\u0027t it be kind of silly to detach that volume and attach it to another instance? Wouldn\u0027t your original instance that this was attached to be messed up?\n\nAs far as using the user-editable instance name in the volume name, I don\u0027t think you can do that unless you\u0027re going to truncate it to fit, since the instance display name can be up to 255 characters and that\u0027s the limit for the volume name too.\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/models.py#n286\n\nhttp://git.openstack.org/cgit/openstack/cinder/tree/cinder/db/sqlalchemy/models.py#n154\n\nYou could use instance.name which is the generated name from the instance_name_template, but the instance_name_template isn\u0027t limited in size from what I can tell either.\n\nSo if you want to use something from the instance, like name or display_name, you\u0027ll most likely need to have a check in here to truncate the final volume name before calling create - or use the instance uuid, but like you said that could change if the volume is attached to another instance, but even if that happens, the volume display_name is editable also and the user could rename the volume in that case.  idk, it\u0027s not a huge win either way to me so I\u0027d leave that up to your judgement.","commit_id":"09765a9f303adf2a9c09a7c0e1126320c09dba21"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"33ed4cbc4b8d30624a788959596282a1c93459d9","unresolved":false,"context_lines":[{"line_number":407,"context_line":"          \u0027during block device mapping stage of instance %(instance_uuid)s\u0027) %"},{"line_number":408,"context_line":"        {\u0027source\u0027: source_description,"},{"line_number":409,"context_line":"         \u0027instance_uuid\u0027: instance.uuid})"},{"line_number":410,"context_line":"    return name[:255], description[:255]"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"def _convert_block_devices(device_type, block_device_mapping):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_45020840","line":410,"updated":"2015-10-02 11:24:49.000000000","message":"This kind of thing might belong in the volume_api code if we really do need to do this :(","commit_id":"4749a07e21ed7f141f8132beba430d06b31d25fd"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"351c416f272e764dd94df072fee4c0d5dc942e78","unresolved":false,"context_lines":[{"line_number":407,"context_line":"          \u0027during block device mapping stage of instance %(instance_uuid)s\u0027) %"},{"line_number":408,"context_line":"        {\u0027source\u0027: source_description,"},{"line_number":409,"context_line":"         \u0027instance_uuid\u0027: instance.uuid})"},{"line_number":410,"context_line":"    return name[:255], description[:255]"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"def _convert_block_devices(device_type, block_device_mapping):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_bcb489d1","line":410,"in_reply_to":"9a1a9d01_45020840","updated":"2015-10-05 14:47:38.000000000","message":"will dig it","commit_id":"4749a07e21ed7f141f8132beba430d06b31d25fd"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"48dc8a3271d4dd77f4dc4fc66149da482f6010ac","unresolved":false,"context_lines":[{"line_number":409,"context_line":"          \u0027during block device mapping stage of instance %(instance_uuid)s\u0027) %"},{"line_number":410,"context_line":"        {\u0027source\u0027: source_description,"},{"line_number":411,"context_line":"         \u0027instance_uuid\u0027: instance.uuid})"},{"line_number":412,"context_line":"    return name[:255], description[:255]"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"def _convert_block_devices(device_type, block_device_mapping):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_72b8cdc8","line":412,"updated":"2015-10-08 09:10:12.000000000","message":"I am still not happy with this being here. If this is the limitation of the Cinder API then it should be done in the volume_api","commit_id":"a360d6f60a073a7951b36d49250dd1be3fb201d9"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"84a8f3feddf05c64fd9c59450ef5ce5863bfc180","unresolved":false,"context_lines":[{"line_number":409,"context_line":"          \u0027during block device mapping stage of instance %(instance_uuid)s\u0027) %"},{"line_number":410,"context_line":"        {\u0027source\u0027: source_description,"},{"line_number":411,"context_line":"         \u0027instance_uuid\u0027: instance.uuid})"},{"line_number":412,"context_line":"    return name[:255], description[:255]"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"def _convert_block_devices(device_type, block_device_mapping):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_cc23ef54","line":412,"in_reply_to":"7a2fa921_23ce8282","updated":"2015-10-12 08:54:36.000000000","message":"Done","commit_id":"a360d6f60a073a7951b36d49250dd1be3fb201d9"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"4e2f36331473b234869c80051eeb3356c4483920","unresolved":false,"context_lines":[{"line_number":409,"context_line":"          \u0027during block device mapping stage of instance %(instance_uuid)s\u0027) %"},{"line_number":410,"context_line":"        {\u0027source\u0027: source_description,"},{"line_number":411,"context_line":"         \u0027instance_uuid\u0027: instance.uuid})"},{"line_number":412,"context_line":"    return name[:255], description[:255]"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"def _convert_block_devices(device_type, block_device_mapping):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_23ce8282","line":412,"in_reply_to":"7a2fa921_72b8cdc8","updated":"2015-10-08 11:14:31.000000000","message":"i remember about that, but have not done it yet","commit_id":"a360d6f60a073a7951b36d49250dd1be3fb201d9"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"48dc8a3271d4dd77f4dc4fc66149da482f6010ac","unresolved":false,"context_lines":[{"line_number":475,"context_line":""},{"line_number":476,"context_line":"    name_generator \u003d functools.partial("},{"line_number":477,"context_line":"        _generate_volume_name,"},{"line_number":478,"context_line":"        iter(six.moves.xrange(1, len(block_device_mapping) + 1)))"},{"line_number":479,"context_line":"    map(_log_and_attach, block_device_mapping)"},{"line_number":480,"context_line":"    return block_device_mapping"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_f2d05d21","line":478,"updated":"2015-10-08 09:10:12.000000000","message":"nit: we can just pass itertools.count() here","commit_id":"a360d6f60a073a7951b36d49250dd1be3fb201d9"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"84a8f3feddf05c64fd9c59450ef5ce5863bfc180","unresolved":false,"context_lines":[{"line_number":475,"context_line":""},{"line_number":476,"context_line":"    name_generator \u003d functools.partial("},{"line_number":477,"context_line":"        _generate_volume_name,"},{"line_number":478,"context_line":"        iter(six.moves.xrange(1, len(block_device_mapping) + 1)))"},{"line_number":479,"context_line":"    map(_log_and_attach, block_device_mapping)"},{"line_number":480,"context_line":"    return block_device_mapping"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_53167bf2","line":478,"in_reply_to":"7a2fa921_f2d05d21","updated":"2015-10-12 08:54:36.000000000","message":"Done","commit_id":"a360d6f60a073a7951b36d49250dd1be3fb201d9"}]}
