)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0b00aa743fb8bc3f03087934f92893078ca6c74","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Image Import Refactor"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This spec proposes a refactoring of the Glance image import functionality"},{"line_number":10,"context_line":"along the lines worked out during discussions at the Mitka summit."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"ApiImpact"},{"line_number":13,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba8a016a_b77a6ebb","line":10,"updated":"2015-11-19 20:10:39.000000000","message":"s/Mitka/Mitaka/","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Image Import Refactor"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This spec proposes a refactoring of the Glance image import functionality"},{"line_number":10,"context_line":"along the lines worked out during discussions at the Mitka summit."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"ApiImpact"},{"line_number":13,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a8ffd7b_27186084","line":10,"in_reply_to":"ba8a016a_b77a6ebb","updated":"2015-11-24 17:02:35.000000000","message":"Thanks for catching that!","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"}],"specs/mitaka/approved/image-import-refactor.rst":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":58,"context_line":"tasks API is too customizable to be suitable for DefCore purposes, and in fact,"},{"line_number":59,"context_line":"does not fare well when assessed on the dimensions of interoperability and"},{"line_number":60,"context_line":"discoverability."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"The primary problem with tasks as defined in the current API is that they have"},{"line_number":63,"context_line":"an \"input\" element, defined in the task schema as a JSON blob, whose exact"},{"line_number":64,"context_line":"content is left up to the cloud deployer.  This allows for flexibility on the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_367e826a","line":61,"updated":"2015-10-09 14:59:44.000000000","message":"Maybe add a one liner to mention DefCore Compute vs DefCore Platform (and how the API must be consistent for each)?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":58,"context_line":"tasks API is too customizable to be suitable for DefCore purposes, and in fact,"},{"line_number":59,"context_line":"does not fare well when assessed on the dimensions of interoperability and"},{"line_number":60,"context_line":"discoverability."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"The primary problem with tasks as defined in the current API is that they have"},{"line_number":63,"context_line":"an \"input\" element, defined in the task schema as a JSON blob, whose exact"},{"line_number":64,"context_line":"content is left up to the cloud deployer.  This allows for flexibility on the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_1136bbb4","line":61,"in_reply_to":"7a2fa921_367e826a","updated":"2015-10-12 10:23:52.000000000","message":"I wouldn\u0027t mind a one liner here but even just links to the relevant docs would be enough.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":58,"context_line":"tasks API is too customizable to be suitable for DefCore purposes, and in fact,"},{"line_number":59,"context_line":"does not fare well when assessed on the dimensions of interoperability and"},{"line_number":60,"context_line":"discoverability."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"The primary problem with tasks as defined in the current API is that they have"},{"line_number":63,"context_line":"an \"input\" element, defined in the task schema as a JSON blob, whose exact"},{"line_number":64,"context_line":"content is left up to the cloud deployer.  This allows for flexibility on the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_eaba2f71","line":61,"in_reply_to":"7a2fa921_367e826a","updated":"2015-10-12 15:41:33.000000000","message":"I\u0027ll add a reference to the DefCore interoperability page,\nhttp://www.openstack.org/brand/interop/\n\nStuart, is the point you want to emphasize that since Glance is part of the OpenStack Powered Compute, we can\u0027t come up with a design that depends on an object store being exposed to end-users (even though it would be available for an OpenStack Powered Platform)?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"80d67b7e91b848c548bcf173b6ea89083bc5481f","unresolved":false,"context_lines":[{"line_number":58,"context_line":"tasks API is too customizable to be suitable for DefCore purposes, and in fact,"},{"line_number":59,"context_line":"does not fare well when assessed on the dimensions of interoperability and"},{"line_number":60,"context_line":"discoverability."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"The primary problem with tasks as defined in the current API is that they have"},{"line_number":63,"context_line":"an \"input\" element, defined in the task schema as a JSON blob, whose exact"},{"line_number":64,"context_line":"content is left up to the cloud deployer.  This allows for flexibility on the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a29b11f_1595eadc","line":61,"in_reply_to":"7a2fa921_d94d9ac5","updated":"2015-10-20 16:50:23.000000000","message":"Added a \"note\" to the \"Problem description\" section.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f798071be2b8af8e6c9687183b79a4836f0a67cc","unresolved":false,"context_lines":[{"line_number":58,"context_line":"tasks API is too customizable to be suitable for DefCore purposes, and in fact,"},{"line_number":59,"context_line":"does not fare well when assessed on the dimensions of interoperability and"},{"line_number":60,"context_line":"discoverability."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"The primary problem with tasks as defined in the current API is that they have"},{"line_number":63,"context_line":"an \"input\" element, defined in the task schema as a JSON blob, whose exact"},{"line_number":64,"context_line":"content is left up to the cloud deployer.  This allows for flexibility on the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_d94d9ac5","line":61,"in_reply_to":"7a2fa921_eaba2f71","updated":"2015-10-13 10:41:04.000000000","message":"\u003e Stuart, is the point you want to emphasize that since Glance is part of the OpenStack Powered Compute, we can\u0027t come up with a design that depends on an object store being exposed to end-users (even though it would be available for an OpenStack Powered Platform)?\n\nYes, I think so.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_d644ee4a","line":87,"updated":"2015-10-09 14:59:44.000000000","message":"I\u0027d like us to record the reasons for the decision to mandate image import for all users as part of DefCore Compute. (I can add something based on the old etherpad if appropriate)","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"80d67b7e91b848c548bcf173b6ea89083bc5481f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a29b11f_07d8611c","line":87,"in_reply_to":"5a2ca52d_5b72a4ae","updated":"2015-10-20 16:50:23.000000000","message":"Added a \"note\" to the \"Problem description\" section to emphasize Mark\u0027s point.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"80d67b7e91b848c548bcf173b6ea89083bc5481f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a29b11f_8771d1e2","line":87,"in_reply_to":"5a2ca52d_63ee41ee","updated":"2015-10-20 16:50:23.000000000","message":"Added a list of motivations right after the place where the use case is defined.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3e87c3d9fc1bf0c09a92051f78c114903f5b4d9f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_8e47c11c","line":87,"in_reply_to":"5a2ca52d_63ee41ee","updated":"2015-10-14 18:20:05.000000000","message":"Mark\u0027s clarification is correct. We have users that want to bring images into their clouds in an interoperable way. The existing APIs make that difficult, for various reasons. So we want a new API that lets us meet all of the constraints while still achieving interoperability. After we have that, we can work to encourage the DefCore committee to adopt it.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"82e9049bbd3d347172ba873a66dbe660105b4df3","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_5b72a4ae","line":87,"in_reply_to":"5a2ca52d_8e47c11c","updated":"2015-10-15 13:31:05.000000000","message":"Given the discussion here, does the text above need to be revised?  (I think not, but want to check.)\n\nI think Stuart\u0027s point is that since Glance is in the OpenStack powered Compute program, in order to achieve interoperability, we cannot assume that there\u0027s an object store.  This definitely constrains our design decisions.  I\u0027d like us to figure out a way to satisfy \"Compute\" interoperability without dooming users to a lowest-common-denominator experience.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"d14c4dab3b76695fabb66f07b853e21cb06e349b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_2c9fdcb5","line":87,"in_reply_to":"7a2fa921_52d9c055","updated":"2015-10-12 10:38:02.000000000","message":"Hi Mark,\n\nI didn\u0027t say -- or at least didn\u0027t intend to say -- that this spec makes image import mandatory. As you say, that would be a DefCore thing.\n\nThe impression given to the Glance team so far is that the end goal driving this spec is to incorporate the new API call as mandatory into both DefCore Compute and DefCore Platform.\n\nFrom Doug\u0027s mail (http://lists.openstack.org/pipermail/openstack-dev/2015-September/074360.html):\n\n   Once identified and incorporated into the DefCore capabilities\n   set, the selected API needs to remain stable for an extended\n   period of time\n\nI\u0027d just like to record why we are writing an API which must potentially be usable by DefCore Compute.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_11d23b35","line":87,"in_reply_to":"7a2fa921_52d9c055","updated":"2015-10-12 10:23:52.000000000","message":"Mark, ++","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_e5fd8009","line":87,"in_reply_to":"7a2fa921_52d9c055","updated":"2015-10-12 15:41:33.000000000","message":"Thanks for your clarification, Mark.\n\nStuart, I agree that we should say something here, though I\u0027m not sure exactly what.  The initial discussion (at least this is what I recall) was that DefCore is going to mandate that what we\u0027re calling \"image import\" must be available in any cloud that wants to achieve the \"OpenStack Powered Compute\" designation (and hence, also any cloud that wants the \"OpenStack Powered Platform\") designation.  (Some of this is discussed on the current image scoring matrix patch in the DefCore project, https://review.openstack.org/#/c/213353/ )  This spec is an attempt to re-work our previous attempt to provide an end-user upload capability without directly exposing the current image upload call/workflow.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e3a308e7358bab79acd7127fbc261da5592e8b24","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_63ee41ee","line":87,"in_reply_to":"7a2fa921_79480688","updated":"2015-10-13 14:43:53.000000000","message":"Good point, the use case at the top of the spec specifies the \"what\" but doesn\u0027t really say anything about why you\u0027d want to do it.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6754,"name":"Mark T. Voelker","email":"markvoelker@gmail.com","username":"mvoelker"},"change_message_id":"caef2eee01bf186dded2ea99b1e210f5cd6a9ac8","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_52d9c055","line":87,"in_reply_to":"7a2fa921_d644ee4a","updated":"2015-10-09 17:07:37.000000000","message":"Just to clarify: this spec doesn\u0027t make image import mandatory and no decision has been made to make import mandatory.  This spec in fact cannot do so (that\u0027s really up to the DefCore Committee and it\u0027s scoring process, not Glance).  What the spec is attempting to do is make the import process more likely to meet more of the 12 criteria [1] for being included in DefCore Guidelines in the future, which is an excellent design consideration for things we want to be interoperable.\n\n[1] http://git.openstack.org/cgit/openstack/defcore/tree/doc/source/process/CoreCriteria.rst","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f798071be2b8af8e6c9687183b79a4836f0a67cc","unresolved":false,"context_lines":[{"line_number":84,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_79480688","line":87,"in_reply_to":"7a2fa921_e5fd8009","updated":"2015-10-13 10:41:04.000000000","message":"\u003e Stuart, I agree that we should say something here, though I\u0027m not sure exactly what.\n\nWhat I had in mind was just to capture why people want to have image import for Compute. If that weren\u0027t the case the solution would be easier, so I\u0027d just like us to record the reasons. I think Doug had some thoughts on this on the old etherpad.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_5c379c4c","line":88,"updated":"2015-10-09 14:59:44.000000000","message":"About image export:\n\nDo we need to think about export for DefCore compute? Will DefCore ever mandate that export is a requirement for DefCore Compute? (I\u0027m not  sure what that would look like.)","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_cbdc0477","line":88,"in_reply_to":"7a2fa921_31e177d1","updated":"2015-10-12 15:41:33.000000000","message":"I agree that we should do only image import in this spec, but see my comments below about exposing tasks, because I think image export, image cloning, and other on-demand image-related services would be best exposed as tasks.  If I\u0027m right about that, then it would be good to keep image import in the same basic framework.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":85,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":86,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":87,"context_line":"image transfer)."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Proposed change"},{"line_number":90,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_31e177d1","line":88,"in_reply_to":"7a2fa921_5c379c4c","updated":"2015-10-12 10:23:52.000000000","message":"Image export would follow the same evaluation as image import. While I think we should keep it in mind, we should just focus on import in this spec.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6754,"name":"Mark T. Voelker","email":"markvoelker@gmail.com","username":"mvoelker"},"change_message_id":"caef2eee01bf186dded2ea99b1e210f5cd6a9ac8","unresolved":false,"context_lines":[{"line_number":97,"context_line":"container or disk format unsupported in a particular cloud, such images will"},{"line_number":98,"context_line":"not be bootable, and it\u0027s highly unlikely that an end-user desires to create a"},{"line_number":99,"context_line":"non-bootable image.  So it\u0027s important that there be a uniform way for an"},{"line_number":100,"context_line":"end-user to discover what formats are supported."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"Further, many deployers will want to put a maximum size on imported images."},{"line_number":103,"context_line":"For example, an image whose virtual size is greater than the maximum size disk"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_324d249a","line":100,"updated":"2015-10-09 17:07:37.000000000","message":"Good summary!  I love that we\u0027re paying attention to the discoverability aspect here.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":104,"context_line":"available will not be bootable in that cloud.  Or a deployer might wish to"},{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_7c0858da","line":107,"updated":"2015-10-09 14:59:44.000000000","message":"I think Glance will probably need to be able to figure out the virtual size, which means image introspection, which means moving away from considering the image as an opaque blob - a fairly big change.\n\nReading the virtual size may be easy enough to do in pure python. (Some other things may not be.)\n\nHere\u0027s qcow2 for example:\n\n https://github.com/qemu/qemu/blob/master/tests/qemu-iotests/qcow2.py\n\nvhd would probably be easy enough to implement too.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"80d67b7e91b848c548bcf173b6ea89083bc5481f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"available will not be bootable in that cloud.  Or a deployer might wish to"},{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a29b11f_91eb47b0","line":107,"in_reply_to":"5a2ca52d_26ee168c","updated":"2015-10-20 16:50:23.000000000","message":"Added a \"Policy impact\" section to the spec.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"3268c7ab856187717adcc3aad0552604238b21ec","unresolved":false,"context_lines":[{"line_number":104,"context_line":"available will not be bootable in that cloud.  Or a deployer might wish to"},{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_b2f7e9d1","line":107,"in_reply_to":"7a2fa921_7c0858da","updated":"2015-10-09 20:35:49.000000000","message":"This needs to be investigated more completely, and it seems like a bottleneck to proceeding with this spec.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f798071be2b8af8e6c9687183b79a4836f0a67cc","unresolved":false,"context_lines":[{"line_number":104,"context_line":"available will not be bootable in that cloud.  Or a deployer might wish to"},{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_d4023fb4","line":107,"in_reply_to":"7a2fa921_8547ec1c","updated":"2015-10-13 10:41:04.000000000","message":"\u003e (And for a really bad vulnerablity, a deployer might want to shut down image import entirely until a mitigation is in place.)\n\nSounds like a case for a policy.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":104,"context_line":"available will not be bootable in that cloud.  Or a deployer might wish to"},{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_31997720","line":107,"in_reply_to":"7a2fa921_b2f7e9d1","updated":"2015-10-12 10:23:52.000000000","message":"+1\n\nFWIW, when working on the introspect task, I considered doing all this in python but I ended up using qemu-img because it has support for more image types, it also introspects the image type and I didn\u0027t feel like duplicating *and* maintaining that code in Glance. TBH, I don\u0027t think requesting `qemu-img` to be installed is a terrible thing. \n\nThat said, to Stuart\u0027s point, I think this would indeed need an introspect step to be run every time.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"d14c4dab3b76695fabb66f07b853e21cb06e349b","unresolved":false,"context_lines":[{"line_number":104,"context_line":"available will not be bootable in that cloud.  Or a deployer might wish to"},{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_4ce498ab","line":107,"in_reply_to":"7a2fa921_b2f7e9d1","updated":"2015-10-12 10:38:02.000000000","message":"The potentially large difference between the number of image bytes and the virtual disk size may need to be considered from a security point of view.\n\nMalicious headers may also need to be considered: http://lists.openstack.org/pipermail/openstack/2015-June/013078.html","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":104,"context_line":"available will not be bootable in that cloud.  Or a deployer might wish to"},{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_8547ec1c","line":107,"in_reply_to":"7a2fa921_b2f7e9d1","updated":"2015-10-12 15:41:33.000000000","message":"Yes, it\u0027s a jungle out there!\n\nWe definitely need to think about this.  There are nine values defined in the enumeration for the the disk_format image property.  I think that each format is going to have its own various security issues.  Further, even if we picked just one or two formats to fully support, we can\u0027t anticipate all possible attacks.  The import workflow must be configurable so that new checks can be introduced when necessary.  (And for a really bad vulnerablity, a deployer might want to shut down image import entirely until a mitigation is in place.)\n\nPart of the impetus to rewrite the task executor in taskflow was that it would be easier to introduce new elements into the import flow.  At the Vancouver summit, some deployers expressed interest in having a StackForge repository where people could contribute work they\u0027ve done on validating and scanning images.  I think something along those lines is the way to go ... we provide the framework, and leave it configurable for what exactly is going to happen during the import processing.  That will allow people to react much more quickly to vulnerabilities.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e3a308e7358bab79acd7127fbc261da5592e8b24","unresolved":false,"context_lines":[{"line_number":104,"context_line":"available will not be bootable in that cloud.  Or a deployer might wish to"},{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_26ee168c","line":107,"in_reply_to":"7a2fa921_d4023fb4","updated":"2015-10-13 14:43:53.000000000","message":"I agree, I\u0027ll make explicit that this will be a policy-governed activity.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_dc708c42","line":108,"updated":"2015-10-09 14:59:44.000000000","message":"It may be implicit, but we probably need to limit the number of concurrent import requests a user can kick off?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"518112858c398fa6a7d984c73e2a9c5823ba62bf","unresolved":false,"context_lines":[{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_1cc7bd65","line":108,"in_reply_to":"7a2fa921_070b007e","updated":"2015-10-11 22:45:53.000000000","message":"I don\u0027t think so - just reject the subsequent requests with a 4xx code.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_51575326","line":108,"in_reply_to":"7a2fa921_1cc7bd65","updated":"2015-10-12 10:23:52.000000000","message":"I think we\u0027ll need new states anyway. More precisely, I think we need a way to communicate the background tasks status regardless on how they are exposed.\n\nBased on the proposal and the discussions, this imports will likely happen in the background. In this case, I\u0027d rather have a new status than rejecting the import request.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_8e1cda6b","line":108,"in_reply_to":"7a2fa921_51575326","updated":"2015-10-12 15:41:33.000000000","message":"+1 on not rejecting requests.\n\nI think this is a reason to expose a task for import.  An end user would have a list of pending tasks that was entirely separate from the list of usable images.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f798071be2b8af8e6c9687183b79a4836f0a67cc","unresolved":false,"context_lines":[{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_540b8f7d","line":108,"in_reply_to":"7a2fa921_8e1cda6b","updated":"2015-10-13 10:41:04.000000000","message":"I\u0027d be ok with rejecting requests with a 429 (and a clear message). Especially if it simplified things for a first implementation.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d511ee36e7a98a459d621e1be426000e027eaed","unresolved":false,"context_lines":[{"line_number":105,"context_line":"encourage end-users to follow good practices (for example, good"},{"line_number":106,"context_line":"application/data separation) by only accepting relatively small virtual disks."},{"line_number":107,"context_line":"This virtual disk size limit also needs to be communicated to end users."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"So, we need to determine an API call that will make this information discoverable"},{"line_number":110,"context_line":"to end users."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_070b007e","line":108,"in_reply_to":"7a2fa921_dc708c42","updated":"2015-10-09 19:08:13.000000000","message":"That\u0027s a good point. If we assume we won\u0027t expose the import tasks through the task API, does that mean we need a new image state for \"waiting to start import\"?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"With respect to interoperability, we need to determine what information and"},{"line_number":113,"context_line":"workflow is suitable for both small and large clouds, where image data is being"},{"line_number":114,"context_line":"supplied by untrusted users."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Alternatives"},{"line_number":117,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_457ee66a","line":114,"updated":"2015-10-09 14:59:44.000000000","message":"Is it worth putting our current thoughts around transporting the bits in here?\n\nRight now this would be a brief outline of the two possible high level approaches (direct transfer of bits/indirect import from location). (I can add this if appropriate).","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"82e9049bbd3d347172ba873a66dbe660105b4df3","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"With respect to interoperability, we need to determine what information and"},{"line_number":113,"context_line":"workflow is suitable for both small and large clouds, where image data is being"},{"line_number":114,"context_line":"supplied by untrusted users."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Alternatives"},{"line_number":117,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_3bcb28a7","line":114,"in_reply_to":"5a2ca52d_2e778d3b","updated":"2015-10-15 13:31:05.000000000","message":"I\u0027m thinking a good place to start this list would be the design summit etherpad?  Or would it be better (and more permanent) to do it here?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"80d67b7e91b848c548bcf173b6ea89083bc5481f","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"With respect to interoperability, we need to determine what information and"},{"line_number":113,"context_line":"workflow is suitable for both small and large clouds, where image data is being"},{"line_number":114,"context_line":"supplied by untrusted users."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Alternatives"},{"line_number":117,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a29b11f_7d13e40d","line":114,"in_reply_to":"5a2ca52d_3bcb28a7","updated":"2015-10-20 16:50:23.000000000","message":"Added a \"note\" to the \"Proposed changes\" section describing the 3 approaches mentioned so far.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3e87c3d9fc1bf0c09a92051f78c114903f5b4d9f","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"With respect to interoperability, we need to determine what information and"},{"line_number":113,"context_line":"workflow is suitable for both small and large clouds, where image data is being"},{"line_number":114,"context_line":"supplied by untrusted users."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Alternatives"},{"line_number":117,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_2e778d3b","line":114,"in_reply_to":"5a2ca52d_f52a187e","updated":"2015-10-14 18:20:05.000000000","message":"It would be good to list all of those, and start thinking of issues.\n\nFor example, if Glance is going to return a URL where the user can upload something, Glance has to know how to do that, and it\u0027s coupled to the type of service where that URL is going to be hosted. Does that mean Glance has to know how to build URLs for swift, apache, and other types of web servers? Does Glance need to come up with a unique URL? It seems much less complicated to decouple that step by having the user place the data somewhere before making the call to glance.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"With respect to interoperability, we need to determine what information and"},{"line_number":113,"context_line":"workflow is suitable for both small and large clouds, where image data is being"},{"line_number":114,"context_line":"supplied by untrusted users."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Alternatives"},{"line_number":117,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_2ecee6b4","line":114,"in_reply_to":"7a2fa921_0773d9b5","updated":"2015-10-12 15:41:33.000000000","message":"Or there\u0027s a third option, Glance returns a URL to which the end-user uploads the bytes.  I think this is different from direct upload with redirect, though maybe it\u0027s already covered by that.  In any case, I agree that we need to outline the approaches with pros/cons.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f798071be2b8af8e6c9687183b79a4836f0a67cc","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"With respect to interoperability, we need to determine what information and"},{"line_number":113,"context_line":"workflow is suitable for both small and large clouds, where image data is being"},{"line_number":114,"context_line":"supplied by untrusted users."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Alternatives"},{"line_number":117,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_f52a187e","line":114,"in_reply_to":"7a2fa921_2ecee6b4","updated":"2015-10-13 10:41:04.000000000","message":"\u003e Glance returns a URL to which the end-user uploads the bytes\n\nYes, this is an option, so we should document that we thought of it.\n\nIt\u0027s similar to the import from URL except (I assume) the full path for this particular image\u0027s bytes would be specified, eg for image \u0027123\u0027: http://images.example.com/123\n\nI think supplying a full, image specific path may be hard to make work.\nIt\u0027s actually just a special case of import from URL where we\u0027re allowed to restrict the URL in some way.\n\nIf we just restrict the URL (http://images.example.com/*) it seems more workable.\nIn the \u0027Swift is available\u0027 case it avoids glance trying to create(/cleanup?) specific containers, or users having to re-upload image bytes to different places in swift.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d511ee36e7a98a459d621e1be426000e027eaed","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"With respect to interoperability, we need to determine what information and"},{"line_number":113,"context_line":"workflow is suitable for both small and large clouds, where image data is being"},{"line_number":114,"context_line":"supplied by untrusted users."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Alternatives"},{"line_number":117,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_a771ec0d","line":114,"in_reply_to":"7a2fa921_457ee66a","updated":"2015-10-09 19:08:13.000000000","message":"I\u0027m not sure what this question really means, can you elaborate?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"d14c4dab3b76695fabb66f07b853e21cb06e349b","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"With respect to interoperability, we need to determine what information and"},{"line_number":113,"context_line":"workflow is suitable for both small and large clouds, where image data is being"},{"line_number":114,"context_line":"supplied by untrusted users."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Alternatives"},{"line_number":117,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_0773d9b5","line":114,"in_reply_to":"7a2fa921_a771ec0d","updated":"2015-10-12 10:38:02.000000000","message":"Sure. I just mean we need to decide about whether we upload the bytes directly into the Glance API or provide a location (eg URL) which the server fetches the bits from. \n\nWe should outline the two approaches, maybe listing some pros/cons.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":112,"context_line":"With respect to interoperability, we need to determine what information and"},{"line_number":113,"context_line":"workflow is suitable for both small and large clouds, where image data is being"},{"line_number":114,"context_line":"supplied by untrusted users."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Alternatives"},{"line_number":117,"context_line":"------------"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_05f8eec1","line":115,"updated":"2015-10-09 14:59:44.000000000","message":"Is it worth adding bit transfer \u0027operability considerations\u0027 here (or in another part of the doc)? \n\nie enumerate the qualities that a good solution should have. (I can add this if appropriate).","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":112,"context_line":"With respect to interoperability, we need to determine what information and"},{"line_number":113,"context_line":"workflow is suitable for both small and large clouds, where image data is being"},{"line_number":114,"context_line":"supplied by untrusted users."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Alternatives"},{"line_number":117,"context_line":"------------"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_ce4ad227","line":115,"in_reply_to":"7a2fa921_05f8eec1","updated":"2015-10-12 15:41:33.000000000","message":"I think it\u0027s worth doing, let\u0027s work together on that.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d7e1d86a7d474f3c6ac2e359b155fb6474361481","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"As the current proposal is that the refactoring of image import functionality"},{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_c5ea1d74","line":135,"updated":"2015-10-08 17:55:28.000000000","message":"We want to be careful with wording here. It\u0027s OK to use tasks as a backend implementation detail, and it\u0027s OK (though not optimal) to present an API for a user to check a task they start some other way, but it seems like we want the new call to be part of the images API rather than the tasks API. Since tasks may be moved to an admin-only interface, we might even want to use tasks on the backend but not expose that at all through the public API, and have the user check the import status by getting the image details instead of polling the task directly.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"As the current proposal is that the refactoring of image import functionality"},{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_ae1676ef","line":135,"in_reply_to":"7a2fa921_acabecd5","updated":"2015-10-12 15:41:33.000000000","message":"Not surprisingly, I prefer the /tasks endpoint.  (I\u0027ll come back and provide some justification later, I\u0027m getting a little leery about having so many comments in \u0027draft\u0027 status!)","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"80d67b7e91b848c548bcf173b6ea89083bc5481f","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"As the current proposal is that the refactoring of image import functionality"},{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a29b11f_fd1cd4c2","line":135,"in_reply_to":"7a2fa921_ae1676ef","updated":"2015-10-20 16:50:23.000000000","message":"Added a \"note\" that whether or not to expose /tasks is still under discussion, referring to people to the \"outer\" comments on the spec.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"As the current proposal is that the refactoring of image import functionality"},{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_d098767a","line":135,"in_reply_to":"7a2fa921_c5ea1d74","updated":"2015-10-09 14:59:44.000000000","message":"Obviously there\u0027s a range of opinions on whether we should (re)use /tasks for the main api call.\n\nMy preference is to not reuse a /tasks resource, but to use something under /images. It seems a more natural fit.\n\nFrom the tasks documentation, it seems that tasks were, at least in part, created to enable deployer specific operations:\n\n https://review.openstack.org/#/c/220166\n\n ``input``: this is defined to be a JSON blob, the exact content of which will\n depend upon the requirements set by the specific cloud deployer.  The intent\n￼ is that each deployer will document these requirements for end users.\n\nThat seems to be counter to DefCore inter-operability.\n\nWe could redefine the purpose of /tasks, but having some tasks be \u0027official\u0027 DefCore tasks and others be operator specific feels like it would make the purpose of tasks even less clear. It would also prevent us from making task creation be admin-only if we wanted to (as Doug said).","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"As the current proposal is that the refactoring of image import functionality"},{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_acabecd5","line":135,"in_reply_to":"7a2fa921_d098767a","updated":"2015-10-12 10:23:52.000000000","message":"I\u0027m also of the idea that we could (re)use the task engine but not the endpoint (/tasks). I think this specific process should have a new, discoverable, interoperable, and users-oriented endpoint that could use the existing task engine to do the import.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_5ce9dcb5","line":137,"updated":"2015-10-09 14:59:44.000000000","message":"I think this spec will not be dealing with converting images from one format to another? If so, maybe state it explicitly. (But that we plan to do it in the future).","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e3a308e7358bab79acd7127fbc261da5592e8b24","unresolved":false,"context_lines":[{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_a3dd3872","line":137,"in_reply_to":"5a2ca52d_5572ec7d","updated":"2015-10-13 14:43:53.000000000","message":"I don\u0027t know what I think about this, mainly because \"having a format that all operators must accept\" implies that the imported image will be bootable in the accepting cloud.  John Garbutt and I gave a talk about image interoperability at the Atlanta summit with the intent of stating some basic practices that could make images interoperable, and wound up instead suggesting that it\u0027s much better to bootstrap from a cloud\u0027s public images (as opposed to bake your own images) if you want a pleasing outcome.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7d626a37853bd9fb1f72628444586e95b752c71a","unresolved":false,"context_lines":[{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_397007dc","line":137,"in_reply_to":"5a2ca52d_7d03d00d","updated":"2015-10-15 16:30:33.000000000","message":"\u003e How is this different to an operator (or operators) which only accepts \u0027vhd\u0027 implying that imported vhd images will be bootable?\n\nFair enough.  (Glad you think a required format is out of scope for this spec, though!)\n\nI think I\u0027ll add an \"out of scope\" section when I revise the spec so we can keep a list of these ideas for next steps.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e8bcb54c49494907ee5d42023ae0f56134c35e01","unresolved":false,"context_lines":[{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_7d03d00d","line":137,"in_reply_to":"5a2ca52d_a3dd3872","updated":"2015-10-15 15:27:30.000000000","message":"\u003e it\u0027s much better to bootstrap from a cloud\u0027s public images\n\nI was as the talk (containers will solve all our problems!)\n\n\u003e \"having a format that all operators must accept\" implies that the imported image will be bootable in the accepting cloud.\n\nHow is this different to an operator (or operators) which only accepts \u0027vhd\u0027 implying that imported vhd images will be bootable?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_ce01723b","line":137,"in_reply_to":"7a2fa921_2ced9c25","updated":"2015-10-12 15:41:33.000000000","message":"I agree, will make sure the scope is addressed somewhere.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_2ced9c25","line":137,"in_reply_to":"7a2fa921_5ce9dcb5","updated":"2015-10-12 10:23:52.000000000","message":"++\n\nmore specifically, this specs will deal with tasks that are *required* for the import process to succeed. The rest will be worked on in the future and likele it\u0027ll be made configurable.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f798071be2b8af8e6c9687183b79a4836f0a67cc","unresolved":false,"context_lines":[{"line_number":134,"context_line":"should make use of the current tasks interface, most of the current tasks"},{"line_number":135,"context_line":"framework will not change."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_5572ec7d","line":137,"in_reply_to":"7a2fa921_ce01723b","updated":"2015-10-13 10:41:04.000000000","message":"This is out of scope so ... but I do like the idea of having a format that all operators must accept. For me \u0027raw\u0027 is probably the one. We should consider adding that to our to-do list once we\u0027ve completed implementing this spec.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"* Specification for the method"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_eb110353","line":139,"updated":"2015-10-09 14:59:44.000000000","message":"The \u0027upload\u0027 formats and the \u0027import\u0027 formats need to be decoupled.\n\nThe set of accepted formats for import may change over time, and they may be different than the \u0027native\u0027 format used by nova.\n\nLet\u0027s say the \u0027native\u0027 format is \u0027qcow2\u0027. And the import formats are \u0027raw\u0027, \u0027qcow2\u0027, \u0027vhd\u0027.\n\nIf, eg for security reasons, the operator decides to disallow the import of \u0027qcow2\u0027 it must still be possible to create a \u0027qcow2\u0027 image from a nova snapshot.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7d626a37853bd9fb1f72628444586e95b752c71a","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"* Specification for the method"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_5406ea86","line":139,"in_reply_to":"5a2ca52d_3d16b855","updated":"2015-10-15 16:30:33.000000000","message":"I was thinking that there\u0027s a list of image disk_formats that you use in your cloud, and then there\u0027s the list of image disk_formats that you accept for import.  If you associate the former with \"images\" and the latter with \"tasks\", then you have a conceptually more clear way to convey this to end-users.  But maybe not.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"* Specification for the method"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_ae2bd693","line":139,"in_reply_to":"7a2fa921_4ce6d845","updated":"2015-10-12 15:41:33.000000000","message":"I think this is another good reason to make import a task posted to /tasks and decouple it from /images -- it\u0027s less confusing for issues like this.  It makes it extremely clear that the import list is what formats the cloud accepts for import purposes.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e8bcb54c49494907ee5d42023ae0f56134c35e01","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"* Specification for the method"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_3d16b855","line":139,"in_reply_to":"7a2fa921_ae2bd693","updated":"2015-10-15 15:27:30.000000000","message":"I don\u0027t quite get what you\u0027re saying here about tasks making this clearer (sorry).","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"A new API call that will provide information about, what disk_format,"},{"line_number":138,"context_line":"container_format, etc., are accepted by the cloud will be introduced.  (Will"},{"line_number":139,"context_line":"fill in details as the design is agreed upon.)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"* Specification for the method"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_4ce6d845","line":139,"in_reply_to":"7a2fa921_eb110353","updated":"2015-10-12 10:23:52.000000000","message":"good point","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d7e1d86a7d474f3c6ac2e359b155fb6474361481","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_058fb52a","line":145,"updated":"2015-10-08 17:55:28.000000000","message":"We talked about having a separate \"preferred\" format as well as any other formats that can be supported by having the cloud convert the image from the input format to the preferred format. I think that\u0027s 1 string and 1 list of strings, but they are separate values.\n\nOTOH, the preferred format may actually change based on some other characteristic like zone or server flavor, so we may need to think about whether there is additional complexity to be accounted for here.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e3a308e7358bab79acd7127fbc261da5592e8b24","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_c3e4f40e","line":145,"in_reply_to":"5a2ca52d_0a31a7a2","updated":"2015-10-13 14:43:53.000000000","message":"@Flavio: I agree, let\u0027s keep the preferred format out of scope.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3e87c3d9fc1bf0c09a92051f78c114903f5b4d9f","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_8ed7c1be","line":145,"in_reply_to":"5a2ca52d_c3e4f40e","updated":"2015-10-14 18:20:05.000000000","message":"It\u0027s important to provide a way to discover which formats will work after import, but I agree we can put off any conversion APIs for later. I like the idea of decoupling conversion from upload.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e3a308e7358bab79acd7127fbc261da5592e8b24","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_06cf5ab1","line":145,"in_reply_to":"5a2ca52d_db2aabe7","updated":"2015-10-13 14:43:53.000000000","message":"@Stuart: I agree that it will be enlightening if we try to sketch out a JSON schema for this.\n\nI disagree with folding the conversion into the import.  I think the use-cases for conversion are broader than just import (e.g., multihypervisor cloud).  On the other hand, if someone currently possesses an offline image in format X and the cloud only accepts import of format Y (but offers Y-\u003eX conversion), then that person is out of luck.  But nonetheless, I think we should hold off on conversion-during-import for the first edition.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"07bc82f91d9b6c64632a3d86bba73744f0860592","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_0a31a7a2","line":145,"in_reply_to":"5a2ca52d_db2aabe7","updated":"2015-10-13 11:45:45.000000000","message":"I think having a preferred format is out of the scope of this spec (unless I\u0027m missing something). Saying that for this spec we\u0027d be down to just qcow2 feels like picking up a format that everyone must support and I believe we should avoid that for now.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f798071be2b8af8e6c9687183b79a4836f0a67cc","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_db2aabe7","line":145,"in_reply_to":"7a2fa921_013adbe7","updated":"2015-10-13 10:41:04.000000000","message":"\u003e Suppose the end-user needs the image to be in a different format to use a particular flavor/AZ or whatever.\n\nMaybe this could be handled with an import call where the the desired output format can be specified?\n\nFor now, we probably just need json that is flexible enough to be future proof, so something that would allow global and per-format restrictions, eg:\n\n input_formats: qcow, raw, vhd\n input_format_details:\n   qcow:\n     output_formats: qcow2, raw\n     default_output_format: qcow2\n     backing_store: false\n     encryption: false\n     compression: false\n   vhd:\n     output_formats: qcow2, raw, vhd\n     default_output_format: vhd\n     backing_store: false\n     dynamic: true\n     fixed: true\n     differencing: false\n   raw:\n     output_formats: qcow2, raw\n     default_output_format: qcow2\n max_size: 1024\n max_virtual_size: 1048576\n\nFor a first implementation where conversion is not supported, this may reduce to:\n\n input_formats: qcow\n input_format_details:\n   qcow:\n     output_formats: qcow2\n     default_output_format: qcow2\n     backing_store: false\n     encryption: false\n     compression: false\n max_size: 1024\n max_virtual_size: 1048576","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6754,"name":"Mark T. Voelker","email":"markvoelker@gmail.com","username":"mvoelker"},"change_message_id":"caef2eee01bf186dded2ea99b1e210f5cd6a9ac8","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_d5493a32","line":145,"in_reply_to":"7a2fa921_058fb52a","updated":"2015-10-09 17:07:37.000000000","message":"Is it possible that more than one format might be \"preferred\"?  It\u0027s sort of a subjective word...\n\nGood point re: zones/flavors/etc though.  The same is true of regions, which are frequently used as a way of offering different (for example) hypervisors.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6754,"name":"Mark T. Voelker","email":"markvoelker@gmail.com","username":"mvoelker"},"change_message_id":"c4e64d70251d95d663c72d72bc28395b3f5282da","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_feb76a82","line":145,"in_reply_to":"7a2fa921_8780708c","updated":"2015-10-09 23:34:50.000000000","message":"@Doug: With regions I\u0027ve typically seen each region have it\u0027s own local Glance instance (regions more or less amount two separate control planes, sometimes sharing a Horizon and sometimes sharing a Keystone, though with federation the latter is becoming less frequent).  With AZ\u0027s I\u0027ve more commonly seen multiple AZ\u0027s sharing a single Glance.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"3268c7ab856187717adcc3aad0552604238b21ec","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_0f15569a","line":145,"in_reply_to":"7a2fa921_8780708c","updated":"2015-10-09 20:35:49.000000000","message":"From an API consumer\u0027s perspective, the most versatile and powerful use case will be to get a full range of values available from a single request. I would prefer to see a complete response proposed rather than have to tickle details out through the use of required query parameters.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d511ee36e7a98a459d621e1be426000e027eaed","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_8780708c","line":145,"in_reply_to":"7a2fa921_d5493a32","updated":"2015-10-09 19:08:13.000000000","message":"@Mark - I think you\u0027re right. So we either account for that by making the zone/region/flavor an input to the query (\"tell me what type of image to upload to run on a m1.tiny in us-east\" vs. (\"tell me what type of image to upload\"), or we have the query response include the full range of values in some sort of mapping the client can use to determine the answer itself. It might produce a simpler API if we just get the client to provide us with the input arguments.\n\nExposing my ignorance again, is an individual Glance service aware of multiple regions or zones? Or is the assumption that each region or zone would have its own Glance service?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"  * This method returns the disk formats and container formats supported in the"},{"line_number":144,"context_line":"    deployment being queried.  It will also return the maximum size image that"},{"line_number":145,"context_line":"    may be imported into that cloud."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"  * Method type: GET"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_013adbe7","line":145,"in_reply_to":"7a2fa921_feb76a82","updated":"2015-10-12 15:41:33.000000000","message":"Summarizing the above:\n- End-user makes a \"what do you accept\" call\n- Glance responds with a list of container formats, disk formats (possibly each containing only one value), max size in bytes (and whatever else turns out to be important as this discussion progresses)\n- End-user makes the import call\n\nSuppose the end-user needs the image to be in a different format to use a particular flavor/AZ or whatever.  We could handle this by introducing a conversion task, where end-user specifies an existing image and requests that an new image be created in a specific supported format (where \"supported\" format depends on the cloud).  This would allow decoupling among:\n- what image formats are actually in use in the cloud\n- what image formats are supported for import\n- what image formats are supported for conversion\n\nIt would be good to have such decoupling because:\n- the in-use formats depend on what kind of hypervisors you have and what format they prefer\n- the import formats depend on what formats you are confident your screening processes are adequate for\n- the conversion formats depend on what you\u0027re confident will convert correctly\n\n@Doug: when you say \"preferred\" format, do you mean \"OpenStack preferred\", or just \"preferred for this cloud\"?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d7e1d86a7d474f3c6ac2e359b155fb6474361481","unresolved":false,"context_lines":[{"line_number":176,"context_line":"---------------"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"As its intent is to consume user-provided data, this feature will introduce"},{"line_number":179,"context_line":"new security risks."},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"* It consumes user-provided data.  Depending upon the container_format"},{"line_number":182,"context_line":"  and disk_format allowed, this may expose Glance (and other projects"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_e564f922","line":179,"updated":"2015-10-08 17:55:28.000000000","message":"How are these risks different from the risks present in the existing v1 and v2 mechanisms for uploading or importing images? Are these really new?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"82e9049bbd3d347172ba873a66dbe660105b4df3","unresolved":false,"context_lines":[{"line_number":176,"context_line":"---------------"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"As its intent is to consume user-provided data, this feature will introduce"},{"line_number":179,"context_line":"new security risks."},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"* It consumes user-provided data.  Depending upon the container_format"},{"line_number":182,"context_line":"  and disk_format allowed, this may expose Glance (and other projects"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_1b6f4c93","line":179,"in_reply_to":"5a2ca52d_ceb9397b","updated":"2015-10-15 13:31:05.000000000","message":"Sorry Doug, I misunderstood your point.  I\u0027ll revise to be more explicit in the way you suggest.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3e87c3d9fc1bf0c09a92051f78c114903f5b4d9f","unresolved":false,"context_lines":[{"line_number":176,"context_line":"---------------"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"As its intent is to consume user-provided data, this feature will introduce"},{"line_number":179,"context_line":"new security risks."},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"* It consumes user-provided data.  Depending upon the container_format"},{"line_number":182,"context_line":"  and disk_format allowed, this may expose Glance (and other projects"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_ceb9397b","line":179,"in_reply_to":"7a2fa921_e436cde6","updated":"2015-10-14 18:20:05.000000000","message":"No, I was just trying to clarify how they were new. Maybe being more explicit about the fact that the older APIs were not meant to be exposed to regular end users would address that.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":176,"context_line":"---------------"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"As its intent is to consume user-provided data, this feature will introduce"},{"line_number":179,"context_line":"new security risks."},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"* It consumes user-provided data.  Depending upon the container_format"},{"line_number":182,"context_line":"  and disk_format allowed, this may expose Glance (and other projects"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_e436cde6","line":179,"in_reply_to":"7a2fa921_e564f922","updated":"2015-10-12 15:41:33.000000000","message":"Well, the v1 API was never intended to be exposed to end-users, and the discussion at the Havana summit was that v2 upload shouldn\u0027t be exposed directly to end-users, either.  Rather, only trusted users should be allowed access.  So under that assumption, we\u0027re doing something new.\n\nIf you reject that assumption, then you\u0027re right, we are actually narrowing a big security hole.\n\nOn the other hand, even though the hole is narrowed, there may be more people trying to stuff bad things into it, so overall exposure may increase.\n\nI really don\u0027t have an axe to grind here, if the consensus is that there\u0027s no security impact, then I\u0027ll be happy to change the text.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"518112858c398fa6a7d984c73e2a9c5823ba62bf","unresolved":false,"context_lines":[{"line_number":181,"context_line":"* It consumes user-provided data.  Depending upon the container_format"},{"line_number":182,"context_line":"  and disk_format allowed, this may expose Glance (and other projects"},{"line_number":183,"context_line":"  that consume images from Glance) to decompression bombs or various"},{"line_number":184,"context_line":"  tar-based attacks."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"* It enables a resource exhaustion attack."},{"line_number":187,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_3cc4f95d","line":184,"updated":"2015-10-11 22:45:53.000000000","message":"Those projects (Nova in particular) are already exposed to that risk.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":181,"context_line":"* It consumes user-provided data.  Depending upon the container_format"},{"line_number":182,"context_line":"  and disk_format allowed, this may expose Glance (and other projects"},{"line_number":183,"context_line":"  that consume images from Glance) to decompression bombs or various"},{"line_number":184,"context_line":"  tar-based attacks."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"* It enables a resource exhaustion attack."},{"line_number":187,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_a468d588","line":184,"in_reply_to":"7a2fa921_3cc4f95d","updated":"2015-10-12 15:41:33.000000000","message":"Great, maybe we can leverage whatever they\u0027ve done to mitigate these attacks so that a Glance node doesn\u0027t get killed when it opens up a user-submitted package to see what\u0027s inside.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"518112858c398fa6a7d984c73e2a9c5823ba62bf","unresolved":false,"context_lines":[{"line_number":183,"context_line":"  that consume images from Glance) to decompression bombs or various"},{"line_number":184,"context_line":"  tar-based attacks."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"* It enables a resource exhaustion attack."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"(The remainder of the questions in this section will be addressed as the"},{"line_number":189,"context_line":"discussion advances.)"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_dc9f0564","line":186,"updated":"2015-10-11 22:45:53.000000000","message":"How so? It doesn\u0027t imply unlimited tasks, and it doesn\u0027t provide anonymous or sibil based attacks, so this seems unjustified.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"80d67b7e91b848c548bcf173b6ea89083bc5481f","unresolved":false,"context_lines":[{"line_number":183,"context_line":"  that consume images from Glance) to decompression bombs or various"},{"line_number":184,"context_line":"  tar-based attacks."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"* It enables a resource exhaustion attack."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"(The remainder of the questions in this section will be addressed as the"},{"line_number":189,"context_line":"discussion advances.)"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a29b11f_1173b74e","line":186,"in_reply_to":"5a2ca52d_5be144fd","updated":"2015-10-20 16:50:23.000000000","message":"Updated this entire section in light of the discussion above.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"82e9049bbd3d347172ba873a66dbe660105b4df3","unresolved":false,"context_lines":[{"line_number":183,"context_line":"  that consume images from Glance) to decompression bombs or various"},{"line_number":184,"context_line":"  tar-based attacks."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"* It enables a resource exhaustion attack."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"(The remainder of the questions in this section will be addressed as the"},{"line_number":189,"context_line":"discussion advances.)"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_5be144fd","line":186,"in_reply_to":"5a2ca52d_8e7341e7","updated":"2015-10-15 13:31:05.000000000","message":"Some kind of timeout is a good idea so that someone uploading a bunch of images over really slow connections doesn\u0027t tie up a Glance node for an arbitrary amount of time.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3e87c3d9fc1bf0c09a92051f78c114903f5b4d9f","unresolved":false,"context_lines":[{"line_number":183,"context_line":"  that consume images from Glance) to decompression bombs or various"},{"line_number":184,"context_line":"  tar-based attacks."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"* It enables a resource exhaustion attack."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"(The remainder of the questions in this section will be addressed as the"},{"line_number":189,"context_line":"discussion advances.)"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_8e7341e7","line":186,"in_reply_to":"7a2fa921_64087d92","updated":"2015-10-14 18:20:05.000000000","message":"A max size, and a max import task lifetime, should address this.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":183,"context_line":"  that consume images from Glance) to decompression bombs or various"},{"line_number":184,"context_line":"  tar-based attacks."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"* It enables a resource exhaustion attack."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"(The remainder of the questions in this section will be addressed as the"},{"line_number":189,"context_line":"discussion advances.)"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_64087d92","line":186,"in_reply_to":"7a2fa921_dc9f0564","updated":"2015-10-12 15:41:33.000000000","message":"I was thinking that if we don\u0027t have a max_size, then someone could upload an arbitrary number of bytes and overwhelm all your glance nodes, either on purpose or via a buggy script.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"3268c7ab856187717adcc3aad0552604238b21ec","unresolved":false,"context_lines":[{"line_number":274,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"It is not anticipated that this feature will require dependencies not already"},{"line_number":277,"context_line":"used by the current Glance tasks."},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"Testing"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_6f296a9a","line":277,"updated":"2015-10-09 20:35:49.000000000","message":"virtual disk size and image format introspection may introduce new dependencies?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"512cb498a208459242ab3c870393f4a5b1de152e","unresolved":false,"context_lines":[{"line_number":274,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"It is not anticipated that this feature will require dependencies not already"},{"line_number":277,"context_line":"used by the current Glance tasks."},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"Testing"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_a708e52e","line":277,"in_reply_to":"7a2fa921_6c1634f3","updated":"2015-10-12 11:00:04.000000000","message":"Why would we need root access?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":274,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"It is not anticipated that this feature will require dependencies not already"},{"line_number":277,"context_line":"used by the current Glance tasks."},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"Testing"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_6c1634f3","line":277,"in_reply_to":"7a2fa921_6f296a9a","updated":"2015-10-12 10:23:52.000000000","message":"if that\u0027s the case, it\u0027d be `qemu-img` and we probably need to pool rootwrap in but there\u0027s a patch/spec for that already.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4fd8bf69b3b441981e33149dddbfa134a61f3c90","unresolved":false,"context_lines":[{"line_number":274,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"It is not anticipated that this feature will require dependencies not already"},{"line_number":277,"context_line":"used by the current Glance tasks."},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"Testing"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a29b11f_289461e0","line":277,"in_reply_to":"7a2fa921_a708e52e","updated":"2015-10-20 08:13:33.000000000","message":"Actually, you don\u0027t. We don\u0027t require it for the current usage.\n\n(also, I obviously meant pull not pool :P)","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d7e1d86a7d474f3c6ac2e359b155fb6474361481","unresolved":false,"context_lines":[{"line_number":279,"context_line":"Testing"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_c50e9d8b","line":282,"updated":"2015-10-08 17:55:28.000000000","message":"Are we going to try to do image format verification? That would need a negative test.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d511ee36e7a98a459d621e1be426000e027eaed","unresolved":false,"context_lines":[{"line_number":279,"context_line":"Testing"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_87571025","line":282,"in_reply_to":"7a2fa921_773ab19a","updated":"2015-10-09 19:08:13.000000000","message":"What does Glance do to verify image contents now?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":279,"context_line":"Testing"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_ccb2e806","line":282,"in_reply_to":"7a2fa921_87571025","updated":"2015-10-12 10:23:52.000000000","message":"Glance doesn\u0027t verify image\u0027s contents. The introspection task just runs qemu-img and so does the conversion task. Other than that, the image is stored as it\u0027s uploaded and handed to Nova that way.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":279,"context_line":"Testing"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_040bc97e","line":282,"in_reply_to":"7a2fa921_877609d7","updated":"2015-10-12 15:41:33.000000000","message":"My experience is that converted vhds can be problematic.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":279,"context_line":"Testing"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_773ab19a","line":282,"in_reply_to":"7a2fa921_c50e9d8b","updated":"2015-10-09 14:59:44.000000000","message":"If so, how? libguestfs may be an option. Nova uses this already. It\u0027s not written in python, but it has a python library.\n\nhttps://www.berrange.com/tags/libguestfs/","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"512cb498a208459242ab3c870393f4a5b1de152e","unresolved":false,"context_lines":[{"line_number":279,"context_line":"Testing"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_877609d7","line":282,"in_reply_to":"7a2fa921_ccb2e806","updated":"2015-10-12 11:00:04.000000000","message":"Some Googling seems to suggest that when qemu-img converts an image from another format to vhd that the resulting vhd image cannot be snapshotted in OpenStack:\n\nhttps://www.citrix.com/blogs/2012/10/04/convert-a-raw-image-to-xenserver-vhd/\n\nDoes anyone know if vhd images created by \"qemu-img convert\" typically work ok for deployments using Xen?","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_572215a4","line":283,"updated":"2015-10-09 14:59:44.000000000","message":"In addition to format verification should we check that the image doesn\u0027t contain backing file references (ie references to files on the local host\u0027s filesystem), eg:\n\n https://github.com/qemu/qemu/blob/master/docs/specs/qcow2.txt\n\nAgain, this would be pretty easy to do in pure python.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"512cb498a208459242ab3c870393f4a5b1de152e","unresolved":false,"context_lines":[{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_c2070f17","line":283,"in_reply_to":"7a2fa921_4c76d807","updated":"2015-10-12 11:00:04.000000000","message":"Nice!","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_4c76d807","line":283,"in_reply_to":"7a2fa921_572215a4","updated":"2015-10-12 10:23:52.000000000","message":"This is done already, FWIW.\n\nhttps://git.openstack.org/cgit/openstack/glance/commit/glance/async/flows/base_import.py?id\u003dd529863a1e8d2307526bdb395b4aebe97f81603d\n\nI\u0027m all for moving to python as much as we can but I\u0027d really like to avoid duplicating things that exist elsewhere and that are also very well maintained.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9a4616dd884ca0d25a0f69ab5d8f91986294d21","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"The following will need to be added to the glance developer docs."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_57f535ea","line":284,"updated":"2015-10-09 14:59:44.000000000","message":"Do we also need to think about disallowing changing the format metadata after the image is active?\n\nEg a user imports a \u0027raw\u0027 image. Then changes its format to qcow2.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e3a308e7358bab79acd7127fbc261da5592e8b24","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"The following will need to be added to the glance developer docs."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_a6ca264e","line":284,"in_reply_to":"5a2ca52d_1edb311d","updated":"2015-10-13 14:43:53.000000000","message":"I think this is another good reason to prefer a task model, in which the image isn\u0027t created until the imported payload has passed the various tests, etc., and you know exactly what you\u0027re dealing with.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"82e9049bbd3d347172ba873a66dbe660105b4df3","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"The following will need to be added to the glance developer docs."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_7b7a00f3","line":284,"in_reply_to":"5a2ca52d_316372de","updated":"2015-10-15 13:31:05.000000000","message":"@Doug, in the v2 API image upload is a 2 step ordered process:\nPOST /images -\u003e creates an Image record with a UUID\nPUT /images/UUID/file -\u003e the upload of the image data\n\nWith an import task, we\u0027d have the option taking the image data first, figuring out whether it\u0027s acceptable, and only then perform the image creation.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3e87c3d9fc1bf0c09a92051f78c114903f5b4d9f","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"The following will need to be added to the glance developer docs."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_316372de","line":284,"in_reply_to":"5a2ca52d_a6ca264e","updated":"2015-10-14 18:20:05.000000000","message":"@Brian, you seem to have a different definition for when an image is \"created\". Are you defining the image as the database record? I thought images existed in multiple states, some of which can\u0027t be used by nova or other consumers, and that the state would change as part of the process of getting all of the parts of the image (metadata, disk contents, etc.) ready for use.\n\nI was talking about conversion on import, but if we decouple conversion from import then I agree the metadata shouldn\u0027t be mutable at all.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8cbd257052acd59a2f88c08a604b44863d09806b","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"The following will need to be added to the glance developer docs."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_e4856dad","line":284,"in_reply_to":"7a2fa921_2c64bc47","updated":"2015-10-12 15:41:33.000000000","message":"I agree about the non-mutability.\n\n@Doug: once the image is active, I think conversion should work by creating a *new* image with the different properties, checksum, etc.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d511ee36e7a98a459d621e1be426000e027eaed","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"The following will need to be added to the glance developer docs."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_8705d014","line":284,"in_reply_to":"7a2fa921_57f535ea","updated":"2015-10-09 19:08:13.000000000","message":"Yes, I think the format values should not be mutable once the image is active, except in the case where Glance itself changes them if it converts the image from one format to another.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"709f7c892ccdda0d7da9f130f305b6d53d4ba356","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"The following will need to be added to the glance developer docs."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a2fa921_2c64bc47","line":284,"in_reply_to":"7a2fa921_8705d014","updated":"2015-10-12 10:23:52.000000000","message":"++","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f798071be2b8af8e6c9687183b79a4836f0a67cc","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Documentation Impact"},{"line_number":285,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"The following will need to be added to the glance developer docs."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5a2ca52d_1edb311d","line":284,"in_reply_to":"7a2fa921_e4856dad","updated":"2015-10-13 10:41:04.000000000","message":"I think Doug is talking about a conversion that happens during an image import.\n\nIn this case setting the image to active and setting the format metadata should happen with the same database call.\nOnce that call has completed the format should no longer be modifiable.","commit_id":"36b21cb9cc66d77e1518e875e89718a93d3468d0"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"e1c44b369927d37c51168a903558d85a88446535","unresolved":false,"context_lines":[{"line_number":67,"context_line":"the Havana design summit (see [OSD1]_, [OSW2]_, and [OSW1]_).  This API was"},{"line_number":68,"context_line":"designed to present an uniform interface to end-users that allowed a large"},{"line_number":69,"context_line":"degree of customization by individual cloud providers.  Since the Havana design"},{"line_number":70,"context_line":"summit, however, the DefCore movement in OpenStack has developed as a means of"},{"line_number":71,"context_line":"ensuring interoperability among OpenStack branded clouds.  The current Glance"},{"line_number":72,"context_line":"tasks API is too customizable to be suitable for DefCore purposes, and in fact,"},{"line_number":73,"context_line":"does not fare well when assessed on the dimensions of interoperability and"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_77a4e349","line":70,"updated":"2015-10-22 22:32:20.000000000","message":"In addition to DefCore - the TC defined a tag called \"compute-starter-kit\" of which Glance is a part.\n\nI\u0027d like to argue that part of the design here needs to assert that Image Upload is a fundamental and essential part of a cloud. Further, since it is a fundamental and essential part of a cloud, it is a function that must be operational in a compute-starter-kit cloud.\n\nTherefore, we can define the \u0027interoperability\u0027 needs from a technical perspective without getting DefCore about it - as a technical body we want to release software to our users which is amazing, and as a technical body we want it to be complete and operational. OpenStack is NOT never has been and never will be Open Core - so decisions on the _technical_ side of the fence need to be about providing functionality to users.\n\nDuncan makes an EXCELLENT _technical_ point below about economy vs. business that also has nothing to do with Trademarks or DefCore. It has to do with providing a user experience. I think maybe let\u0027s focus on that ... we, as technical people, want to provide our end users with functionality, and ALSO want to provide our end users with some optional optimized or enhanced paths that may not make sense at all sizes and scales of deployments.\n\nWithout talking about vendor differentiation, an end user may want a 5 node cloud in which case a swift is silly, or an end user may want a CERN sized cloud in which case it\u0027s not and the optimized path. Those are both valid choices the user can make - and both of them are covered in our current mission statement as primary.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0571c4b6b777886f431386194fe14ae8fbae7054","unresolved":false,"context_lines":[{"line_number":67,"context_line":"the Havana design summit (see [OSD1]_, [OSW2]_, and [OSW1]_).  This API was"},{"line_number":68,"context_line":"designed to present an uniform interface to end-users that allowed a large"},{"line_number":69,"context_line":"degree of customization by individual cloud providers.  Since the Havana design"},{"line_number":70,"context_line":"summit, however, the DefCore movement in OpenStack has developed as a means of"},{"line_number":71,"context_line":"ensuring interoperability among OpenStack branded clouds.  The current Glance"},{"line_number":72,"context_line":"tasks API is too customizable to be suitable for DefCore purposes, and in fact,"},{"line_number":73,"context_line":"does not fare well when assessed on the dimensions of interoperability and"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a26ad4f_bbf44f87","line":70,"in_reply_to":"3a29b11f_77a4e349","updated":"2015-10-29 02:48:32.000000000","message":"\u003e I\u0027d like to argue that part of the design here needs to assert that Image Upload is a fundamental and essential part of a cloud.\n\nAnd it is already implemented as PUT v2/images/file/{image_id}\n\nWe are talking about a different use case here, that of end-user image upload.  It is *not* widely supported among clouds in general (not just OpenStack).  It is not fundamental and it is not essential.  I\u0027m mentioning that because providing an amazing user experience may require a deployer to include capabilities (e.g., an exposed object store) that not all deployers may want to expose.  And that should be their choice.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"aaba04e2b3ab284d05a769b0e094ba998352fad9","unresolved":false,"context_lines":[{"line_number":71,"context_line":"ensuring interoperability among OpenStack branded clouds.  The current Glance"},{"line_number":72,"context_line":"tasks API is too customizable to be suitable for DefCore purposes, and in fact,"},{"line_number":73,"context_line":"does not fare well when assessed on the dimensions of interoperability and"},{"line_number":74,"context_line":"discoverability."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"The primary problem with tasks as defined in the current API is that they have"},{"line_number":77,"context_line":"an \"input\" element, defined in the task schema as a JSON blob, whose exact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_54d0fd1e","line":74,"updated":"2015-10-21 17:39:36.000000000","message":"I am not super concerned about the language here, but I want to set the tone for some of the comments I left below by pointing out my disagreement with the problem statement:\n\nI think it is great that DefCore has brought these problems to light and gives us a clear problem to be solved, but the real problem here is how our users will be interacting with glance. A really simple problem statement is \"As a user I want to upload an image to a cloud. Currently, there is no way I can do this without deployer specific knowledge about the cloud I am uploading an image to.\" I am not convinced that adding a discovery  API for some of the input contents solves this problem (expanded on this below).","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"aaba04e2b3ab284d05a769b0e094ba998352fad9","unresolved":false,"context_lines":[{"line_number":108,"context_line":"   interoperable among all \"OpenStack Powered Compute\" sites. This presents a"},{"line_number":109,"context_line":"   challenge for the design of image import because a particular deployer does"},{"line_number":110,"context_line":"   not have to expose an object store to end-users to achieve the \"OpenStack"},{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_9409b586","line":111,"updated":"2015-10-21 17:39:36.000000000","message":"Yes! By making the input able to refer out of service we also create a massive discovery problem - our service being usable purely via discovery now depends on all the possible out of service input methods also being usable via discovery.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"903b4e7815b84ef64d07ee4949409181abc1046b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"   interoperable among all \"OpenStack Powered Compute\" sites. This presents a"},{"line_number":109,"context_line":"   challenge for the design of image import because a particular deployer does"},{"line_number":110,"context_line":"   not have to expose an object store to end-users to achieve the \"OpenStack"},{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_6e49a55f","line":111,"in_reply_to":"3a29b11f_7dbcfd05","updated":"2015-10-21 19:20:07.000000000","message":"Sorry, not the best explanation. For HTTP(S) this isnt a huge issue, but for swift does a deployment allow me to import from any swift AZ? Do images need to be at a specific swift location, or have any special properties set?\n\nI think if we require everyone to support HTTP(S) then making this discoverable isn\u0027t required - I will always have an HTTP(S) method where I can upload an image to a cloud so as a user I am happy.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"36c2d8503d12aade6338952f872fd7d62c1e2915","unresolved":false,"context_lines":[{"line_number":108,"context_line":"   interoperable among all \"OpenStack Powered Compute\" sites. This presents a"},{"line_number":109,"context_line":"   challenge for the design of image import because a particular deployer does"},{"line_number":110,"context_line":"   not have to expose an object store to end-users to achieve the \"OpenStack"},{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_7dbcfd05","line":111,"in_reply_to":"3a29b11f_9409b586","updated":"2015-10-21 18:03:32.000000000","message":"@greghaynes - I don\u0027t understand what you mean here.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":16683,"name":"Alexey Galkin","email":"agalkin@mirantis.com","username":"agalkin"},"change_message_id":"98a563a78964a2d09ff1df3a0e2e5edf056fb60f","unresolved":false,"context_lines":[{"line_number":110,"context_line":"   not have to expose an object store to end-users to achieve the \"OpenStack"},{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"},{"line_number":115,"context_line":"   Platform\" cloud, having an object store available, would likely want to make"},{"line_number":116,"context_line":"   use of the object store as part of the import workflow.  (With Swift"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_bf8f74cb","line":113,"updated":"2015-10-26 09:05:32.000000000","message":"Please fix typo:\ncommmon -\u003e common","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0571c4b6b777886f431386194fe14ae8fbae7054","unresolved":false,"context_lines":[{"line_number":110,"context_line":"   not have to expose an object store to end-users to achieve the \"OpenStack"},{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"},{"line_number":115,"context_line":"   Platform\" cloud, having an object store available, would likely want to make"},{"line_number":116,"context_line":"   use of the object store as part of the import workflow.  (With Swift"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a26ad4f_1bbd4368","line":113,"in_reply_to":"3a29b11f_bf8f74cb","updated":"2015-10-29 02:48:32.000000000","message":"will do, thanks for catching this","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2737f468713c16b0d40257a9558eefb04ba94e40","unresolved":false,"context_lines":[{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"},{"line_number":115,"context_line":"   Platform\" cloud, having an object store available, would likely want to make"},{"line_number":116,"context_line":"   use of the object store as part of the import workflow.  (With Swift"},{"line_number":117,"context_line":"   available, for example, the end-user has access to parallel segment upload,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_c1aeca84","line":114,"updated":"2015-10-20 17:37:19.000000000","message":"I sort of understand this statement, but as a user of openstack clouds I am currently doomed to the LCD experience anyways. I can\u0027t typically take advantage of features that exist in one cloud but don\u0027t in another, and where features exist with different implementations I have to write twice as much code.\n\nAll this to say I think our goal should be to make the LCD experience the only experience and to make it useful and reliable and a generally happy place.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"fcd718ea1ccdb98b69e26c77a2dabd7231771ad2","unresolved":false,"context_lines":[{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"},{"line_number":115,"context_line":"   Platform\" cloud, having an object store available, would likely want to make"},{"line_number":116,"context_line":"   use of the object store as part of the import workflow.  (With Swift"},{"line_number":117,"context_line":"   available, for example, the end-user has access to parallel segment upload,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_5a8027c0","line":114,"in_reply_to":"3a29b11f_14a8451f","updated":"2015-10-21 17:44:46.000000000","message":"(My comment actually raced with Stuart\u0027s and was a reply to clark).\n\nI do agree that that requiring a completely uniform backend isn\u0027t necessary. Again though, we have to do it in a way where users aren\u0027t required to know a-priori what the backend choices are in order to upload an image.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"36c2d8503d12aade6338952f872fd7d62c1e2915","unresolved":false,"context_lines":[{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"},{"line_number":115,"context_line":"   Platform\" cloud, having an object store available, would likely want to make"},{"line_number":116,"context_line":"   use of the object store as part of the import workflow.  (With Swift"},{"line_number":117,"context_line":"   available, for example, the end-user has access to parallel segment upload,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_bdfb75c0","line":114,"in_reply_to":"3a29b11f_5a8027c0","updated":"2015-10-21 18:03:32.000000000","message":"Right, that\u0027s the goal. We would, for example, require support of simple http:// or https:// URLs for the source for an import, but also allow swift:// URLs for clouds that deploy swift and want to expose the extra benefits that allows. (Using the URL scheme is just one possible way that would be exposed, so don\u0027t get wrapped up in that if it bothers you.)","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"e1c44b369927d37c51168a903558d85a88446535","unresolved":false,"context_lines":[{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"},{"line_number":115,"context_line":"   Platform\" cloud, having an object store available, would likely want to make"},{"line_number":116,"context_line":"   use of the object store as part of the import workflow.  (With Swift"},{"line_number":117,"context_line":"   available, for example, the end-user has access to parallel segment upload,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_77ece3ba","line":114,"in_reply_to":"3a29b11f_80e5f038","updated":"2015-10-22 22:32:20.000000000","message":"Yeah. There should be a simple case that always works that does not need discovery, and a \"business class\" case that is discoverable and opt-in able.\n\nIf I have written my application to do the http route - I should never have to bother with the discovery because as a user I\u0027ve chosen to use the LCD approach.\n\nAlso, agree with Greg - if it\u0027s the intent, it should be in the spec, otherwise it\u0027s confusing.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"903b4e7815b84ef64d07ee4949409181abc1046b","unresolved":false,"context_lines":[{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"},{"line_number":115,"context_line":"   Platform\" cloud, having an object store available, would likely want to make"},{"line_number":116,"context_line":"   use of the object store as part of the import workflow.  (With Swift"},{"line_number":117,"context_line":"   available, for example, the end-user has access to parallel segment upload,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_80e5f038","line":114,"in_reply_to":"3a29b11f_bdfb75c0","updated":"2015-10-21 19:20:07.000000000","message":"Glad to hear that is a goal, we should specify something that meets this goal in the spec here :).\n\nI think the URL scheme is a good plan if we are going to stick with the task import design. This is definitely an area where not exposing backend decisions to our users is superior, though (if users have to only post to /images then all the discovery logic about that isn\u0027t needed).","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f6a77c2e04b2687b15f75d17122b067f344d9158","unresolved":false,"context_lines":[{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"},{"line_number":115,"context_line":"   Platform\" cloud, having an object store available, would likely want to make"},{"line_number":116,"context_line":"   use of the object store as part of the import workflow.  (With Swift"},{"line_number":117,"context_line":"   available, for example, the end-user has access to parallel segment upload,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_3eb9a215","line":114,"in_reply_to":"3a29b11f_c1aeca84","updated":"2015-10-21 16:56:39.000000000","message":"\u003e All this to say I think our goal should be to make the LCD experience the only experience\n\nI disagree.\n\nWe shouldn\u0027t force everyone to fly economy -- even when business class is available.\n\nI\u0027d prefer to see us present a consistent user experience (ie the work flow is \u0027the same\u0027 in the two cases), but without losing all the good stuff that Swift offers when it is available.\n\nThis would probably look something like \u0027upload your image bits somewhere\u0027, then point Glance at a URL.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"aaba04e2b3ab284d05a769b0e094ba998352fad9","unresolved":false,"context_lines":[{"line_number":111,"context_line":"   Powered Compute\" label."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The challenge is that we don\u0027t want to doom end-users to a \"lowest commmon"},{"line_number":114,"context_line":"   denominator\" experience in all OpenStack clouds.  An \"OpenStack Powered"},{"line_number":115,"context_line":"   Platform\" cloud, having an object store available, would likely want to make"},{"line_number":116,"context_line":"   use of the object store as part of the import workflow.  (With Swift"},{"line_number":117,"context_line":"   available, for example, the end-user has access to parallel segment upload,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_14a8451f","line":114,"in_reply_to":"3a29b11f_c1aeca84","updated":"2015-10-21 17:39:36.000000000","message":"Yes. To expand a bit further, I think LCD here really means minimum requirements. Use of a cloud without deployer-specific knowledge should absolutely be a minimum requirement of this service, and it is not currently being met. If we can also offer options where deployers can improve on that, great.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":16683,"name":"Alexey Galkin","email":"agalkin@mirantis.com","username":"agalkin"},"change_message_id":"98a563a78964a2d09ff1df3a0e2e5edf056fb60f","unresolved":false,"context_lines":[{"line_number":119,"context_line":"   image-sized payloads.)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":".. note :: Mark Voelker provided a useful clarification on a previous draft"},{"line_number":122,"context_line":"   about the relationship of this spec to the DefCore creteria, and I\u0027d like"},{"line_number":123,"context_line":"   to include it here:"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"       This spec doesn\u0027t make image import mandatory and no decision has been"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_bf545421","line":122,"updated":"2015-10-26 09:05:32.000000000","message":"And another one typo:\n\ncreteria -\u003e criteria","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0571c4b6b777886f431386194fe14ae8fbae7054","unresolved":false,"context_lines":[{"line_number":119,"context_line":"   image-sized payloads.)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":".. note :: Mark Voelker provided a useful clarification on a previous draft"},{"line_number":122,"context_line":"   about the relationship of this spec to the DefCore creteria, and I\u0027d like"},{"line_number":123,"context_line":"   to include it here:"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"       This spec doesn\u0027t make image import mandatory and no decision has been"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a26ad4f_1b646320","line":122,"in_reply_to":"3a29b11f_bf545421","updated":"2015-10-29 02:48:32.000000000","message":"thanks","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"e1c44b369927d37c51168a903558d85a88446535","unresolved":false,"context_lines":[{"line_number":122,"context_line":"   about the relationship of this spec to the DefCore creteria, and I\u0027d like"},{"line_number":123,"context_line":"   to include it here:"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"       This spec doesn\u0027t make image import mandatory and no decision has been"},{"line_number":126,"context_line":"       made to make import mandatory. This spec in fact cannot do so (that\u0027s"},{"line_number":127,"context_line":"       really up to the DefCore Committee and its scoring process, not"},{"line_number":128,"context_line":"       Glance). What the spec is attempting to do is make the import process"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_77d5c3e2","line":125,"updated":"2015-10-22 22:32:20.000000000","message":"The API can list image upload as a behavior associated with a non-admin user by default in the policy.json file, making deployments who choose to restrict it clearly reducing intended functionality.\n\nI agree that \u0027make it mandatory\u0027 is otherwise a very tricky sentence - but making it obviously a default expected behavior for non-admins is clearly in our remit and we should definitely do it.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0571c4b6b777886f431386194fe14ae8fbae7054","unresolved":false,"context_lines":[{"line_number":122,"context_line":"   about the relationship of this spec to the DefCore creteria, and I\u0027d like"},{"line_number":123,"context_line":"   to include it here:"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"       This spec doesn\u0027t make image import mandatory and no decision has been"},{"line_number":126,"context_line":"       made to make import mandatory. This spec in fact cannot do so (that\u0027s"},{"line_number":127,"context_line":"       really up to the DefCore Committee and its scoring process, not"},{"line_number":128,"context_line":"       Glance). What the spec is attempting to do is make the import process"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a26ad4f_7b2b1795","line":125,"in_reply_to":"3a29b11f_77d5c3e2","updated":"2015-10-29 02:48:32.000000000","message":"(Just want to register that I am against making end-user image upload a default expected behavior for OpenStack clouds.)","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"aaba04e2b3ab284d05a769b0e094ba998352fad9","unresolved":false,"context_lines":[{"line_number":131,"context_line":"       consideration for things we want to be interoperable."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"Proposed change"},{"line_number":134,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"The Glance image schema defines a set of enumerated values for the"},{"line_number":137,"context_line":"``disk_format`` and ``container_format`` image properties.  Other than reading"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_da719777","line":134,"updated":"2015-10-21 17:39:36.000000000","message":"The things below are fine, but there is a huge problem that AFAICT is not addressed: How do we describe to a user that this cloud wants the image to be uploaded to the object storage service before being imported, or that another cloud wants an image to be imported from an http uri? We need to do this to a point where a client can automatically take the correct behavior based on discoverable information, and I don\u0027t see any way for a client to do so with just these proposed changes.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"903b4e7815b84ef64d07ee4949409181abc1046b","unresolved":false,"context_lines":[{"line_number":131,"context_line":"       consideration for things we want to be interoperable."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"Proposed change"},{"line_number":134,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"The Glance image schema defines a set of enumerated values for the"},{"line_number":137,"context_line":"``disk_format`` and ``container_format`` image properties.  Other than reading"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_c32772c8","line":134,"in_reply_to":"3a29b11f_3dd5251b","updated":"2015-10-21 19:20:07.000000000","message":"Requiring HTTP(s) would be awesome and removes a lot of the issues here, we should definitely put that in the spec if it is the plan.\n\nFrom a technical standpoint, I wonder what the motivation is for making such a flexible API when you really only support 2 upload methods (HTTP and swift), 1 of which is required. It seems like a lot of work where we let backend details leak into the API requiring us to write a lot of discovery logic where as instead we could just require one well defined API to upload via HTTP(S), and optionally allow deployers to enable swift support.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"36c2d8503d12aade6338952f872fd7d62c1e2915","unresolved":false,"context_lines":[{"line_number":131,"context_line":"       consideration for things we want to be interoperable."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"Proposed change"},{"line_number":134,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"The Glance image schema defines a set of enumerated values for the"},{"line_number":137,"context_line":"``disk_format`` and ``container_format`` image properties.  Other than reading"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_3dd5251b","line":134,"in_reply_to":"3a29b11f_da719777","updated":"2015-10-21 18:03:32.000000000","message":"As I said above, http(s) would always be required to be supported. A discovery API might return the list of URL schemes supported for more optimized cases.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"e1c44b369927d37c51168a903558d85a88446535","unresolved":false,"context_lines":[{"line_number":141,"context_line":"container or disk format unsupported in a particular cloud, such images will"},{"line_number":142,"context_line":"not be bootable, and it\u0027s highly unlikely that an end-user desires to create a"},{"line_number":143,"context_line":"non-bootable image.  So it\u0027s important that there be a uniform way for an"},{"line_number":144,"context_line":"end-user to discover what formats are supported."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"Further, many deployers will want to put a maximum size on imported images."},{"line_number":147,"context_line":"For example, an image whose virtual size is greater than the maximum size disk"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_d7db774d","line":144,"updated":"2015-10-22 22:32:20.000000000","message":"I\u0027d like to see a common denominator format, actually. Similar to the economy/business class discussion above - I should ALWAYS be able to upload images to a cloud in qcow2 format because it\u0027s a standard open format with standard open tools and it\u0027s compressed.\n\nNOW - once that\u0027s the case, if the image service exposes information via an API that says \"for optimized experience, this cloud uses format XYZ\" - then the user could opt in to using that and life would be the happy. In fact, perhaps a flag of \"please convert this for me\" so that it\u0027s an opt-in to image manipulation - and also if someone uploads a qcow2 without that flag and the cloud needs raw, the API can immediately throw a mismatch error saying \"we cannot accept a qcow2 image and promise immutability\"\n\nThere is an argument about image imutability. So how about we say:\n\n\"Each cloud has a native format. If  you upload the image to the cloud in the clouds native format, the cloud will not alter the image and will guarantee you imutability. Every cloud also supports qcow2, but you need to opt-in to the use of the cloud\u0027s image format manipulation.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"e1c44b369927d37c51168a903558d85a88446535","unresolved":false,"context_lines":[{"line_number":189,"context_line":"   use a particular flavor or availability zone. We could handle this by"},{"line_number":190,"context_line":"   introducing a conversion task (out of scope for this spec, however), where"},{"line_number":191,"context_line":"   end-user specifies an existing image and requests that an new image be"},{"line_number":192,"context_line":"   created in a specific supported format (where \"supported\" format depends on"},{"line_number":193,"context_line":"   the cloud). This would allow decoupling among:"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"   * what image formats are actually in use in the cloud"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_77a703a7","line":192,"updated":"2015-10-22 22:32:20.000000000","message":"I think this actually shows a hole in the design - which is that a cloud may sanely have multiple image formats that are valid - which are tied to different flavors or AZs. That means image upload needs to be able to handle the sentence:\n\n\"As a user I want to upload an image so that I can boot it in azX on a Y flavor instance\"\n\nA great current example of the need is at Rax - who are successfully running a dual-\u0027hypervisor\u0027 nova with a VHD-based virtual cluster and an Ironic based OnMetal service. OnMetal does not boot VHD and Virtual doesn\u0027t boot RAW/qcow2 - and you know what? That\u0027s TOTALLY reasonable. But as a user of the cloud, I can\u0027t use OnMetal at all right now because the cloud does not allow me to upload images _for_ OnMetal. I can upload images for virt only.\n\nSo I think the API needs to account for this need. (regardless of my other arguments about image conversion ... _one_ way to handle this problem would be to allow for cloud image conversion - but that still doesn\u0027t handle the disctinction logically that I want an image for a flavor in a location)","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2737f468713c16b0d40257a9558eefb04ba94e40","unresolved":false,"context_lines":[{"line_number":203,"context_line":"   * the import formats depend on what formats you are confident your screening"},{"line_number":204,"context_line":"     processes are adequate for"},{"line_number":205,"context_line":"   * the conversion formats depend on what you\u0027re confident will convert"},{"line_number":206,"context_line":"     correctly"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"Alternatives"},{"line_number":209,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_c1e80a13","line":206,"updated":"2015-10-20 17:37:19.000000000","message":"It can also help improve performance of the import if users can upload a compressed image format even when the cloud expects an uncompressed format like raw. Basically trade IO for CPU time.\n\nAs images get large this can be very beneficial, but I agree out of scope for this spec.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f6a77c2e04b2687b15f75d17122b067f344d9158","unresolved":false,"context_lines":[{"line_number":203,"context_line":"   * the import formats depend on what formats you are confident your screening"},{"line_number":204,"context_line":"     processes are adequate for"},{"line_number":205,"context_line":"   * the conversion formats depend on what you\u0027re confident will convert"},{"line_number":206,"context_line":"     correctly"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"Alternatives"},{"line_number":209,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_de898e27","line":206,"in_reply_to":"3a29b11f_c1e80a13","updated":"2015-10-21 16:56:39.000000000","message":"+1\n\nraw images can be very sparse, so perfect for compression.\n(Out of scope for now, but hopefully very doable.)","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0073da7deddb47b55326c2cc40ac0d26739ae2ac","unresolved":false,"context_lines":[{"line_number":222,"context_line":"design we come up with for image import should make it easy to accommodate"},{"line_number":223,"context_line":"them."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"* Out of scope: Image conversion during the import process"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"* Out of scope: Specification of a common disk/container format that all sites"},{"line_number":228,"context_line":"  must support"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_5dcee12e","line":225,"updated":"2015-10-21 18:20:12.000000000","message":"I think I\u0027m convinced that we never need to do this, and should just support uploading an image in one step and converting it to create a new image in a second step. I think the only argument that might convince me otherwise is if we can make the image conversion transparent and associate multiple copies of the image content, stored in different formats, with the same image id somehow. That might be extra complexity, that we don\u0027t want, though.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"e1c44b369927d37c51168a903558d85a88446535","unresolved":false,"context_lines":[{"line_number":222,"context_line":"design we come up with for image import should make it easy to accommodate"},{"line_number":223,"context_line":"them."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"* Out of scope: Image conversion during the import process"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"* Out of scope: Specification of a common disk/container format that all sites"},{"line_number":228,"context_line":"  must support"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_37a74bbe","line":225,"in_reply_to":"3a29b11f_5dcee12e","updated":"2015-10-22 22:32:20.000000000","message":"I want to argue (as I have above) that image conversion is not out of scope. Largely because the image format is a key part of the API and if the API allows a deployer to require a user to create an image in a format that is baroque to create, then we\u0027ve paid lipservice to interop.\n\nI agree that we might not get it _implemented_ this cycle or even next - but if we don\u0027t keep this in mind in the design of the API, we\u0027re in a bad place.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"e1c44b369927d37c51168a903558d85a88446535","unresolved":false,"context_lines":[{"line_number":282,"context_line":"  * JSON schema definition for the body data: not allowed"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"  * JSON schema definition for the response data: similar to the"},{"line_number":285,"context_line":"    v2/schemas/task schema"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"* Example use case including typical API samples for both data supplied by the"},{"line_number":288,"context_line":"  caller and the response: (Will fill in later, still needs to be discussed)"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_5a19ce20","line":285,"updated":"2015-10-22 22:32:20.000000000","message":"I don\u0027t see any description of how the actual image data upload is accomplished in a simple cloud. Once I\u0027ve discovered, as a user, how do I actually upload image content to the cloud? Are there going to be a set number of tasks that have a known and published JSON schema I can count on being there? Where does the data go? Will I submit a task with the image data in the body of the task?\n\nOr, is the proposal that if the cloud does not deploy a swift, it is up to the user to upload the image to a location with from which glance can download the image? because that\u0027s unworkably complex enough to not actually solve the current problem even a little bit.\n\nAlso, it doesn\u0027t address any of the deficiencies in the current tasks system, such as inability to delete past tasks and the lack of a descriptiive name in the task list (imagine uploading 10 images a day for 2 years and then try to deal with glance list-tasks)\n\nAlso, it doesn\u0027t address the fact that tasks in an implementation detail, not an actual Resource that a user cares about. As a user, I want to upload an image. That may involve an async task, but that task is only interesting EVER while the image is being imported. In nova, there are states of a server being created, but the resource I manage as a user is the sever.\n\nAs a user, I am not interested in creating or owning a task. I do not want to manage a task. I want to manage an image. I want to upload an image. Saying:\n\n/images/{id}/import\n\nAnd having that start an async process that reflects itself in statuses in /images/{id} makes TOTALY sense from a REST API perspective.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"e1c44b369927d37c51168a903558d85a88446535","unresolved":false,"context_lines":[{"line_number":364,"context_line":"Image import, as described herein, is an end user operation, not an admin"},{"line_number":365,"context_line":"operation.  It is, however, necessary that it be governed appropriately by"},{"line_number":366,"context_line":"Glance policies.  For example, a small public deployer with limited resources might"},{"line_number":367,"context_line":"want to restrict image import to specific users."},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"Additionally, as mentioned above, it should be possible for a deployer to \"turn"},{"line_number":370,"context_line":"off\" image import if a vulnerability is discovered."}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_d73937f3","line":367,"updated":"2015-10-22 22:32:20.000000000","message":"While OpenStack obviously allows an insane amount of customizability, this sentence implies that we think that turning off image upload is a normal and acceptable thing to do, when in fact it is an action that breaks the cloud for end users.\n\nAlso, for the record, literally all of the small public clouds have image upload turned on for all of their users - both v1 providers and v2 providers.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2737f468713c16b0d40257a9558eefb04ba94e40","unresolved":false,"context_lines":[{"line_number":376,"context_line":"guarantee applies to image import."},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"The python-glanceclient will be modified to support image import.  (Will"},{"line_number":379,"context_line":"describe the interface after the basic design is worked out.)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"Performance Impact"},{"line_number":382,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_e1ee66b3","line":379,"updated":"2015-10-20 17:37:19.000000000","message":"Couple of things that I think will be important here based on existing glanceclient experiences:\n\n* A user of glanceclient shouldn\u0027t need to manually call several steps to do discovery, task, and import. A single function call should be all that is necessary and the client should be intelligent for me.\n* Fail early. Do not wait for a 15GB image to upload before exiting with an error due to an invalid container type or missing argument.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"e1c44b369927d37c51168a903558d85a88446535","unresolved":false,"context_lines":[{"line_number":376,"context_line":"guarantee applies to image import."},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"The python-glanceclient will be modified to support image import.  (Will"},{"line_number":379,"context_line":"describe the interface after the basic design is worked out.)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"Performance Impact"},{"line_number":382,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_371e6b70","line":379,"in_reply_to":"3a29b11f_1ed94622","updated":"2015-10-22 22:32:20.000000000","message":"+1\n\nThere should be reasonable, if suboptimal, defaults for all of the discoverable settings so that if a user wants to skip that and go, their upload will WORK but maybe not as great as it could be if they discovered more.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f6a77c2e04b2687b15f75d17122b067f344d9158","unresolved":false,"context_lines":[{"line_number":376,"context_line":"guarantee applies to image import."},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"The python-glanceclient will be modified to support image import.  (Will"},{"line_number":379,"context_line":"describe the interface after the basic design is worked out.)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"Performance Impact"},{"line_number":382,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_1ed94622","line":379,"in_reply_to":"3a29b11f_e1ee66b3","updated":"2015-10-21 16:56:39.000000000","message":"+1\n\nMaybe \"glance image-import ...\"","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2737f468713c16b0d40257a9558eefb04ba94e40","unresolved":false,"context_lines":[{"line_number":442,"context_line":"Testing"},{"line_number":443,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Documentation Impact"},{"line_number":448,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_a1162ea5","line":445,"updated":"2015-10-20 17:37:19.000000000","message":"And boot it.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"d9b263b07b694048e5e634318d0833280c6d9b78","unresolved":false,"context_lines":[{"line_number":442,"context_line":"Testing"},{"line_number":443,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Documentation Impact"},{"line_number":448,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_bd6a95b1","line":445,"in_reply_to":"3a29b11f_19f08090","updated":"2015-10-21 17:55:36.000000000","message":"Right, image uploads are useless if nova is unable to take that data from glance is boot a VM from it. Doing this extra step ensures that the use case behind having image uploads actually functions.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"28875a76e1beb4f75c563a14c2f70582e12a171f","unresolved":false,"context_lines":[{"line_number":442,"context_line":"Testing"},{"line_number":443,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Documentation Impact"},{"line_number":448,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_19f08090","line":445,"in_reply_to":"3a29b11f_3e720212","updated":"2015-10-21 17:13:00.000000000","message":"It would be useful to have 2 separate tests covering \"can I import data into glance and then get it back out unchanged\" and \"can I import a bootable image into glance and make it usable in nova\". I think Clark\u0027s suggestion is covering the second case, where we only really know the image works if we try to boot it.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"08748f4dcb8c7c2f7fce2c8d3dfc7cff7447b09e","unresolved":false,"context_lines":[{"line_number":442,"context_line":"Testing"},{"line_number":443,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Documentation Impact"},{"line_number":448,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_1aa4b6b7","line":445,"in_reply_to":"3a29b11f_5da8218d","updated":"2015-10-22 22:34:14.000000000","message":"So we already have tempest tests that do this. For uploading an image, booting it and using it:\n\nhttp://git.openstack.org/cgit/openstack/tempest/tree/tempest/scenario/test_minimum_basic.py\n\nFor just uploading an \"image\":\n\nhttp://git.openstack.org/cgit/openstack/tempest/tree/tempest/api/image/v2/test_images.py#n37\n\nand\n\nhttp://git.openstack.org/cgit/openstack/tempest/tree/tempest/api/image/v1/test_images.py#n29\n\nWe definitely have a lack of testing on glance though and there is a noticeable gap between the low level upload random bits and the more involved scenario test.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"e1c44b369927d37c51168a903558d85a88446535","unresolved":false,"context_lines":[{"line_number":442,"context_line":"Testing"},{"line_number":443,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Documentation Impact"},{"line_number":448,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_da6cfed1","line":445,"in_reply_to":"3a29b11f_5da8218d","updated":"2015-10-22 22:32:20.000000000","message":"You\u0027re all going to kill me here...\n\nThere is another key thing to booting it- which is that uploading an image is useless if you cannot boot it AND get it on the network. That means there is another latent and non-defined interface here which is \"what is required to be in the image so that it can get its networking config on this cloud.\n\nThere are currently two answers to that question with extant OpenStack clouds:\n- DHCP\n- glean\n\nIn a cloud-init v2 world, the second answer would be \"glean/cloud-init\"\n\nBUT - what the answer from the cloud should be is:\n\nnetwork info provider:\n- DHCP\n- config-drive\n\nOf course, getting that information at upload time is too late, as the image will already exist. So I think it\u0027s important that we define an interface for discovery of this in image so that image content can be constructed. The currrent process is \"look for static network info in config-drive - if it\u0027s there, this cloud wants us to statically configure our network interfaces, if it\u0027s not, this cloud wants us to DHCP\" - but perhaps a flag exposed ALWAYS in config-drive of \"network-method: DHCP\" or \"network-method: static\" would allow the image content to always know what it\u0027s supposed to do and standard mechanisms like cloud-init/glean to do the right thing regardless of OpenStack cloud.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f6a77c2e04b2687b15f75d17122b067f344d9158","unresolved":false,"context_lines":[{"line_number":442,"context_line":"Testing"},{"line_number":443,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Documentation Impact"},{"line_number":448,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_3e720212","line":445,"in_reply_to":"3a29b11f_a1162ea5","updated":"2015-10-21 16:56:39.000000000","message":"What would the specific purpose of the boot test be?","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"36c2d8503d12aade6338952f872fd7d62c1e2915","unresolved":false,"context_lines":[{"line_number":442,"context_line":"Testing"},{"line_number":443,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"It should be possible to add a tempest test that imports a small image."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Documentation Impact"},{"line_number":448,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a29b11f_5da8218d","line":445,"in_reply_to":"3a29b11f_bd6a95b1","updated":"2015-10-21 18:03:32.000000000","message":"In the future where we have image conversion, it may be possible (even desirable) to upload an image that the nova service, as deployed, can\u0027t use directly. So we still need to support that case with a test that doesn\u0027t try to boot the image.","commit_id":"7568576c624dc84f0ff06d453ab98b274ae32765"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0b00aa743fb8bc3f03087934f92893078ca6c74","unresolved":false,"context_lines":[{"line_number":21,"context_line":"  A cloud end-user has a bunch of bits that they want to give to Glance in the"},{"line_number":22,"context_line":"  expectation that (in the absence of error conditions) Glance will produce an"},{"line_number":23,"context_line":"  Image (record, file) tuple that can subsequently be used by other OpenStack"},{"line_number":24,"context_line":"  services that consume Images."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Among the motivations for the above use case are:"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_f710f65a","line":24,"updated":"2015-11-19 20:10:39.000000000","message":"The above use case is just adding an image to Glance and calling it \"image import\" instead of \"image create\".","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":21,"context_line":"  A cloud end-user has a bunch of bits that they want to give to Glance in the"},{"line_number":22,"context_line":"  expectation that (in the absence of error conditions) Glance will produce an"},{"line_number":23,"context_line":"  Image (record, file) tuple that can subsequently be used by other OpenStack"},{"line_number":24,"context_line":"  services that consume Images."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Among the motivations for the above use case are:"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_d557bac8","line":24,"in_reply_to":"ba8a016a_f710f65a","updated":"2015-11-24 17:02:35.000000000","message":"Not exactly, because image creation in the Images v2 API is a 2 step process: (1) create the image record (currently called \"image create\"), and (2) upload the image data.   Since \"image create\" is already used, and since several other different technology clouds call this use case \"image import\", that\u0027s what we\u0027re calling it too.\n\nAdditionally, Nova already uses \"image-create\" as the name of an instance action, viz., snapshotting an instance.  As Doug points out below, there\u0027s been some confusion around this with respect to what should be tested and what capabilities should be required in DefCore, so I think it\u0027s best to continue to speak of this use case as \"image import\".","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0b00aa743fb8bc3f03087934f92893078ca6c74","unresolved":false,"context_lines":[{"line_number":26,"context_line":"Among the motivations for the above use case are:"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"* An end user creates a \"golden image\" offline and wants to use it in various"},{"line_number":29,"context_line":"  OpenStack clouds."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"* A particular cloud may not offer a public image of some excellent but obscure"},{"line_number":32,"context_line":"  operating system.  The EBOOS User Group could make a VM image available on"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_ba16d549","line":29,"updated":"2015-11-19 20:10:39.000000000","message":"Again, there\u0027s no substantial difference between creating an image and \"importing an image\"","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":26,"context_line":"Among the motivations for the above use case are:"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"* An end user creates a \"golden image\" offline and wants to use it in various"},{"line_number":29,"context_line":"  OpenStack clouds."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"* A particular cloud may not offer a public image of some excellent but obscure"},{"line_number":32,"context_line":"  operating system.  The EBOOS User Group could make a VM image available on"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_504bd859","line":29,"in_reply_to":"9a8ffd7b_2c3cca92","updated":"2015-11-24 17:02:35.000000000","message":"Just want to amplify Doug\u0027s point here: a deployer could decide not to implement the image import use case, but that doesn\u0027t imply that such a cloud wouldn\u0027t have any images.  You still have (a) the possibility of image creation via Nova snapshot, and even if that were disallowed, you\u0027d still have (b) administrative upload of public images.  Thus, there are in fact three distinct use cases around what\u0027s broadly referred to as \"image creation\".","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"403885c8bb998e0fa53e1d1afd425a3ff3ceb4c0","unresolved":false,"context_lines":[{"line_number":26,"context_line":"Among the motivations for the above use case are:"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"* An end user creates a \"golden image\" offline and wants to use it in various"},{"line_number":29,"context_line":"  OpenStack clouds."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"* A particular cloud may not offer a public image of some excellent but obscure"},{"line_number":32,"context_line":"  operating system.  The EBOOS User Group could make a VM image available on"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_2c3cca92","line":29,"in_reply_to":"ba8a016a_ba16d549","updated":"2015-11-24 14:41:15.000000000","message":"We\u0027ve been trying to differentiate between creating an image from an instance through nova and bringing an image into the cloud entirely from the outside because some of the discussions with the DefCore committee revealed that they were not thinking about both cases when considering the tests.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0b00aa743fb8bc3f03087934f92893078ca6c74","unresolved":false,"context_lines":[{"line_number":31,"context_line":"* A particular cloud may not offer a public image of some excellent but obscure"},{"line_number":32,"context_line":"  operating system.  The EBOOS User Group could make a VM image available on"},{"line_number":33,"context_line":"  its website, and EBOOS enthusiasts could import it into the OpenStack cloud"},{"line_number":34,"context_line":"  of their choice."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* An end user creates a snapshot of an instance in one OpenStack cloud and"},{"line_number":37,"context_line":"  wants to boot instances from it in another OpenStack cloud.  (Obviously, this"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_7a338df6","line":34,"updated":"2015-11-19 20:10:39.000000000","message":"Again, this isn\u0027t different from creating an image in Glance.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":31,"context_line":"* A particular cloud may not offer a public image of some excellent but obscure"},{"line_number":32,"context_line":"  operating system.  The EBOOS User Group could make a VM image available on"},{"line_number":33,"context_line":"  its website, and EBOOS enthusiasts could import it into the OpenStack cloud"},{"line_number":34,"context_line":"  of their choice."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* An end user creates a snapshot of an instance in one OpenStack cloud and"},{"line_number":37,"context_line":"  wants to boot instances from it in another OpenStack cloud.  (Obviously, this"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_708dbc7a","line":34,"in_reply_to":"ba8a016a_7a338df6","updated":"2015-11-24 17:02:35.000000000","message":"Hopefully, the above discussion has convinced you that there\u0027s a difference worth noting.  (Otherwise, we\u0027ll just have to disagree about this :).)","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0b00aa743fb8bc3f03087934f92893078ca6c74","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Glance contains a \"tasks\" API that is a result of discussions during and after"},{"line_number":67,"context_line":"the Havana design summit (see [OSD1]_, [OSW2]_, and [OSW1]_).  This API was"},{"line_number":68,"context_line":"designed to present an uniform interface to end-users that allowed a large"},{"line_number":69,"context_line":"degree of customization by individual cloud providers.  Since the Havana design"},{"line_number":70,"context_line":"summit, however, the DefCore movement in OpenStack has developed as a means of"},{"line_number":71,"context_line":"ensuring interoperability among OpenStack branded clouds.  The current Glance"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_7a4aad56","line":68,"updated":"2015-11-19 20:10:39.000000000","message":"s/an uniform/a uniform/","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Glance contains a \"tasks\" API that is a result of discussions during and after"},{"line_number":67,"context_line":"the Havana design summit (see [OSD1]_, [OSW2]_, and [OSW1]_).  This API was"},{"line_number":68,"context_line":"designed to present an uniform interface to end-users that allowed a large"},{"line_number":69,"context_line":"degree of customization by individual cloud providers.  Since the Havana design"},{"line_number":70,"context_line":"summit, however, the DefCore movement in OpenStack has developed as a means of"},{"line_number":71,"context_line":"ensuring interoperability among OpenStack branded clouds.  The current Glance"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_90a3809e","line":68,"in_reply_to":"ba8a016a_7a4aad56","updated":"2015-11-24 17:02:35.000000000","message":"noted, thanks","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0b00aa743fb8bc3f03087934f92893078ca6c74","unresolved":false,"context_lines":[{"line_number":81,"context_line":"element is the deployer\u0027s documentation.  While some flexibility is good, this"},{"line_number":82,"context_line":"much flexibility makes it impossible for a competent end-user of one OpenStack"},{"line_number":83,"context_line":"cloud to be sure this competence extends to a different OpenStack cloud.  Given"},{"line_number":84,"context_line":"that the tasks API is not widely exposed among OpenStack clouds at this point,"},{"line_number":85,"context_line":"it should be possible to give the \"input\" element suitable structure such that"},{"line_number":86,"context_line":"interoperabilty and discoverability can be enhanced while introducing minimal"},{"line_number":87,"context_line":"breaking changes."}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_3a850559","line":84,"updated":"2015-11-19 20:10:39.000000000","message":"s/is not widely exposed among OpenStack clouds/is only exposed in Rackspace Cloud/","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":81,"context_line":"element is the deployer\u0027s documentation.  While some flexibility is good, this"},{"line_number":82,"context_line":"much flexibility makes it impossible for a competent end-user of one OpenStack"},{"line_number":83,"context_line":"cloud to be sure this competence extends to a different OpenStack cloud.  Given"},{"line_number":84,"context_line":"that the tasks API is not widely exposed among OpenStack clouds at this point,"},{"line_number":85,"context_line":"it should be possible to give the \"input\" element suitable structure such that"},{"line_number":86,"context_line":"interoperabilty and discoverability can be enhanced while introducing minimal"},{"line_number":87,"context_line":"breaking changes."}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_101230b5","line":84,"in_reply_to":"ba8a016a_3a850559","updated":"2015-11-24 17:02:35.000000000","message":":)\n\nNot sure that\u0027s true, btw.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0b00aa743fb8bc3f03087934f92893078ca6c74","unresolved":false,"context_lines":[{"line_number":92,"context_line":"OpenStack service, or Glance administrators supplying public images for use in"},{"line_number":93,"context_line":"a cloud).  What we aim to do in this spec is to define a suitable end-user"},{"line_number":94,"context_line":"image import mechanism that will satisfy the requirements of all OpenStack"},{"line_number":95,"context_line":"clouds, whether small or large, public or private."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"The goal of this spec is to refactor the image import task to meet the"},{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_3a66652a","line":95,"updated":"2015-11-19 20:10:39.000000000","message":"Big -1 from me. The entire Glance tasks API should be deprecated.\n\nAs I mentioned more than 2 years ago, the PUT /images/{image}/file API call should simply be evolved to set a new status for an uploaded image. I suggest QUARANTINED or something like PENDING_REVIEW.\n\nThe existing owner information in the Glance API should be perfectly capable of providing a rudimentary ACL for determining which users of the Glance API have the ability to upload image bits that go directly to an ACTIVE status and by-pass PENDING_REVIEW.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2331316817b374c41bd9a8f294bd33b0fd1af444","unresolved":false,"context_lines":[{"line_number":92,"context_line":"OpenStack service, or Glance administrators supplying public images for use in"},{"line_number":93,"context_line":"a cloud).  What we aim to do in this spec is to define a suitable end-user"},{"line_number":94,"context_line":"image import mechanism that will satisfy the requirements of all OpenStack"},{"line_number":95,"context_line":"clouds, whether small or large, public or private."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"The goal of this spec is to refactor the image import task to meet the"},{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_a048b15c","line":95,"in_reply_to":"9a8ffd7b_1674689a","updated":"2015-11-24 17:29:23.000000000","message":"I\u0027ll think about this some more during my revision.  I\u0027m not sure what I\u0027m about to say is the best way to think about this, but what\u0027s going on is that we will have two upload methods, one synchronous (the current workflow) and one asynchronous (to support the image import use case).  I think the question is whether we should expose this difference in the API, or simply handle it behind the scenes. But like I say, this may not be the best (or even a good) way to think about this.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"13b1f4b3d6d1db6cb259e3f77ddac4481c659a04","unresolved":false,"context_lines":[{"line_number":92,"context_line":"OpenStack service, or Glance administrators supplying public images for use in"},{"line_number":93,"context_line":"a cloud).  What we aim to do in this spec is to define a suitable end-user"},{"line_number":94,"context_line":"image import mechanism that will satisfy the requirements of all OpenStack"},{"line_number":95,"context_line":"clouds, whether small or large, public or private."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"The goal of this spec is to refactor the image import task to meet the"},{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_1674689a","line":95,"in_reply_to":"9a8ffd7b_98ff3434","updated":"2015-11-24 16:58:18.000000000","message":"I\u0027m trying to think about the practical effect to users on whether we re-use /file or not.\n\nLet\u0027s say we re-use /file:\n\na config option can keep the old behaviour (no validation)\n\nA1) config option is set (old behaviour)\n\n 1. upload to /file of valid image \u003d Ok\n 2. upload to /file of invalid image \u003d Ok\n\nA2) config option is unset (new behaviour)\n\n 1. upload to /file of valid image \u003d ? (Will eventually succeed, but impact depends on specific application behaviour)\n 2. upload to /file of invalid image \u003d Fail\n\nLet\u0027s say we don\u0027t re-use /file. In this case direct upload to /file may be disabled by default, to ensure uploads occur through the alternative validated path.\n\na config option says whether direct upload to /file is permitted\n\nB1) config option is unset (old behaviour)\n\n 1. upload to /file of valid image \u003d Ok\n 2. upload to /file of invalid image \u003d Ok\n\nB2) config option is set (new /bikeshed behaviour)\n\n 1. upload to /file of valid image \u003d Fail\n 2. upload to /file of invalid image \u003d Fail\n\nAre A and B pretty much equivalent in terms of potential impact to users?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7c6a4fa439a59f4876d1a9012ef0aaa6eb01598f","unresolved":false,"context_lines":[{"line_number":92,"context_line":"OpenStack service, or Glance administrators supplying public images for use in"},{"line_number":93,"context_line":"a cloud).  What we aim to do in this spec is to define a suitable end-user"},{"line_number":94,"context_line":"image import mechanism that will satisfy the requirements of all OpenStack"},{"line_number":95,"context_line":"clouds, whether small or large, public or private."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"The goal of this spec is to refactor the image import task to meet the"},{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_ddc6fa48","line":95,"in_reply_to":"ba8a016a_02a42106","updated":"2015-11-20 18:52:00.000000000","message":"Hi Jay,\n\nI\u0027m curious about this, too.  Suppose we change the PUT /v2/images/{image_id}/file semantics so that it returns (depending on role of the caller) either 201 with an \u0027active\u0027 image, or a 202 with a \u0027deactivated\u0027 image (status already exists, prohibits download).\n\nOr we could keep it simpler and just change PUT to return 202 simpliciter with a \u0027deactivated image\u0027, and the caller\u0027s role would be used to determine whether the validation workflow needs to be kicked off, or whether it could be skipped and the image go directly to \u0027active\u0027 (e.g., for a nova snapshot).  But I imagine this would be a breaking change?\n\nOr I guess we could stick with the 201 response, and remove the guarantee that the image will be \u0027active\u0027?\n\nI guess my question is how much change can we get away with here if we modify the existing call.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a5ea2399b2ad11b95c8e8d3b93be9c1bd084bdfd","unresolved":false,"context_lines":[{"line_number":92,"context_line":"OpenStack service, or Glance administrators supplying public images for use in"},{"line_number":93,"context_line":"a cloud).  What we aim to do in this spec is to define a suitable end-user"},{"line_number":94,"context_line":"image import mechanism that will satisfy the requirements of all OpenStack"},{"line_number":95,"context_line":"clouds, whether small or large, public or private."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"The goal of this spec is to refactor the image import task to meet the"},{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_a09ae412","line":95,"in_reply_to":"ba8a016a_02a42106","updated":"2015-11-24 22:16:31.000000000","message":"I just checked this ... the PUT returns a 204 (at least in my current devstack).  That\u0027s what the API docs say as well.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fd838eb9403f317bf1406bc5646ef5dc760bc987","unresolved":false,"context_lines":[{"line_number":92,"context_line":"OpenStack service, or Glance administrators supplying public images for use in"},{"line_number":93,"context_line":"a cloud).  What we aim to do in this spec is to define a suitable end-user"},{"line_number":94,"context_line":"image import mechanism that will satisfy the requirements of all OpenStack"},{"line_number":95,"context_line":"clouds, whether small or large, public or private."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"The goal of this spec is to refactor the image import task to meet the"},{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_816c7a09","line":95,"in_reply_to":"ba8a016a_02a42106","updated":"2015-11-21 19:08:32.000000000","message":"Yes, I think returning a 201 Created and having the image in QUARANTINED (or PENDING_REVIEW) status is perfectly OK. The reason is that the file *was* uploaded suiccessfully (thus the 201 Created result), but the image record is in a holding pen until it can be verified.\n\nClients still need to call GET /images/{image} in order to get the status of an image, so even if the caller did a PUT /images/{image}/file and got back a 201 Created, they should still be checking GET /images/{image} in order to get the status of the image record itself.\n\nTaking import out of the discussion, it is perfectly possible in the current API to do the following:\n\n -\u003e POST /images  # returns an image UUID and URI Location: HTTP header\n Right afterwards, two clients might call the following, separately, one slightly after the other:\n -\u003e client A calls PUT /images/{image}/file\n -\u003e client B calls DELETE images/{image}\n\nClient A would get a 201 Created if all goes well, and client B would get a 204 No Content if all goes well. If client A attempted to do something with the image after calling PUT /images/{image}/file but without first calling GET /images/{image} to check the status of the image, then whatever client A tried to do would result in a 404 Not Found. So, it\u0027s essential that any client that issues a call to PUT or PATCH on the image resource or the image file resource should call GET /images/{image} in order to get the most up-to-date status of the image anyway.\n\nSetting the image status to PENDING_REVIEW instead of ACTIVE after a successful call to PUT /images/{image}/file is perfectly fine, IMHO, and shouldn\u0027t break well-crafted clients.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"59bb117d03abe9baa6c0692aeb93ce6b0438f4c0","unresolved":false,"context_lines":[{"line_number":92,"context_line":"OpenStack service, or Glance administrators supplying public images for use in"},{"line_number":93,"context_line":"a cloud).  What we aim to do in this spec is to define a suitable end-user"},{"line_number":94,"context_line":"image import mechanism that will satisfy the requirements of all OpenStack"},{"line_number":95,"context_line":"clouds, whether small or large, public or private."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"The goal of this spec is to refactor the image import task to meet the"},{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_02a42106","line":95,"in_reply_to":"ba8a016a_3a66652a","updated":"2015-11-20 18:19:02.000000000","message":"Hi Jay,\n\nHappy to see you chime in :-)\n\n\u003e PUT ... should simply be evolved\n\nCurrently the PUT returns 201 with an active image status. Are you saying it\u0027s ok to change the API to return 201 with a \u0027quarantined\u0027 status (applications will need to poll for the \u0027active\u0027 state)? Or are you saying whatever processing occurs should just happen before returning the 201 with \u0027active\u0027? Thanks.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"c75241beae4de6643b51c68178dda5696fcfd69f","unresolved":false,"context_lines":[{"line_number":92,"context_line":"OpenStack service, or Glance administrators supplying public images for use in"},{"line_number":93,"context_line":"a cloud).  What we aim to do in this spec is to define a suitable end-user"},{"line_number":94,"context_line":"image import mechanism that will satisfy the requirements of all OpenStack"},{"line_number":95,"context_line":"clouds, whether small or large, public or private."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"The goal of this spec is to refactor the image import task to meet the"},{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_b4b0bd8c","line":95,"in_reply_to":"ba8a016a_816c7a09","updated":"2015-11-23 12:36:48.000000000","message":"Note: when the bits are uploaded to /file, in addition to the 201 return code, the server also returns a json body which includes the image status.\n\nStill, I\u0027ve typically used \u0027will this change potentially break existing applications\u0027 as a way to tell if an API change is backwards compatible or not. I understand that the argument is \u0027those are dumb applications\u0027, but they\u0027re out there; I guess I\u0027m just not sure how convinced I am here tbh. That said, if it\u0027s not something that scares the api-wg, then I\u0027m not going to lie down in front of the bulldozers.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"cdaff8a78430a9f21299f94dc03e1b1717dbf5be","unresolved":false,"context_lines":[{"line_number":92,"context_line":"OpenStack service, or Glance administrators supplying public images for use in"},{"line_number":93,"context_line":"a cloud).  What we aim to do in this spec is to define a suitable end-user"},{"line_number":94,"context_line":"image import mechanism that will satisfy the requirements of all OpenStack"},{"line_number":95,"context_line":"clouds, whether small or large, public or private."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"The goal of this spec is to refactor the image import task to meet the"},{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_98ff3434","line":95,"in_reply_to":"ba8a016a_b4b0bd8c","updated":"2015-11-24 13:31:50.000000000","message":"In my head, the change of semantics in the existing `/file` endpoint *is* a breaking change since users, with the proposed change, are not going to be able to use the image after it\u0027s uploaded and they\u0027ll have to poll to know when it is ready to be used.\n\nI agree well-crafted clients should be able to survive this but there are crappy ones out there. I don\u0027t feel comfortable changing this behavior on the existing `/file` endpoint, FWIW.\n\nI\u0027d feel better, for sure, if all this is behind a flag that has to be enabled in the config file","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0b00aa743fb8bc3f03087934f92893078ca6c74","unresolved":false,"context_lines":[{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":99,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":100,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":101,"context_line":"image transfer)."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":".. note :: Currently, Glance is included in two DefCore programs: \"OpenStack"},{"line_number":104,"context_line":"   Powered Compute\" and \"OpenStack Powered Platform\". (See [OSO1]_ for a"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_fd6c57d1","line":101,"updated":"2015-11-19 20:10:39.000000000","message":"None of those image operations need new API calls. POST /images creates the image record, GET /images/{image}/file gets the image data, and PUT /images/{image}/file uploads the image data. \"Transferring\" or \"Cloning\" an image is just a GET on one cloud, a POST /images and then a PUT /images/{file}/file on another cloud.\n\nregion-to-region replication is an implementation detail that should be handled behind the scenes depending on how OpenStack deployer has set up their Glance registry database and backing stores for images.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":98,"context_line":"interoperability and discoverability goals in such a way that the design"},{"line_number":99,"context_line":"approach taken can be used for other related image operations, for example,"},{"line_number":100,"context_line":"image export or image cloning (that is, region-to-region or cloud-to-cloud"},{"line_number":101,"context_line":"image transfer)."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":".. note :: Currently, Glance is included in two DefCore programs: \"OpenStack"},{"line_number":104,"context_line":"   Powered Compute\" and \"OpenStack Powered Platform\". (See [OSO1]_ for a"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_dbfda96f","line":101,"in_reply_to":"ba8a016a_fd6c57d1","updated":"2015-11-24 17:02:35.000000000","message":"Possibly, but this is another case where it\u0027s worth noting that there are distinct use cases for getting image data out of Glance, where \"image export\" would be an end user getting data out of Glance (as opposed to Nova or an OpenStack service, or opposed to a Glance administrator downloading image data for forensic analysis or something).\n\nAs Doug mentioned above, this is another place where there\u0027s been some confusion around DefCore testing, so I wanted to call it out.  For public clouds offering images containing licensed software, there may be legal reasons not to allow \"image export\".  Or it may be worth having a workflow that allows processing of the image data before it\u0027s delivered to the end user (i.e., it may require an \"asynchronous\" download similar to the \"asynchronous upload\" we\u0027re proposing for image import.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0b00aa743fb8bc3f03087934f92893078ca6c74","unresolved":false,"context_lines":[{"line_number":105,"context_line":"   definition of these terms.)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"   One goal of this spec is that the image import functionality should be"},{"line_number":108,"context_line":"   interoperable among all \"OpenStack Powered Compute\" sites. This presents a"},{"line_number":109,"context_line":"   challenge for the design of image import because a particular deployer does"},{"line_number":110,"context_line":"   not have to expose an object store to end-users to achieve the \"OpenStack"},{"line_number":111,"context_line":"   Powered Compute\" label."}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_9db3cb4c","line":108,"updated":"2015-11-19 20:10:39.000000000","message":"Easiest way to make image import functionality interoperable is to get rid of the tasks API and the needlessly duplicated \"image import\" functionality entirely. Problem solved.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":152,"context_line":"      each containing only one value), max size in bytes, max virtual size in"},{"line_number":153,"context_line":"      bytes, and the import-methods available at this site"},{"line_number":154,"context_line":"   #. **End-user makes a \"what should the request body look like?\" call**"},{"line_number":155,"context_line":"      (*format discovery* call)"},{"line_number":156,"context_line":"   #. Glance responds with a JSON schema describing the request body"},{"line_number":157,"context_line":"   #. Thinking ahead, end-user makes a \"what will the response body look"},{"line_number":158,"context_line":"      like?\" call.  (The request *format discovery* call will suffice for this,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_33ada731","line":155,"updated":"2015-11-10 17:08:06.000000000","message":"Can you clarify why two discovery calls may be needed?\n\nI don\u0027t quite get why we need request body format discovery.\n\nWhen might the request body format be different?\n\nThanks.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a3deea74486e7d40063194277acd595b90cc782a","unresolved":false,"context_lines":[{"line_number":152,"context_line":"      each containing only one value), max size in bytes, max virtual size in"},{"line_number":153,"context_line":"      bytes, and the import-methods available at this site"},{"line_number":154,"context_line":"   #. **End-user makes a \"what should the request body look like?\" call**"},{"line_number":155,"context_line":"      (*format discovery* call)"},{"line_number":156,"context_line":"   #. Glance responds with a JSON schema describing the request body"},{"line_number":157,"context_line":"   #. Thinking ahead, end-user makes a \"what will the response body look"},{"line_number":158,"context_line":"      like?\" call.  (The request *format discovery* call will suffice for this,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_98062e1f","line":155,"in_reply_to":"ba8a016a_0a3c4f92","updated":"2015-11-17 01:24:13.000000000","message":"Erno - My point was that the schema itself shouldn\u0027t change. Don\u0027t add and remove arguments based on the values passed.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":152,"context_line":"      each containing only one value), max size in bytes, max virtual size in"},{"line_number":153,"context_line":"      bytes, and the import-methods available at this site"},{"line_number":154,"context_line":"   #. **End-user makes a \"what should the request body look like?\" call**"},{"line_number":155,"context_line":"      (*format discovery* call)"},{"line_number":156,"context_line":"   #. Glance responds with a JSON schema describing the request body"},{"line_number":157,"context_line":"   #. Thinking ahead, end-user makes a \"what will the response body look"},{"line_number":158,"context_line":"      like?\" call.  (The request *format discovery* call will suffice for this,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_78e979b6","line":155,"in_reply_to":"ba8a016a_98062e1f","updated":"2015-11-19 12:39:55.000000000","message":"Doug, I think we\u0027re on the same page here.  The request/response schemas are there for initial discovery (i.e., the very first time someone makes this API call in any openstack cloud).  The intent is that once such a person has consumed a schema, they are good to go with these calls in any openstack cloud, as long as they use correct values (as revealed by the value discovery call) when using the format defined by the request/response schemas.  All I\u0027m proposing is that we post them along with all the other items we post at /v2/schemas.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aeee54e16555bc693629432049c5a89fb7bdf51b","unresolved":false,"context_lines":[{"line_number":152,"context_line":"      each containing only one value), max size in bytes, max virtual size in"},{"line_number":153,"context_line":"      bytes, and the import-methods available at this site"},{"line_number":154,"context_line":"   #. **End-user makes a \"what should the request body look like?\" call**"},{"line_number":155,"context_line":"      (*format discovery* call)"},{"line_number":156,"context_line":"   #. Glance responds with a JSON schema describing the request body"},{"line_number":157,"context_line":"   #. Thinking ahead, end-user makes a \"what will the response body look"},{"line_number":158,"context_line":"      like?\" call.  (The request *format discovery* call will suffice for this,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_5b620218","line":155,"in_reply_to":"da85f559_230f7038","updated":"2015-11-13 16:20:44.000000000","message":"It\u0027s fine to publish the request/response schemas, but users shouldn\u0027t *have* to ask for those in order to successfully call the API. They should only need to discover values that can be passed *to* the API, like the container formats and other items listed in the previous discovery call.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":152,"context_line":"      each containing only one value), max size in bytes, max virtual size in"},{"line_number":153,"context_line":"      bytes, and the import-methods available at this site"},{"line_number":154,"context_line":"   #. **End-user makes a \"what should the request body look like?\" call**"},{"line_number":155,"context_line":"      (*format discovery* call)"},{"line_number":156,"context_line":"   #. Glance responds with a JSON schema describing the request body"},{"line_number":157,"context_line":"   #. Thinking ahead, end-user makes a \"what will the response body look"},{"line_number":158,"context_line":"      like?\" call.  (The request *format discovery* call will suffice for this,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_230f7038","line":155,"in_reply_to":"da85f559_33ada731","updated":"2015-11-11 05:43:28.000000000","message":"It\u0027s not different in this case, but I think in the general case, there\u0027s no requirement that the request body in a POST has to be the same format as the created resource?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76343c42849c1a50a401058fe0bb50f3bc9e3931","unresolved":false,"context_lines":[{"line_number":152,"context_line":"      each containing only one value), max size in bytes, max virtual size in"},{"line_number":153,"context_line":"      bytes, and the import-methods available at this site"},{"line_number":154,"context_line":"   #. **End-user makes a \"what should the request body look like?\" call**"},{"line_number":155,"context_line":"      (*format discovery* call)"},{"line_number":156,"context_line":"   #. Glance responds with a JSON schema describing the request body"},{"line_number":157,"context_line":"   #. Thinking ahead, end-user makes a \"what will the response body look"},{"line_number":158,"context_line":"      like?\" call.  (The request *format discovery* call will suffice for this,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_0a3c4f92","line":155,"in_reply_to":"da85f559_5b620218","updated":"2015-11-16 11:49:20.000000000","message":"Can we just return the schema and any possible value restrictions on the initial schema call? I\u0027m not hugely fond of multiple discovery calls either.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":156,"context_line":"   #. Glance responds with a JSON schema describing the request body"},{"line_number":157,"context_line":"   #. Thinking ahead, end-user makes a \"what will the response body look"},{"line_number":158,"context_line":"      like?\" call.  (The request *format discovery* call will suffice for this,"},{"line_number":159,"context_line":"      as the same schema will be used for both.)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"#. Image Import"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_5345ca14","line":159,"updated":"2015-11-10 17:08:06.000000000","message":"Can you give an example of when we may need different response body formats?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":156,"context_line":"   #. Glance responds with a JSON schema describing the request body"},{"line_number":157,"context_line":"   #. Thinking ahead, end-user makes a \"what will the response body look"},{"line_number":158,"context_line":"      like?\" call.  (The request *format discovery* call will suffice for this,"},{"line_number":159,"context_line":"      as the same schema will be used for both.)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"#. Image Import"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_be2db796","line":159,"in_reply_to":"da85f559_5345ca14","updated":"2015-11-11 05:43:28.000000000","message":"We don\u0027t need different formats here, but in the general case, does knowing the format of a HTTP response imply that I also know how to correctly format a request?  I\u0027m not sure it\u0027s a requirement for a RESTful API.  It\u0027s kind of a moot point here since we use the same format for both, though.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aeee54e16555bc693629432049c5a89fb7bdf51b","unresolved":false,"context_lines":[{"line_number":168,"context_line":"   #. **End-user makes a call to tell Glance to process the image data**"},{"line_number":169,"context_line":"      (*image-import* call)"},{"line_number":170,"context_line":"   #. **End-user makes a call to see the result of the import operation**"},{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_9b45c918","line":171,"updated":"2015-11-13 16:20:44.000000000","message":"Why is that a separate call from asking for the image info using the image record created above?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":168,"context_line":"   #. **End-user makes a call to tell Glance to process the image data**"},{"line_number":169,"context_line":"      (*image-import* call)"},{"line_number":170,"context_line":"   #. **End-user makes a call to see the result of the import operation**"},{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_58b5957b","line":171,"in_reply_to":"ba8a016a_2be8e00f","updated":"2015-11-19 12:39:55.000000000","message":"(I discuss this in the comments on the next item, where it comes up again.)","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"36d7d909a8631c626b0f010239402fc28e262cb4","unresolved":false,"context_lines":[{"line_number":168,"context_line":"   #. **End-user makes a call to tell Glance to process the image data**"},{"line_number":169,"context_line":"      (*image-import* call)"},{"line_number":170,"context_line":"   #. **End-user makes a call to see the result of the import operation**"},{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_2be8e00f","line":171,"in_reply_to":"da85f559_9b45c918","updated":"2015-11-17 18:33:52.000000000","message":"+1\n\nAfter talking to Doug, reading the rest of the comments and thinking this through a bit more, I think we don\u0027t really need this extra call.\n\nAll the info the user needs should be in the image resource. Tasks updates, tasks statuses, tasks errors, etc. There\u0027s no need to add another resource to provide this information.\n\nTL;DR: I believe import-info could go away. If feedback from users is that they need this, we can add it in the future. As of now, we need to organize the tasks based on the time we\u0027ve available. The work required to implement import-info doesn\u0027t make it worth it right now.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aeee54e16555bc693629432049c5a89fb7bdf51b","unresolved":false,"context_lines":[{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"},{"line_number":175,"context_line":"   #. End-user makes a call to see whether the image can be used to boot an"},{"line_number":176,"context_line":"      instance (using an existing v2 call) (*image-detail* call)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_fb6bb583","line":174,"updated":"2015-11-13 16:20:44.000000000","message":"Why is there a separate import resource?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"},{"line_number":175,"context_line":"   #. End-user makes a call to see whether the image can be used to boot an"},{"line_number":176,"context_line":"      instance (using an existing v2 call) (*image-detail* call)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_9613785c","line":174,"in_reply_to":"9a8ffd7b_2cf36a75","updated":"2015-11-24 17:02:35.000000000","message":"Thanks, Doug.\n\nI think Nova\u0027s gone the other direction on this with the os-instance-actions API, though.  Just something to think about from an API consistence point of view.\n\nhttp://developer.openstack.org/api-ref-compute-v2.1.html#os-instance-actions-v2.1","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a3deea74486e7d40063194277acd595b90cc782a","unresolved":false,"context_lines":[{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"},{"line_number":175,"context_line":"   #. End-user makes a call to see whether the image can be used to boot an"},{"line_number":176,"context_line":"      instance (using an existing v2 call) (*image-detail* call)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_5e38afd3","line":174,"in_reply_to":"ba8a016a_0abbefc5","updated":"2015-11-17 01:24:13.000000000","message":"Right, I understood what was happening, I don\u0027t understand why it\u0027s a different record. The object that I as a user am manipulating is the image. Why is the state of the image being maintained in a different object?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"241d2a4505c5d2579ccd452055eef5c600bd0da8","unresolved":false,"context_lines":[{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"},{"line_number":175,"context_line":"   #. End-user makes a call to see whether the image can be used to boot an"},{"line_number":176,"context_line":"      instance (using an existing v2 call) (*image-detail* call)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_c250ab0d","line":174,"in_reply_to":"ba8a016a_1bd5c7e6","updated":"2015-11-19 13:22:56.000000000","message":"One more comment here: take a look at the import schema given below in this document.  Are we seriously proposing that that entire thing will be encompassed in the Image object?  (It\u0027s technically doable, but is that what we want?)","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"36d7d909a8631c626b0f010239402fc28e262cb4","unresolved":false,"context_lines":[{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"},{"line_number":175,"context_line":"   #. End-user makes a call to see whether the image can be used to boot an"},{"line_number":176,"context_line":"      instance (using an existing v2 call) (*image-detail* call)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_ab41300d","line":174,"in_reply_to":"ba8a016a_5e38afd3","updated":"2015-11-17 18:33:52.000000000","message":"My comment on L171 applies to this too.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"},{"line_number":175,"context_line":"   #. End-user makes a call to see whether the image can be used to boot an"},{"line_number":176,"context_line":"      instance (using an existing v2 call) (*image-detail* call)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_1bd5c7e6","line":174,"in_reply_to":"ba8a016a_ab41300d","updated":"2015-11-19 12:39:55.000000000","message":"I\u0027ll take one last stab at this.  Doug says, \"I don\u0027t understand why it\u0027s a different record. The object that I as a user am manipulating is the image. Why is the state of the image being maintained in a different object?\"\n\nIt depends on how you conceptualize this.  The Glance v2 model is that you have the Image (record) and it has an associated /file resource, which is where the data lives.  The import workflow is that I create the Image (record), and the next step is to get data into the /file resource.  At this point, the state of the Image is \u0027processing\u0027 (if we add that) or \u0027queued\u0027 (if we stick with our current states).  The process of taking in the image data, validating/converting it, packaging it, etc., is happening in a process separate from the Image, and that\u0027s what we\u0027re tracking with the /import resource.\n\nOf course, you don\u0027t *have* to conceptualize it that way (and obviously, lots of people aren\u0027t!).  But that\u0027s the thinking here.\n\nAdditionally, and this is the point I\u0027d like us to think carefully about, we are going to introduce \u0027export\u0027 and the long-discussed image \u0027clone\u0027 operations.  (Possibly also on-demand image conversion to specific formats.)  These are conceptually similar to image import, I think, and we\u0027d want to represent them in a similar way.  There\u0027s no reason why those operations couldn\u0027t be done concurrently, so an Image could be undergoing an export, a clone, and a few conversions all at the same time.  If we use the Image resource to track these, it\u0027s going to get pretty busy in there.  And maybe that\u0027s OK.  My point is just that we should deal with these operations in a consistent way.\n\nBefore we commit to not doing the /import resource, I\u0027d like us to sketch out what the resulting Image object is going to look like so we can all see what we\u0027re committed to.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"403885c8bb998e0fa53e1d1afd425a3ff3ceb4c0","unresolved":false,"context_lines":[{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"},{"line_number":175,"context_line":"   #. End-user makes a call to see whether the image can be used to boot an"},{"line_number":176,"context_line":"      instance (using an existing v2 call) (*image-detail* call)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_2cf36a75","line":174,"in_reply_to":"ba8a016a_c250ab0d","updated":"2015-11-24 14:41:15.000000000","message":"@Brian, yes, one object.\n\nIt\u0027s fine to have an internal concept of the import to track more detail than is exposed to the user. But there\u0027s no need to leak that internal data schema to the user. Just set the state of the image object. Fewer APIs and objects for the user outside to consider will make Glance easier to use.\n\nThe state of a conversion should be tracked on the new image created from the conversion.\n\nSimilarly, the state of the transfer or clone from one cloud to another will be tracked on the destination object.\n\nThat means the state of an operation is consistently being tracked on the new object the user created by starting the operation.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76343c42849c1a50a401058fe0bb50f3bc9e3931","unresolved":false,"context_lines":[{"line_number":171,"context_line":"      (*import-info* call)"},{"line_number":172,"context_line":"   #. End-user notes that import operation has reached a final state (either"},{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"},{"line_number":175,"context_line":"   #. End-user makes a call to see whether the image can be used to boot an"},{"line_number":176,"context_line":"      instance (using an existing v2 call) (*image-detail* call)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_0abbefc5","line":174,"in_reply_to":"da85f559_fb6bb583","updated":"2015-11-16 11:49:20.000000000","message":"I think the two above questions can be answered at once.\n\nIIUC the plan is to allow multiple possible workflows on the import phase: It might be as simple as linking the location to the image record or it can be as complex as validating the image being safely bootable in sandbox environment before accepting it as part of the image data. \n\nThe idea was not to push that info to the image, but image status will be something like \"importing\" and the import resource (effectively the underlying task) status will be provided to the user via the import interface. In most cases the user should not need to be interested about this nor touch it, but you might want to check what\u0027s going on if your cirros image import has been taking half an hour.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"},{"line_number":175,"context_line":"   #. End-user makes a call to see whether the image can be used to boot an"},{"line_number":176,"context_line":"      instance (using an existing v2 call) (*image-detail* call)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"API changes"},{"line_number":179,"context_line":"-----------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_b3f2f6d0","line":176,"updated":"2015-11-10 17:08:06.000000000","message":"nit: Glance can\u0027t tell if the image can be used to successfully boot an instance. Should we just say something like \u0027to see if the image is in an \"active\" state\u0027?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":173,"context_line":"      success or failure) and **makes a call to delete the import resource**"},{"line_number":174,"context_line":"      (*import-delete* call)"},{"line_number":175,"context_line":"   #. End-user makes a call to see whether the image can be used to boot an"},{"line_number":176,"context_line":"      instance (using an existing v2 call) (*image-detail* call)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"API changes"},{"line_number":179,"context_line":"-----------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_be54d7fe","line":176,"in_reply_to":"da85f559_b3f2f6d0","updated":"2015-11-11 05:43:28.000000000","message":"Good point, all we know is that as far as Glance is concerned, the image is available for consumption.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"In the interest of consistency, it would be good for the new calls/workflow to"},{"line_number":185,"context_line":"be similar to the existing image upload workflow (which we recommend be"},{"line_number":186,"context_line":"reserved for admins).  That workflow is:"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"#. ``POST v2/images``"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_1392e257","line":186,"updated":"2015-11-10 17:08:06.000000000","message":"\u0027which we recommend be reserved for admins\u0027: We seem to be saying that nova snapshots will switch to use image import? Is that the case?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"In the interest of consistency, it would be good for the new calls/workflow to"},{"line_number":185,"context_line":"be similar to the existing image upload workflow (which we recommend be"},{"line_number":186,"context_line":"reserved for admins).  That workflow is:"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"#. ``POST v2/images``"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_9e76b3a2","line":186,"in_reply_to":"da85f559_1392e257","updated":"2015-11-11 05:43:28.000000000","message":"Good catch, I should have said \"which we recommend not be exposed directly to end users\".","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aeee54e16555bc693629432049c5a89fb7bdf51b","unresolved":false,"context_lines":[{"line_number":191,"context_line":"   returns a ``Location`` header that contains a URI that can be used in a GET"},{"line_number":192,"context_line":"   request to retrieve the image record.  It is expected that the end-user (or"},{"line_number":193,"context_line":"   glanceclient) understands the convention that the location of the image data"},{"line_number":194,"context_line":"   is the value of the ``Location`` header with ``file`` appended to the path."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"#. ``PUT v2/images/{image_id}/file``"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_7bb3450b","line":194,"updated":"2015-11-13 16:20:44.000000000","message":"It\u0027s not clear why the new value is in the Location header instead of simply part of the body. Can you elaborate on that?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":191,"context_line":"   returns a ``Location`` header that contains a URI that can be used in a GET"},{"line_number":192,"context_line":"   request to retrieve the image record.  It is expected that the end-user (or"},{"line_number":193,"context_line":"   glanceclient) understands the convention that the location of the image data"},{"line_number":194,"context_line":"   is the value of the ``Location`` header with ``file`` appended to the path."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"#. ``PUT v2/images/{image_id}/file``"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_1ee1352d","line":194,"in_reply_to":"da85f559_7bb3450b","updated":"2015-11-19 12:39:55.000000000","message":"It\u0027s both.  This call returns a 201 with an Image response that contains a \"self\" field with the URI.  Additionally it returns the Location header as the HTTP/1.1 standard sort of implies it should.\n\n(I may be misunderstanding your question.  This call and the next one are already existing Glance calls.  My point is just to remind everyone of how the v2 API handles upload now so that it\u0027s clear that the \u0027glance-local\u0027 method introduced later is consistent, which I think would be a good thing.)","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aeee54e16555bc693629432049c5a89fb7bdf51b","unresolved":false,"context_lines":[{"line_number":201,"context_line":"A key distinction between image upload and image import is that imported images"},{"line_number":202,"context_line":"are not placed directly into the storage backend.  Instead, they are written to"},{"line_number":203,"context_line":"a \"staging area\" where they can undergo a validation process before the data is"},{"line_number":204,"context_line":"written to the backend."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Consistent with the above, we propose that the location where the image data is"},{"line_number":207,"context_line":"PUT be known by convention.  The convention is that the imported image data is"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_db8cb137","line":204,"updated":"2015-11-13 16:20:44.000000000","message":"I\u0027m not sure why you wouldn\u0027t want to validate all images. Can you elaborate on that?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"403885c8bb998e0fa53e1d1afd425a3ff3ceb4c0","unresolved":false,"context_lines":[{"line_number":201,"context_line":"A key distinction between image upload and image import is that imported images"},{"line_number":202,"context_line":"are not placed directly into the storage backend.  Instead, they are written to"},{"line_number":203,"context_line":"a \"staging area\" where they can undergo a validation process before the data is"},{"line_number":204,"context_line":"written to the backend."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Consistent with the above, we propose that the location where the image data is"},{"line_number":207,"context_line":"PUT be known by convention.  The convention is that the imported image data is"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_c71f195a","line":204,"in_reply_to":"ba8a016a_fea4714b","updated":"2015-11-24 14:41:15.000000000","message":"OK, that makes sense.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":201,"context_line":"A key distinction between image upload and image import is that imported images"},{"line_number":202,"context_line":"are not placed directly into the storage backend.  Instead, they are written to"},{"line_number":203,"context_line":"a \"staging area\" where they can undergo a validation process before the data is"},{"line_number":204,"context_line":"written to the backend."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Consistent with the above, we propose that the location where the image data is"},{"line_number":207,"context_line":"PUT be known by convention.  The convention is that the imported image data is"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_fea4714b","line":204,"in_reply_to":"da85f559_db8cb137","updated":"2015-11-19 12:39:55.000000000","message":"Sure, the idea is that snapshot images coming from Nova will be OK disk-format-wise and container-format-wise, since the particular deployment in which this is happening will have everything configured correctly.  (There could be file corruption due to network disruptions or something, but these are dealt with by the current upload process, by appropriate checksumming, etc.)  So we can put the images created by Nova on a \"fast track\" into Glance in order to conserve resources.\n\nAdditionally, you might want to allow an administrator to put images directly into Glance, bypassing the import process, in the case where there are images of particular proprietary operating systems that end-users aren\u0027t allowed to bring into the cloud themselves.\n\nIn a nutshell, we want to preserve the current behavior for Glance admins and Nova and other OpenStack services.  We just don\u0027t advise exposing that behavior to arbitrary end users.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aeee54e16555bc693629432049c5a89fb7bdf51b","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Consistent with the above, we propose that the location where the image data is"},{"line_number":207,"context_line":"PUT be known by convention.  The convention is that the imported image data is"},{"line_number":208,"context_line":"placed as follows:"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_fb4895ce","line":208,"updated":"2015-11-13 16:20:44.000000000","message":"Why rely on convention instead of being explicit?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"403885c8bb998e0fa53e1d1afd425a3ff3ceb4c0","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Consistent with the above, we propose that the location where the image data is"},{"line_number":207,"context_line":"PUT be known by convention.  The convention is that the imported image data is"},{"line_number":208,"context_line":"placed as follows:"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_6752eddf","line":208,"in_reply_to":"ba8a016a_01e0f894","updated":"2015-11-24 14:41:15.000000000","message":"When glance tells the user to use swift-local, it should give a URL pointing to swift so the user knows what \"local\" means to the glance service. To be consistent *with itself* the call should include a URL when glance-local is used. In that case it should return the /file endpoint, I think.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"40ca061a7be1b9b58643a8ff963c0b82f521262a","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Consistent with the above, we propose that the location where the image data is"},{"line_number":207,"context_line":"PUT be known by convention.  The convention is that the imported image data is"},{"line_number":208,"context_line":"placed as follows:"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_4672c47c","line":208,"in_reply_to":"ba8a016a_0395a03d","updated":"2015-11-18 15:52:03.000000000","message":"Is it sufficient to only point at a swift proxy. I presumed that the link does not need to specify a container or object name.\n\notherwise we can go back to the tempurl conversation","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"47d9859ad14181db3505f5d7ccf0e8dab1309453","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Consistent with the above, we propose that the location where the image data is"},{"line_number":207,"context_line":"PUT be known by convention.  The convention is that the imported image data is"},{"line_number":208,"context_line":"placed as follows:"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_7902063f","line":208,"in_reply_to":"ba8a016a_4672c47c","updated":"2015-11-18 17:28:57.000000000","message":"@Steve - Right.\n\n@Stuart - The response should include enough information for the recipient to know they should create a new swift object on a given swift instance. It doesn\u0027t need to specify the container or object ID, since that information can be passed to the call triggering the data import later.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e4b0315ed8a39d1ab781b58992f0606979560f93","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Consistent with the above, we propose that the location where the image data is"},{"line_number":207,"context_line":"PUT be known by convention.  The convention is that the imported image data is"},{"line_number":208,"context_line":"placed as follows:"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_0395a03d","line":208,"in_reply_to":"ba8a016a_700d733d","updated":"2015-11-18 10:43:40.000000000","message":"\u003e we should return the location where the image should be uploaded to\n\nOne concern here is: how would we know that we were not sending a path to a pre-existing, unrelated, Swift object (which would get over-written/destroyed)? Swift is eventually consistent, so an attempt to check wouldn\u0027t provide a guarantee that the object doesn\u0027t exist.\n\nSimilarly, how would we know that we weren\u0027t sending a path to an object the user is just about to upload?\n\nIf a script were to consume the proposed path is there a (slim) danger of user data loss?\n\nIs this something having the user propose the container/object avoids?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Consistent with the above, we propose that the location where the image data is"},{"line_number":207,"context_line":"PUT be known by convention.  The convention is that the imported image data is"},{"line_number":208,"context_line":"placed as follows:"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_01e0f894","line":208,"in_reply_to":"ba8a016a_7902063f","updated":"2015-11-19 12:39:55.000000000","message":"Here\u0027s what I remember from the summit.\n\n(1) As Doug points out, if the user is going to do \u0027swift-local\u0027, the user will be telling Glance the container/object in the import call, so the URL isn\u0027t relevant for the Swift case.\n\n(2) Doing this by convention would be at least as good as the current API, in which the knowledge that you upload the data to /v2/images/{image_id}/file is by convention.\n\n(3) If you expose both the \u0027swift-local\u0027 and \u0027glance-local\u0027 methods in your cloud, the URL in the response would be confusing (for \u0027swift-local\u0027 you are not supposed to upload your image data to it, even though you must upload image data at some point in order to upload an image).\n\n(4) If you expose only the \u0027swift-local\u0027 method, then you won\u0027t be returning a URL.  So rather than have consumers look for a URL that might or might not be there, it\u0027s more consistent simply not to return a URL at all.\n\n(5) The behavior we want to encourage is for the response recipient to look for the list of methods exposed by the particular cloud and make decisions based on the list.\n\nNone of these are knock-down arguments, but doing it by convention is consistent with what we\u0027ve got now and simple (to finally answer Doug\u0027s initial question!).","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"36d7d909a8631c626b0f010239402fc28e262cb4","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Consistent with the above, we propose that the location where the image data is"},{"line_number":207,"context_line":"PUT be known by convention.  The convention is that the imported image data is"},{"line_number":208,"context_line":"placed as follows:"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_700d733d","line":208,"in_reply_to":"da85f559_fb4895ce","updated":"2015-11-17 18:33:52.000000000","message":"This was discussed at the summit. One of the reasons was to just allow the user to use a different container, which can still be done even when a swift URL is returned.\n\nMy feeling (it was my feeling at the summit as well) is that we should return the location where the image should be uploaded to. It can either be the `/bikeshed` endpoint or a swift endpoint (users are still able to upload to a different container, afaik).\n\nI remember there were some concerns about multi-region swift, etc.\n\nBrian, it\u0027d be cool if you could elaborate on why we ended up going with convention rather than explicitness. It might be a good moment to revisit this a bit.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"5deec6a1108db4289dd634ca9fee1faf793c665d","unresolved":false,"context_lines":[{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":213,"context_line":"consensus)."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Import methods"},{"line_number":216,"context_line":"**************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_1db5e02f","line":213,"updated":"2015-11-11 18:06:27.000000000","message":"I\u0027ve been trying to think about how easy/hard some of this would be to implement.\n\n When an image becomes active can I still access the \"bikeshed\"?\n Is the \"bikeshed\" listed in image detail?\n Does the \"bikeshed\" fall under the storage quota system/billing?\n If I delete a bikeshed can I upload a new one? (Are \"bikesheds\" immutable?)\n If an image becomes \u0027killed\u0027 does the bikeshed get deleted? (Can I reuse a bikeshed, eg for future image conversion?)\n If I\u0027m allowed to upload to a regular queued image, am I also allowed to upload to a queued image that currently has a \"bikeshed\"?\n If an image is public is the \"bikeshed\" public?\n Does the \"bikeshed\" have a size/checksum?\n What is the \u0027retry\u0027 behaviour for uploading to the \"bikeshed\"?\n Does coupling the existing image multiple location logic and the \"bikeshed\" location logic get complex -- eg when deleting images?\n \u0027delayed delete\u0027 would need to be \"bikeshed\" aware.\n Can I add a \"bikeshed\" to an already active image?\n Can I resuse a \"bikeshed\" for another image import? (This may be interesting in the future for image conversion)\n\n\nIt feels like implementing the \u0027bikeshed\u0027 could end up becoming pretty complex/touch a lot of existing code paths.\n\nGlance already provides a way of storing image data ... could we reuse that instead?\n\nWe could have \"importable/non-bootable\" images -- images which are almost identical to regular images but wouldn\u0027t be bootable. (They would be similar to \u0027deactivated\u0027 images.)\n\nThis kind of image would serve as the byte source for image import in the same way as a swift object.\n\nSo a new image \u0027123\u0027 could be created by importing the bytes from \"ABC\", where \"ABC\" would be either a previously existing swift object when swift is present, or \"ABC\" would be a previously existing \u0027importable\u0027 image in the non-swift case.\n\nSimilar to the swift case the stashing and deletion of image bytes is decoupled from\nthe import operation. (To delete the stashed bytes you delete the \u0027importable\u0027 image).\n\nI need to think about whether this would really reduce the amount of new code needed/reduce the impact on the existing code base.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f779ecc3dff98be0878139c39e9975374865d60d","unresolved":false,"context_lines":[{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":213,"context_line":"consensus)."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Import methods"},{"line_number":216,"context_line":"**************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_7b94d889","line":213,"updated":"2015-11-12 18:17:49.000000000","message":"TBH, I\u0027m not sure what it is that you\u0027re suggesting here.\n\nIf it\u0027s re-using the `/file` endpoint, I think I brought it up at the summit and there were good reasons not to do that.\n\nIs the suggestion to just create the image using the current method and then call import on that image?\n\nIf so, I don\u0027t think that would be consistent with the rest of the API that\u0027s being proposed here.\n\nCould you elaborate on what your idea is?\n\nI agree adding `/bikeshed` will have to re-use some of the codepaths we already support for `/file` but there are still some differences (like status transition).\n\nWe should perhaps list those constraints and requirements here","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"13b1f4b3d6d1db6cb259e3f77ddac4481c659a04","unresolved":false,"context_lines":[{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":213,"context_line":"consensus)."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Import methods"},{"line_number":216,"context_line":"**************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_903aa0cc","line":213,"in_reply_to":"9a8ffd7b_27e2a5d6","updated":"2015-11-24 16:58:18.000000000","message":"\u003e Can you elaborate on how that\u0027s simpler than just tracking 2 storage locations?\n\nIt\u0027s simpler, in part, because it\u0027s a subset.\n\nIn the two storage location case you still need to have the image from in /var in order to process it. (I think.) So you still need to write the code to clean up /var.\n\nIt\u0027s simpler also because if the image data is modified as part of the processing you only push a large blob into the backend once rather than twice. (And you don\u0027t have to figure out when to delete the out-dated one, or what to do if that delete fails.)\n\nYou also need to handle all the additional state related to having two blobs. You either add state (eg a second image checksum, a second image size) or you overload one size/checksum for the two blobs. In the simpler case there is only one, unoverloaded checksum/size.\n\nExisting code, eg in particular v1 code, would be less perturbed. Basic, non-upload related operations such as deleting/showing/listing images wouldn\u0027t need to be updated to ensure the two blobs in the backend are handled appropriately in all cases. Delete, show, list could continue to work the same as before. You don\u0027t need to worry about changing how you display storage usage (to potentially include the 2nd blob) to users.\n\nYou don\u0027t need to write tests to ensure that the second blob isn\u0027t inappropriately accessible (eg by other users) at any point etc.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"403885c8bb998e0fa53e1d1afd425a3ff3ceb4c0","unresolved":false,"context_lines":[{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":213,"context_line":"consensus)."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Import methods"},{"line_number":216,"context_line":"**************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_27e2a5d6","line":213,"in_reply_to":"ba8a016a_82594390","updated":"2015-11-24 14:41:15.000000000","message":"I was less concerned with where the bikeshed was than how we treat it. We still have to make sure that local disk is cleaned up when things go badly or the image is deleted, so I\u0027m not sure it makes that much difference. Can you elaborate on how that\u0027s simpler than just tracking 2 storage locations?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"32a3f4445a6eb293fdff8ff841d3f51668520cf2","unresolved":false,"context_lines":[{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":213,"context_line":"consensus)."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Import methods"},{"line_number":216,"context_line":"**************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_82594390","line":213,"in_reply_to":"ba8a016a_e180548d","updated":"2015-11-19 13:50:39.000000000","message":"Doug,\n\nThanks, really helpful input.\n\n\u003e that image data might be stored in a different location if we need to make changes to the image during the import process.\n\nYes. I\u0027d come to the same conclusion. I\u0027m a bit concerned this will add complexity to the implementation. For example a request to delete the image will need to also delete the bikeshed. So we would need to update both the existing v2 api, and the dusty old v1 api code to do this additional delete step, or else implement this dependency in all the glance_store backends. \n\nObviously adding the bikeshed is a fairly fundamental change to images. Rather than having one data blob per image we will potentially have two. I do wonder if once we start looking at the implementation we will see a certain level of complexity which stems from making such a core change. Eg do we need additional APIs to query the bikeshed checksum/size. (The db code doesn\u0027t handle having two sizes/checksums per image.) Will storage quota calculation need to include the \u0027bikshed\u0027 bits. Do we need to be able to list images with bikesheds so we can see what is using our storage quota? These knock on effects could lead to slightly different API experiences for users in the different deployment types. This is not the case for the existing \u0027different\u0027 deployment types today (direct upload versus import-from-swift): all images look the same.\n\nI\u0027ll throw out an alternative which might be worth considering. I think would be easier to implement because it wouldn\u0027t require the persistent bikeshed. And like today\u0027s different deployments images would continue to have the same user visible states (ie no persistent blob) in both cases.\n\nIt would work as follows:\n\n 1. The Glance server reads in the image bits from a user\u0027s request and saves them to the local filesystem  (not to the image/backing store)\n 2. 202 is returned to the user\n 3. The Glance server performs validation/manipulation of the original bits and then uploads the new bits to the image, which goes through its traditional queued-\u003esaving-\u003eactive states at this point.\n\nNo follow up API request is required from the user: they just know that the image will eventually become \u0027active\u0027.\nThe number of copies of the bits, and the number of times they\u0027re transferred is reduced because they are not being copied in and out of the backend storage for processing.\n\nDisadvantages of this approach: because the bits are not stored in the backend you can\u0027t do a user initiated retry. You can however do automatic retries on failure. These would cover most failure cases (upload to backend, transient token errors/whatever). Really bad failures (a node crash) would not be retriable without re-sending all the bits (but this is no different from current upload). On balance, this approach could be more robust than the existing upload -- where upload to the backend can\u0027t be retried.\n\nI\u0027m interested to know if people think this would be easier/workable.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":213,"context_line":"consensus)."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Import methods"},{"line_number":216,"context_line":"**************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_e180548d","line":213,"in_reply_to":"ba8a016a_fca8248f","updated":"2015-11-19 12:39:55.000000000","message":"Doug has completely and clearly articulated the way I\u0027m thinking about the bikeshed.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"47d9859ad14181db3505f5d7ccf0e8dab1309453","unresolved":false,"context_lines":[{"line_number":210,"context_line":"   ``PUT v2/images/{image_id}/bikeshed``"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":213,"context_line":"consensus)."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Import methods"},{"line_number":216,"context_line":"**************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_fca8248f","line":213,"in_reply_to":"da85f559_7b94d889","updated":"2015-11-18 17:28:57.000000000","message":"@Stuart,\n\nI see the bikeshed as a temporary storage location. We only need to expose it to the user to allow them to upload data. It should be tightly coupled to the final image, although that image data might be stored in a different location if we need to make changes to the image during the import process.\n\nI would not expect to be able to do anything (read or write) with the bikeshed after the image is active, because at that point the bikeshed is either gone or empty and the image data is in the \"normal\" location it resides with images today.\n\nThe bikeshed does not need to be included in the image detail unless the details already contain other sub-urls of the image. It should be listed explicitly in the response when creating the new image, and should only be used for that initial upload.\n\nThe bikeshed should not be deletable by the user directly, but it should be deleted when the image is deleted (or when the import is \"successful\" and the image is made active).\n\nI\u0027m not sure what the question about uploading to a queued image with a bikeshed means. I expected the image to enter a state that means Glance is ready for the data to be put in to the bikeshed, and while it is in that state an upload would clear any existing data in the bikeshed and replace it with the current upload (to allow for retries). After the image import is completed, the bikeshed would not be accessible.\n\nImage conversion should use the imported image, rather than the bikeshed temporary location.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"79bf96914e7c3e08ca223305b6c3336bc152901a","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"   ``[ \"glance-local\", \"swift-local\" ]``"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"``glance-local``"},{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_87d1b159","line":222,"updated":"2015-11-10 13:19:58.000000000","message":"Where did the `-local` suffix come from? \n\nI don\u0027t recall when we started using it but I\u0027m wondering if we really need it. What is that sufix communicating to the user?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"47d9859ad14181db3505f5d7ccf0e8dab1309453","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"   ``[ \"glance-local\", \"swift-local\" ]``"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"``glance-local``"},{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_dc91a048","line":222,"in_reply_to":"ba8a016a_aab5037f","updated":"2015-11-18 17:28:57.000000000","message":"Does swift-local imply there is a swift-remote? Similarly for glance-local, do we have a different behavior for a remote glance?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"   ``[ \"glance-local\", \"swift-local\" ]``"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"``glance-local``"},{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_6c0e9be6","line":222,"in_reply_to":"ba8a016a_dc91a048","updated":"2015-11-19 12:39:55.000000000","message":"Doug\u0027s question really gets at the issue here, as far as \u0027swift-local\u0027 goes.  The name \u0027swift-local\u0027 was to make it clear that it\u0027s *not* swift-remote, i.e., it\u0027s the local swift in the same region as the glance you\u0027re importing to.  That\u0027s all we\u0027re committed to implementing in this spec.\n\nI think Erno\u0027s right that we started saying \u0027glance-local\u0027 for the other method just for consistency.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"d8e076084b17ac279310377443aa43a71b5bd4d1","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"   ``[ \"glance-local\", \"swift-local\" ]``"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"``glance-local``"},{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_98ca994e","line":222,"in_reply_to":"da85f559_82240d60","updated":"2015-11-14 07:26:52.000000000","message":"I still don\u0027t see why the suffix is a user concern in this case.\nSwift regions being mentioned but this is the glance-local text.\nSeems like we can drop it.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"   ``[ \"glance-local\", \"swift-local\" ]``"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"``glance-local``"},{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_bed7f749","line":222,"in_reply_to":"da85f559_87d1b159","updated":"2015-11-11 05:43:28.000000000","message":"You may be right.  The idea was that it\u0027s \"local\" in the sense that you\u0027re uploading to the glance URL specified by the convention described in the previous section, as opposed to glance giving you a URL (not necessarily of glance itself) that you\u0027d upload the data to.  But an import method like that would probably be more clearly named \"external-url\" rather than \"glance-external\".  So probably the \"-local\" doesn\u0027t do anything other than provide symmetry with \"swift-local\".  If it\u0027s not conveying anything useful to the end user, I agree we should drop it.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76343c42849c1a50a401058fe0bb50f3bc9e3931","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"   ``[ \"glance-local\", \"swift-local\" ]``"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"``glance-local``"},{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_aab5037f","line":222,"in_reply_to":"da85f559_98ca994e","updated":"2015-11-16 11:49:20.000000000","message":"I think the original point having it there was pure consistency. If we need to specify locality for some points, we should do it for all of them.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"5deec6a1108db4289dd634ca9fee1faf793c665d","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"   ``[ \"glance-local\", \"swift-local\" ]``"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"``glance-local``"},{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_82240d60","line":222,"in_reply_to":"da85f559_bed7f749","updated":"2015-11-11 18:06:27.000000000","message":"I *think* the idea of the glance-local/swift-local terminology was a region thing.\n\nEg say I have two swift regions: region-1 and region-2.\n\nI can only import bytes from swift region-1 to glance region-1; I can\u0027t import bytes from swift region-2 to glance region-1.\n(Though this could be configurable in the future).\n\nIn the glance case I guess a couple of questions are:\n\n 1. can I use image X\u0027s \"bikeshed\" for image Y (where Y is in the same region)?\n 2. can I use image X\u0027s \"bikeshed\" for image Y (where Y is in a different region)?\n\nMaybe specifying the region(s) explicitly (rather than saying \u0027-local\u0027) makes this clearer also?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"},{"line_number":226,"context_line":"   the import."},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"``swift-local``"},{"line_number":229,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_f3263ecd","line":226,"updated":"2015-11-10 17:08:06.000000000","message":"I\u0027m not sure, but we could think about something that allowed specifying a list of regions in the future.\n\nSo let\u0027s say your cloud has region-1 and region-2, we could start with:\n\nglance-region: region-1\n\nbut potentially evolve to support\n\nglance-region: region-1, region-2\n\nin the future.\n\nIn this case the swift object would be specified with a 1. region 2. container 3. object \"triple\".","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"},{"line_number":226,"context_line":"   the import."},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"``swift-local``"},{"line_number":229,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_ece4cbac","line":226,"in_reply_to":"ba8a016a_3cd78cee","updated":"2015-11-19 12:39:55.000000000","message":"Doug, I think your impression is correct.  At least that\u0027s the usual practice.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"47d9859ad14181db3505f5d7ccf0e8dab1309453","unresolved":false,"context_lines":[{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"},{"line_number":226,"context_line":"   the import."},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"``swift-local``"},{"line_number":229,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_3cd78cee","line":226,"in_reply_to":"da85f559_7e12ef0a","updated":"2015-11-18 17:28:57.000000000","message":"It was my impression that glance wasn\u0027t region aware, and deployers were expected to set up separate glance instances. Is that wrong?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":223,"context_line":"   The end-user does a PUT of image data to ``v2/images/{image_id}/bikeshed``"},{"line_number":224,"context_line":"   after an image record has been created.  After the data has been uploaded,"},{"line_number":225,"context_line":"   the end-user follows with a call to Glance to process the data and complete"},{"line_number":226,"context_line":"   the import."},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"``swift-local``"},{"line_number":229,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_7e12ef0a","line":226,"in_reply_to":"da85f559_f3263ecd","updated":"2015-11-11 05:43:28.000000000","message":"I don\u0027t have a definite opinion on this at the moment.  I guess it depends on how regions are typically used in openstack depolyments.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aeee54e16555bc693629432049c5a89fb7bdf51b","unresolved":false,"context_lines":[{"line_number":229,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"},{"line_number":230,"context_line":"   placement may occur before or after the image record is created.  After the"},{"line_number":231,"context_line":"   data has been uploaded and an image record is created, the end-user makes a"},{"line_number":232,"context_line":"   call to Glance to process the data and complete the import."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"A particular Glance installation does not have to support both methods, but"},{"line_number":235,"context_line":"it\u0027s expected that it will expose at least one."}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_bb5f6d74","line":232,"updated":"2015-11-13 16:20:44.000000000","message":"How does the user know where to put the data, or how does glance know where to fetch it?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"47d9859ad14181db3505f5d7ccf0e8dab1309453","unresolved":false,"context_lines":[{"line_number":229,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"},{"line_number":230,"context_line":"   placement may occur before or after the image record is created.  After the"},{"line_number":231,"context_line":"   data has been uploaded and an image record is created, the end-user makes a"},{"line_number":232,"context_line":"   call to Glance to process the data and complete the import."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"A particular Glance installation does not have to support both methods, but"},{"line_number":235,"context_line":"it\u0027s expected that it will expose at least one."}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_3c454cb2","line":232,"in_reply_to":"ba8a016a_4a033710","updated":"2015-11-18 17:28:57.000000000","message":"OK, the Glance URL is controllable and can be returned but Glance shouldn\u0027t propose container or object ID URLs in swift, so that should just be the URL of the swift server in the deployment.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76343c42849c1a50a401058fe0bb50f3bc9e3931","unresolved":false,"context_lines":[{"line_number":229,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"},{"line_number":230,"context_line":"   placement may occur before or after the image record is created.  After the"},{"line_number":231,"context_line":"   data has been uploaded and an image record is created, the end-user makes a"},{"line_number":232,"context_line":"   call to Glance to process the data and complete the import."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"A particular Glance installation does not have to support both methods, but"},{"line_number":235,"context_line":"it\u0027s expected that it will expose at least one."}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_4a033710","line":232,"in_reply_to":"da85f559_bb5f6d74","updated":"2015-11-16 11:49:20.000000000","message":"The \"last\" call is specifying the location, so if glance tells you that you can put your image data to [\"glance-local\u003curi to bikeshed\u003e\", \"swift-local:\u003curi to suggested location\u003e\"] user will specify at the last call the actual location used so glance will know where to look for the bits. In the swift case the suggested location can be overwritten by for example exiting blob of data in users swift container instead of reuploading.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":232,"context_line":"   call to Glance to process the data and complete the import."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"A particular Glance installation does not have to support both methods, but"},{"line_number":235,"context_line":"it\u0027s expected that it will expose at least one."},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"Discovery calls"},{"line_number":238,"context_line":"***************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_f6694cbf","line":235,"updated":"2015-11-10 17:08:06.000000000","message":"Do we want to say that it is expected that installations with Swift will typically only support the swift-local case? Or is that too opinionated?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f779ecc3dff98be0878139c39e9975374865d60d","unresolved":false,"context_lines":[{"line_number":232,"context_line":"   call to Glance to process the data and complete the import."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"A particular Glance installation does not have to support both methods, but"},{"line_number":235,"context_line":"it\u0027s expected that it will expose at least one."},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"Discovery calls"},{"line_number":238,"context_line":"***************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_1b8fcc75","line":235,"updated":"2015-11-12 18:17:49.000000000","message":"I think that\u0027s specific to deployments so I would prefer not to have it here (although it might be true)","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":232,"context_line":"   call to Glance to process the data and complete the import."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"A particular Glance installation does not have to support both methods, but"},{"line_number":235,"context_line":"it\u0027s expected that it will expose at least one."},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"Discovery calls"},{"line_number":238,"context_line":"***************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_ec2e0ba4","line":235,"in_reply_to":"ba8a016a_9d0fdde0","updated":"2015-11-19 12:39:55.000000000","message":"I agree with Stuart here.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"28879bd1dfe890224fad71086974530fca73c948","unresolved":false,"context_lines":[{"line_number":232,"context_line":"   call to Glance to process the data and complete the import."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"A particular Glance installation does not have to support both methods, but"},{"line_number":235,"context_line":"it\u0027s expected that it will expose at least one."},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"Discovery calls"},{"line_number":238,"context_line":"***************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_9d0fdde0","line":235,"in_reply_to":"ba8a016a_a57bf47a","updated":"2015-11-17 15:01:02.000000000","message":"\u003e  Deployer might have swift deployed but not for image backend\n\nWhy is the choice of glance backend relevant here?\n\nRemember, the user will be stashing the bits in the cloud\u0027s swift object store. Glance will read those bytes from Swift and write them to whichever backend happens to be configured (swift or not).","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76343c42849c1a50a401058fe0bb50f3bc9e3931","unresolved":false,"context_lines":[{"line_number":232,"context_line":"   call to Glance to process the data and complete the import."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"A particular Glance installation does not have to support both methods, but"},{"line_number":235,"context_line":"it\u0027s expected that it will expose at least one."},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"Discovery calls"},{"line_number":238,"context_line":"***************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_a57bf47a","line":235,"in_reply_to":"da85f559_1b8fcc75","updated":"2015-11-16 11:49:20.000000000","message":"I\u0027d prefer not expecting it. Deployer might have swift deployed but not for image backend and expecting the swift model being available just because swift is deployed does not sound sensible.\n\nJust like we do not expect the direct to glance path being available just because glance is deployed.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":232,"context_line":"   call to Glance to process the data and complete the import."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"A particular Glance installation does not have to support both methods, but"},{"line_number":235,"context_line":"it\u0027s expected that it will expose at least one."},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"Discovery calls"},{"line_number":238,"context_line":"***************"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_fe157fe4","line":235,"in_reply_to":"da85f559_f6694cbf","updated":"2015-11-11 05:43:28.000000000","message":"I think that\u0027s true, so I\u0027m willing to say it!","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"79bf96914e7c3e08ca223305b6c3336bc152901a","unresolved":false,"context_lines":[{"line_number":277,"context_line":"Note that the values for ``source_disk_format``, ``source_container_format``,"},{"line_number":278,"context_line":"``target_disk_format``, and ``target_container_format`` will be pulled from"},{"line_number":279,"context_line":"configuration options used to supply values for the *value discovery* call."},{"line_number":280,"context_line":"This will allow an end-user to do accurate schema-validation on the request."},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"format discovery call summary"},{"line_number":283,"context_line":"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_07970149","line":280,"updated":"2015-11-10 13:19:58.000000000","message":"It\u0027d be good to mention which of these configs exist already and which need to be added.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":277,"context_line":"Note that the values for ``source_disk_format``, ``source_container_format``,"},{"line_number":278,"context_line":"``target_disk_format``, and ``target_container_format`` will be pulled from"},{"line_number":279,"context_line":"configuration options used to supply values for the *value discovery* call."},{"line_number":280,"context_line":"This will allow an end-user to do accurate schema-validation on the request."},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"format discovery call summary"},{"line_number":283,"context_line":"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_5edb6b4f","line":280,"in_reply_to":"da85f559_07970149","updated":"2015-11-11 05:43:28.000000000","message":"I\u0027ll address that in the next revision.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"d8e076084b17ac279310377443aa43a71b5bd4d1","unresolved":false,"context_lines":[{"line_number":336,"context_line":"An additional header, ``OpenStack-image-import-methods``, will be added to the"},{"line_number":337,"context_line":"response.  The value of this header will be a comma-separated list of import"},{"line_number":338,"context_line":"method keywords."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"data-put"},{"line_number":341,"context_line":"^^^^^^^^"},{"line_number":342,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_23a1fea9","line":339,"updated":"2015-11-14 07:26:52.000000000","message":"As indicated in Doug\u0027s comments, additional guidance in the form of links should be given in the response to direct the API consumer to either the \u0027bikeshed\u0027 or a (same-region) Swift proxy for data-put and to \u0027import\u0027 as well.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":336,"context_line":"An additional header, ``OpenStack-image-import-methods``, will be added to the"},{"line_number":337,"context_line":"response.  The value of this header will be a comma-separated list of import"},{"line_number":338,"context_line":"method keywords."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"data-put"},{"line_number":341,"context_line":"^^^^^^^^"},{"line_number":342,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_56c4303f","line":339,"in_reply_to":"9a8ffd7b_0760c134","updated":"2015-11-24 17:02:35.000000000","message":"OK, thanks for your patience on this point, I think I finally got it!","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"403885c8bb998e0fa53e1d1afd425a3ff3ceb4c0","unresolved":false,"context_lines":[{"line_number":336,"context_line":"An additional header, ``OpenStack-image-import-methods``, will be added to the"},{"line_number":337,"context_line":"response.  The value of this header will be a comma-separated list of import"},{"line_number":338,"context_line":"method keywords."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"data-put"},{"line_number":341,"context_line":"^^^^^^^^"},{"line_number":342,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_0760c134","line":339,"in_reply_to":"ba8a016a_27b3cc51","updated":"2015-11-24 14:41:15.000000000","message":"@Brian, Because python-glanceclient isn\u0027t the only thing uploading data to the cloud and it\u0027s polite to be helpful by giving all the details the client needs, even if it would be \"easy\" for the client to compute them. :-)\n\nIt also future-proofs you a bit because if that URL needs to change, or you want to support other ways to get images into the cloud, you\u0027ve established the precedent of \"upload the image to the URL given\".","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":336,"context_line":"An additional header, ``OpenStack-image-import-methods``, will be added to the"},{"line_number":337,"context_line":"response.  The value of this header will be a comma-separated list of import"},{"line_number":338,"context_line":"method keywords."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"data-put"},{"line_number":341,"context_line":"^^^^^^^^"},{"line_number":342,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_27b3cc51","line":339,"in_reply_to":"da85f559_23a1fea9","updated":"2015-11-19 12:39:55.000000000","message":"I don\u0027t agree.  For \u0027glance-local\u0027 or whatever we call it, the client knows the convention to upload to the bikeshed.  For \u0027swift-local\u0027 the client knows the data should be in the end-user\u0027s object store in that region.  I\u0027m not clear on why we need to provide links here.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"79bf96914e7c3e08ca223305b6c3336bc152901a","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"#. The call to ``v2/images/{image_id}/file`` is allowed only when the image is"},{"line_number":349,"context_line":"   in ``queued`` status.  The call to ``v2/images/{image_id}/bikeshed`` will"},{"line_number":350,"context_line":"   also be allowed if the image is in ``error`` status."},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"   This is for the case where the subsequent image-import call fails: the"},{"line_number":353,"context_line":"   end-user can upload fresh data and retry the image-import call.  If this"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_02904feb","line":350,"updated":"2015-11-10 13:19:58.000000000","message":"I think we should have 2 different policies for `/file` and `/bikeshed` to be able to keep backwards compatibility properly *and* to support clouds moving to the new method.\n\nOne thing I\u0027m thinking about is that the `/file` endpoint must remain unchanged,therefore it has to move the image to active after the upload has been done. This, however, will break the new workflow as it won\u0027t trigger the underlying task engine, which is key and important to this process.\n\nShould we mention this here? Am I forgetting something?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f779ecc3dff98be0878139c39e9975374865d60d","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"#. The call to ``v2/images/{image_id}/file`` is allowed only when the image is"},{"line_number":349,"context_line":"   in ``queued`` status.  The call to ``v2/images/{image_id}/bikeshed`` will"},{"line_number":350,"context_line":"   also be allowed if the image is in ``error`` status."},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"   This is for the case where the subsequent image-import call fails: the"},{"line_number":353,"context_line":"   end-user can upload fresh data and retry the image-import call.  If this"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_3b8ad064","line":350,"updated":"2015-11-12 18:17:49.000000000","message":"You didn\u0027t misunderstood my point. I agree it\u0027s ok for `/file` to bypass the engine as long as we provide a way to restrict it to admins only.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"#. The call to ``v2/images/{image_id}/file`` is allowed only when the image is"},{"line_number":349,"context_line":"   in ``queued`` status.  The call to ``v2/images/{image_id}/bikeshed`` will"},{"line_number":350,"context_line":"   also be allowed if the image is in ``error`` status."},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"   This is for the case where the subsequent image-import call fails: the"},{"line_number":353,"context_line":"   end-user can upload fresh data and retry the image-import call.  If this"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_dec2fb33","line":350,"in_reply_to":"da85f559_02904feb","updated":"2015-11-11 05:43:28.000000000","message":"I agree about the separate policies for /file and /bikeshed.\n\nI may be misunderstanding your point, but I think it\u0027s ok that a PUT to /file bypasses the task engine, since PUT /file would be used only by admins and services that can be relied upon to put valid content directly into glance.  If an admin or service needed to have processing done before the content goes into glance, it could use the new workflow.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"47d9859ad14181db3505f5d7ccf0e8dab1309453","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"#. The call to ``v2/images/{image_id}/file`` is allowed only when the image is"},{"line_number":349,"context_line":"   in ``queued`` status.  The call to ``v2/images/{image_id}/bikeshed`` will"},{"line_number":350,"context_line":"   also be allowed if the image is in ``error`` status."},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"   This is for the case where the subsequent image-import call fails: the"},{"line_number":353,"context_line":"   end-user can upload fresh data and retry the image-import call.  If this"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_bca29c49","line":350,"in_reply_to":"da85f559_3b8ad064","updated":"2015-11-18 17:28:57.000000000","message":"Yes, the existing /file endpoint behavior shouldn\u0027t need to change. I would expect many deployers who have already exposed that endpoint to keep it exposed as a backwards-compatibility solution for their users.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"cf2aa63687f1b0b8e6c4ade60a8caff094afd99a","unresolved":false,"context_lines":[{"line_number":365,"context_line":"   max_upload_bytes value published in the value discovery call."},{"line_number":366,"context_line":"   "},{"line_number":367,"context_line":"#. The call will fail when the upload time exceeds the"},{"line_number":368,"context_line":"   max_upload_time_in_seconds value published in the value discovery call."},{"line_number":369,"context_line":"   "},{"line_number":370,"context_line":"#. Once Glance has begun processing the data associated with this URI,"},{"line_number":371,"context_line":"   subsequent PUT calls will return a 409 (Conflict)."}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa80f949_dbca546e","line":368,"updated":"2015-11-04 21:57:25.000000000","message":"This value is named \"max_upload_time\" in the value discovery response.  (I dropped the \"_in_seconds\" when I changed the response so that it included a description of each value, but forgot to change it here.)","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d8936c1cf9e1b755340bcd4e4260585a6f9409cf","unresolved":false,"context_lines":[{"line_number":378,"context_line":""},{"line_number":379,"context_line":"* Method type: PUT"},{"line_number":380,"context_line":"* Normal http response code(s): 204 (No Content)"},{"line_number":381,"context_line":"* Expected error http response code(s): 401, 405, 409, 415"},{"line_number":382,"context_line":"    * 401: unauthorized"},{"line_number":383,"context_line":"    * 405: only PUT supported for this call"},{"line_number":384,"context_line":"    * 409: associated image is not in appropriate status"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa80f949_362db546","line":381,"updated":"2015-11-04 22:15:24.000000000","message":"Forgot to add 413 for \"payload too large\".\n\nNot sure what to return when the max_upload_time is exceeded.  (Could return a 402 on the theory that \"time is money\").","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":378,"context_line":""},{"line_number":379,"context_line":"* Method type: PUT"},{"line_number":380,"context_line":"* Normal http response code(s): 204 (No Content)"},{"line_number":381,"context_line":"* Expected error http response code(s): 401, 405, 409, 415"},{"line_number":382,"context_line":"    * 401: unauthorized"},{"line_number":383,"context_line":"    * 405: only PUT supported for this call"},{"line_number":384,"context_line":"    * 409: associated image is not in appropriate status"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_b903d841","line":381,"in_reply_to":"ba8a016a_a581b4fd","updated":"2015-11-19 12:39:55.000000000","message":"I thought about that, but it\u0027s defined as \"The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.\"[1]\n\nThe situation isn\u0027t that we\u0027re waiting for the request, the request is in progress, just more slowly than we\u0027d like.  On the other hand, the request might be satisfied if the request was made over a faster connection.  So maybe this is correct after all.\n\nWe need some API WG people to look this over!\n\n\n[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76343c42849c1a50a401058fe0bb50f3bc9e3931","unresolved":false,"context_lines":[{"line_number":378,"context_line":""},{"line_number":379,"context_line":"* Method type: PUT"},{"line_number":380,"context_line":"* Normal http response code(s): 204 (No Content)"},{"line_number":381,"context_line":"* Expected error http response code(s): 401, 405, 409, 415"},{"line_number":382,"context_line":"    * 401: unauthorized"},{"line_number":383,"context_line":"    * 405: only PUT supported for this call"},{"line_number":384,"context_line":"    * 409: associated image is not in appropriate status"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_a581b4fd","line":381,"in_reply_to":"fa80f949_362db546","updated":"2015-11-16 11:49:20.000000000","message":"How about 408 \"Request Timeout\"? :P","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"79bf96914e7c3e08ca223305b6c3336bc152901a","unresolved":false,"context_lines":[{"line_number":400,"context_line":"The values specified in the request body must satisfy any restrictions"},{"line_number":401,"context_line":"specified in the *value discovery* call or the request will fail."},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":404,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":405,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":406,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_b8997421","line":403,"updated":"2015-11-10 13:19:58.000000000","message":"FWIW, it bothers me a bit that when using `glance-local` there\u0027s no way to know if data has been `PUT` into glance. I don\u0027t have a better suggestion right now to keep this consistent but I think we may need a status specific for when the data has been uploaded. We currently set the image to saving and active right after that. \n\nWhat about we make the import call accept images in saving and queued ?\n\nOne scenario I\u0027m thinking is: What happens if I upload image data and then call import with a swift URL ? The image data will remain in Glance and that could be exploited to cause a DDOS by filling up the disk.\n\nSo:\n\n- If glance-local is used, the image status will be set to `saving` when the data upload starts.\n\n- The import call accepts either queued or saving. If the later is set, then the import call must not accept any swift URL.\n\nDoes the above make sense?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bfd811797bdcfff75683e95a7805e640ed6061a8","unresolved":false,"context_lines":[{"line_number":400,"context_line":"The values specified in the request body must satisfy any restrictions"},{"line_number":401,"context_line":"specified in the *value discovery* call or the request will fail."},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":404,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":405,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":406,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_67b3140b","line":403,"in_reply_to":"ba8a016a_cfeb2412","updated":"2015-11-19 12:39:55.000000000","message":"I like Doug\u0027s suggestions here (not sure which I like best).  The key thing is that it looks like we have a few ways to handle this issue.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"47d9859ad14181db3505f5d7ccf0e8dab1309453","unresolved":false,"context_lines":[{"line_number":400,"context_line":"The values specified in the request body must satisfy any restrictions"},{"line_number":401,"context_line":"specified in the *value discovery* call or the request will fail."},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":404,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":405,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":406,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_cfeb2412","line":403,"in_reply_to":"da85f559_3e02273e","updated":"2015-11-18 17:28:57.000000000","message":"I don\u0027t think you need to change the image status when the upload starts. That\u0027s going to make retrying failed uploads more complicated.\n\nMaybe it\u0027s an error to call import with the swift information if the bikeshed is not empty.\n\nMaybe we always delete the contents of the bikeshed after the import is done.\n\nMaybe the same bikeshed location is used as local temporary space by the swift import mechanism to download the data before processing it through the import tasks.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":400,"context_line":"The values specified in the request body must satisfy any restrictions"},{"line_number":401,"context_line":"specified in the *value discovery* call or the request will fail."},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":404,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":405,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":406,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_3e02273e","line":403,"in_reply_to":"da85f559_b8997421","updated":"2015-11-11 05:43:28.000000000","message":"You raise good points.  I\u0027m not sure about using \u0027saving\u0027 in this context, since someone could create a snapshot of an instance and then try to speed up the image creation by POST /import which would fail because nothing would be in the bikeshed, and then the image would go to \u0027error\u0027 ... and I\u0027m not sure what would happen when glance goes to update the image record after the nova shapshot upload concludes.  This definitely requires more thought.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":412,"context_line":"* Expected error http response code(s): 401, 404, 405, 409, 415"},{"line_number":413,"context_line":"    * 401: unauthorized"},{"line_number":414,"context_line":"    * 404: image record doesn\u0027t exist or is not owned by the caller"},{"line_number":415,"context_line":"    * 405: only POST, GET, DELETE supported for this call"},{"line_number":416,"context_line":"    * 409: associated image is not in appropriate status"},{"line_number":417,"context_line":"    * 415: unsupported media type (must be ``application/json``)"},{"line_number":418,"context_line":"* URL for the resource: ``v2/images/{image_id}/import``"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_c2ed5ef0","line":415,"updated":"2015-11-10 17:08:06.000000000","message":"Thinking about how much code we\u0027ll need to write/support, I\u0027m wondering how much of this we could do without for a first implementation?\n\nFor example: Nova snapshots also create an image, \"do stuff\" and then upload the bytes. The user just polls the standard state of the resulting image.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aeee54e16555bc693629432049c5a89fb7bdf51b","unresolved":false,"context_lines":[{"line_number":412,"context_line":"* Expected error http response code(s): 401, 404, 405, 409, 415"},{"line_number":413,"context_line":"    * 401: unauthorized"},{"line_number":414,"context_line":"    * 404: image record doesn\u0027t exist or is not owned by the caller"},{"line_number":415,"context_line":"    * 405: only POST, GET, DELETE supported for this call"},{"line_number":416,"context_line":"    * 409: associated image is not in appropriate status"},{"line_number":417,"context_line":"    * 415: unsupported media type (must be ``application/json``)"},{"line_number":418,"context_line":"* URL for the resource: ``v2/images/{image_id}/import``"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_7e0b337e","line":415,"in_reply_to":"da85f559_c2ed5ef0","updated":"2015-11-13 16:20:44.000000000","message":"+1, I don\u0027t see the need for a separate resource.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"79bf96914e7c3e08ca223305b6c3336bc152901a","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    * 404: image record doesn\u0027t exist or is not owned by the caller"},{"line_number":415,"context_line":"    * 405: only POST, GET, DELETE supported for this call"},{"line_number":416,"context_line":"    * 409: associated image is not in appropriate status"},{"line_number":417,"context_line":"    * 415: unsupported media type (must be ``application/json``)"},{"line_number":418,"context_line":"* URL for the resource: ``v2/images/{image_id}/import``"},{"line_number":419,"context_line":"* Parameters which can be passed via the URL: none"},{"line_number":420,"context_line":"* JSON schema definition for the body data: ``v2/schemas/import``"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_389344a5","line":417,"updated":"2015-11-10 13:19:58.000000000","message":"Should we have an error for \"image data not found\" ?\n\nWhat happens if the only supported method is \"glance-local\" and I call import w/o actually uploading the data? Another example could be calling the import endpoint w/ a swift URL that doesn\u0027t exist.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f779ecc3dff98be0878139c39e9975374865d60d","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    * 404: image record doesn\u0027t exist or is not owned by the caller"},{"line_number":415,"context_line":"    * 405: only POST, GET, DELETE supported for this call"},{"line_number":416,"context_line":"    * 409: associated image is not in appropriate status"},{"line_number":417,"context_line":"    * 415: unsupported media type (must be ``application/json``)"},{"line_number":418,"context_line":"* URL for the resource: ``v2/images/{image_id}/import``"},{"line_number":419,"context_line":"* Parameters which can be passed via the URL: none"},{"line_number":420,"context_line":"* JSON schema definition for the body data: ``v2/schemas/import``"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_dbeb8411","line":417,"updated":"2015-11-12 18:17:49.000000000","message":"ah-ha, yeah. That makes sense.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    * 404: image record doesn\u0027t exist or is not owned by the caller"},{"line_number":415,"context_line":"    * 405: only POST, GET, DELETE supported for this call"},{"line_number":416,"context_line":"    * 409: associated image is not in appropriate status"},{"line_number":417,"context_line":"    * 415: unsupported media type (must be ``application/json``)"},{"line_number":418,"context_line":"* URL for the resource: ``v2/images/{image_id}/import``"},{"line_number":419,"context_line":"* Parameters which can be passed via the URL: none"},{"line_number":420,"context_line":"* JSON schema definition for the body data: ``v2/schemas/import``"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_de2d1ba9","line":417,"in_reply_to":"da85f559_389344a5","updated":"2015-11-11 05:43:28.000000000","message":"I was thinking that kind of error wouldn\u0027t happen until the task started processing and discovered that the data wasn\u0027t available, then the import task would go to \u0027failure\u0027 and the image would go into \u0027error\u0027 state.  I\u0027m worried about the timing here.  With \u0027glance-local\u0027 it would be pretty fast to discover that the thing was missing from the bikeshed, but with the \u0027swift-local\u0027 method, you\u0027d have to make a call to swift and who knows how long that could take.  So I think it\u0027s better to issue a 201 here, and then propagate the error back to the user later.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"cf2aa63687f1b0b8e6c4ade60a8caff094afd99a","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"No request body.  The response body will conform to the JSON schema retrievable"},{"line_number":443,"context_line":"from the format discovery call.  If an import process is not active for this"},{"line_number":444,"context_line":"image, the response code is 404."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"import-info call summary"},{"line_number":447,"context_line":"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\""}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa80f949_5b7d04e6","line":444,"updated":"2015-11-04 21:57:25.000000000","message":"Monty suggested that we allow an end-user to put a name on each task so they can be tracked easily.  Since we are using an \"import\" resource on the particular image, it will be easy to see which import task is associated with a particular image, so I didn\u0027t put a \"name\" or \"user_note\" field in the import schema.\n\nIt just occurred to me that under this scheme, there isn\u0027t a way for a user to ask \"what imports do I have pending/processing right now?\"","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"47d9859ad14181db3505f5d7ccf0e8dab1309453","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"No request body.  The response body will conform to the JSON schema retrievable"},{"line_number":443,"context_line":"from the format discovery call.  If an import process is not active for this"},{"line_number":444,"context_line":"image, the response code is 404."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"import-info call summary"},{"line_number":447,"context_line":"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_cf07a4c8","line":444,"in_reply_to":"ba8a016a_17d8f352","updated":"2015-11-18 17:28:57.000000000","message":"Why would we allow a separate import call on the same image if the image status is error? Keep it simple. Make a new image, and try the import again there.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"No request body.  The response body will conform to the JSON schema retrievable"},{"line_number":443,"context_line":"from the format discovery call.  If an import process is not active for this"},{"line_number":444,"context_line":"image, the response code is 404."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"import-info call summary"},{"line_number":447,"context_line":"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_96db78ed","line":444,"in_reply_to":"ba8a016a_cf07a4c8","updated":"2015-11-24 17:02:35.000000000","message":"Keeping it simple sounds good to me.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76343c42849c1a50a401058fe0bb50f3bc9e3931","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"No request body.  The response body will conform to the JSON schema retrievable"},{"line_number":443,"context_line":"from the format discovery call.  If an import process is not active for this"},{"line_number":444,"context_line":"image, the response code is 404."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"import-info call summary"},{"line_number":447,"context_line":"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_17d8f352","line":444,"in_reply_to":"fa80f949_5b7d04e6","updated":"2015-11-16 11:49:20.000000000","message":"but after erroring out there might be new import calls issued, so the user might have multiple imports for same image.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f779ecc3dff98be0878139c39e9975374865d60d","unresolved":false,"context_lines":[{"line_number":467,"context_line":"    :language: json"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"import-delete"},{"line_number":470,"context_line":"^^^^^^^^^^^^^"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"``DELETE v2/images/{image_id}/import``"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_fbee8820","line":470,"updated":"2015-11-12 18:17:49.000000000","message":"+1 on removing it :)","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"79bf96914e7c3e08ca223305b6c3336bc152901a","unresolved":false,"context_lines":[{"line_number":467,"context_line":"    :language: json"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"import-delete"},{"line_number":470,"context_line":"^^^^^^^^^^^^^"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"``DELETE v2/images/{image_id}/import``"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_78af8c94","line":470,"updated":"2015-11-10 13:19:58.000000000","message":"When are we expecting this call to be used?\n\nIs it just to \"clean up\" tasks from the database?\n\nCan these tasks be cleaned when the image is removed ?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":467,"context_line":"    :language: json"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"import-delete"},{"line_number":470,"context_line":"^^^^^^^^^^^^^"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"``DELETE v2/images/{image_id}/import``"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_c9548300","line":470,"in_reply_to":"da85f559_78af8c94","updated":"2015-11-11 05:43:28.000000000","message":"I think you\u0027re right, we don\u0027t need this call.  If the import is successful, the import task doesn\u0027t hold any info of interest to the end-user (who already knows the image UUID), so we should just delete the import resource upon success.  If the import fails, I like your idea of just doing cleanup when the image itself is deleted.\n\nSince the call isn\u0027t going to allow cancellation of the import once it enters \u0027processing\u0027, it\u0027s probably not necessary.  So I\u0027m willing to eliminate it.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76343c42849c1a50a401058fe0bb50f3bc9e3931","unresolved":false,"context_lines":[{"line_number":467,"context_line":"    :language: json"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"import-delete"},{"line_number":470,"context_line":"^^^^^^^^^^^^^"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"``DELETE v2/images/{image_id}/import``"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_97cb8372","line":470,"in_reply_to":"da85f559_fbee8820","updated":"2015-11-16 11:49:20.000000000","message":"+1 from me as well, but then it will be more important to be able to identify the different import for single image (see my previous comment above).","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":505,"context_line":"   Why needed: Once Glance begins processing an import-image request, PUTs to"},{"line_number":506,"context_line":"   ``v2/images/{image_id}/bikeshed`` will return an error.  If the Image"},{"line_number":507,"context_line":"   remains in ``queued`` status, the end-user won\u0027t have a way to know in"},{"line_number":508,"context_line":"   advance that a PUT call will fail."},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"``error``"},{"line_number":511,"context_line":"   Why needed: The current Glance workflow is that when an image upload fails,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_72f23f71","line":508,"updated":"2015-11-10 17:08:06.000000000","message":"Again, thinking in terms of a minimal initial implementation, do we absolutely need these additional states for a first pass? \n\nA nova snapshot does not put an image into a processing state after creating the image (queued) and before uploading the bits (saving) (ie while it is writing the instance state to local disk).","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":505,"context_line":"   Why needed: Once Glance begins processing an import-image request, PUTs to"},{"line_number":506,"context_line":"   ``v2/images/{image_id}/bikeshed`` will return an error.  If the Image"},{"line_number":507,"context_line":"   remains in ``queued`` status, the end-user won\u0027t have a way to know in"},{"line_number":508,"context_line":"   advance that a PUT call will fail."},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"``error``"},{"line_number":511,"context_line":"   Why needed: The current Glance workflow is that when an image upload fails,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_36688cf5","line":508,"in_reply_to":"da85f559_72f23f71","updated":"2015-11-24 17:02:35.000000000","message":"Thanks, Stuart, I\u0027ll keep the nova snapshot analogy in mind during the rewrite and see if we can get by without new states.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":510,"context_line":"``error``"},{"line_number":511,"context_line":"   Why needed: The current Glance workflow is that when an image upload fails,"},{"line_number":512,"context_line":"   the image is put into ``killed`` status and is ultimately automatically"},{"line_number":513,"context_line":"   deleted.  Since we\u0027re tying the import to the Image resource, we need to"},{"line_number":514,"context_line":"   keep the image around if the import fails.  Otherwise we\u0027ll be in a"},{"line_number":515,"context_line":"   situation where ``GET v2/images/{image_id}`` returns 404, but ``GET"},{"line_number":516,"context_line":"   v2/images/{image_id}/import`` returns information about the status of the"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_9f4c8c71","line":513,"updated":"2015-11-10 17:08:06.000000000","message":"What automatically deletes killed images?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":510,"context_line":"``error``"},{"line_number":511,"context_line":"   Why needed: The current Glance workflow is that when an image upload fails,"},{"line_number":512,"context_line":"   the image is put into ``killed`` status and is ultimately automatically"},{"line_number":513,"context_line":"   deleted.  Since we\u0027re tying the import to the Image resource, we need to"},{"line_number":514,"context_line":"   keep the image around if the import fails.  Otherwise we\u0027ll be in a"},{"line_number":515,"context_line":"   situation where ``GET v2/images/{image_id}`` returns 404, but ``GET"},{"line_number":516,"context_line":"   v2/images/{image_id}/import`` returns information about the status of the"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9a8ffd7b_ea3778e1","line":513,"in_reply_to":"da85f559_9f4c8c71","updated":"2015-11-24 17:02:35.000000000","message":"I thought that was the workflow, but maybe not.  Need to check on this.\n\n@Stuart - do you think \u0027killed\u0027 could work for \u0027error\u0027?  I\u0027m not sure.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f779ecc3dff98be0878139c39e9975374865d60d","unresolved":false,"context_lines":[{"line_number":682,"context_line":"-----------"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":"Primary assignee:"},{"line_number":685,"context_line":"  \u003claunchpad-id or None\u003e"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"Other contributors:"},{"line_number":688,"context_line":"  \u003claunchpad-id or None\u003e"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_9bf17c03","line":685,"updated":"2015-11-12 18:17:49.000000000","message":"Do we know already who\u0027s going to help coding this? It\u0027s quite some work :D","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f779ecc3dff98be0878139c39e9975374865d60d","unresolved":false,"context_lines":[{"line_number":690,"context_line":"Reviewers"},{"line_number":691,"context_line":"---------"},{"line_number":692,"context_line":""},{"line_number":693,"context_line":"Core reviewer(s):"},{"line_number":694,"context_line":"  \u003claunchpad-id or None\u003e"},{"line_number":695,"context_line":"  \u003claunchpad-id or None\u003e"},{"line_number":696,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da85f559_bbf480f0","line":693,"updated":"2015-11-12 18:17:49.000000000","message":"I think it\u0027d be safe to put the whole glance-core team here :D","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76343c42849c1a50a401058fe0bb50f3bc9e3931","unresolved":false,"context_lines":[{"line_number":690,"context_line":"Reviewers"},{"line_number":691,"context_line":"---------"},{"line_number":692,"context_line":""},{"line_number":693,"context_line":"Core reviewer(s):"},{"line_number":694,"context_line":"  \u003claunchpad-id or None\u003e"},{"line_number":695,"context_line":"  \u003claunchpad-id or None\u003e"},{"line_number":696,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba8a016a_9792a356","line":693,"in_reply_to":"da85f559_bbf480f0","updated":"2015-11-16 11:49:20.000000000","message":"++","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ffeb49294652bd722722dfd2fc4537a75d86447","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Among the motivations for the above use case are:"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"* An end user creates a \"golden image\" offline and wants to use it in various"},{"line_number":38,"context_line":"  OpenStack clouds."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"* A particular cloud may not offer a public image of some excellent but obscure"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_19f3220c","line":37,"updated":"2015-11-25 02:46:00.000000000","message":"End users typically don\u0027t create golden images... or at least, that isn\u0027t how I understand the term golden images. I typically hear the term \"golden image\" refer to the base images for operating systems that the cloud operator will support that a cloud administrator uploads for tenants to launch instances from.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"04451204b7276b9781ecc531ec184c52340a6f64","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Among the motivations for the above use case are:"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"* An end user creates a \"golden image\" offline and wants to use it in various"},{"line_number":38,"context_line":"  OpenStack clouds."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"* A particular cloud may not offer a public image of some excellent but obscure"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_fa9f1001","line":37,"in_reply_to":"9a8ffd7b_19f3220c","updated":"2015-11-25 14:24:23.000000000","message":"I think this potentially refers to images which are deemed secure, and which an end user will likely want to sign. A uniform interface for importing images would definitely help users leverage the image signing functionality in Glance.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Among the motivations for the above use case are:"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"* An end user creates a \"golden image\" offline and wants to use it in various"},{"line_number":38,"context_line":"  OpenStack clouds."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"* A particular cloud may not offer a public image of some excellent but obscure"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_895eda74","line":37,"in_reply_to":"9a8ffd7b_fa9f1001","updated":"2015-12-01 12:36:09.000000000","message":"@Jay - in a large public cloud, the public images tend to be fairly generic; hence a common use case is for an end-user to boot an instance from a public image, configure it as desired, snapshot it, and then use the snapshot (instead of the public image) as a \"golden image\" to build out their infrastructure.  A large user could have several golden images, for webhead, DB server, etc.\n\n@dane - a secure, signed image makes sense for a \"golden image\" also","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ffeb49294652bd722722dfd2fc4537a75d86447","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"   #. End-user makes a \"create image record\" call (using existing v2 call)"},{"line_number":135,"context_line":"      (*image-create* call)"},{"line_number":136,"context_line":"   #. **End-user PUTs the data in the appropriate place** (*data-put* call)"},{"line_number":137,"context_line":"   #. End-user makes a call to see whether the image has status ``active``"},{"line_number":138,"context_line":"      (using an existing v2 call) (*image-detail* call)"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_790a6ed4","line":136,"updated":"2015-11-25 02:46:00.000000000","message":"The appropriate place is just the same place that every other image file goes to -- i.e. PUT /images/{image}/file.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8c1ab304b1fa81fd65696e25a6bce38a9b44a3f2","unresolved":false,"context_lines":[{"line_number":170,"context_line":"properties on the image record at this point.  Thus the import call needs to be"},{"line_number":171,"context_line":"asynchronous."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":".. note:: Glance guarantees the immutability of image data once an image is"},{"line_number":174,"context_line":"          goes \u0027active\u0027.  So how do we support the following scenario?"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"             The image is imported with ``container_format`` A, but will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_b6f44e87","line":173,"updated":"2015-11-25 13:09:50.000000000","message":"s/is goes/goes/","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":170,"context_line":"properties on the image record at this point.  Thus the import call needs to be"},{"line_number":171,"context_line":"asynchronous."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":".. note:: Glance guarantees the immutability of image data once an image is"},{"line_number":174,"context_line":"          goes \u0027active\u0027.  So how do we support the following scenario?"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"             The image is imported with ``container_format`` A, but will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_29024e3f","line":173,"in_reply_to":"9a8ffd7b_b6f44e87","updated":"2015-12-01 12:36:09.000000000","message":"thanks","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"b33da43377fe04db3673dd838c42b241ce3b8870","unresolved":false,"context_lines":[{"line_number":179,"context_line":"          The end user will set the ``container_format`` to A before the data"},{"line_number":180,"context_line":"          PUT.  As part of the import processing, Glance will change the"},{"line_number":181,"context_line":"          ``container_format`` property on the image record to B before the"},{"line_number":182,"context_line":"          image goes active.  Similarly, the checksum after the PUT will be the"},{"line_number":183,"context_line":"          checksum of the data package with ``container_format`` A.  Before the"},{"line_number":184,"context_line":"          image goes active, the checksum will be changed to the checksum of"},{"line_number":185,"context_line":"          the package in container_format B.  ``disk_format`` and any other"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_9cdd9f44","line":182,"updated":"2015-11-25 14:58:25.000000000","message":"@Brian\n\nI\u0027ve commented a few times that we don\u0027t have to store the unvalidated bits in the backend storage.\n\nie for the non-direct upload case we could save the incoming bits into /var, validate them, convert them, and then push up the bits into the backend.\n\nIn this approach (as with nova snapshot) there is no need to re-use the checksum, or to add complications around tracking two backend blobs.\n\nI\u0027d like some feedback on this approach so I know whether it\u0027s crazy talk (and not just being ignored) :-)","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"57019c37415626d511c624f16649108af98c8e00","unresolved":false,"context_lines":[{"line_number":179,"context_line":"          The end user will set the ``container_format`` to A before the data"},{"line_number":180,"context_line":"          PUT.  As part of the import processing, Glance will change the"},{"line_number":181,"context_line":"          ``container_format`` property on the image record to B before the"},{"line_number":182,"context_line":"          image goes active.  Similarly, the checksum after the PUT will be the"},{"line_number":183,"context_line":"          checksum of the data package with ``container_format`` A.  Before the"},{"line_number":184,"context_line":"          image goes active, the checksum will be changed to the checksum of"},{"line_number":185,"context_line":"          the package in container_format B.  ``disk_format`` and any other"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_77d3c8d5","line":182,"in_reply_to":"9a8ffd7b_08ea96db","updated":"2015-11-27 13:53:53.000000000","message":"I think I\u0027ve replied to this comment already.\n\nWe have something like this in place already as part of the task engine. We call it work_dir. It\u0027s a dir that needs to exist where the image bits are stored while they are worked on.\n\nThe problem with this, and I really don\u0027t like this part, is that it makes that node a SPOF in the import process. If the node with the image data goes down, we won\u0027t be able to import that image anymore. Also, this means the import process will have to happen in the same node where the image was stored, which is not great for scalability.\n\nThe workaround for this right now is to have an NFS mounted on the same path on every glance-api node. This is not the best solution, we all know how unreliable NFS can me.\n\nSo, to answer your question directly: I don\u0027t think this is crazy pants as we\u0027re already doing it. But I don\u0027t think this is the best solution and I\u0027d personally prefer us to move to something more reliable.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"3fe81eee19302270097ff67f7072e19790f47058","unresolved":false,"context_lines":[{"line_number":179,"context_line":"          The end user will set the ``container_format`` to A before the data"},{"line_number":180,"context_line":"          PUT.  As part of the import processing, Glance will change the"},{"line_number":181,"context_line":"          ``container_format`` property on the image record to B before the"},{"line_number":182,"context_line":"          image goes active.  Similarly, the checksum after the PUT will be the"},{"line_number":183,"context_line":"          checksum of the data package with ``container_format`` A.  Before the"},{"line_number":184,"context_line":"          image goes active, the checksum will be changed to the checksum of"},{"line_number":185,"context_line":"          the package in container_format B.  ``disk_format`` and any other"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_eb54b1ca","line":182,"in_reply_to":"9a8ffd7b_77d3c8d5","updated":"2015-11-27 15:23:53.000000000","message":"\u003e Also, this means the import process will have to happen in the same node where the image was stored, which is not great for scalability.\n\nCan you provide more detail here? My reading of the current spec is that we only have a single API call to put the bits. We don\u0027t have a follow up call (the bits are uploaded, please consume them). So won\u0027t the node receiving the bits and the node processing the bits be the same node?\n\n\u003e The problem with this, and I really don\u0027t like this part, is that it makes that node a SPOF in the import process.\n\nHow does stashing the bits in the backend help here? (What kind of restart mechanism did you have in mind?). Thanks.\n\nCan you also clarify if we need to support having two blobs (simultaneously) in the backend?","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":179,"context_line":"          The end user will set the ``container_format`` to A before the data"},{"line_number":180,"context_line":"          PUT.  As part of the import processing, Glance will change the"},{"line_number":181,"context_line":"          ``container_format`` property on the image record to B before the"},{"line_number":182,"context_line":"          image goes active.  Similarly, the checksum after the PUT will be the"},{"line_number":183,"context_line":"          checksum of the data package with ``container_format`` A.  Before the"},{"line_number":184,"context_line":"          image goes active, the checksum will be changed to the checksum of"},{"line_number":185,"context_line":"          the package in container_format B.  ``disk_format`` and any other"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_fac40260","line":182,"in_reply_to":"9a8ffd7b_8feef6b2","updated":"2015-12-01 12:36:09.000000000","message":"Stuart, I think Flavio and Steve have answered some of your questions.  Here\u0027s a bit more:\n\n\u003e \u003e Also, this means the import process will have to happen in the same node where the image was stored, which is not great for scalability.\n\u003e Can you provide more detail here? My reading of the current spec is that we only have a single API call to put the bits. We don\u0027t have a follow up call (the bits are uploaded, please consume them). So won\u0027t the node receiving the bits and the node processing the bits be the same node?\n\nI think Steve got this, we want to avoid unnecessary coupling between the workers and the API nodes.  Image validation (and compression/packaging, if a deployer wants to include that) are very I/O and CPU intensive at various stages of the processing, you may not be in a position to satisfy all requests as they come it (or if you try to, you may not be able to satisfy API availability requirements in your cloud).  Also, as these imports come in, they may stack up on the receiving node, leading to resource exhaustion for the work_dir or /var or wherever the imported data is being stored temporarily.  So I like putting the incoming data into the backend (in a suitably deactivated state) because presumably the cloud\u0027s been architected so that the backend can store as much data as is required to satisfy whatever image quota\u0027s been set for end-users.\n\n\u003e \u003e The problem with this, and I really don\u0027t like this part, is that it makes that node a SPOF in the import process.\n\n\u003e How does stashing the bits in the backend help here? (What kind of restart mechanism did you have in mind?). Thanks.\n\nIf the node that has accepted the data has a failure to the extent that its filesystem is corrupted, and you have to rotate in a new Glance node, the imported data is lost.  If it\u0027s in the backend, the new node can just read it out of there when it\u0027s time to process the imported data so that the image can be activated.\n\nOn the import model in the previous patch sets, the import operation was triggered by a separate API call (/v2/images/{image_id}/import), which would be routed to the appropriate Glance node for processing.  Something similar would have to happen behind the scenes in the single \"asynchronous upload\" call that\u0027s proposed in this patch set.\n\n\u003e Can you also clarify if we need to support having two blobs (simultaneously) in the backend?\n\nI don\u0027t think so.  The deactivated blob would be subject to replacement after it\u0027s processed (or simply made active, if that\u0027s all the processing requires).  If the worker crashes during the upload of the validated data, the object in the backend could become corrupted, though.  So maybe we would need to be able to support 2 blobs simultaneously for a short time?\n\n(The beauty of the \u0027swift-local\u0027 workflow is that the unvalidated blob is safely stored in the end-users object store account, so if the worker crashed during upload of validated image data to glance, the original unvalidated blob is still available.  Thus \u0027swift-local\u0027 gets us reliability, and it also helps with scalability as it\u0027s an independent location that any worker process could pull from.)\n\nI hope this addresses your questions?","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"6f88f134250271d8a921c135d1eccc8c17b8ae99","unresolved":false,"context_lines":[{"line_number":179,"context_line":"          The end user will set the ``container_format`` to A before the data"},{"line_number":180,"context_line":"          PUT.  As part of the import processing, Glance will change the"},{"line_number":181,"context_line":"          ``container_format`` property on the image record to B before the"},{"line_number":182,"context_line":"          image goes active.  Similarly, the checksum after the PUT will be the"},{"line_number":183,"context_line":"          checksum of the data package with ``container_format`` A.  Before the"},{"line_number":184,"context_line":"          image goes active, the checksum will be changed to the checksum of"},{"line_number":185,"context_line":"          the package in container_format B.  ``disk_format`` and any other"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_08ea96db","line":182,"in_reply_to":"9a8ffd7b_9cdd9f44","updated":"2015-11-26 12:00:48.000000000","message":"Let me add some more detail here.\n\nWe should only move data when we need to.\n\n-----\n\nCase 1: No validation/no modification\n\nThis corresponds to the original PUT. Here we can put the data straight into the backend. No need to go via /var.\n\nCase 2: Validation/no modification\n\nIn this case I\u0027m assuming we need the bits in /var so something like qemu-img can access it to do the validation.\n\nHere we need to validate the data. This is a read operation. We will not modify the image. Once validation (of the bits in /var) passes, we push the bits into the backend. The image is only available once validation passes -- no definite requirement for a new state.\n\nIf validation fails there is no need to push the bits into the backend. Rather than writing the bits both into /var and the backend we will have only written them to /var. There is no backend store cleanup operation required if validation fails. There is no need to reset the checksum/size etc.\n\nCase 3: modification\n\n\"Modification\" could be conversion or some operator specific image modification.\n\nHere I\u0027m assuming we will always need the original bits in /var in order to operate on them.\n\nThe original bits are read from the request into /var. They are modified to create new bits. The new bits are uploaded to the backend. There is no need to upload the original bits to the backend and then overwrite them.\n\n-----\n\nWe\u0027ll need to know in advance whether a request is validating/modifying the image bits. I think that should be possible.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"70055d8681033628698a5dc568c2412a30caa94e","unresolved":false,"context_lines":[{"line_number":179,"context_line":"          The end user will set the ``container_format`` to A before the data"},{"line_number":180,"context_line":"          PUT.  As part of the import processing, Glance will change the"},{"line_number":181,"context_line":"          ``container_format`` property on the image record to B before the"},{"line_number":182,"context_line":"          image goes active.  Similarly, the checksum after the PUT will be the"},{"line_number":183,"context_line":"          checksum of the data package with ``container_format`` A.  Before the"},{"line_number":184,"context_line":"          image goes active, the checksum will be changed to the checksum of"},{"line_number":185,"context_line":"          the package in container_format B.  ``disk_format`` and any other"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_8feef6b2","line":182,"in_reply_to":"9a8ffd7b_eb54b1ca","updated":"2015-12-01 00:09:42.000000000","message":"I don\u0027t see a good reason to suggest that a worker/processor should/need be co-located with an API node. \n\nThat model creates an unnecessary coupling between the workers and the API nodes. Having the workers co-located with the API node undermines the benefits of separation offered by having separate processes in the first place.\n\nI would second Flavio\u0027s concern about use of a work_dir here. Allow an appropriate abstract storage to be provided, even if it is merely an indirection to the work_dir initially. This allows the SPOF to be mitigated and the workers and APIs to be separated.\n\nAs for a task restart mechanism, that is a concern that can be explored independently, in the task framework implementation which is doing the work.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ffeb49294652bd722722dfd2fc4537a75d86447","unresolved":false,"context_lines":[{"line_number":201,"context_line":"          able to set that property on the image record before the image data"},{"line_number":202,"context_line":"          is imported.  I believe this could be done by allowing users to have"},{"line_number":203,"context_line":"          C but not U permissions on the ``os_type`` property, that is, the"},{"line_number":204,"context_line":"          current property protection scheme will work for this scenario."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"          I just want to point out this scenario so people can think about any"},{"line_number":207,"context_line":"          other similar situations with protected image properties and make"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_f9865eb8","line":204,"updated":"2015-11-25 02:46:00.000000000","message":"You could communicate to the end user which properties are settable in the discovery API call described above. Something like this might work...\n\nReturned for an administrative user:\n\n GET /capabilities\n 200 OK\n {\n   \"can_upload\": true,\n   \"put_image_file\": {\n     \"disk_format\": {\n       \"source_formats\": [\"iso\", \"vhd\", \"ova\"],\n       \"target_formats\": [\"iso\", \"vhd\", \"qcow2\", \"ova\"]\n     },\n      \"container_format\": {\n        \"source_formats\": [\"bare\"],\n        \"target_formats\": [\"bare\", \"ovf\"]\n      },\n      \"max_size_bytes\": 102400000000000,\n      \"max_virtual_size_bytes\": 1024000000000\n   }\n }\n\nfor a normal end user using a cloud that does not allow uploading images, the returned result would be simply:\n\n GET /capabilities\n 200 OK\n {\n   \"can_upload\": false,\n   \"put_image_file\": null\n }\n\nand for a normal end user using a cloud that DID allow the user to upload an image, the result might look like:\n\n GET /capabilities\n 200 OK\n {\n   \"can_upload\": false,\n   \"put_image_file\": {\n     \"disk_format\": {\n       \"source_formats\": [\"iso\"],\n       \"target_formats\": [\"iso\", \"qcow2\"]\n     },\n      \"container_format\": {\n        \"source_formats\": [\"bare\"],\n        \"target_formats\": [\"bare\"]\n      },\n      \"max_size_bytes\": 1024000000,\n      \"max_virtual_size_bytes\": 1024000000,\n      \"restricted_properties\": [\"os_type\"]\n   }\n }","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":201,"context_line":"          able to set that property on the image record before the image data"},{"line_number":202,"context_line":"          is imported.  I believe this could be done by allowing users to have"},{"line_number":203,"context_line":"          C but not U permissions on the ``os_type`` property, that is, the"},{"line_number":204,"context_line":"          current property protection scheme will work for this scenario."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"          I just want to point out this scenario so people can think about any"},{"line_number":207,"context_line":"          other similar situations with protected image properties and make"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_556de1ca","line":204,"in_reply_to":"9a8ffd7b_c473577f","updated":"2015-12-01 12:36:09.000000000","message":"I\u0027ve got two concerns here:\n\n(1) @Jay - as Stuart points out, the end user needs to tell the import process (a) what container_format, disk_format apply to the uploaded blob, and (b) what the desired target c_f, d_f for clouds that allow conversion-on-input.  (And possibly other stuff, too, but definitely those.)\n\n(2) @Stuart - the property protections don\u0027t necessarily need to be exposed, but we need to have a way to handle something like os_type, that must be non-user-modifiable for licensing reasons, but needs to be set somehow.  If we\u0027re just using the image object as a communication medium, this is going to be a problem.  (It also smells like an anti-pattern, as well.)\n\nThe more I think about this, the more I think we need a dedicated \u0027import\u0027 call so that the end-user can explain to Glance what exactly is being requested.  I just don\u0027t think it\u0027s workable to rely on the image object for this purpose.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"b33da43377fe04db3673dd838c42b241ce3b8870","unresolved":false,"context_lines":[{"line_number":201,"context_line":"          able to set that property on the image record before the image data"},{"line_number":202,"context_line":"          is imported.  I believe this could be done by allowing users to have"},{"line_number":203,"context_line":"          C but not U permissions on the ``os_type`` property, that is, the"},{"line_number":204,"context_line":"          current property protection scheme will work for this scenario."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"          I just want to point out this scenario so people can think about any"},{"line_number":207,"context_line":"          other similar situations with protected image properties and make"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_c473577f","line":204,"in_reply_to":"9a8ffd7b_f9865eb8","updated":"2015-11-25 14:58:25.000000000","message":"On the formats:\n\n\"source_formats\": [\"iso\"],\n       \"target_formats\": [\"iso\", \"qcow2\"]\n\nDo we need to be able to express things like:\nyou can do ovf-\u003eovf, ovf-\u003eqcow2 and qcow2-\u003eqcow2, but not qcow2-\u003e ovf? (Per-format parameters.)\n\nOn the protected properties:\n\nExposing which properties are protected is a good thing -- but does it need to be done as part of this spec?","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ffeb49294652bd722722dfd2fc4537a75d86447","unresolved":false,"context_lines":[{"line_number":216,"context_line":"^^^^^^^^"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"Make the ``PUT v2/images/{image_id}/file`` call completely asynchronous.  When"},{"line_number":219,"context_line":"the PUT is complete, Glance returns a ``201 Created``.  (Currently, this call"},{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_999392fa","line":219,"updated":"2015-11-25 02:46:00.000000000","message":"It wouldn\u0027t be a 201 Created. It would be a 202 Accepted.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"04855d03601761913a0d0ed04e17caff517a3b2d","unresolved":false,"context_lines":[{"line_number":216,"context_line":"^^^^^^^^"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"Make the ``PUT v2/images/{image_id}/file`` call completely asynchronous.  When"},{"line_number":219,"context_line":"the PUT is complete, Glance returns a ``201 Created``.  (Currently, this call"},{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_89f791f4","line":219,"in_reply_to":"9a8ffd7b_999392fa","updated":"2015-11-25 18:59:35.000000000","message":"+1","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"b33da43377fe04db3673dd838c42b241ce3b8870","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"Make the ``PUT v2/images/{image_id}/file`` call completely asynchronous.  When"},{"line_number":219,"context_line":"the PUT is complete, Glance returns a ``201 Created``.  (Currently, this call"},{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"},{"line_number":223,"context_line":"status immediately.  Otherwise, the image will stay ``processing`` until"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_d5f53fcb","line":220,"updated":"2015-11-25 14:58:25.000000000","message":"I\u0027m reading this as we go from \u0027204\u0027 in all cases to \u0027201 (or 204)\u0027 in all cases. Or is the new code returned for the async case only? Could we add some more detail explaining the thinking here?","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"Make the ``PUT v2/images/{image_id}/file`` call completely asynchronous.  When"},{"line_number":219,"context_line":"the PUT is complete, Glance returns a ``201 Created``.  (Currently, this call"},{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"},{"line_number":223,"context_line":"status immediately.  Otherwise, the image will stay ``processing`` until"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_7586e514","line":220,"in_reply_to":"9a8ffd7b_2fbb4a77","updated":"2015-12-01 12:36:09.000000000","message":"@Jay, Mike - I can live with 202.  Question: is the change from 204 to 202 a breaking change?\n\n@Stuart - my thinking on Option 1 is that we change the current response for all calls.  With Option 1, we\u0027d no longer have a \u0027synchronous\u0027 upload to Glance.  The call would give you a 202, and how quickly a subsequent GET on /v2/images/{image_id} showed you an image in \u0027active\u0027 status would depend on your roles or something (e.g., Nova and admin -\u003e \u0027active\u0027 immediately; end-user importing an image -\u003e \u0027deactivated\u0027 for a while and eventually \u0027active\u0027).","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"f328f36e3ab3eb1e128354eb640435d618adc38d","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"Make the ``PUT v2/images/{image_id}/file`` call completely asynchronous.  When"},{"line_number":219,"context_line":"the PUT is complete, Glance returns a ``201 Created``.  (Currently, this call"},{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"},{"line_number":223,"context_line":"status immediately.  Otherwise, the image will stay ``processing`` until"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_a4017308","line":220,"in_reply_to":"9a8ffd7b_7586e514","updated":"2015-12-01 15:42:11.000000000","message":"@Brian, good question. my gut feeling is that it probably is a breaking change since any client that was specifically written to expect a 204 will need to change. but, they are both 2xx series return values, so i\u0027m not sure on how bad the breakage would be considered (for example, is this a minor or major version bump).","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"70055d8681033628698a5dc568c2412a30caa94e","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"Make the ``PUT v2/images/{image_id}/file`` call completely asynchronous.  When"},{"line_number":219,"context_line":"the PUT is complete, Glance returns a ``201 Created``.  (Currently, this call"},{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"},{"line_number":223,"context_line":"status immediately.  Otherwise, the image will stay ``processing`` until"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_2fbb4a77","line":220,"in_reply_to":"9a8ffd7b_d5f53fcb","updated":"2015-12-01 00:09:42.000000000","message":"Perhaps in any case where a PUT operation is completed but the image does not result in a status of ACTIVE, a 202 Accepted should be returned.\n\nThis concern applies for Option 1 or Option 2.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ffeb49294652bd722722dfd2fc4537a75d86447","unresolved":false,"context_lines":[{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"},{"line_number":223,"context_line":"status immediately.  Otherwise, the image will stay ``processing`` until"},{"line_number":224,"context_line":"validation or whatever processes have been configured by the deployer have"},{"line_number":225,"context_line":"completed."},{"line_number":226,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_5d38b5d3","line":223,"updated":"2015-11-25 02:46:00.000000000","message":"I would recommend either PENDING_REVIEW or QUARANTINED. PROCESSING kind of sounds like the image is shortly going to be active, but the image file is still being uploaded to backend storing (which is actually the SAVING state)","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"b33da43377fe04db3673dd838c42b241ce3b8870","unresolved":false,"context_lines":[{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"},{"line_number":223,"context_line":"status immediately.  Otherwise, the image will stay ``processing`` until"},{"line_number":224,"context_line":"validation or whatever processes have been configured by the deployer have"},{"line_number":225,"context_line":"completed."},{"line_number":226,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_391cc5c0","line":223,"in_reply_to":"9a8ffd7b_01b4f6ce","updated":"2015-11-25 14:58:25.000000000","message":"I don\u0027t think adding a new state is strictly needed.\n\nI\u0027m thinking of a nova snapshot, where the image record is created (queued), some stuff happens, the bits are pushed up (saving), it becomes usable (active). There\u0027s no new state for the \u0027stuff happening\u0027 phase.\n\nIf we are adding a new state it would be good to say why.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"57019c37415626d511c624f16649108af98c8e00","unresolved":false,"context_lines":[{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"},{"line_number":223,"context_line":"status immediately.  Otherwise, the image will stay ``processing`` until"},{"line_number":224,"context_line":"validation or whatever processes have been configured by the deployer have"},{"line_number":225,"context_line":"completed."},{"line_number":226,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_5a1fc95a","line":223,"in_reply_to":"9a8ffd7b_391cc5c0","updated":"2015-11-27 13:53:53.000000000","message":"I think we need it as that\u0027s going to communicate what\u0027s going on, server-side, with the image. If we go from queued to saving and we do all the import steps when the image is in saving then the user won\u0027t know if the image bits are still being written or they are being validated/converted/whatever.\n\n+1 on documenting why we need it.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"},{"line_number":223,"context_line":"status immediately.  Otherwise, the image will stay ``processing`` until"},{"line_number":224,"context_line":"validation or whatever processes have been configured by the deployer have"},{"line_number":225,"context_line":"completed."},{"line_number":226,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_90fef703","line":223,"in_reply_to":"9a8ffd7b_5a1fc95a","updated":"2015-12-01 12:36:09.000000000","message":"@Stuart - basically, what Flavio said.  Additionally, with tasks or an \u0027import\u0027 resource out of the picture, all communication between Glance and the user vis-a-vis what\u0027s going on during the import process has to be done through the medium of the image object.  So this is going to require:\n(a) introducing new states, and \n(b) introducing new elements on the image object.\n\nThe reason for (b) is that the proposal in this patch set will put an image in \u0027killed\u0027 or \u0027error\u0027 status ... but that doesn\u0027t tell the end user anything about what the problem is ... bad input format, corrupted image data, failed validation for some other reason, etc.  It would be pretty bad if we don\u0027t get some kind of message out to the user.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8c1ab304b1fa81fd65696e25a6bce38a9b44a3f2","unresolved":false,"context_lines":[{"line_number":220,"context_line":"returns a ``204 No Content``)."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"If the user is an admin or a service user, the image will go to ``active``"},{"line_number":223,"context_line":"status immediately.  Otherwise, the image will stay ``processing`` until"},{"line_number":224,"context_line":"validation or whatever processes have been configured by the deployer have"},{"line_number":225,"context_line":"completed."},{"line_number":226,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_01b4f6ce","line":223,"in_reply_to":"9a8ffd7b_5d38b5d3","updated":"2015-11-25 13:09:50.000000000","message":"But there\u0027s more to that async processing than just review/quarantine. The image could be converted to a different format.\n\nFor the sake of bikeshed, what about \"IMPORTING\" ?","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8c1ab304b1fa81fd65696e25a6bce38a9b44a3f2","unresolved":false,"context_lines":[{"line_number":228,"context_line":"being a breaking change.  (Actually, I\u0027m not so sure about that.  It\u0027s"},{"line_number":229,"context_line":"documented to return a 204 now.  There\u0027s no guarantee I\u0027m aware of that the"},{"line_number":230,"context_line":"image will immediately be active such that you don\u0027t need to check before"},{"line_number":231,"context_line":"trying to use the image.)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":".. note:: It\u0027s possible that instead of introducing a new status,"},{"line_number":234,"context_line":"          ``processing``, we could use the existing status ``deactivated``."}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_7cba450c","line":231,"updated":"2015-11-25 13:09:50.000000000","message":"This is exactly what concerns me about this change. I don\u0027t want to break the existing API. Changing the status *and* making it asynchronous does feel like a breaking change.\n\nOne thing that would make this feel a bit better is having a way to enable/disable the asynchronous behavior, which is just a way to say \"we broke you but we also give you a way to not being broken\"\n\nI\u0027m generally -1 on option 1","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":228,"context_line":"being a breaking change.  (Actually, I\u0027m not so sure about that.  It\u0027s"},{"line_number":229,"context_line":"documented to return a 204 now.  There\u0027s no guarantee I\u0027m aware of that the"},{"line_number":230,"context_line":"image will immediately be active such that you don\u0027t need to check before"},{"line_number":231,"context_line":"trying to use the image.)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":".. note:: It\u0027s possible that instead of introducing a new status,"},{"line_number":234,"context_line":"          ``processing``, we could use the existing status ``deactivated``."}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_30c14b81","line":231,"in_reply_to":"9a8ffd7b_7cba450c","updated":"2015-12-01 12:36:09.000000000","message":"@Flavio - I agree with you on this.  Plus, Idon\u0027t like the idea of a configuration option that would enable backward compatiblity (not for any good reasons, just on general principles!).  If we\u0027d need a config option to use Option 1, that\u0027s enough for me to -1 Option 1 as well.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ffeb49294652bd722722dfd2fc4537a75d86447","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_bd74419c","line":248,"updated":"2015-11-25 02:46:00.000000000","message":"Surprise! I\u0027m totally -1 on this. :)","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"5886e49d15d9d6913e303e0fff0aa96f9c4d8df5","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_920ddaea","line":248,"in_reply_to":"9a8ffd7b_3158e887","updated":"2015-11-30 13:27:12.000000000","message":"Option 3:\n\nWe preserve the existing behaviour for old clients. New clients indicate that they can handle new behaviour.\n\n(Conceptually a bit like microversions.)\n\nI think users of the old (ie existing) client expect the following upload behaviour:\n\n1) The resource is \"/file\"\n\n2) the image is usable after the data is PUT to /file (ie after a non-error response is returned)\n\n3) the image bits are not modified (the checksum does not change)\n\nWe need to think about whether we should guarantee unmodified bits in the absence of image conversion. In the absence of an  indication from the user that modifying the bits is ok, we possibly should not modify them. This allows the checksum to be used as expected (and image signing to work, if we\u0027re interested in that).\n\nWe could preserve 1, 2 and 3 (ie support existing clients) if we perform a validation which doesn\u0027t take \"very long\".\n\nFor newer clients, eg clients which support format conversion, the request could indicate that the client (A) Supports asynchronous behaviour, and (B) Is ok with the bits being modified.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"98a8cef5112d0ad86a060f4cb8aaae9681bdd307","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_d5da3117","line":248,"in_reply_to":"9a8ffd7b_8b8ca936","updated":"2015-12-01 12:16:18.000000000","message":"\u003e The idea that you will block while work which \"doesn\u0027t take very long\" is performed is probably not reasonable\n\nIf we distinguish between incoming requests that may modify the bits and those which preserve the checksum, then in the \u0027preserve the checksum\u0027 case, we can validate the container using qemu-image in a couple of seconds. (I don\u0027t think waiting a couple of seconds is unreasonable.)\n\nIn the conversion (don\u0027t guarantee the checksum) case it\u0027s ok to act asynchronously because that\u0027s a new API call, so no existing clients will be tripped up.\n\nIf we decide that we don\u0027t want to guarantee the original checksum (in non-conversion cases) or we decide that we want to allow arbitrarily long introspection of images (again, in non-conversion cases) then Option 3 won\u0027t fly.\n\nI haven\u0027t been able to think of a case for long lived introspection (since you can dd whatever you want into a snapshot later anyway, or boot from a cinder volume). But I could be missing something here. Do you have a specific use case in mind? Thanks.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"70055d8681033628698a5dc568c2412a30caa94e","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_8b8ca936","line":248,"in_reply_to":"9a8ffd7b_920ddaea","updated":"2015-12-01 00:09:42.000000000","message":"The idea that you will block while work which \"doesn\u0027t take very long\" is performed is probably not reasonable. That seems like wishful thinking. The API should not try to hide asynchronous behavior where it exists.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"57019c37415626d511c624f16649108af98c8e00","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_9a077181","line":248,"in_reply_to":"9a8ffd7b_9547b74a","updated":"2015-11-27 13:53:53.000000000","message":"No, option 2 doesn\u0027t break the API. It introduces a *new* endpoint for users to move to. Clouds will opt-in to that endpoint and opt-out from the old one. Nonetheless, no cloud will be forced to do that. They\u0027ll eventually do it - I hope - for the sake of being interoperable and, of course, compliant with defcore.\n\nOption 1 assumes people don\u0027t rely on the image being active right away and I don\u0027t want to be the one assuming things for our users.\n\nI understand we can put the change in option 1 behind a flag but that will leave us with an API that can behave in 2 different ways and the user won\u0027t know which way that is because it\u0027s not discoverable.\n\nFWIW, I have the feeling we\u0027re trying to workout excuses to make #1 not look like a breaking change (or at least make us believe that) and I don\u0027t feel comfortable with that.\n\nOption 1 changes the API. It changes the return code and it also changes the workflow a user follows to import an image. \n\nIf we\u0027re going to go with option 1 (which I\u0027m voting against to) then lets be honest and say we\u0027re breaking the API (which, btw, we can\u0027t. Otherwise, we need to give up the `follows-deprecation-standards` tag).","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"3fe81eee19302270097ff67f7072e19790f47058","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_3158e887","line":248,"in_reply_to":"9a8ffd7b_9a077181","updated":"2015-11-27 15:23:53.000000000","message":"\u003e FWIW, I have the feeling we\u0027re trying to workout excuses to make 1 not look like a breaking change\n\nI agree we should be up front.\n\n\u003e No, option 2 doesn\u0027t break the API.\n\nOn paper maybe, but are we concerned about the real effects on users too?\n\nAnyone uploading to a cloud which has disabled direct upload will need a new version of the glance client. And \"anyone\" could mean \"absolutely everybody\" if we disable it by default. That\u0027s going to feel fairly breaking in practice.\n\nIt\u0027s also harder to work around because you can\u0027t just change how you\u0027re using the existing client library to poll the image; you really do need a new client library. So you\u0027ve to source and deploy a new client lib ... which may or may not be backported to Debian 4 :-)","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8c1ab304b1fa81fd65696e25a6bce38a9b44a3f2","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_fc38753f","line":248,"in_reply_to":"9a8ffd7b_bd74419c","updated":"2015-11-25 13:09:50.000000000","message":"Surprise, I\u0027m actually +1 on this! :D\n\nHere are some motivations to go with option 2 to begin with:\n\n* We won\u0027t break the existing API\n* We\u0027ll prepare ourselves for future enhancements. If you notice, this proposal doesn\u0027t mention support for external sources/uploads like the previous one. However, I\u0027m pretty sure there will be requests for that in the future and I\u0027d like Glance to be prepared.\n* Having a separate end-point gives use a proper way to help users migrate to the new way of doing things. The old endpoint will go away, eventually.\n* We don\u0027t really need to rewrite things, we can re-use pretty much everything from the existing `/file` endpoint.\n\nI read option 2 as adding an alias to `/file` (with a couple of tweaks) and a new header to the image create call.\n\nThe problem with this option is that it won\u0027t really allow us to support other external sources because there\u0027s no way to tell glance when the data has been uploaded to that external source.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"b33da43377fe04db3673dd838c42b241ce3b8870","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_9547b74a","line":248,"in_reply_to":"9a8ffd7b_fc38753f","updated":"2015-11-25 14:58:25.000000000","message":"\u003e We won\u0027t break the existing API\n\nI strongly argued against option 1 because I saw it as a breaking change.\n\nRight now, I\u0027m not sure if option 2 improves things in terms of breaking stuff.\n\nWith option 2 requests to /file will start to return 403 at some point. Is that arguably *more* breaking? With option 1 at least if your application just uploads an image and doesn\u0027t rely on it becoming active immediately it will continue to work.\n\n(Both option 1 and option 2 can have \u0027keep the old behaviour\u0027 config parameters.)","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"3fe81eee19302270097ff67f7072e19790f47058","unresolved":false,"context_lines":[{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"},{"line_number":252,"context_line":"in the regular Glance storage backend since it won\u0027t be usable until the image"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_d1507c34","line":249,"updated":"2015-11-27 15:23:53.000000000","message":"General question: how long will validation typically take?\n\nIf by default we\u0027re just doing a \u0027qemu-img info\u0027 then it\u0027s seconds.\n\nCould the imports that don\u0027t change the bits (preserve the checksum) be synchronous?\n\nAnd only imports which change the bits (this is new behaviour) be asynchronous? If so, would that avoid breakage?","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"70055d8681033628698a5dc568c2412a30caa94e","unresolved":false,"context_lines":[{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"},{"line_number":252,"context_line":"in the regular Glance storage backend since it won\u0027t be usable until the image"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_8b16e9a5","line":249,"in_reply_to":"9a8ffd7b_035559c4","updated":"2015-12-01 00:09:42.000000000","message":"Best to not make a presumption about this:\n\nSome cloud operators will want to perform longer-running operations on uploaded images. \n\nFurther, async validation could be subject to scheduling limitations adding yet more variation.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"},{"line_number":252,"context_line":"in the regular Glance storage backend since it won\u0027t be usable until the image"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_701033a9","line":249,"in_reply_to":"9a8ffd7b_8b16e9a5","updated":"2015-12-01 12:36:09.000000000","message":"@Stuart - I\u0027m with Steve on this.  As a data point, the current Rackspace import processing takes on the order of 10 minutes, using the \u0027swift-local\u0027 approach.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"fd37623a68e0a84d8ec8867919dfc08f4e75efdb","unresolved":false,"context_lines":[{"line_number":246,"context_line":"(where \u0027bikeshed\u0027 will eventually be replaced by an appropriate name reached by"},{"line_number":247,"context_line":"consensus).  Non-admins and non-services will get a 403 if they make the"},{"line_number":248,"context_line":"synchronous call."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"In prior patch sets, the \"bikeshed\" was treated as an intermediate storage"},{"line_number":251,"context_line":"location, but that doesn\u0027t have to be the case -- the user data can be placed"},{"line_number":252,"context_line":"in the regular Glance storage backend since it won\u0027t be usable until the image"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_035559c4","line":249,"in_reply_to":"9a8ffd7b_d1507c34","updated":"2015-11-27 16:05:04.000000000","message":"A quick follow up:\n\nI\u0027m trying to think about what any potential long lived validation would do...\n\nOnce you have a booted instance you can dd anything to \u0027/\u0027 and take a snapshot. (Similarly with a Cinder volume.)\nSo anything that Glance did to inspect the raw image bytes (rather than just the qcow2 wrapper for example) could be bypassed later. The same validation could be added into Nova too of course. In which case would it make sense to have it in Glance at all?","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ffeb49294652bd722722dfd2fc4537a75d86447","unresolved":false,"context_lines":[{"line_number":268,"context_line":"value discovery"},{"line_number":269,"context_line":"^^^^^^^^^^^^^^^"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"``GET v2/values/import``"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"The response is a JSON document containing a dict.  This document should"},{"line_number":274,"context_line":"provide an end-user with sufficient information to perform an image import."}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_dd3ca595","line":271,"updated":"2015-11-25 02:46:00.000000000","message":"-1. I prefer a simpler, more compact:\n\n GET /capabilities\n\ncall that returns the capabilities of the service in a JSON object like the example above.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":268,"context_line":"value discovery"},{"line_number":269,"context_line":"^^^^^^^^^^^^^^^"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"``GET v2/values/import``"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"The response is a JSON document containing a dict.  This document should"},{"line_number":274,"context_line":"provide an end-user with sufficient information to perform an image import."}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_4bf22208","line":271,"in_reply_to":"9a8ffd7b_dd3ca595","updated":"2015-12-01 12:36:09.000000000","message":"@Jay - I\u0027m not against this, I\u0027m just worried about whether the capabilities for export might be different enough from import that it might be good to have a different endpoint.  Either that or we add another level to the capabilities response so you could distinguish the import stuff from the export stuff.  Any thoughts?","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ffeb49294652bd722722dfd2fc4537a75d86447","unresolved":false,"context_lines":[{"line_number":270,"context_line":""},{"line_number":271,"context_line":"``GET v2/values/import``"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"The response is a JSON document containing a dict.  This document should"},{"line_number":274,"context_line":"provide an end-user with sufficient information to perform an image import."},{"line_number":275,"context_line":""},{"line_number":276,"context_line":".. literalinclude:: value-discovery-response.json"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_3db05143","line":273,"updated":"2015-11-25 02:46:00.000000000","message":"it\u0027s not a dict, it\u0027s an object in JSON notation :)","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ffeb49294652bd722722dfd2fc4537a75d86447","unresolved":false,"context_lines":[{"line_number":273,"context_line":"The response is a JSON document containing a dict.  This document should"},{"line_number":274,"context_line":"provide an end-user with sufficient information to perform an image import."},{"line_number":275,"context_line":""},{"line_number":276,"context_line":".. literalinclude:: value-discovery-response.json"},{"line_number":277,"context_line":"    :linenos:"},{"line_number":278,"context_line":"    :language: json"},{"line_number":279,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_7d5819fb","line":276,"updated":"2015-11-25 02:46:00.000000000","message":"Would be best to have a JSONSchema document that describes the possible returned value from the discovery URI, instead of a free-form JSON document","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":273,"context_line":"The response is a JSON document containing a dict.  This document should"},{"line_number":274,"context_line":"provide an end-user with sufficient information to perform an image import."},{"line_number":275,"context_line":""},{"line_number":276,"context_line":".. literalinclude:: value-discovery-response.json"},{"line_number":277,"context_line":"    :linenos:"},{"line_number":278,"context_line":"    :language: json"},{"line_number":279,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_ab3b8e9b","line":276,"in_reply_to":"9a8ffd7b_7d5819fb","updated":"2015-12-01 12:36:09.000000000","message":"@Jay - do you mean a JSON schema describing the format of the discovery response, or to put the site-specific info into a JSON schema (i.e., the discovery response would *be* a JSON schema)?","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"04451204b7276b9781ecc531ec184c52340a6f64","unresolved":false,"context_lines":[{"line_number":357,"context_line":""},{"line_number":358,"context_line":"#. The call will fail when the number of uploaded bytes exceeds the"},{"line_number":359,"context_line":"   max_upload_bytes value published in the value discovery call."},{"line_number":360,"context_line":"   "},{"line_number":361,"context_line":"#. The call will fail when the upload time exceeds the"},{"line_number":362,"context_line":"   max_upload_time value published in the value discovery call."},{"line_number":363,"context_line":"   "}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_da21ecb5","line":360,"updated":"2015-11-25 14:24:23.000000000","message":"whitespace nit.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"04451204b7276b9781ecc531ec184c52340a6f64","unresolved":false,"context_lines":[{"line_number":360,"context_line":"   "},{"line_number":361,"context_line":"#. The call will fail when the upload time exceeds the"},{"line_number":362,"context_line":"   max_upload_time value published in the value discovery call."},{"line_number":363,"context_line":"   "},{"line_number":364,"context_line":"In the interest of simplicity, once a successful ``PUT ../bikeshed`` has been"},{"line_number":365,"context_line":"made, subsequent PUT calls will return a 409 (Conflict), just as the ``PUT"},{"line_number":366,"context_line":"../file`` does currently."}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_fa12b061","line":363,"updated":"2015-11-25 14:24:23.000000000","message":"whitespace nit.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8c1ab304b1fa81fd65696e25a6bce38a9b44a3f2","unresolved":false,"context_lines":[{"line_number":374,"context_line":"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\""},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"* Method type: PUT"},{"line_number":377,"context_line":"* Normal http response code(s): 204 (No Content)"},{"line_number":378,"context_line":"* Expected error http response code(s): 401, 405, 409, 415"},{"line_number":379,"context_line":"    * 401: unauthorized"},{"line_number":380,"context_line":"    * 405: only PUT supported for this call"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_305f01e7","line":377,"updated":"2015-11-25 13:09:50.000000000","message":"202 according to Jay\u0027s comment in one of the previous sections","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":374,"context_line":"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\""},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"* Method type: PUT"},{"line_number":377,"context_line":"* Normal http response code(s): 204 (No Content)"},{"line_number":378,"context_line":"* Expected error http response code(s): 401, 405, 409, 415"},{"line_number":379,"context_line":"    * 401: unauthorized"},{"line_number":380,"context_line":"    * 405: only PUT supported for this call"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_eb1676f0","line":377,"in_reply_to":"9a8ffd7b_305f01e7","updated":"2015-12-01 12:36:09.000000000","message":"I agree.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8c1ab304b1fa81fd65696e25a6bce38a9b44a3f2","unresolved":false,"context_lines":[{"line_number":399,"context_line":"   image waiting for/undergoing import processing."},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"``error``"},{"line_number":402,"context_line":"   Why needed: Not sure this is actually needed."},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"Alternatives"},{"line_number":405,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_10e19dfe","line":402,"updated":"2015-11-25 13:09:50.000000000","message":"I don\u0027t think we need a new error status. What we need is a way to communicate the errors coming from the tasks.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"b33da43377fe04db3673dd838c42b241ce3b8870","unresolved":false,"context_lines":[{"line_number":399,"context_line":"   image waiting for/undergoing import processing."},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"``error``"},{"line_number":402,"context_line":"   Why needed: Not sure this is actually needed."},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"Alternatives"},{"line_number":405,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_99b4d1f2","line":402,"in_reply_to":"9a8ffd7b_10e19dfe","updated":"2015-11-25 14:58:25.000000000","message":"Agreed. (Ideally something that could be reused by existing failures, eg a \u0027message\u0027 property.)","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"33f13db94bf594c76ab1199458be018e459c52e4","unresolved":false,"context_lines":[{"line_number":399,"context_line":"   image waiting for/undergoing import processing."},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"``error``"},{"line_number":402,"context_line":"   Why needed: Not sure this is actually needed."},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"Alternatives"},{"line_number":405,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_2b79de2f","line":402,"in_reply_to":"9a8ffd7b_99b4d1f2","updated":"2015-12-01 12:36:09.000000000","message":"So then if an error happened, the image status would go to \u0027killed\u0027 and the \u0027message\u0027 element (which is usually null) would be populated with a string value?","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ffeb49294652bd722722dfd2fc4537a75d86447","unresolved":false,"context_lines":[{"line_number":444,"context_line":"bump should occur."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"Not exactly in scope for this spec, but ... we should also decide what to do"},{"line_number":447,"context_line":"about the \"tasks\" API, that is, should it be internal only? or admin only?"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"Security impact"},{"line_number":450,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_1d8ead78","line":447,"updated":"2015-11-25 02:46:00.000000000","message":"It should be removed entirely, IMHO.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8c1ab304b1fa81fd65696e25a6bce38a9b44a3f2","unresolved":false,"context_lines":[{"line_number":444,"context_line":"bump should occur."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"Not exactly in scope for this spec, but ... we should also decide what to do"},{"line_number":447,"context_line":"about the \"tasks\" API, that is, should it be internal only? or admin only?"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"Security impact"},{"line_number":450,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a8ffd7b_f05ad982","line":447,"in_reply_to":"9a8ffd7b_1d8ead78","updated":"2015-11-25 13:09:50.000000000","message":"I think it should be made available for admins only and a proper warning should be logged if it\u0027s enabled. We can\u0027t just go there and delete the endpoint.\n\nWe can decide in the future if we want to delete it or not based on the feedback.\n\nP.S: I\u0027d also like to remove it but we simply can\u0027t.","commit_id":"1ffa9671d5150b75e7e44b267a8c94e9c2c65376"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"d0c9a9f66fe0dc2041824e54962528049cbbf771","unresolved":false,"context_lines":[{"line_number":38,"context_line":"  various OpenStack clouds."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"* A particular cloud may not offer a public image of some excellent but obscure"},{"line_number":41,"context_line":"  operating system.  The EBOOS User Group could make a VM image available on"},{"line_number":42,"context_line":"  its website, and EBOOS enthusiasts could import it into the OpenStack cloud"},{"line_number":43,"context_line":"  of their choice."},{"line_number":44,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_0fee17b4","line":41,"updated":"2015-12-07 18:52:31.000000000","message":"Silly editorial nit: Can we put `(EBOOS)` after `excellent but obscure operating system`, or just capitalize that phrase. Took me longer than I care to admit to realize you were shortening that phrase.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6503d9f1485864fc747169ef4e8c27efb622b1ae","unresolved":false,"context_lines":[{"line_number":38,"context_line":"  various OpenStack clouds."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"* A particular cloud may not offer a public image of some excellent but obscure"},{"line_number":41,"context_line":"  operating system.  The EBOOS User Group could make a VM image available on"},{"line_number":42,"context_line":"  its website, and EBOOS enthusiasts could import it into the OpenStack cloud"},{"line_number":43,"context_line":"  of their choice."},{"line_number":44,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_4cd422eb","line":41,"in_reply_to":"7a740942_0fee17b4","updated":"2015-12-07 20:34:09.000000000","message":"Sorry about that, that was a dumb move on my part.  I will fix on the next revision.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"d0c9a9f66fe0dc2041824e54962528049cbbf771","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"Current Upload Workflow"},{"line_number":121,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"Here\u0027s a quick reminder of the current image upload workflow."},{"line_number":124,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_f21b7271","line":121,"updated":"2015-12-07 18:52:31.000000000","message":"Should this be a subsection of \"problem description\"?","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6503d9f1485864fc747169ef4e8c27efb622b1ae","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"Current Upload Workflow"},{"line_number":121,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"Here\u0027s a quick reminder of the current image upload workflow."},{"line_number":124,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_4c8c22da","line":121,"in_reply_to":"7a740942_f21b7271","updated":"2015-12-07 20:34:09.000000000","message":"Probably not, but I wasn\u0027t sure where else to put it.  (It would be a sidebar in this section if I knew how to create one in RST.)  I want it close to the proposed new workflow for purposes of comparison/contrast.   I\u0027ll see if I can come up with something better on the next patch set (which will hopefully be the last, so I\u0027ll try really hard!)","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7125cc2dba6770ae88728c08a10e9b82618a97ca","unresolved":false,"context_lines":[{"line_number":182,"context_line":"   The end user wants to know what import methods this site supports.  Although"},{"line_number":183,"context_line":"   this information will be returned in the value discovery call described"},{"line_number":184,"context_line":"   above, we also propose to return it in a response header from the call used"},{"line_number":185,"context_line":"   to create the image record."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"#. format discovery"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_b74c3f43","line":185,"updated":"2015-12-04 20:23:05.000000000","message":"Why both?","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"84062caedc39e0ebf6860451b27ba318a044044a","unresolved":false,"context_lines":[{"line_number":182,"context_line":"   The end user wants to know what import methods this site supports.  Although"},{"line_number":183,"context_line":"   this information will be returned in the value discovery call described"},{"line_number":184,"context_line":"   above, we also propose to return it in a response header from the call used"},{"line_number":185,"context_line":"   to create the image record."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"#. format discovery"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_3099c07c","line":185,"in_reply_to":"7a740942_27ff6fab","updated":"2015-12-08 13:28:14.000000000","message":"Also as we recycle the old endpoint for image create the extra returned headers will provide the client information if the old style synchronous workflow is used or if the cloud is utilizing the new async import process (no headers, upload to /v2/images/{ID}/file and you should be done, headers, follow the new path specified by those headers). This prevents one\u0027s need to do first version discovery, then value discovery and finally after that being able to do the create calls.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6503d9f1485864fc747169ef4e8c27efb622b1ae","unresolved":false,"context_lines":[{"line_number":182,"context_line":"   The end user wants to know what import methods this site supports.  Although"},{"line_number":183,"context_line":"   this information will be returned in the value discovery call described"},{"line_number":184,"context_line":"   above, we also propose to return it in a response header from the call used"},{"line_number":185,"context_line":"   to create the image record."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"#. format discovery"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_27ff6fab","line":185,"in_reply_to":"7a740942_32d1fa23","updated":"2015-12-07 20:34:09.000000000","message":"Flavio, thanks for the assist, but I actually *was* referring to the \"methods\" header.\n\nWhy both?\n\n- When the client makes the POST /v2/images call, it\u0027s useful for the methods to be included in the header since it\u0027s expected that not all sites will support all methods (though all sites will support a method), and that way the client can decide how to get the image data loaded into the cloud.  So my impression was that returning the methods in the header was key.\n\n- I\u0027m thinking of the \"value discovery\" call as being a more asynchronous kind of thing.  It doesn\u0027t tell you info that you couldn\u0027t get from reading the site\u0027s documentation, but nonetheless, I think it should be complete as possible, so I think the supported methods should show up in that call.\n\n- finally, I\u0027m pretty sure there\u0027s feedback on prior patch set that a client shouldn\u0027t be *required* to make the value discovery call as part of the import workflow, so having the methods in the header allows the client to do an import without making the value discovery call.\n\nAs far as including the URL in a response header, the an earlier patch set proposed configuration-by-convention similar to the way the current image upload URL is known, but my impression was that people preferred an explicit upload URL.\n\n(I\u0027m happy to be corrected on any or all of the above!)","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"d0c9a9f66fe0dc2041824e54962528049cbbf771","unresolved":false,"context_lines":[{"line_number":182,"context_line":"   The end user wants to know what import methods this site supports.  Although"},{"line_number":183,"context_line":"   this information will be returned in the value discovery call described"},{"line_number":184,"context_line":"   above, we also propose to return it in a response header from the call used"},{"line_number":185,"context_line":"   to create the image record."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"#. format discovery"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_32d1fa23","line":185,"in_reply_to":"7a740942_b74c3f43","updated":"2015-12-07 18:52:31.000000000","message":"+1 to Doug\u0027s question","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"23a80973b1f90cdb41382dfdf613fa432fd47b62","unresolved":false,"context_lines":[{"line_number":182,"context_line":"   The end user wants to know what import methods this site supports.  Although"},{"line_number":183,"context_line":"   this information will be returned in the value discovery call described"},{"line_number":184,"context_line":"   above, we also propose to return it in a response header from the call used"},{"line_number":185,"context_line":"   to create the image record."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"#. format discovery"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_0cee25b4","line":185,"in_reply_to":"7a740942_b74c3f43","updated":"2015-12-07 16:26:04.000000000","message":"I believe Brian is referring to the header that will contain the destination URL rather than just the method. Am I right?, Brian.\n\nI believe the upload url is useful to have in the image-create response\u0027s headers as that\u0027d make it easier for client libraries to follow-the-nose.\n\nTha said, we could also live without it.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"1dedd90359e06c74e35b5c122e41e0941f7a9b1c","unresolved":false,"context_lines":[{"line_number":202,"context_line":"``glance-direct``"},{"line_number":203,"context_line":"   The end-user does a PUT of image data directly to Glance using a URL"},{"line_number":204,"context_line":"   included in a response header to the image-create request.  (The URL will"},{"line_number":205,"context_line":"   also be known by convention, namely, ``v2/images/{image_id}/bikeshed``."},{"line_number":206,"context_line":"   After the data has been uploaded, the end-user follows with a call to Glance"},{"line_number":207,"context_line":"   to process the data and complete the import."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_ab66a127","line":205,"updated":"2015-12-08 13:46:22.000000000","message":"Can we start calling the `bikeshed` endpoint with a proper name? Perhaps \"stage\", or even just \"upload\" ?","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"de8c68af5f4b8a30094e3a462639b71490e61d09","unresolved":false,"context_lines":[{"line_number":204,"context_line":"   included in a response header to the image-create request.  (The URL will"},{"line_number":205,"context_line":"   also be known by convention, namely, ``v2/images/{image_id}/bikeshed``."},{"line_number":206,"context_line":"   After the data has been uploaded, the end-user follows with a call to Glance"},{"line_number":207,"context_line":"   to process the data and complete the import."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"``swift-local``"},{"line_number":210,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9a8ffd7b_89a083f5","line":207,"updated":"2015-12-03 13:32:53.000000000","message":"In terms of implementation, it feels like the Swift case may work well with the existing Glance code base.\n\nIt doesn\u0027t require a core change (additional blob) to the image model which would affect unrelated things eg, v1 delete.\n\nAdding the \u0027bikeshed\u0027 as part of an image will be quite invasive I think, requiring modifications to existing (well tested) code paths.\n\nDo people think we\u0027ll probably end up needing to have a bikeshed size/checksum if there is a separate API call to \u0027import\u0027 it. And possibly a way for users to see their existing bikesheds/whether an image has a bikeshed or not. And a way for bikesheds not to overshoot user\u0027s quota, so that user A can\u0027t use space which has been reserved for user B. And the bikeshed to co-exist (at least temporarily) with the image data. Etc\n\nIf we need bikesheds, would it be cleaner to separate them from images?\n\nWe could then have potentially have behaviour which is almost identical to the Swift case, eg:\n\nPOST /v2/bikesheds\nreturns 11-22-33-44 (bikeshed id)\n\nthen to import it, you\u0027d point to /v2/bikesheds/11-22-33-44 in a similar way as a swift object  (it\u0027s not part of the image in question).\n\nThe number of allowed bikesheds could be limited -- eg \u002710\u0027. Because they have known size they can be included in quota (or have their own quota). With a known checksum integrity can be checked. They can co-exist with the image data. They can be re-used: to retry or create another image.\n\nThe code to implement bikesheds (put, delete, list) could be kept separate from existing code -- limiting risk/potentially reducing spaghetti.\n\nThe possible states of images would be the same whether you\u0027re importing from swift or a bikeshed.\n\nIf the import from swift is what the operator supports the /v2/bikesheds resource can be turned off by policy.\n\nIt feels like this would be more code one day one, but may be cleaner/more modular/maintainable.\n\nInterested in others\u0027 opinions.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"0bb361661a0ee7db9b2de26a194b8c8a64e5cac0","unresolved":false,"context_lines":[{"line_number":204,"context_line":"   included in a response header to the image-create request.  (The URL will"},{"line_number":205,"context_line":"   also be known by convention, namely, ``v2/images/{image_id}/bikeshed``."},{"line_number":206,"context_line":"   After the data has been uploaded, the end-user follows with a call to Glance"},{"line_number":207,"context_line":"   to process the data and complete the import."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"``swift-local``"},{"line_number":210,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_a1492862","line":207,"in_reply_to":"7a740942_34ba8a0b","updated":"2015-12-07 12:13:37.000000000","message":"There are some parallels with Amazon\u0027s s3 \"Multipart Upload\" and what\nwe\u0027re trying to do.\n\n(Though the name is similar, this is an s3 specific thing, unrelated\nto HTTP multipart requests.)\n\nYou upload some bytes -- which are initially inaccessible. Those bytes\nare processed (concatenated) and a new, accessible S3 object is created.\n\nAlso, there are two ways to provide the bytes. You can upload \u0027new\u0027\nbytes to the multipart upload API, or you can reference existing s3\nobjects. This is similar to our case of uploading the bytes into Glance\nor referencing an existing swift object.\n\nAnother common factor is that in both cases the new functionality is\nbeing added to an already existing API.\n\nIt\u0027s worth having a look at their API (before reading further):\n\nhttp://docs.aws.amazon.com/AmazonS3/latest/dev/UsingRESTAPImpUpload.html\n\n ***\n\nI like a few aspects of the way they have done things.\n\nThey have not made any changes to any of their existing API calls.\ns3 objects continued to look the same after \"Multipart Upload\" was\nimplemented as before. The usual \u0027head\u0027 on an s3 object does not return\nany details of pending uploads.\n\nThere is a nice separation of concerns. When you delete an s3 object,\nno outstanding multi-part uploads are deleted.\n\n\nThe call to create a multipart upload is:\n\n POST /ObjectName?uploads HTTP/1.1\n\nThis (cleverly) seems to integrate it with the object, but it actually \ndoesn\u0027t: when you create a multipart upload the target s3 object doesn\u0027t\nexist yet. The upload and the object are very separate things.\n\nThe above call could be re-written as:\n\n POST /uploads?ObjectName\u003dxxx\n\nespecially considering the call to list pending uploads is:\n\n GET /?uploads HTTP/1.1\n\nNote that \u0027uploads\u0027 are not tasks. A \u0027task\u0027 is a process. An \u0027upload\u0027\nis a reference to bytes.\n\nWhile the object key is known to the uploadid, the uploadid is not known\nto the object (remember, the object doesn\u0027t need to exist.) This is very\ndifferent to the \u0027bikeshed\u0027 being fused with the image. There isn\u0027t even\na need to share the same database (or datastore).\n\nThe new API and the old API are so cleanly separated that the final\n\"Complete Multipart Upload\" (the interface between old and new behaviour) \ncould have been implemented by calling the original REST API to PUT\na new object -- leaving the old code\u0027s functions oblivious to any new\nbehaviour. (In reality they\u0027ll have called the original, unchanged, put object function.)\n\nThe way that the \"Complete Multipart Upload\" is synchronous is\ninteresting.  (\"Amazon S3 periodically sends whitespace characters to\nkeep the connection from timing out\".)\n\nMy best guess as to why this was done was in case there is a failure\nafter the object is created, but before the \u0027uploadid\u0027 is fully deleted.\nIn which case the user will need to clean up the uploadid themselves.\n\nIn terms of us supporting stores that require a user token for access\n(which can\u0027t be regenerated in the event a node crashes) I like that\nthis doesn\u0027t leave us with uncollectable garbage.\n\n(Though I\u0027m not sure about the need to make this a synchronous call in\nthe way they\u0027ve done.)","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"6061c4aa4b2c8425bba462bfb98b8b4ead7ce81a","unresolved":false,"context_lines":[{"line_number":204,"context_line":"   included in a response header to the image-create request.  (The URL will"},{"line_number":205,"context_line":"   also be known by convention, namely, ``v2/images/{image_id}/bikeshed``."},{"line_number":206,"context_line":"   After the data has been uploaded, the end-user follows with a call to Glance"},{"line_number":207,"context_line":"   to process the data and complete the import."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"``swift-local``"},{"line_number":210,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_5f58d156","line":207,"in_reply_to":"7a740942_44e7a740","updated":"2015-12-03 20:17:33.000000000","message":"I don\u0027t like this idea and here\u0027s why:\n\nAs it\u0027s being presented, it means we\u0027ll be pushing part of what\u0027s nowadays glance\u0027s responsibility to the user. That is, the user will now have to understand what a bikeshed is (can we come up with a name for this already?) and how to handle them, in addition to knowing the image import process. This to me feels a lot like what we have in tasks right now.\n\nFurthermore, I think the separate bikeshed endpoint will behave a lot like an HTTP server and I don\u0027t think that\u0027s something we want in Glance.\n\nIn my opinion, the staging area (direct upload destination) is strictly related to the image resource itself and it should be exposed/managed through the image resource rather than as a separate, bikeshed, resource.\n\nI do agree it\u0027ll help separating concerns but, ultimately, I don\u0027t think the added value of it is a good trade off for pushing this complexity to the user.\n\nOne of the main things we\u0027re trying to fix here is the image import process from a *user* perspective. Whether a user is an OP and/or a cloud user is not really relevant in this case as we\u0027re trying to fix the process for both. I do not think, and I can\u0027t stress this enough, that having a separate resource that users need to add to their \"to keep an eye on\" list of things, is the way to do that.\n\nFinally, I don\u0027t think this will make the implementation that much simpler. Sure, there may be (maybe not) fewer state changes/permutations that we\u0027ll have to keep an eye on but I don\u0027t think it\u0027ll help that much at the end.\n\nI\u0027ve said this before and I\u0027ll repeat it here. I think the bikeshed endpoint is very much like the file endpoint with the difference that we\u0027re not setting the image to active after the data is uploaded. IMHO, the process involving a direct-upload must feel like a direct upload and not like an external http server has been hacked into Glance.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"d3a504fd37cc233bb1833ff9f9ed2c691dea741f","unresolved":false,"context_lines":[{"line_number":204,"context_line":"   included in a response header to the image-create request.  (The URL will"},{"line_number":205,"context_line":"   also be known by convention, namely, ``v2/images/{image_id}/bikeshed``."},{"line_number":206,"context_line":"   After the data has been uploaded, the end-user follows with a call to Glance"},{"line_number":207,"context_line":"   to process the data and complete the import."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"``swift-local``"},{"line_number":210,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_34ba8a0b","line":207,"in_reply_to":"7a740942_5f58d156","updated":"2015-12-04 21:40:56.000000000","message":"\u003e the user will now have to understand what a bikeshed is and how to handle them\n\nAgreed. But that\u0027s true in both cases. They will need to be able to create them, list them, view their checksum, import them etc.\n\n\u003e I don\u0027t think this will make the implementation that much simpler\n\nIt might not reduce the number of lines of code needed -- I agree. But I do feel the result would\nbe simpler/more modular.\n\n\u003e Maybe someone can go into more detail about why this cache space is seen as such a complicating factor\n\nI\u0027ll give a go at describing some of the types of things I\u0027ve been thinking about.\n\nIn the bikeshed-in-image case I think it\u0027ll be tricky to figure out which parts of the code need to change and which\ndon\u0027t. We\u0027ll be changing things like: v1 delete, v2 delete, the scrubber, v1 upload (?), v2 upload, v2 show, v2 list, relevant exception handling logic. These are things that currently (mostly) work.\n\nWith a separate resource for import cache objects, code for the new operations could be isolated into separate\ndirectories with minimal touching of any existing files or existing database\ntables. The behaviour of the import cache object would be orthogonal to any image state. The integration point with the existing code would just be providing the bytes to the import call, which could probably use a common function as the import-from-swift case.\nSimpler.\n\nAny future functionality wouldn\u0027t have to deal with the extra complexity\nof ensuring each image\u0027s bikeshed^H^H^H^import cache -- is handled correctly\nin all cases.\n\n\u003e Furthermore, I think the separate bikeshed endpoint will behave a lot like an HTTP server and I don\u0027t think that\u0027s something we want in Glance.\n\nDo you mean things should be under /images? We could have /v2/images/[imported/exported] or whatever.\n\nI think it\u0027s a good thing that individual images would remain the same in v2/v1 and the image\u0027s representation wouldn\u0027t change based on how you chose to upload the bytes, whether its the old direct upload, copy-from, via swift or a staging area in Glance.\n\n\u003e How is that different from how the task-based import processing supported now stores data during the import?\n\nI\u0027d really have to look at the code to give a good answer...but it did it without having to change \"images\" -- and the ripples that causes.\n\nOverall, it does feel like we\u0027re (mostly) converging on the idea of stashing the bytes (in swift or glance) and sending a request to pull them in. Hopefully spending some time thinking about how the Glance stash behaves is worthwhile.\n\nThanks to everyone for their comments.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7125cc2dba6770ae88728c08a10e9b82618a97ca","unresolved":false,"context_lines":[{"line_number":204,"context_line":"   included in a response header to the image-create request.  (The URL will"},{"line_number":205,"context_line":"   also be known by convention, namely, ``v2/images/{image_id}/bikeshed``."},{"line_number":206,"context_line":"   After the data has been uploaded, the end-user follows with a call to Glance"},{"line_number":207,"context_line":"   to process the data and complete the import."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"``swift-local``"},{"line_number":210,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_974583b4","line":207,"in_reply_to":"7a740942_5f58d156","updated":"2015-12-04 20:23:05.000000000","message":"The import cache (née \"bikeshed\") space attached to an image record is an implementation detail caused by the fact that some deployer configurations will want to unpack the data and look at or modify it before allowing the image to become active for use. Don\u0027t make the user worry about that implementation detail by forcing them to manage a resource with a separate quota.\n\nThe *only* thing a user should be able to do with the import cache is put data into it. Every other thing that happens to the import cache should be handled automatically by glance. It can be completely deleted when an import is done, so we don\u0027t need to worry about old cache locations taking up lots of space. If we\u0027re worried about a DOS attack vector by filling up the storage space, then put a quota on the number of images in the state that accept uploaded data.\n\nMaybe someone can go into more detail about why this cache space is seen as such a complicating factor. In my mind I see it as a temporary space behind the existing PUT-based upload function and associated with an image that\u0027s not \"active\". How is that different from how the task-based import processing supported now stores data during the import?","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"23a80973b1f90cdb41382dfdf613fa432fd47b62","unresolved":false,"context_lines":[{"line_number":204,"context_line":"   included in a response header to the image-create request.  (The URL will"},{"line_number":205,"context_line":"   also be known by convention, namely, ``v2/images/{image_id}/bikeshed``."},{"line_number":206,"context_line":"   After the data has been uploaded, the end-user follows with a call to Glance"},{"line_number":207,"context_line":"   to process the data and complete the import."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"``swift-local``"},{"line_number":210,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_b47b9d8b","line":207,"in_reply_to":"7a740942_a1492862","updated":"2015-12-07 16:26:04.000000000","message":"\u003e Agreed. But that\u0027s true in both cases. They will need to be able to create them, list them, view their checksum, import them etc. \n\nRight but the user doesn\u0027t have to know that, it just happens naturally. Since this information would be exposed through the image (where it belongs, IMHO), the user will know where to find it and how to deal with it without having to worry about yet another resource in the API.\n\nTBH, while I understand where you\u0027re coming from with regards to the comparison with S3 and how they\u0027ve implemented it, I\u0027m not sure I understand where you want to get to with it. As I see it, Glance image upload process shouldn\u0027t be compared with S3 - I know you see the bikeshed endpoint as some sort of internal blob store.\n\nI do not think, as I mentioned in my previous comment, the user should worry about the existence of this staging area. Users using direct-upload should only know about the image specific API calls where the image data should be uploaded to. For those users willing to have more control on the uploaded data, etc, there will be other solutions - swift, i.e - to do that.\n\nI also know you\u0027ve some concerns about how the use of quota will affect v1 and how this will be exposed (or not) through v1 (which is still supported) but I don\u0027t believe the above is the right way to solve that.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"d0c9a9f66fe0dc2041824e54962528049cbbf771","unresolved":false,"context_lines":[{"line_number":204,"context_line":"   included in a response header to the image-create request.  (The URL will"},{"line_number":205,"context_line":"   also be known by convention, namely, ``v2/images/{image_id}/bikeshed``."},{"line_number":206,"context_line":"   After the data has been uploaded, the end-user follows with a call to Glance"},{"line_number":207,"context_line":"   to process the data and complete the import."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"``swift-local``"},{"line_number":210,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_9523f8a6","line":207,"in_reply_to":"7a740942_a1492862","updated":"2015-12-07 18:52:31.000000000","message":"I actually like the separation of concerns between uploads and images that I think is being proposed here.\n\nAlso putting more responsibility on Glance to do things behind the scenes makes perfect sense. Starting an image-import task with the upload ID simplifies all cases IMO because then we can ignore the backing store and let glance_store handle the upload to the chosen backend (swift, ceph, etc.)","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"7b9b339d85900034d46f01fa94aec096d333bccf","unresolved":false,"context_lines":[{"line_number":204,"context_line":"   included in a response header to the image-create request.  (The URL will"},{"line_number":205,"context_line":"   also be known by convention, namely, ``v2/images/{image_id}/bikeshed``."},{"line_number":206,"context_line":"   After the data has been uploaded, the end-user follows with a call to Glance"},{"line_number":207,"context_line":"   to process the data and complete the import."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"``swift-local``"},{"line_number":210,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_44e7a740","line":207,"in_reply_to":"7a740942_ce1098ab","updated":"2015-12-03 18:07:06.000000000","message":"Also, the import from Swift and import from Glance wouldn\u0027t be inter-dependent.\n\nWhen importing, both cases would just iterate over a source of bytes  and process them in an identical way. The Swift case wouldn\u0027t need to worry about the possibility of a pre-existing bikeshed in the image for example. (Neither case would.)\n\nA bug in the bikeshed code would be isolated to bikeshed functionality, and less likely to affect either Swift import or other previously existing functionality.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"28fe680204be6974dff7f71dc57aa53dcba688a1","unresolved":false,"context_lines":[{"line_number":204,"context_line":"   included in a response header to the image-create request.  (The URL will"},{"line_number":205,"context_line":"   also be known by convention, namely, ``v2/images/{image_id}/bikeshed``."},{"line_number":206,"context_line":"   After the data has been uploaded, the end-user follows with a call to Glance"},{"line_number":207,"context_line":"   to process the data and complete the import."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"``swift-local``"},{"line_number":210,"context_line":"   The end-user places the image data in the user\u0027s object store account.  Data"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_ce1098ab","line":207,"in_reply_to":"9a8ffd7b_89a083f5","updated":"2015-12-03 17:30:15.000000000","message":"Basically, we\u0027d potentially get better \"separation of concerns\" [1].\n\nBecause the bikeshed code would be separate, and the bikeshed state and the image state wouldn\u0027t be inter-dependent, we\u0027d have the ability [1] to:\n\n\"later improve or modify one section of code without having to know the details of other sections, and without having to make corresponding changes to those sections.\"\n\n[1] https://en.wikipedia.org/wiki/Separation_of_concerns","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"d0c9a9f66fe0dc2041824e54962528049cbbf771","unresolved":false,"context_lines":[{"line_number":259,"context_line":"* Method type: GET"},{"line_number":260,"context_line":"* Normal http response code(s): 200 (OK)"},{"line_number":261,"context_line":"* Expected error http response code(s): 400, 401, 405"},{"line_number":262,"context_line":"    * 400: request body passed"},{"line_number":263,"context_line":"    * 401: unauthorized"},{"line_number":264,"context_line":"    * 405: only GET supported for this call"},{"line_number":265,"context_line":"* URL for the resource: ``v2/values/import``"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_356b24b9","line":262,"updated":"2015-12-07 18:52:31.000000000","message":"Is this an API-WG recommendation? If not, we should make it one because it\u0027s a good design (400 on unexpected request bodies)","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6503d9f1485864fc747169ef4e8c27efb622b1ae","unresolved":false,"context_lines":[{"line_number":259,"context_line":"* Method type: GET"},{"line_number":260,"context_line":"* Normal http response code(s): 200 (OK)"},{"line_number":261,"context_line":"* Expected error http response code(s): 400, 401, 405"},{"line_number":262,"context_line":"    * 400: request body passed"},{"line_number":263,"context_line":"    * 401: unauthorized"},{"line_number":264,"context_line":"    * 405: only GET supported for this call"},{"line_number":265,"context_line":"* URL for the resource: ``v2/values/import``"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_62dd656e","line":262,"in_reply_to":"7a740942_356b24b9","updated":"2015-12-07 20:34:09.000000000","message":"Not sure it\u0027s an actual recommendation, but it came up in discussion on the ML this summer (and now that I think of it, you were involved in the discussion):\nhttp://lists.openstack.org/pipermail/openstack-dev/2015-July/070319.html\n\n+1 to suggesting that the API WG make this a recommendation","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"7ad70e67be13e51f5f0c2f9b7d409b697002c5b0","unresolved":false,"context_lines":[{"line_number":259,"context_line":"* Method type: GET"},{"line_number":260,"context_line":"* Normal http response code(s): 200 (OK)"},{"line_number":261,"context_line":"* Expected error http response code(s): 400, 401, 405"},{"line_number":262,"context_line":"    * 400: request body passed"},{"line_number":263,"context_line":"    * 401: unauthorized"},{"line_number":264,"context_line":"    * 405: only GET supported for this call"},{"line_number":265,"context_line":"* URL for the resource: ``v2/values/import``"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_ab2f813d","line":262,"in_reply_to":"7a740942_62dd656e","updated":"2015-12-08 13:39:31.000000000","message":"It is an API-WG recommendation. We just approved a patch in glance based on this recommendation.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"d0c9a9f66fe0dc2041824e54962528049cbbf771","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    * 401: unauthorized"},{"line_number":264,"context_line":"    * 405: only GET supported for this call"},{"line_number":265,"context_line":"* URL for the resource: ``v2/values/import``"},{"line_number":266,"context_line":"    * alternative: ``v2/capabilities``"},{"line_number":267,"context_line":"    * alternative: ``v2/capabilities/import``"},{"line_number":268,"context_line":"* Parameters which can be passed via the URL: none"},{"line_number":269,"context_line":"* JSON schema definition for the body data: not allowed"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_95a8d8dc","line":266,"updated":"2015-12-07 18:52:31.000000000","message":"I like capabilities better but that might just be me and I\u0027m not going to shave yaks over it.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6503d9f1485864fc747169ef4e8c27efb622b1ae","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    * 401: unauthorized"},{"line_number":264,"context_line":"    * 405: only GET supported for this call"},{"line_number":265,"context_line":"* URL for the resource: ``v2/values/import``"},{"line_number":266,"context_line":"    * alternative: ``v2/capabilities``"},{"line_number":267,"context_line":"    * alternative: ``v2/capabilities/import``"},{"line_number":268,"context_line":"* Parameters which can be passed via the URL: none"},{"line_number":269,"context_line":"* JSON schema definition for the body data: not allowed"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_c20779c8","line":266,"in_reply_to":"7a740942_95a8d8dc","updated":"2015-12-07 20:34:09.000000000","message":"The reason I\u0027m hedging about \u0027capabilities\u0027 is that I think it implies a particular kind of value, and not all these values fall into that category.  But maybe it\u0027s me who\u0027s shaving yaks here.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"d0c9a9f66fe0dc2041824e54962528049cbbf771","unresolved":false,"context_lines":[{"line_number":292,"context_line":"   Additionally, we may need to allow for some provider-specific properties in"},{"line_number":293,"context_line":"   the schema.  I think that\u0027s OK as long as they have sane defaults.  The"},{"line_number":294,"context_line":"   reason is that there may be image properties that are protected so that"},{"line_number":295,"context_line":"   users cannot modify them, but which need to be set properly on the image"},{"line_number":296,"context_line":"   (and may require the end user to tell Glance what their value should be)."},{"line_number":297,"context_line":"   An example is ``os_type``, which affects how the Xen hypervisor creates the"},{"line_number":298,"context_line":"   guest filesystem.  A cloud may protect this property because otherwise"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_75ae8c82","line":295,"updated":"2015-12-07 18:52:31.000000000","message":"\"need to be set properly on the image\" by the uploading user? I thought we mentioned above that Glance may have to set appropriate protected properties on an image as part of processing. Is this then still a problem?\n\nOr do we want to communicate (through this) that a particular property is restricted and cannot be set by a user because I\u0027m +1 on that idea.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7125cc2dba6770ae88728c08a10e9b82618a97ca","unresolved":false,"context_lines":[{"line_number":438,"context_line":"   encounters a problem when trying to boot that image, a question will arise"},{"line_number":439,"context_line":"   as to whether there\u0027s a problem with the image itself, or whether the upload"},{"line_number":440,"context_line":"   was corrupted.  Thus, the ``message`` could be populated with the checksum"},{"line_number":441,"context_line":"   of the original upload."},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"image-import"},{"line_number":444,"context_line":"************"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_d7730be6","line":441,"updated":"2015-12-04 20:23:05.000000000","message":"Is that case common enough to warrant saving the \"upload_checksum\" separately from the final checksum for all images?","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"1066fea8cfb45011c52976a3f8c52d8094cd8f4b","unresolved":false,"context_lines":[{"line_number":438,"context_line":"   encounters a problem when trying to boot that image, a question will arise"},{"line_number":439,"context_line":"   as to whether there\u0027s a problem with the image itself, or whether the upload"},{"line_number":440,"context_line":"   was corrupted.  Thus, the ``message`` could be populated with the checksum"},{"line_number":441,"context_line":"   of the original upload."},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"image-import"},{"line_number":444,"context_line":"************"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_c5c62e49","line":441,"in_reply_to":"7a740942_02f10195","updated":"2015-12-09 18:06:40.000000000","message":"Since the data persists across requests, Glance needs access to the checksum (at least internally).\n\nEg if the upload is to server one and the import request hits server two then server two needs access to the checksum to check for corruption. It probably needs the size also, eg to know if a large swift object (SLO/DLO) is needed, or to know in advance if the quota will be over-run.\n\nIt\u0027s a separate question as to whether we expose checksum and size to the user.\n\nThe current proposal doesn\u0027t expose either.\n\nIt feels a little unexpected (to me anyway) that you PUT something and don\u0027t get to see details of anything created as a result of your PUT. Instead, it\u0027s reflected indirectly in a change of image state. (That\u0027s my understanding from yesterday\u0027s IRC meeting). \n\nIs this problematic from a practical point of view? Maybe. I know billing is uncool, but operators sometimes bill Glance based on the amount of data in use.Here the data is intended to be ephemeral, but nothing enforces that. Should it be the operator\u0027s decision whether or not to charge for bikeshed data usage (importing via Swift will be charged for data usage)? If so, then the user needs to see the size. If a storage quota is in place, it seems more user friendly if you can see what\u0027s using up your quota. Should the API provide an admin with a clear picture of what is using up data in the storage backend?","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6503d9f1485864fc747169ef4e8c27efb622b1ae","unresolved":false,"context_lines":[{"line_number":438,"context_line":"   encounters a problem when trying to boot that image, a question will arise"},{"line_number":439,"context_line":"   as to whether there\u0027s a problem with the image itself, or whether the upload"},{"line_number":440,"context_line":"   was corrupted.  Thus, the ``message`` could be populated with the checksum"},{"line_number":441,"context_line":"   of the original upload."},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"image-import"},{"line_number":444,"context_line":"************"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_02f10195","line":441,"in_reply_to":"7a740942_530fe536","updated":"2015-12-07 20:34:09.000000000","message":"My hesitation about saving the upload_checksum is that while it\u0027s very useful to know, it\u0027s kind of ephemeral, so I\u0027m not sure we want to keep it on the image.  Although, on the other hand, we could put it on the image as an additional property (i.e., not a column in the images table), and then the end user could leave it or delete it as he or she wished.\n\nIan\u0027s suggestion solves the problem, but it depends on us exposing an upload resource (I haven\u0027t made up my mind about that yet).","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"d0c9a9f66fe0dc2041824e54962528049cbbf771","unresolved":false,"context_lines":[{"line_number":438,"context_line":"   encounters a problem when trying to boot that image, a question will arise"},{"line_number":439,"context_line":"   as to whether there\u0027s a problem with the image itself, or whether the upload"},{"line_number":440,"context_line":"   was corrupted.  Thus, the ``message`` could be populated with the checksum"},{"line_number":441,"context_line":"   of the original upload."},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"image-import"},{"line_number":444,"context_line":"************"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_530fe536","line":441,"in_reply_to":"7a740942_d7730be6","updated":"2015-12-07 18:52:31.000000000","message":"I would think so. People need a way to ensure the data they uploaded was received as it was intended to be uploaded. Alternatively, if uploads are a separate thing from images, we could have it store its own checksum that users can check.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"1066fea8cfb45011c52976a3f8c52d8094cd8f4b","unresolved":false,"context_lines":[{"line_number":448,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":449,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":452,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":453,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":454,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_b069e227","line":451,"updated":"2015-12-09 18:06:40.000000000","message":"Does the the PUT to /bikeshed change the image state?\n\nhttp://eavesdrop.openstack.org/irclogs/%23openstack-meeting-4/%23openstack-meeting-4.2015-12-08.log.html#t2015-12-08T14:27:45","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7125cc2dba6770ae88728c08a10e9b82618a97ca","unresolved":false,"context_lines":[{"line_number":601,"context_line":"Image import, as described herein, is an end user operation, not an admin"},{"line_number":602,"context_line":"operation.  It is, however, necessary that it be governed appropriately by"},{"line_number":603,"context_line":"Glance policies.  For example, a small public deployer with limited resources might"},{"line_number":604,"context_line":"want to restrict image import to specific users."},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"Additionally, as mentioned above, it should be possible for a deployer to \"turn"},{"line_number":607,"context_line":"off\" image import if a vulnerability is discovered."}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_325ffde6","line":604,"updated":"2015-12-04 20:23:05.000000000","message":"It\u0027s OK to make it possible to do this, but the default should be that a user can upload images for their own use.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6503d9f1485864fc747169ef4e8c27efb622b1ae","unresolved":false,"context_lines":[{"line_number":601,"context_line":"Image import, as described herein, is an end user operation, not an admin"},{"line_number":602,"context_line":"operation.  It is, however, necessary that it be governed appropriately by"},{"line_number":603,"context_line":"Glance policies.  For example, a small public deployer with limited resources might"},{"line_number":604,"context_line":"want to restrict image import to specific users."},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"Additionally, as mentioned above, it should be possible for a deployer to \"turn"},{"line_number":607,"context_line":"off\" image import if a vulnerability is discovered."}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_a20fcd86","line":604,"in_reply_to":"7a740942_325ffde6","updated":"2015-12-07 20:34:09.000000000","message":"Thanks for pointing that out, I will make it more clear on the next patch set.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7125cc2dba6770ae88728c08a10e9b82618a97ca","unresolved":false,"context_lines":[{"line_number":610,"context_line":"---------------------"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"We need to articulate clearly how the traditional Glance image immutability"},{"line_number":613,"context_line":"guarantee applies to image import."},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"The python-glanceclient will be modified to support image import.  (Will"},{"line_number":616,"context_line":"describe the interface after the basic design is worked out.)"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_d2e31904","line":613,"updated":"2015-12-04 20:23:05.000000000","message":"It seems reasonable to say that an image is only immutable after it goes into the active state. This leaves an explicit opening for deployer tools to be able to modify an image somehow. Assuming there is no format conversion, the user will be able to tell if it is modified by examining the checksum, as long as that is accurately updated after the deployer scripts run.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6503d9f1485864fc747169ef4e8c27efb622b1ae","unresolved":false,"context_lines":[{"line_number":610,"context_line":"---------------------"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"We need to articulate clearly how the traditional Glance image immutability"},{"line_number":613,"context_line":"guarantee applies to image import."},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"The python-glanceclient will be modified to support image import.  (Will"},{"line_number":616,"context_line":"describe the interface after the basic design is worked out.)"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_2273dd16","line":613,"in_reply_to":"7a740942_d2e31904","updated":"2015-12-07 20:34:09.000000000","message":"We\u0027re on the same page here.","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"2f2f4233e570a2def16d45662f5701890b11069e","unresolved":false,"context_lines":[{"line_number":661,"context_line":"Work Items"},{"line_number":662,"context_line":"----------"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"* API"},{"line_number":665,"context_line":"* (internal) task configuration"},{"line_number":666,"context_line":"* python-glanceclient support"},{"line_number":667,"context_line":"* tempest tests"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a740942_074b215a","line":664,"updated":"2015-12-08 15:21:23.000000000","message":"I\u0027m trying to break things down into tasks that we can start working on while we finalize some aspects of this spec. I\u0027ve come up with the following list and I\u0027ve created wishlist bugs for each one of them as a way to track the work there and allow ppl to start taking them on.\n\nHere\u0027s the list (please, provide feedback about it and if you have ideas for other work items, please do provide them):\n\n\n    * API Version Bump https://bugs.launchpad.net/glance/+bug/1523934\n    * Policy rules and new configuration options https://bugs.launchpad.net/glance/+bug/1523937\n        * Start working on the header changes https://bugs.launchpad.net/glance/+bug/1523941\n        * Work on the API schema changes (discoverability) https://bugs.launchpad.net/glance/+bug/1523944\n        * Import call (task triggering) https://bugs.launchpad.net/glance/+bug/1523955\n\nThe nested items depend on the policy change","commit_id":"bc6c6d12e9df5f8a360e9c29ba71e7a96b7111a0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d0fcb23db9aa7c60bd9358db050c3f14b262748","unresolved":false,"context_lines":[{"line_number":102,"context_line":"       Glance). What the spec is attempting to do is make the import process"},{"line_number":103,"context_line":"       more likely to meet more of the 12 criteria [OSR1]_ for being included"},{"line_number":104,"context_line":"       in DefCore Guidelines in the future, which is an excellent design"},{"line_number":105,"context_line":"       consideration for things we want to be interoperable."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Current Upload Workflow"},{"line_number":108,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1a7b0d38_6e864fbb","line":105,"updated":"2015-12-22 15:55:22.000000000","message":"Mark\u0027s comments are accurate, but it would be useful for the glance team to explicitly state that their goal is to create an API that could be used for DefCore\u0027s purposes, because we *want* them to include image import in the required features of OpenStack clouds for trademark use.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"ea5ca529269fca86d63ea62caa72300a68e1f39a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"       Glance). What the spec is attempting to do is make the import process"},{"line_number":103,"context_line":"       more likely to meet more of the 12 criteria [OSR1]_ for being included"},{"line_number":104,"context_line":"       in DefCore Guidelines in the future, which is an excellent design"},{"line_number":105,"context_line":"       consideration for things we want to be interoperable."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Current Upload Workflow"},{"line_number":108,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1a7b0d38_a598d26b","line":105,"in_reply_to":"1a7b0d38_6e864fbb","updated":"2015-12-22 16:37:09.000000000","message":"From chatting with Flavio, it sounds like Brian probably has another draft of this spec nearly ready. I\u0027ll offer to add a follow-up patch with some wording about my concerns on this note, and about deprecating the older image APIs, and we can review that separately to keep this original spec moving along.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"7c4496c5161367b811014d98c2a85fbda4bf5f96","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"We define two initial import methods.  These are:"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"   ``[ \"glance-direct\", \"swift-local\" ]``"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"``glance-direct``"},{"line_number":202,"context_line":"   The end-user does a PUT of image data directly to Glance using a URL"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_64e86711","line":199,"updated":"2015-12-15 19:51:17.000000000","message":"I am prefering \u0027direct\u0027 and \u0027indirect\u0027 here to describe the difference between these methods. That is coupled with my comments below about the indirect via swift option being discoverable. The use of \u0027local\u0027 here is a leaky concern that seems avoidable.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":18749,"name":"Deepak Mohan","email":"deepak.mohan@rackspace.com","username":"dpk"},"change_message_id":"9419bfe2290d4ba45a96785bf137c9f0a5ce41dc","unresolved":false,"context_lines":[{"line_number":246,"context_line":"   * what image formats are actually in use in the cloud"},{"line_number":247,"context_line":"   * what image formats are supported for import"},{"line_number":248,"context_line":"   * what image formats are supported for conversion"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"   It would be good to have such decoupling because:"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"   * the in-use formats depend on what kind of hypervisors you have and what"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_22afaf95","line":249,"updated":"2015-12-16 16:50:43.000000000","message":"This looks like a good idea. It will make future enhancements to enable format conversion and interoperability less disruptive.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"08f40a5820ac2f58c41cd6c20f9222ca457c29e9","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    * 401: unauthorized"},{"line_number":267,"context_line":"    * 405: only GET supported for this call"},{"line_number":268,"context_line":"* URL for the resource: ``v2/values/import``"},{"line_number":269,"context_line":"    * alternative: ``v2/capabilities``"},{"line_number":270,"context_line":"    * alternative: ``v2/capabilities/import`` (I think we want the"},{"line_number":271,"context_line":"      sub-resource, as it will keep the response simpler when export, image"},{"line_number":272,"context_line":"      conversion, and possibly other functions are added.)"}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a740942_127233ae","line":269,"updated":"2015-12-09 20:39:21.000000000","message":"So you don\u0027t like capabilities, and I can see that. I don\u0027t quite like values. What about \u0027functionality\u0027? Or some other synonym. I agree capabilities isn\u0027t ideal, but I don\u0027t think values is a very clear endpoint to anyone.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":18749,"name":"Deepak Mohan","email":"deepak.mohan@rackspace.com","username":"dpk"},"change_message_id":"9419bfe2290d4ba45a96785bf137c9f0a5ce41dc","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    * alternative: ``v2/capabilities``"},{"line_number":270,"context_line":"    * alternative: ``v2/capabilities/import`` (I think we want the"},{"line_number":271,"context_line":"      sub-resource, as it will keep the response simpler when export, image"},{"line_number":272,"context_line":"      conversion, and possibly other functions are added.)"},{"line_number":273,"context_line":"* Parameters which can be passed via the URL: none"},{"line_number":274,"context_line":"* JSON schema definition for the body data: not allowed"},{"line_number":275,"context_line":"* JSON schema definition for the response data: none"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_22100fa8","line":272,"updated":"2015-12-16 16:50:43.000000000","message":"How about ``v2/properties/import``","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":18749,"name":"Deepak Mohan","email":"deepak.mohan@rackspace.com","username":"dpk"},"change_message_id":"9419bfe2290d4ba45a96785bf137c9f0a5ce41dc","unresolved":false,"context_lines":[{"line_number":300,"context_line":"   there may be image properties that are protected so that users cannot modify"},{"line_number":301,"context_line":"   them, but which need to be set properly on the image *and* which require the"},{"line_number":302,"context_line":"   end user to tell Glance what their value is."},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"   An example is ``os_type``, which affects how the Xen hypervisor creates the"},{"line_number":305,"context_line":"   guest filesystem.  A cloud may protect this property because otherwise"},{"line_number":306,"context_line":"   changing its value from ``linux`` to ``windows`` will allow end users to run"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_b397738f","line":303,"updated":"2015-12-16 16:50:43.000000000","message":"Agree. This will allow support for a richer set of use cases.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d0fcb23db9aa7c60bd9358db050c3f14b262748","unresolved":false,"context_lines":[{"line_number":312,"context_line":"   properties are, so (A) we can\u0027t specify them by name in the schema, but (B)"},{"line_number":313,"context_line":"   we need to allow room in the schema for such properties, and (C) we need to"},{"line_number":314,"context_line":"   do this in such a way that interoperability isn\u0027t affected.  The schema"},{"line_number":315,"context_line":"   displayed above doesn\u0027t do that yet."},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"summary"},{"line_number":318,"context_line":"^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1a7b0d38_71c71046","line":315,"updated":"2015-12-22 15:55:22.000000000","message":"The whole point of this new API is to avoid deployment-specific API changes. Let\u0027s not create a back door for adding them back. If os_type needs to be provided, add it. If some backends ignore it, that\u0027s better than not knowing when it needs to be specified at all.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"f7ff7a662f52a97665f184d08020dd3346096aa9","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"   The value of the header will be the URL to which the image data could be"},{"line_number":363,"context_line":"   PUT by a subsequent call.  This header will be included only if the site"},{"line_number":364,"context_line":"   supports the ``glance-direct`` import method."},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"data-put"},{"line_number":367,"context_line":"********"}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a740942_ad4ad253","line":364,"updated":"2015-12-10 02:25:42.000000000","message":"I must have missed some of the conversation here.  What happened to the idea of providing a publicUrl for a Swift when the Swift import method is supported?","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":18749,"name":"Deepak Mohan","email":"deepak.mohan@rackspace.com","username":"dpk"},"change_message_id":"9419bfe2290d4ba45a96785bf137c9f0a5ce41dc","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"   The value of the header will be the URL to which the image data could be"},{"line_number":363,"context_line":"   PUT by a subsequent call.  This header will be included only if the site"},{"line_number":364,"context_line":"   supports the ``glance-direct`` import method."},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"data-put"},{"line_number":367,"context_line":"********"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_c301da07","line":364,"in_reply_to":"5a710552_6435c7d8","updated":"2015-12-16 16:50:43.000000000","message":"Tend to agree with the thinking that some URL is better than none, for a higher level of consistency.\n\nHow about something like \"https://swift.mycloud.net/v1/\u003ctenant_id\u003e\".","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"ab5a40f711fd68f76dafc90c7b70f92c9d4e040d","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"   The value of the header will be the URL to which the image data could be"},{"line_number":363,"context_line":"   PUT by a subsequent call.  This header will be included only if the site"},{"line_number":364,"context_line":"   supports the ``glance-direct`` import method."},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"data-put"},{"line_number":367,"context_line":"********"}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a740942_c64fdfbc","line":364,"in_reply_to":"7a740942_ad4ad253","updated":"2015-12-10 14:20:40.000000000","message":"I just left it out because I\u0027m not excited about the idea, but that could be because I\u0027m misunderstanding how it would work.  Here\u0027s what I\u0027m not clear on, maybe you can help me out:\n\nFor the glance-direct, you would get:\n\n  \"OpenStack-image-import-url: https://glance.mycloud.net/v2/images/{image_id}\"\n\nGlance can generate that URL with no problem, it\u0027s got all the necessary info, and the user can upload directly to that URL.\n\nFor swift-local, the response header would be something like:\n\n  \"OpenStack-image-import-url: https://swift.mycloud.net/\"\n\nThat URL isn\u0027t actionable without the user adding some stuff to it.\n\nI don\u0027t like the asymmetry of one URL being actionable and the other requiring massaging.  Of course, I seem to be perfectly OK with the asymmetry of one method having a URL response header, and the other not!  I\u0027m definitely willing to listen to other opinions.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"7c4496c5161367b811014d98c2a85fbda4bf5f96","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"   The value of the header will be the URL to which the image data could be"},{"line_number":363,"context_line":"   PUT by a subsequent call.  This header will be included only if the site"},{"line_number":364,"context_line":"   supports the ``glance-direct`` import method."},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"data-put"},{"line_number":367,"context_line":"********"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_6435c7d8","line":364,"in_reply_to":"7a740942_c64fdfbc","updated":"2015-12-15 19:51:17.000000000","message":"Yes, there is an asymmetry in both cases. I think some discoverable guidance is better than none however.\n\nPerhaps using an alternate header name for direct vs indirect methods can help account for this.\n\nAdditionally directing the user to a Swift URL in the preferred (local) region that allows further discovery to occur, or providing candidate container (\u0027glance_temp\u0027) and object (\u0027{image_id}\u0027) names would be acceptable in spite of the potential for conflicts there. \n\nAlternately, I know offering temp URLs was mentioned at the summit and it has been discarded since but I think offering an optional temp URL might still be a legitimate option to consider.\n\nJust omitting guidance in the response, expecting user to find the right answer on their own (likely resulting in support tickets, maybe trying to sleuth out providers docs in the process but maybe not) is not the sort of experience we should be designing as a best practice.\n\nEither way, this concern does not need to hold up design of the direct import, in terms of segmenting the work.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":18749,"name":"Deepak Mohan","email":"deepak.mohan@rackspace.com","username":"dpk"},"change_message_id":"9419bfe2290d4ba45a96785bf137c9f0a5ce41dc","unresolved":false,"context_lines":[{"line_number":367,"context_line":"********"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"``PUT v2/images/{image_id}/stage``"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"This call will follow the specification for the current ``PUT"},{"line_number":372,"context_line":"v2/images/{image_id}/file`` call, with the following changes:"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_23f1be01","line":370,"updated":"2015-12-16 16:50:43.000000000","message":"Is there a reason the URL for the PUT needs to have the /stage, as opposed to just the URL for the image - which is what is used in the existing implementation? (http://glance.example.com/v1/images/\u003cimage-id\u003e - as per the documentation at http://docs.openstack.org/developer/glance/glanceapi.html#reserve-a-new-image)\n\nWondering whether maintaining the existing URL would reduce the change/learning needed for existing customers who use the PUT.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d0fcb23db9aa7c60bd9358db050c3f14b262748","unresolved":false,"context_lines":[{"line_number":373,"context_line":""},{"line_number":374,"context_line":"#. The call to ``/file`` is accepted only when the disk and container format"},{"line_number":375,"context_line":"   fields have been set on an image.  That will not be required for the"},{"line_number":376,"context_line":"   call to ``/stage``."},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"#. The call will fail when the number of uploaded bytes exceeds the"},{"line_number":379,"context_line":"   max_upload_bytes value published in the value discovery call."}],"source_content_type":"text/x-rst","patch_set":8,"id":"1a7b0d38_d15fe473","line":376,"updated":"2015-12-22 15:55:22.000000000","message":"I don\u0027t think this is a bad idea, but I\u0027m not sure why it\u0027s different. Can you elaborate?","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a158c6ea04d2c1d66c6c6fa496161bce79ddd350","unresolved":false,"context_lines":[{"line_number":475,"context_line":"          should just put a property named"},{"line_number":476,"context_line":"          ``org.openstack.glance_import-message`` on the image, and the end"},{"line_number":477,"context_line":"          user could delete the property when it\u0027s no longer of interest."},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"image-import"},{"line_number":480,"context_line":"************"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a740942_997deeb3","line":478,"updated":"2015-12-09 19:03:17.000000000","message":"I missed this comment from Stuart on PS7 that came in while I was making this revision:\n\nSince the data persists across requests, Glance needs access to the checksum (at least internally).\n\nEg if the upload is to server one and the import request hits server two then server two needs access to the checksum to check for corruption. It probably needs the size also, eg to know if a large swift object (SLO/DLO) is needed, or to know in advance if the quota will be over-run.\n\nIt\u0027s a separate question as to whether we expose checksum and size to the user.\n\nThe current proposal doesn\u0027t expose either.\n\nIt feels a little unexpected (to me anyway) that you PUT something and don\u0027t get to see details of anything created as a result of your PUT. Instead, it\u0027s reflected indirectly in a change of image state. (That\u0027s my understanding from yesterday\u0027s IRC meeting).\n\nIs this problematic from a practical point of view? Maybe. I know billing is uncool, but operators sometimes bill Glance based on the amount of data in use.Here the data is intended to be ephemeral, but nothing enforces that. Should it be the operator\u0027s decision whether or not to charge for bikeshed data usage (importing via Swift will be charged for data usage)? If so, then the user needs to see the size. If a storage quota is in place, it seems more user friendly if you can see what\u0027s using up your quota. Should the API provide an admin with a clear picture of what is using up data in the storage backend?","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"7c4496c5161367b811014d98c2a85fbda4bf5f96","unresolved":false,"context_lines":[{"line_number":475,"context_line":"          should just put a property named"},{"line_number":476,"context_line":"          ``org.openstack.glance_import-message`` on the image, and the end"},{"line_number":477,"context_line":"          user could delete the property when it\u0027s no longer of interest."},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"image-import"},{"line_number":480,"context_line":"************"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_e7abf987","line":478,"in_reply_to":"7a740942_320eda3b","updated":"2015-12-15 19:51:17.000000000","message":"All fair points, Stuart.\n\nFixing quotas to behave correctly and expose to users everything they would need to be able to manage stage objects seems like a larger scope of work to be done. Doing that well would be it\u0027s own spec, in my mind. \n\nWhile I appreciate the model that S3 offers for the multi-part upload model and the simplicity that offers, that model depends on the existence of S3. If we could depend on the availability of Swift we wouldn\u0027t be here.\n\nMaybe some configurable limit on the number of images that can be in states which can have data in a stage object might make sense then as an initial design until a full solution is available exposing the stage object?\n\nPersonally, I don\u0027t see allowing admins access to info about operational concerns such as temp storage via API to be surprising or unusual.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9baba4505092b92324f1096f44aeae43d2abfcea","unresolved":false,"context_lines":[{"line_number":475,"context_line":"          should just put a property named"},{"line_number":476,"context_line":"          ``org.openstack.glance_import-message`` on the image, and the end"},{"line_number":477,"context_line":"          user could delete the property when it\u0027s no longer of interest."},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"image-import"},{"line_number":480,"context_line":"************"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a740942_320eda3b","line":478,"in_reply_to":"7a740942_68c70665","updated":"2015-12-11 16:12:13.000000000","message":"\u003e users can not reasonably be considered to be responsible for the data, and thus it should have no impact on their quota.\n\nWe\u0027ll need to restrict how much backend storage the user can consume through the staging area.\nOtherwise, a user could upload enough stuff to prevent other users from creating images.\n\n\u003e The Glance service owns and thus needs to take responsibility for data in the stage, under the model that has been presented here\n\nYes, we\u0027re agreeing that\u0027s a constraint of the proposed model. But it may be problematic. I see the decision as to whether persistent storage is provided for free or not as one which should be made by whoever is paying for the hardware. (In the s3 multi-part upload model users are billed for their uploaded but not yet active data.)\n\n\u003e The API might reasonably provide a means for an admin to get a summary of which images currently have data in a stage, but that seems like another feature to consider and depends on the implementation of the stage.\n\nIt would be surprising to give admins access to that info, but not users.\n\nIf we use a \u0027separation of concerns\u0027 model it\u0027s not a problem to expose size/checksum of staged data (without having to change the existing image makeup) and also to quota however we want.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"f7ff7a662f52a97665f184d08020dd3346096aa9","unresolved":false,"context_lines":[{"line_number":475,"context_line":"          should just put a property named"},{"line_number":476,"context_line":"          ``org.openstack.glance_import-message`` on the image, and the end"},{"line_number":477,"context_line":"          user could delete the property when it\u0027s no longer of interest."},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"image-import"},{"line_number":480,"context_line":"************"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a740942_68c70665","line":478,"in_reply_to":"7a740942_997deeb3","updated":"2015-12-10 02:25:42.000000000","message":"Because PUT is supposed to be complete and idempotent there is an established pattern for not seeing details of the resource repeated in the response. \nIf the stage is considered a subresource similar to tags or other properties which are often also made available as a sub-resource, then I don\u0027t see it as problematic.\n\nAs for billing:\nBecause data in a stage is neither usable nor removable directly by a user, users can not reasonably be considered to be responsible for the data, and thus it should have no impact on their quota. The Glance service owns and thus needs to take responsibility for data in the stage, under the model that has been presented here. The user can use and remove data staged in Swift for import, so they would naturally be responsible for that data.\n\nThe API might reasonably provide a means for an admin to get a summary of which images currently have data in a stage, but that seems like another feature to consider and depends on the implementation of the stage.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a158c6ea04d2c1d66c6c6fa496161bce79ddd350","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a740942_593546f5","line":487,"updated":"2015-12-09 19:03:17.000000000","message":"I missed this comment from Stuart on PS7 that came in while I was making this revision:\n\nDoes the the PUT to /bikeshed change the image state?\n\nhttp://eavesdrop.openstack.org/irclogs/%23openstack-meeting-4/%23openstack-meeting-4.2015-12-08.log.html#t2015-12-08T14:27:45","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f3b2cfd83680b661eeb771cb62a5dd933aa0761e","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a7e1126_1d3dedc3","line":487,"in_reply_to":"3a7e1126_02b03e89","updated":"2015-12-18 18:24:30.000000000","message":"\u003e You\u0027re trying to eliminate the need for a new state here. We could eliminate the need for \u0027queued\u0027 by probing to see if any bits have been uploaded to the store yet. We could eliminate the need for \u0027active\u0027 by seeing if the number of bytes uploaded match the image size. But really, if you need a state, you need a state.\n\nNo! I\u0027m trying to eliminate the need of a *new* state that does pretty much *the same thing* another state we *already have* does. That\u0027s different and that\u0027s what I\u0027d like to avoid because it\u0027d be confusing to users.\n\n\u003e My understanding is you\u0027re saying that PUTs to /stage are allowed when we are in a saving state. (To allow retrying the PUT of the bikeshed.)\n\nNo! I said that PUTs to /stage are allowed when the image is in `queue` or `saving`. However, if the image is in `saving` we should check if the call that put the image in that state was done to `/file` or `/stage`. We can check that using one of the mechanisms I mentioned in my previous comment.\n\n\u003e Now the second PUT -- let\u0027s say its just 1 GB -- comes in.\n\nI assume this PUT goes to `/stage`, right ? Are we discussing whether we should allow re-uploads to `/stage`? or are we still discussing whether we should have /stage as a separate endpoint?\n\nBecause, if we\u0027re now discussing multiple uploads for the same image on `/stage` then I don\u0027t think the answer to this question will help resolving the other point we where discussing. That is, whether we should have `/stage` as a separate resource or not.\n\n\u003e Do the two PUTs have unique locations so they can be differentiated (and both exist at the same time)? If so, how do you choose which \u0027wins\u0027? How does the user know which one \u0027won\u0027?\n\nIf by two PUTs you mean `/file` and `/stage` then yes, I believe those locations are different and those calls can\u0027t be concurrent. If you\u0027re referring to two PUTs to `/stage` then I think we need to discuss this further and I\u0027d be more than happy to leave that out of this spec and let it be a material for N. I don\u0027t want re-uploads to be a blocker of this work.\n\nIn other words, I think we could restrict PUTs to `/stage` only for images in `queued` status like we do with `/file` and then open that for images in `/saving` state when this work is done and when the story of DLMs will be clearer throughout OpenStack.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d0fcb23db9aa7c60bd9358db050c3f14b262748","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"1a7b0d38_743cde2f","line":487,"in_reply_to":"3a7e1126_1d3dedc3","updated":"2015-12-22 15:55:22.000000000","message":"I\u0027m not sure I follow all of this, but I think I agree with Stuart that we need some protection against using both /file and /stage on the same image and that a state flag of some sort is a relatively easy way to accomplish that. Once the user starts using an image with either /file or /stage, it should be marked so that *only* that workflow can be used. A subsequent call attempting to use the other workflow should fail immediately without storing extra data anywhere.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"9f5f2e2b9e3a832e6e33f1dd188d197a2d52fee8","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a7e1126_b1d19659","line":487,"in_reply_to":"3a7e1126_61f3799f","updated":"2015-12-17 23:07:33.000000000","message":"There are several ways we can avoid the above scenario:\n\n1) We don\u0027t allow `/file` \u0026 `/stage` to be enabled at the same time\n\n2) We store somewhere that the image data is being uploaded through `/file` or `stage` (this is by far my least favorite)\n\n3) We have a different status that behaves pretty much like `saving` but we use it for the `/stage` endpoint. I.e: `uploading`\n\n4) Whenever a call is done to `/stage` and the image is in `saving` we can check if the previous (or current) call was done to `file` by looking into the store if there\u0027s an image file being written. \n\n#4 is probably the easiest upgrade wise as we\u0027d be able to run both and still prevent both paths to be used for the same image. We\u0027d need to check just when `stage` is called as a call to `/file` on an image that is in `saving` status should fail. This option would prevent for both paths to be used for the same image and then have data leaked in the server.\n\n#1 is probably the easiest code wise as we know both paths won\u0027t ever conflict. Unfortunately, this pushes the burden to the operator and I\u0027d rather have this upgrade be as less painful as possible.\n\n#2 I don\u0027t like at all but I thought I would mention it anyway.\n\n#3 is fine but it requires a new status to be added. Since this status would behave just like `saving`, it shouldn\u0027t be hard to add. However, this adds a lot of work docs wise and users need to learn the difference between them, which is not great.\n\nSo, I still don\u0027t think \"separating concerns\" and pushing all this logic to the user and adding a new resource is what we should do here. I\u0027m not denying the pros of that strategy but I think it\u0027s not the best we can do from an OPs perspective, a user perspective and an upgrade perspective. I\u0027ve elaborated several times my thoughts on this.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9afcace35d344d82c9a45f05c88c2f332ba6892c","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a7e1126_02b03e89","line":487,"in_reply_to":"3a7e1126_b1d19659","updated":"2015-12-18 13:20:57.000000000","message":"I\u0027ll give some feedback on 4 as that seems to be your preferred option.\n\n\u003e 4) Whenever a call is done to `/stage` and the image is in `saving` we can check if the previous (or current) call was done to `file` by looking into the store if there\u0027s an image file being written.\n\nYou\u0027re trying to eliminate the need for a new state here. We could eliminate the need for \u0027queued\u0027 by probing to see if any bits have been uploaded to the store yet. We could eliminate the need for \u0027active\u0027 by seeing if the number of bytes uploaded match the image size. But really, if you need a state, you need a state.\n\n\u003e 4 is probably the easiest\n\nLet\u0027s consider only PUTs to /stage.\n\nImagine a 100 GB PUT to /stage.\n\nLet\u0027s say the backing store is Swift.\n\nThe 100GB put will create, say, 100 swift objects and a swift manifest.\n\nMy understanding is you\u0027re saying that PUTs to /stage are allowed when we are in a saving state. (To allow retrying the PUT of the bikeshed.)\n\nSo the first PUT is half way there, 50 swift objects have been created, the image is \u0027saving\u0027.\n\nNow the second PUT -- let\u0027s say its just 1 GB -- comes in.\n\nWhat happens?\n\nDoes the second PUT wait for the first PUT to complete, then delete all its bytes? (How would that be implemented? There is no guarantee we know the size of what\u0027s coming in.)\n\nDoes the second PUT complete successfully? (This will have corrupted the first PUT by writing over its data; the second PUT will then complete and corrupt the first by writing over its manifest).\n\nDo the two PUTs have unique locations so they can be differentiated (and both exist at the same time)? If so, how do you choose which \u0027wins\u0027? How does the user know which one \u0027won\u0027?\n\nIf the node crashes before the 100 GB has finished uploading, but the second PUT completes successfully, how do we track the ~50GB that has been uploaded? If the store requires a user token to delete data how can that 50 GB be deleted in the absence of a user request?","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f7e25a271557a430e68033654be82868b2dfff0d","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a7e1126_61f3799f","line":487,"in_reply_to":"3a7e1126_ce229c01","updated":"2015-12-17 15:24:23.000000000","message":"Note: in (2) I meant POST, not PUT. Every time we POST bytes we get a new fileId (or whatever). This doesn\u0027t impact, and is not impacted by, the current image state.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"186bfc82a9b6968d0d1e1a3d125f454565f8eaa6","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a7e1126_ce229c01","line":487,"in_reply_to":"5a710552_417a0b26","updated":"2015-12-17 15:15:53.000000000","message":"\u003e Calling PUT on the `/stage` endpoint when the image is `queued` or `saving` should result in the data being written in the staging area. The call to `/import` changes the status on the image and that prevents other uploads to happen.\n\nIf\n\n1) a user does an old-fashioned PUT to /file\n\n(the image transistions to \u0027saving\u0027)\n\n2) a second later (the image is still \u0027saving\u0027, the upload is still happening) the user does a PUT to /stage\n\n3) another second later (still saving) the user does another PUT to /stage\n\n\nWhat happens? What state does the image end up in? How is any unused data removed? How are failures (eg failure to transition an image state, dropped connections, node crash) handled? What happens if one of the bikesheds is still uploading after an image has transitioned to \u0027active\u0027?\n\n---\n\nIn the seperation of concerns model it\u0027s easy to understand what would happen:\n\n1) a user does an old-fashioned PUT to /file\n\n(the image transistions to \u0027saving\u0027)\n\n2) a second later (still \u0027saving\u0027) the user does a PUT to /bikeshed\n\nwhat happens?\n\nBoth calls succeed.\n\n3) another second later the user tries to import the bikeshed\n\nwhat happens?\n\nThe existing image code handles this. The image is saving, so the import gets a conflict. No new code is needed for this to be handled.\n\nUpon success the image transitions to \u0027active\u0027. The bikeshed is now of no use. They can see it and delete it.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":18749,"name":"Deepak Mohan","email":"deepak.mohan@rackspace.com","username":"dpk"},"change_message_id":"9419bfe2290d4ba45a96785bf137c9f0a5ce41dc","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_46ae5899","line":487,"in_reply_to":"5a710552_417a0b26","updated":"2015-12-16 16:50:43.000000000","message":"Based on this - can both the methods follow the same scheme of state transitions?\n\nFor both methods: queued -\u003e saving -\u003e active","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"ab5a40f711fd68f76dafc90c7b70f92c9d4e040d","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a740942_a1edddb8","line":487,"in_reply_to":"7a740942_1c39ec41","updated":"2015-12-10 14:20:40.000000000","message":"Here\u0027s another (possibly bad) idea.  Maybe instead of messing with the \"normal\" image state machine, we should introduce a \"task_state\" field, and some of the import-related states could go in there?\n\nFor example, for glance-direct:\n\n1. image is created with state \u0027queued\u0027.\n2. user does PUT v2/images/{image_id}/stage\n3. image is in status \u003d queued, task_state \u003d staged\n4. user does POST v2/images/{image_id}/import\n5. image is in status \u003d importing, task_state \u003d pending\n6. image is in status \u003d importing, task_state \u003d processing\n7. image is in status \u003d active, task_state \u003d null\n\nFor swift-local:\n1. image is created with state \u0027queued\u0027.\n2. user does POST v2/images/{image_id}/import\n3. image is in status \u003d importing, task_state \u003d pending\n4. image is in status \u003d importing, task_state \u003d data_transfer\n5. image is in status \u003d importing, task_state \u003d processing\n6. image is in status \u003d active, task_state \u003d null\n\nOr we could dispense with the \u0027importing\u0027 state completely, just keep the image in \u0027queued\u0027, and make the task_state names import_staged, import_pending, etc.\n\nThoughts?","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"9af294a349a2e8c3e46ac4afa5e7efe5424e26c9","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_417a0b26","line":487,"in_reply_to":"7a740942_5567d0e8","updated":"2015-12-15 15:13:02.000000000","message":"\u003e The current synchronous upload to PUT /file results in a transition from \u0027queued\u0027 to \u0027active\u0027 (or \u0027killed\u0027)\n\nNot really, the PUT on `/file` results in a `saving` state until the upload is complete, which then results into either `active` or `queued`. We already have a status that indicates an image data is being uploaded (saving) and we could use that to indicate some \"data\" has been put on the `/stage` endpoint already.\n\nCalling PUT on the `/stage` endpoint when the image is `queued` or `saving` should result in the data being written in the staging area. The call to `/import` changes the status on the image and that prevents other uploads to happen.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d25a66c0401dbd5b6e487162154bf6cc0eb10a20","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a740942_1c39ec41","line":487,"in_reply_to":"7a740942_593546f5","updated":"2015-12-09 19:19:59.000000000","message":"It\u0027s going to have to do something to the image, since all communication to the user is going to be via the image object, but you\u0027re right that the status doesn\u0027t change the way the spec is currently written.\n\nI\u0027m really not sure what to do about this.\n\nThe semantics of \u0027queued\u0027 are \u0027ready to accept data\u0027.  The current synchronous upload to PUT /file results in a transition from \u0027queued\u0027 to \u0027active\u0027 (or \u0027killed\u0027).  The checksum of what you PUT is reflected as the image \u0027checksum\u0027 field, and the size of what you PUT is the image \u0027size\u0027 field.\n\nWe could introduce \u0027staged\u0027 to indicate that the image is \u0027ready for import\u0027.  I guess in this case, the \u0027checksum\u0027 and \u0027size\u0027 fields could be populated with the values of the staged data?  The image isn\u0027t regarded as immutable until it goes \u0027active\u0027, so I guess it would be OK to re-use those fields.\n\nA weirdness is that for the \u0027swift-local\u0027 import workflow, the state transitions will be different.\n\nglance-direct: queued -\u003e staged -\u003e importing -\u003e active (or killed)\n\nswift-local: queued -\u003e importing -\u003e active (or killed)\n\nNot sure what I think about that.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9baba4505092b92324f1096f44aeae43d2abfcea","unresolved":false,"context_lines":[{"line_number":484,"context_line":"The request body must conform to the JSON schema retrievable from the format"},{"line_number":485,"context_line":"discovery call, otherwise the call will fail.  There is no response body."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a740942_5567d0e8","line":487,"in_reply_to":"7a740942_a1edddb8","updated":"2015-12-11 16:12:13.000000000","message":"\u003e Thoughts?\n\nHonestly?\n\nAs far as I can tell all our (technical) problems go away if we use a \u0027separation of concerns\u0027 model.\n\nWe don\u0027t need to worry about anything like this.\n\nWe stream bytes into queued images like we\u0027ve always done.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":18749,"name":"Deepak Mohan","email":"deepak.mohan@rackspace.com","username":"dpk"},"change_message_id":"9419bfe2290d4ba45a96785bf137c9f0a5ce41dc","unresolved":false,"context_lines":[{"line_number":487,"context_line":"The status of ``{image_id}`` must be ``queued`` or the call will"},{"line_number":488,"context_line":"fail with a 409 (Conflict).  If Image ``{image_id}`` does not exist or is not"},{"line_number":489,"context_line":"owned by the caller, a 404 will be returned."},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"summary"},{"line_number":492,"context_line":"^^^^^^^"},{"line_number":493,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_c6a8087a","line":490,"updated":"2015-12-16 16:50:43.000000000","message":"From the discussion above, it sounds like the state of the image can be queued or saving, before it can be imported - does that sound right?","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":18749,"name":"Deepak Mohan","email":"deepak.mohan@rackspace.com","username":"dpk"},"change_message_id":"9419bfe2290d4ba45a96785bf137c9f0a5ce41dc","unresolved":false,"context_lines":[{"line_number":504,"context_line":"* Parameters which can be passed via the URL: none"},{"line_number":505,"context_line":"* JSON schema definition for the body data: ``v2/schemas/import``"},{"line_number":506,"context_line":"* JSON schema definition for the response data: no response"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"example (``glance-direct`` method)"},{"line_number":509,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":510,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a710552_86f52058","line":507,"updated":"2015-12-16 16:50:43.000000000","message":"Seems like a clean way to abstract away the actual method and location of the image.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d0fcb23db9aa7c60bd9358db050c3f14b262748","unresolved":false,"context_lines":[{"line_number":543,"context_line":"* Out of scope: Equivalence of disk/container format(s) used in a particular"},{"line_number":544,"context_line":"  cloud and the disk/container format(s) supported for image import.  (In other"},{"line_number":545,"context_line":"  words, no requirement that a site must allow import of all formats in use at"},{"line_number":546,"context_line":"  that site.)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"* Out of scope: Image export (though obviously we want a solution that lends"},{"line_number":549,"context_line":"  itself easily to export as well as import)"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1a7b0d38_54020240","line":546,"updated":"2015-12-22 15:55:22.000000000","message":"I missed the discussion of this. It would be useful to have a summary of the justification inline, because I don\u0027t necessarily think this is a good idea long term.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0d0fcb23db9aa7c60bd9358db050c3f14b262748","unresolved":false,"context_lines":[{"line_number":628,"context_line":""},{"line_number":629,"context_line":"#. The import operation has been accepted"},{"line_number":630,"context_line":"#. Processing has begun"},{"line_number":631,"context_line":"#. Processing has been completed (success/failure)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"Policy impact"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1a7b0d38_943aaae6","line":631,"updated":"2015-12-22 15:55:22.000000000","message":"If we can report the percent complete, that would be useful. A couple of folks are working on ways to make notifications visible in horizon, and import progress would be good to show.","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"47419eb20434e936c17def2051d307c2be0a74df","unresolved":false,"context_lines":[{"line_number":697,"context_line":"  All current glance cores."},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"Work Items"},{"line_number":700,"context_line":"----------"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"* API version bump: https://bugs.launchpad.net/glance/+bug/1523934"},{"line_number":703,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a7e1126_9d331d14","line":700,"updated":"2015-12-18 18:51:02.000000000","message":"Here\u0027s another work item: https://bugs.launchpad.net/glance/+bug/1527716","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"1fccd4b4a35675d585890830c45c6f9e8beafe13","unresolved":false,"context_lines":[{"line_number":697,"context_line":"  All current glance cores."},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"Work Items"},{"line_number":700,"context_line":"----------"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"* API version bump: https://bugs.launchpad.net/glance/+bug/1523934"},{"line_number":703,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"1a7b0d38_4877be02","line":700,"in_reply_to":"3a7e1126_9d331d14","updated":"2015-12-22 19:11:37.000000000","message":"And another one: https://bugs.launchpad.net/glance/+bug/1528637","commit_id":"8610a62b03087332063014625f5a29e7c82ce5a6"}],"specs/mitaka/approved/image-import/image-import-refactor.rst":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"85fe898e5535e40ed5dcdec9b84fa698a9c55a9b","unresolved":false,"context_lines":[{"line_number":386,"context_line":"The user indicates that the data has been staged by issuing the image-import"},{"line_number":387,"context_line":"call (see below).  Thus multiple data-put calls are allowed.  This could allow"},{"line_number":388,"context_line":"two users in the same tenant to issue competing data-put calls, but for this"},{"line_number":389,"context_line":"implementation we will consider it the responsibility of the tenant to ensure"},{"line_number":390,"context_line":"that users cooperate appropriately."},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"If the subsequent processing on the image concludes that the image should be"},{"line_number":393,"context_line":"rejected, the image data will be deleted and the image will go to ``killed``"}],"source_content_type":"text/x-rst","patch_set":11,"id":"da6ed579_1a5e4e12","line":390,"range":{"start_line":389,"start_character":35,"end_line":390,"end_character":35},"updated":"2016-01-14 10:54:44.000000000","message":"How will they do this?\n\nBy email? Or by implementing a pseudo state in Glance metadata?\n\nDon\u0027t we need (yet another) new state here:\n\n queued-\u003euploading-\u003e*uploaded*-\u003eimporting-\u003eactive\n\nwithout \u0027uploaded\u0027:\n\n1. Users need to communicate the equivalent of an \u0027uploaded\u0027 state (eg via email or Glance metadata). Communicating image state is Glance\u0027s job.\n\n2. Users need to enforce the the equivalent of an \u0027uploaded\u0027 state. They can only do this in an \u0027advisory\u0027 way. Real enforcement of image state (not allowing users to shoot themselves in the foot) is Glance\u0027s job.\n\nNote: This isn\u0027t restricted to multi-user cases. Some single user things could also need to cooperate. Eg cron jobs running on different machines.","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2adfb6b59c5f1c8349e070b44a168a687f488c94","unresolved":false,"context_lines":[{"line_number":386,"context_line":"The user indicates that the data has been staged by issuing the image-import"},{"line_number":387,"context_line":"call (see below).  Thus multiple data-put calls are allowed.  This could allow"},{"line_number":388,"context_line":"two users in the same tenant to issue competing data-put calls, but for this"},{"line_number":389,"context_line":"implementation we will consider it the responsibility of the tenant to ensure"},{"line_number":390,"context_line":"that users cooperate appropriately."},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"If the subsequent processing on the image concludes that the image should be"},{"line_number":393,"context_line":"rejected, the image data will be deleted and the image will go to ``killed``"}],"source_content_type":"text/x-rst","patch_set":11,"id":"da6ed579_7788b7c5","line":390,"range":{"start_line":389,"start_character":35,"end_line":390,"end_character":35},"in_reply_to":"da6ed579_1a5e4e12","updated":"2016-01-14 14:07:26.000000000","message":"Glance can\u0027t know when \u0027uploaded\u0027 has occurred.  Scenario: in same tenant, user A creates image 1, user B uploads data for image 22 by mistake.  User B learns of his error and then does a PUT to /stage of the data for image 1.  Then either user A or B calls /import to notify Glance to begin the import.\n\nAlso, as Flavio pointed out on a previous patch set, we want to be forward-looking for multipart upload.\n\nBut yeah, users A and B could use various means of communication, including a custom pseudo-state in the Glance image metadata to customize their workflow.","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"2b3dad50759de7bb818f7108e46372127b4e1e5f","unresolved":false,"context_lines":[{"line_number":386,"context_line":"The user indicates that the data has been staged by issuing the image-import"},{"line_number":387,"context_line":"call (see below).  Thus multiple data-put calls are allowed.  This could allow"},{"line_number":388,"context_line":"two users in the same tenant to issue competing data-put calls, but for this"},{"line_number":389,"context_line":"implementation we will consider it the responsibility of the tenant to ensure"},{"line_number":390,"context_line":"that users cooperate appropriately."},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"If the subsequent processing on the image concludes that the image should be"},{"line_number":393,"context_line":"rejected, the image data will be deleted and the image will go to ``killed``"}],"source_content_type":"text/x-rst","patch_set":11,"id":"da6ed579_c85c5e7f","line":390,"range":{"start_line":389,"start_character":35,"end_line":390,"end_character":35},"in_reply_to":"da6ed579_7788b7c5","updated":"2016-01-14 14:49:27.000000000","message":"\u003e Glance can\u0027t know when \u0027uploaded\u0027 has occurred.\n\nGlance can know -- it\u0027s when the upload request has completed successfully.\n\nI\u0027m not sure why we\u0027d want to support the scenario you describe. Today if you upload the wrong data you just delete the image and start again.\n\n\u003e user B uploads data for image 22 by mistake.  User B learns of his error and then does a PUT to /stage of the data for image 1. \n\nI\u0027m not sure I follow. Would there be two PUTs to /stage for the same image? One when the image was \u0027queued\u0027 and one where the image was \u0027uploading\u0027?","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"28e231dc4a64f15d3ba616b3c05e7d196c061758","unresolved":false,"context_lines":[{"line_number":386,"context_line":"The user indicates that the data has been staged by issuing the image-import"},{"line_number":387,"context_line":"call (see below).  Thus multiple data-put calls are allowed.  This could allow"},{"line_number":388,"context_line":"two users in the same tenant to issue competing data-put calls, but for this"},{"line_number":389,"context_line":"implementation we will consider it the responsibility of the tenant to ensure"},{"line_number":390,"context_line":"that users cooperate appropriately."},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"If the subsequent processing on the image concludes that the image should be"},{"line_number":393,"context_line":"rejected, the image data will be deleted and the image will go to ``killed``"}],"source_content_type":"text/x-rst","patch_set":11,"id":"da6ed579_eb6b1cef","line":390,"range":{"start_line":389,"start_character":35,"end_line":390,"end_character":35},"in_reply_to":"da6ed579_c85c5e7f","updated":"2016-01-15 14:57:46.000000000","message":"@Brian,\n\nBased on our chat yesterday I made some notes on states etc.\n\nIt\u0027s a (slightly rushed) brain dump, but the kind of thing we should try to do to ensure things can work in principle ahead of writing lots of code:\n\n http://paste.openstack.org/show/484014/","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"d337a19cfe9c5637f88c18ddfed26966da36ff25","unresolved":false,"context_lines":[{"line_number":450,"context_line":"   Why needed: This status conveys to the user that an import call has been"},{"line_number":451,"context_line":"   made but that the image is not yet ready for use.  Data-put calls are not"},{"line_number":452,"context_line":"   accepted when an image is in this state."},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"A new property will be added to the Image object:"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"``message``"}],"source_content_type":"text/x-rst","patch_set":11,"id":"fa69d971_c4300ba1","line":453,"range":{"start_line":453,"start_character":0,"end_line":453,"end_character":0},"updated":"2016-01-04 14:55:50.000000000","message":"I\u0027d assumed the states would look more like:\n\n queued -\u003e importing -\u003e imported -\u003e saving -\u003e active\n\nwhen an image is \u0027importing\u0027 (the bytes are being streamed to /stage) you cannot a) upload to /file b) upload to /stage or c) run the \u0027import\u0027 API on it.\n\nWhen an image is \u0027imported\u0027 you can then run the import API on it. While the bytes are moving from the stage to the final target we\u0027d re-use \u0027saving\u0027. \n\nWhat do the state transitions using \u0027uploading\u0027 and \u0027importing\u0027 look like?\n\n queued -\u003e uploading -\u003e importing -\u003e active?\n\nWhen \u0027uploading\u0027 finishes, how is that communicated to the caller? Just the API return code? Or is there a state change that a subsequent call (or caller) can use?\n\nIs it the case that size and checksum are not visible until the image becomes active?","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"9eeefe09168e8b5700f032cd78468c987d7e604d","unresolved":false,"context_lines":[{"line_number":450,"context_line":"   Why needed: This status conveys to the user that an import call has been"},{"line_number":451,"context_line":"   made but that the image is not yet ready for use.  Data-put calls are not"},{"line_number":452,"context_line":"   accepted when an image is in this state."},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"A new property will be added to the Image object:"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"``message``"}],"source_content_type":"text/x-rst","patch_set":11,"id":"fa69d971_d4a2cbfc","line":453,"range":{"start_line":453,"start_character":0,"end_line":453,"end_character":0},"in_reply_to":"fa69d971_1afafe75","updated":"2016-01-05 14:03:18.000000000","message":"We should probably address this explicitly.  In the general import case, there\u0027s no guarantee that the image-item stored in glance will be the same exact bits as those PUT to /stage (for example, the PUT may be a single VHD file, and the image-item may be a gzipped OVF package).  So as you pointed out on an earlier PS, glance will need to keep the checksum of the \"thing\" PUT to /stage for checking if the \"thing\" needs to be moved around as part of the input processing.  This checksum could be exposed to the user in the Image \"message\" element.  (See [OSE4] for an example.)\n\nThe checksum of what\u0027s actually stored as the image-item would be exposed in the usual location in the Image.","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"9eeefe09168e8b5700f032cd78468c987d7e604d","unresolved":false,"context_lines":[{"line_number":450,"context_line":"   Why needed: This status conveys to the user that an import call has been"},{"line_number":451,"context_line":"   made but that the image is not yet ready for use.  Data-put calls are not"},{"line_number":452,"context_line":"   accepted when an image is in this state."},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"A new property will be added to the Image object:"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"``message``"}],"source_content_type":"text/x-rst","patch_set":11,"id":"fa69d971_d4c3abeb","line":453,"range":{"start_line":453,"start_character":0,"end_line":453,"end_character":0},"in_reply_to":"fa69d971_c4300ba1","updated":"2016-01-05 14:03:18.000000000","message":"The completion of \u0027uploading\u0027 is up to the user.  When the user is satisfied that the bits are all \"up there\", the user then does a POST /import.  If multiple users in the same tenant are uncoordinated and a second user makes a POST /import before the first user has completed the PUT /stage, then either the image will be unusable or will fail validation.\n\nAt first glance (ha!), I don\u0027t like the idea of re-using \u0027saving\u0027 for the final stage when the validated/processed bits are being written to the storage backend.  But I don\u0027t have a good reason other than that it confuses the two image-data-input flows.\n\nThe checksum and size would not be visible until the Image becomes active.","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"2b07dad4797215ef4df046a6902d61b174f84fac","unresolved":false,"context_lines":[{"line_number":450,"context_line":"   Why needed: This status conveys to the user that an import call has been"},{"line_number":451,"context_line":"   made but that the image is not yet ready for use.  Data-put calls are not"},{"line_number":452,"context_line":"   accepted when an image is in this state."},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"A new property will be added to the Image object:"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"``message``"}],"source_content_type":"text/x-rst","patch_set":11,"id":"fa69d971_1afafe75","line":453,"range":{"start_line":453,"start_character":0,"end_line":453,"end_character":0},"in_reply_to":"fa69d971_c4300ba1","updated":"2016-01-04 15:37:36.000000000","message":"When the data is being transferred from /stage to /file will a checksum verification be done?","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"5765d1dd3e58f7003522d09e6a54eef45111a35c","unresolved":false,"context_lines":[{"line_number":451,"context_line":"   made but that the image is not yet ready for use.  Data-put calls are not"},{"line_number":452,"context_line":"   accepted when an image is in this state."},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"A new property will be added to the Image object:"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"``message``"},{"line_number":457,"context_line":"   Why needed: If an error occurs during the import process, the image will go"}],"source_content_type":"text/x-rst","patch_set":11,"id":"fa69d971_92a30b00","line":454,"range":{"start_line":454,"start_character":0,"end_line":454,"end_character":49},"updated":"2016-01-05 11:35:40.000000000","message":"I\u0027m assuming -- in the import from Glance case -- the states go from:\n queued -\u003e uploading -\u003e importing -\u003e active\n\nIf I do a PUT to /stage and the image changes to \u0027uploading\u0027 what happens if I then make an import call before the  PUT to /stage completes? Does the import call detect that the upload is still in progress? (If so, how?) Or does the import call create a new active image with only partial (corrupted) data?\n\nIf the import stage fails (eg writing to the backend raises an error) what state does the image go to? (I don\u0027t think it can go to \u0027killed\u0027 like a regular upload, since that would not indicate that there is still staged data available.) \n\nIn the import from swift case what are the state transitions?\n\n queued -\u003e saving -\u003e active\n\nor\n\n queued -\u003e importing -\u003e active","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"1eba02249860c39d4011fcfe99acade37152fe3c","unresolved":false,"context_lines":[{"line_number":451,"context_line":"   made but that the image is not yet ready for use.  Data-put calls are not"},{"line_number":452,"context_line":"   accepted when an image is in this state."},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"A new property will be added to the Image object:"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"``message``"},{"line_number":457,"context_line":"   Why needed: If an error occurs during the import process, the image will go"}],"source_content_type":"text/x-rst","patch_set":11,"id":"fa69d971_7f15f73d","line":454,"range":{"start_line":454,"start_character":0,"end_line":454,"end_character":49},"in_reply_to":"fa69d971_59713343","updated":"2016-01-05 15:01:54.000000000","message":"\u003e multiple POST /import issue: See line 473 -- first POST will put the image into \u0027importing\u0027 status, the rest will 409.\n\nOk, yes.\n\nFrom memory, the reasons for stashing the quarantined bits in the backing store (rather than local disk) was to allow retry and to decouple reading the bits and processing the bits (so that potentially processing wasn\u0027t restricted to api nodes).\n\nI\u0027m concerned that after the bits are read in and a request goes to the processing node it has to \u0027hope\u0027 that all the image bits have completed uploading (all it knows is the image is in an \u0027uploading\u0027 state, which is ambiguous). There\u0027s no checksum validation either, right?\n\nIf we\u0027re relying on validation to detect that the image is corrupt -- how does that work out-of-the-box, eg for RAW images?\n\nWouldn\u0027t something that prevented corruption without relying on introspection of the image be better? (This is how things work currently.)\n\n\u003e user re-upload: hopefully most failures will be due to bad data\n\nWell maybe, but wouldn\u0027t an alternative which didn\u0027t require quite as much hoping (or re-upload of the data) be better?","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"9eeefe09168e8b5700f032cd78468c987d7e604d","unresolved":false,"context_lines":[{"line_number":451,"context_line":"   made but that the image is not yet ready for use.  Data-put calls are not"},{"line_number":452,"context_line":"   accepted when an image is in this state."},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"A new property will be added to the Image object:"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"``message``"},{"line_number":457,"context_line":"   Why needed: If an error occurs during the import process, the image will go"}],"source_content_type":"text/x-rst","patch_set":11,"id":"fa69d971_d6597036","line":454,"range":{"start_line":454,"start_character":0,"end_line":454,"end_character":49},"in_reply_to":"fa69d971_92a30b00","updated":"2016-01-05 14:03:18.000000000","message":"If you POST /import, glance will process what\u0027s there; you could wind up with a corrupted image, though hopefully this would be detected during validation and cause an import error.\n\nIf the import fails, the image would go to \u0027killed\u0027 and the data in the bikeshed would be deleted -- there would not be any staged data available.","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9504cda80adaa2fb638fc99daf65153ba9a23540","unresolved":false,"context_lines":[{"line_number":451,"context_line":"   made but that the image is not yet ready for use.  Data-put calls are not"},{"line_number":452,"context_line":"   accepted when an image is in this state."},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"A new property will be added to the Image object:"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"``message``"},{"line_number":457,"context_line":"   Why needed: If an error occurs during the import process, the image will go"}],"source_content_type":"text/x-rst","patch_set":11,"id":"fa69d971_d6a17047","line":454,"range":{"start_line":454,"start_character":0,"end_line":454,"end_character":49},"in_reply_to":"fa69d971_d6597036","updated":"2016-01-05 14:22:48.000000000","message":"\u003e If you POST /import, glance will process what\u0027s there; you could wind up with a corrupted image, though hopefully this would be detected during validation and cause an import error.\n\nWhat stops a second POST to /import just after validation has been done, but just before the image has been marked active? If that second post failed half way I think that would result in a corrupt \u0027active\u0027 image.\n\nHow would validation of a RAW image be peformed? Would it be done with the default glance installation, or would it require an operator specific script?\n\nWhat stops a user sending 1,000,000 POSTS to /import the same image? This would be cheap for a user to do (a lot of small requests), but would cause a lot of data to flood the glance nodes. (Unlike a lot of downloads say, where the user has to provide commensurate bandwidth, or a lot of vm boots which can be controlled by nova quorum.)\n\n\u003e If the import fails, the image would go to \u0027killed\u0027 and the data in the bikeshed would be deleted\n\nThis means the user needs to re-upload the data. This seems a real pity considering we\u0027ve tried to provide a non-ephemeral place to stash the \u0027quarantined\u0027 bits.","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c1b4ed8e47f7d7250641c5c33f2c92979a801521","unresolved":false,"context_lines":[{"line_number":451,"context_line":"   made but that the image is not yet ready for use.  Data-put calls are not"},{"line_number":452,"context_line":"   accepted when an image is in this state."},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"A new property will be added to the Image object:"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"``message``"},{"line_number":457,"context_line":"   Why needed: If an error occurs during the import process, the image will go"}],"source_content_type":"text/x-rst","patch_set":11,"id":"fa69d971_59713343","line":454,"range":{"start_line":454,"start_character":0,"end_line":454,"end_character":49},"in_reply_to":"fa69d971_d6a17047","updated":"2016-01-05 14:35:13.000000000","message":"multiple POST /import issue: See line 473 -- first POST will put the image into \u0027importing\u0027 status, the rest will 409.\n\nuser re-upload: hopefully most failures will be due to bad data, not bad processing, so keeping the data around to re-process will be pointless (and if bad processing is happening, we can fix that on our end).  It also slows down attacking the glance nodes with multiple requests to process the same (intentionally bad) data.","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"85fe898e5535e40ed5dcdec9b84fa698a9c55a9b","unresolved":false,"context_lines":[{"line_number":584,"context_line":"  arbitrary number of bytes (can be mitigated by a max size restriction),"},{"line_number":585,"context_line":"  uploading an allowable number of bytes over an extremely slow connection (can"},{"line_number":586,"context_line":"  be mitigated by a Glance-side timeout), concurrent imports (can be mitigated"},{"line_number":587,"context_line":"  by user quota, user limit, task queuing, or some combination)."},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"(The remainder of the questions in this section will be addressed as the"},{"line_number":590,"context_line":"discussion advances.)"}],"source_content_type":"text/x-rst","patch_set":11,"id":"da6ed579_7a42ea69","line":587,"range":{"start_line":587,"start_character":9,"end_line":587,"end_character":15},"updated":"2016-01-14 10:54:44.000000000","message":"We\u0027ve had previous security bugs around users being able to bypass quota (eg https://security.openstack.org/ossa/OSSA-2015-003.html).\n\nWhere have we provided details on how we will prevent a user consuming all the backend storage with images in an \u0027uploading\u0027 state?","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2adfb6b59c5f1c8349e070b44a168a687f488c94","unresolved":false,"context_lines":[{"line_number":584,"context_line":"  arbitrary number of bytes (can be mitigated by a max size restriction),"},{"line_number":585,"context_line":"  uploading an allowable number of bytes over an extremely slow connection (can"},{"line_number":586,"context_line":"  be mitigated by a Glance-side timeout), concurrent imports (can be mitigated"},{"line_number":587,"context_line":"  by user quota, user limit, task queuing, or some combination)."},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"(The remainder of the questions in this section will be addressed as the"},{"line_number":590,"context_line":"discussion advances.)"}],"source_content_type":"text/x-rst","patch_set":11,"id":"da6ed579_5727b3c9","line":587,"range":{"start_line":587,"start_character":9,"end_line":587,"end_character":15},"in_reply_to":"da6ed579_7a42ea69","updated":"2016-01-14 14:07:26.000000000","message":"I don\u0027t think we\u0027ve got details anywhere, we can discuss and amend the spec.  You might want to look at https://etherpad.openstack.org/p/image-import-refactor-TODO and add comments.  We definitely need to be careful about how we enforce end-user limits.","commit_id":"70b83a56790c1fc54f7404c27e6265f8888cf57e"}],"specs/mitaka/approved/import-schema.json":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                \"swift-location\": {"},{"line_number":77,"context_line":"                    \"type\": \"string\","},{"line_number":78,"context_line":"                    \"maxLength\": 255,"},{"line_number":79,"context_line":"                    \"description\": \"Name of the Swift object to be imported in container/name format.\""},{"line_number":80,"context_line":"                }"},{"line_number":81,"context_line":"            },"},{"line_number":82,"context_line":"            \"required\": ["}],"source_content_type":"application/json","patch_set":5,"id":"da85f559_96ba40bf","line":79,"updated":"2015-11-10 17:08:06.000000000","message":"Can you give an example of container/name format?\n(We need something that can be parsed unambiguously.)","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                \"swift-location\": {"},{"line_number":77,"context_line":"                    \"type\": \"string\","},{"line_number":78,"context_line":"                    \"maxLength\": 255,"},{"line_number":79,"context_line":"                    \"description\": \"Name of the Swift object to be imported in container/name format.\""},{"line_number":80,"context_line":"                }"},{"line_number":81,"context_line":"            },"},{"line_number":82,"context_line":"            \"required\": ["}],"source_content_type":"application/json","patch_set":5,"id":"da85f559_e3a88822","line":79,"in_reply_to":"da85f559_96ba40bf","updated":"2015-11-11 05:43:28.000000000","message":"I was thinking of the pseudo-hierarchical object names described in http://docs.openstack.org/developer/swift/api/object_api_v1_overview.html .  Do you think it would be more clear to have the container name and object name specified separately?","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"}],"specs/mitaka/approved/value-discovery-response.json":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"        \"type\": \"integer\","},{"line_number":10,"context_line":"        \"value\": 26843545600"},{"line_number":11,"context_line":"    },"},{"line_number":12,"context_line":"    \"max_upload_time\": {"},{"line_number":13,"context_line":"        \"description\": \"You only have this much time to complete your data upload.  Expressed in seconds.  (Does not apply to the \u0027swift-local\u0027 import method.)\","},{"line_number":14,"context_line":"        \"type\": \"integer\","},{"line_number":15,"context_line":"        \"value\": 600"}],"source_content_type":"application/json","patch_set":5,"id":"da85f559_10cbaba6","line":12,"updated":"2015-11-10 17:08:06.000000000","message":"I don\u0027t think we need this in a first pass? (I\u0027m not even sure how we\u0027d implement it).","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":9,"context_line":"        \"type\": \"integer\","},{"line_number":10,"context_line":"        \"value\": 26843545600"},{"line_number":11,"context_line":"    },"},{"line_number":12,"context_line":"    \"max_upload_time\": {"},{"line_number":13,"context_line":"        \"description\": \"You only have this much time to complete your data upload.  Expressed in seconds.  (Does not apply to the \u0027swift-local\u0027 import method.)\","},{"line_number":14,"context_line":"        \"type\": \"integer\","},{"line_number":15,"context_line":"        \"value\": 600"}],"source_content_type":"application/json","patch_set":5,"id":"da85f559_c30c64ef","line":12,"in_reply_to":"da85f559_10cbaba6","updated":"2015-11-11 05:43:28.000000000","message":"Let\u0027s see what people think.  I\u0027m worried about Glance having all of its connections consumed by very slow uploads of large images.  Since that\u0027s not a problem for the swift-local method that we\u0027re also proposing to implement, however, I\u0027d agree that this isn\u0027t absolutely necessary for the first pass.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"975e89f98c634c7c180dbd6cc255240694af58e0","unresolved":false,"context_lines":[{"line_number":9,"context_line":"        \"type\": \"integer\","},{"line_number":10,"context_line":"        \"value\": 26843545600"},{"line_number":11,"context_line":"    },"},{"line_number":12,"context_line":"    \"max_upload_time\": {"},{"line_number":13,"context_line":"        \"description\": \"You only have this much time to complete your data upload.  Expressed in seconds.  (Does not apply to the \u0027swift-local\u0027 import method.)\","},{"line_number":14,"context_line":"        \"type\": \"integer\","},{"line_number":15,"context_line":"        \"value\": 600"}],"source_content_type":"application/json","patch_set":5,"id":"da85f559_b224ac5f","line":12,"in_reply_to":"da85f559_9118ca1f","updated":"2015-11-12 16:09:18.000000000","message":"This was Doug\u0027s idea, let\u0027s see if he has any comments.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"5deec6a1108db4289dd634ca9fee1faf793c665d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"        \"type\": \"integer\","},{"line_number":10,"context_line":"        \"value\": 26843545600"},{"line_number":11,"context_line":"    },"},{"line_number":12,"context_line":"    \"max_upload_time\": {"},{"line_number":13,"context_line":"        \"description\": \"You only have this much time to complete your data upload.  Expressed in seconds.  (Does not apply to the \u0027swift-local\u0027 import method.)\","},{"line_number":14,"context_line":"        \"type\": \"integer\","},{"line_number":15,"context_line":"        \"value\": 600"}],"source_content_type":"application/json","patch_set":5,"id":"da85f559_9118ca1f","line":12,"in_reply_to":"da85f559_c30c64ef","updated":"2015-11-11 18:06:27.000000000","message":"\u003cbikeshed\u003e\n\nAn import bytes max time may not be enough if other requests can be used to fill the connections: https://en.wikipedia.org/wiki/Slowloris_(software)\n\n\u003c/bikeshed\u003e","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"636d5076faca4cbbaf90f6cccad7feadded7d03b","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"type\": \"string\","},{"line_number":50,"context_line":"        \"value\": \"v2/schemas/import\""},{"line_number":51,"context_line":"    }"},{"line_number":52,"context_line":"}"}],"source_content_type":"application/json","patch_set":5,"id":"da85f559_27a6bc10","line":52,"updated":"2015-11-10 17:08:06.000000000","message":"Do we need to have both \u0027global\u0027 and disk format specific parameters?\n\nmax_upload_bytes and max_virtual_bytes would probably be the same for all formats, but some things may be format specific, and\nsome container_format/disk_format combinations may not be supported:\n\n\n input_formats: qcow, raw, vhd (global)\n max_upload_bytes: 1024 (global)\n max_virtual_bytes: 1048576 (global)\n input_format_details:\n   qcow2: (qcow2 specific)\n     output_formats: qcow2, raw\n     default_output_format: qcow2\n     backing_store: false\n     encryption: false\n     compression: false\n     container_format: bare\n   vhd: (vhd specific)\n     output_formats: qcow2, raw, vhd\n     default_output_format: vhd\n     backing_store: false\n     dynamic: true\n     fixed: true\n     differencing: false\n     container_format: bare\n   raw: (raw specific)\n     output_formats: qcow2, raw\n     default_output_format: qcow2\n     container_format: bare, ova\n   ami: (ami specific)\n     container_format: ami, bare\n   ovf: (ovf specific)\n     container_format: ova","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8c64cf8deb187a9c33ff28757699879763dfffdc","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"type\": \"string\","},{"line_number":50,"context_line":"        \"value\": \"v2/schemas/import\""},{"line_number":51,"context_line":"    }"},{"line_number":52,"context_line":"}"}],"source_content_type":"application/json","patch_set":5,"id":"da85f559_4354f451","line":52,"in_reply_to":"da85f559_27a6bc10","updated":"2015-11-11 05:43:28.000000000","message":"The alternative would be to have these constraints conveyed via documentation at each site.","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d8ec4b59596ec293a2af66a9eea058c6761519","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"type\": \"string\","},{"line_number":50,"context_line":"        \"value\": \"v2/schemas/import\""},{"line_number":51,"context_line":"    }"},{"line_number":52,"context_line":"}"}],"source_content_type":"application/json","patch_set":5,"id":"9a8ffd7b_ca3cf931","line":52,"in_reply_to":"da85f559_4354f451","updated":"2015-11-24 17:02:35.000000000","message":"We\u0027ll have to address this issue (i.e., how to convey format-specific values) eventually.\n\nAt this point, the format of this response was discussed at the API WG meeting on last week, and it looks like we\u0027re OK with proceeding with this kind of response for the value-discovery call.\n\nhttp://eavesdrop.openstack.org/meetings/api_wg/2015/api_wg.2015-11-19-16.00.log.html","commit_id":"111c3a79075d3f9dab17dd0d6ccd2200beac79a1"}]}
