)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"0accc299c84942ac371253c51fb03ca8de7fe0e8","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is an attempt to collate the various alternatives which were proposed"},{"line_number":10,"context_line":"in the comments on the spec, and list their advantages and disadvantages."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ie4e9961e38ff61a1fcf1910aa5bdac1f380b33ec"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a68dd71_c816e2a6","line":11,"updated":"2016-01-22 02:33:48.000000000","message":"Could you add MitakaPriority before the Change-Id?","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"}],"specs/mitaka/approved/image-import/image-import-refactor.rst":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e4fc99a5a2f99eceeef4ecefd33ff1e0f2ac22a2","unresolved":false,"context_lines":[{"line_number":510,"context_line":"Alternatives"},{"line_number":511,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"When Swift is not available, an alternative \u0027native\u0027 method of"},{"line_number":514,"context_line":"supplying the bytes to Glance is required. Here we consider some"},{"line_number":515,"context_line":"alternatives for \u0027native\u0027 upload."},{"line_number":516,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_1315869a","line":513,"updated":"2016-01-25 23:44:49.000000000","message":"This should be already mentioned somewhere in the problem description of this spec. If not, we should probably move it there.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"239e3b5e71370660ac228312f3a5921fa602633c","unresolved":false,"context_lines":[{"line_number":510,"context_line":"Alternatives"},{"line_number":511,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"When Swift is not available, an alternative \u0027native\u0027 method of"},{"line_number":514,"context_line":"supplying the bytes to Glance is required. Here we consider some"},{"line_number":515,"context_line":"alternatives for \u0027native\u0027 upload."},{"line_number":516,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7af24918_72736016","line":513,"in_reply_to":"7a5de9d1_fa10a3aa","updated":"2016-03-04 19:30:01.000000000","message":"https://review.openstack.org/#/c/278086/ adds a summary section to the original spec where this is stated explicitly","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"fcfee3ef6780106131672d2178ef1b0492d85def","unresolved":false,"context_lines":[{"line_number":510,"context_line":"Alternatives"},{"line_number":511,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"When Swift is not available, an alternative \u0027native\u0027 method of"},{"line_number":514,"context_line":"supplying the bytes to Glance is required. Here we consider some"},{"line_number":515,"context_line":"alternatives for \u0027native\u0027 upload."},{"line_number":516,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_fa10a3aa","line":513,"in_reply_to":"9a68dd71_05b3d70b","updated":"2016-01-27 15:58:46.000000000","message":"+1 to stating it more explicitly.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"9ca9df2b8917f8160adfc63e9c39412a901d4320","unresolved":false,"context_lines":[{"line_number":510,"context_line":"Alternatives"},{"line_number":511,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"When Swift is not available, an alternative \u0027native\u0027 method of"},{"line_number":514,"context_line":"supplying the bytes to Glance is required. Here we consider some"},{"line_number":515,"context_line":"alternatives for \u0027native\u0027 upload."},{"line_number":516,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_05b3d70b","line":513,"in_reply_to":"9a68dd71_1315869a","updated":"2016-01-26 15:00:09.000000000","message":"It\u0027s sort of implied at lines 91-97 that the reason we want to have a non-swift import method available is that Glance is part of the \"OpenStack Powered\" designation and Swift is not.  I thought it was stated more explicitly.  I agree it would be worth stating this up top.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e4fc99a5a2f99eceeef4ecefd33ff1e0f2ac22a2","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"Disadvantages:"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"* Rules out long lived validation/processing."},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"Change existing native v2 upload to be asynchronous"},{"line_number":533,"context_line":"---------------------------------------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_7371620b","line":530,"updated":"2016-01-25 23:44:49.000000000","message":"You can reference the problem description here. It\u0027s more than  just validation/processing.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"239e3b5e71370660ac228312f3a5921fa602633c","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"Disadvantages:"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"* Rules out long lived validation/processing."},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"Change existing native v2 upload to be asynchronous"},{"line_number":533,"context_line":"---------------------------------------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7af24918_4d404536","line":530,"in_reply_to":"7a5de9d1_00174152","updated":"2016-03-04 19:30:01.000000000","message":"I completely agree, Stuart.  OpenStack already has a object store solution that handles large numbers of multiple simultaneous connections of various speed and reliability.  We don\u0027t want to reinvent it.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e10996328e1d81fd76f30a19164cd3e03e646afb","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"Disadvantages:"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"* Rules out long lived validation/processing."},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"Change existing native v2 upload to be asynchronous"},{"line_number":533,"context_line":"---------------------------------------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_00174152","line":530,"in_reply_to":"7a5de9d1_7a7ef3af","updated":"2016-01-27 21:02:47.000000000","message":"\u003e preventing new instances from being launched\n\nTypically you\u0027ll have public facing glance-api nodes and internally facing glance-api nodes. If the public facings ones are DoS\u0027d the internal ones should continue to work and allow new instances to be launched. (Note that alternative DoS strategies to bulk file upload exist and require less bandwidth.)\n\nFWIW I think having Swift handle the uploads is advantageous more from an \u0027operational efficiency\u0027 stand point. Glance operators have less potential problems (dropped uploads, deploying more nodes) to worry about and don\u0027t have to reinvent the wheel in terms of users getting bulk data into their cloud.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"fcfee3ef6780106131672d2178ef1b0492d85def","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"Disadvantages:"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"* Rules out long lived validation/processing."},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"Change existing native v2 upload to be asynchronous"},{"line_number":533,"context_line":"---------------------------------------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_7a7ef3af","line":530,"in_reply_to":"9a68dd71_7371620b","updated":"2016-01-27 15:58:46.000000000","message":"Right, it is also the ability to perform a DoS attack on the image service effectively preventing new instances from being launched and also preventing new images from being created (either by the user or by services)","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e4fc99a5a2f99eceeef4ecefd33ff1e0f2ac22a2","unresolved":false,"context_lines":[{"line_number":539,"context_line":"Disadvantages:"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"* Changes existing API behaviour. Not considered backwards compatible."},{"line_number":542,"context_line":"* Users/libraries must change to expect non-synchronous behaviour."},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"Asynchronous upload call"},{"line_number":545,"context_line":"------------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_b6aee82b","line":542,"updated":"2016-01-25 23:44:49.000000000","message":"+ the discoverability/interoperability changes we have now will still be valid","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e4fc99a5a2f99eceeef4ecefd33ff1e0f2ac22a2","unresolved":false,"context_lines":[{"line_number":546,"context_line":""},{"line_number":547,"context_line":"This would be a tweak to the existing v2 upload call, to make it asynchronous --"},{"line_number":548,"context_line":"but in a backwards compatible way. Backwards compatibility could be achieved by"},{"line_number":549,"context_line":"either using a different resource path, adding a header, or using a query parameter."},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"Advantages:"},{"line_number":552,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_a138e4d3","line":549,"range":{"start_line":549,"start_character":25,"end_line":549,"end_character":38},"updated":"2016-01-25 23:44:49.000000000","message":"Ignoring the discoverability call (which is optional) and the final import call, this is pretty much what the current proposal is suggesting. Is it fair to say this alternative just proposes not having the final `import` call?","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"239e3b5e71370660ac228312f3a5921fa602633c","unresolved":false,"context_lines":[{"line_number":546,"context_line":""},{"line_number":547,"context_line":"This would be a tweak to the existing v2 upload call, to make it asynchronous --"},{"line_number":548,"context_line":"but in a backwards compatible way. Backwards compatibility could be achieved by"},{"line_number":549,"context_line":"either using a different resource path, adding a header, or using a query parameter."},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"Advantages:"},{"line_number":552,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7af24918_2d08592d","line":549,"range":{"start_line":549,"start_character":25,"end_line":549,"end_character":38},"in_reply_to":"7a5de9d1_fe72c57b","updated":"2016-03-04 19:30:01.000000000","message":"The problem I see with this is that alternative import methods we envision, e.g., from a user\u0027s object store, or a copy-from from the app catalog don\u0027t fit this pattern.  What we have is:\n1 - create image record\n(2 - data is made available to glance)\n3 - import call\n\nSo I see the current proposal as only 2 steps; it\u0027s 3 because we\u0027re making available a means to get data directly into glance.  But for the object-store and copy-from cases, you\u0027d just do steps 1 and 2.\n\nAlso, the import spec was patched a few weeks ago to remove the \"target_*\" elements from the import body and leave that up to the deployer, so the import call isn\u0027t that complicated.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e10996328e1d81fd76f30a19164cd3e03e646afb","unresolved":false,"context_lines":[{"line_number":546,"context_line":""},{"line_number":547,"context_line":"This would be a tweak to the existing v2 upload call, to make it asynchronous --"},{"line_number":548,"context_line":"but in a backwards compatible way. Backwards compatibility could be achieved by"},{"line_number":549,"context_line":"either using a different resource path, adding a header, or using a query parameter."},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"Advantages:"},{"line_number":552,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_fe72c57b","line":549,"range":{"start_line":549,"start_character":25,"end_line":549,"end_character":38},"in_reply_to":"9a68dd71_a138e4d3","updated":"2016-01-27 21:02:47.000000000","message":"\u003e Is it fair to say this alternative just proposes not having the final `import` call?\n\nYes. Two simple calls (both familiar) - rather than two simple calls and one unfamiliar more complicated call. (Users of this method wouldn\u0027t need to try to figure out which parts of the more complex call, eg conversion, apply to them or not.)","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e10996328e1d81fd76f30a19164cd3e03e646afb","unresolved":false,"context_lines":[{"line_number":547,"context_line":"This would be a tweak to the existing v2 upload call, to make it asynchronous --"},{"line_number":548,"context_line":"but in a backwards compatible way. Backwards compatibility could be achieved by"},{"line_number":549,"context_line":"either using a different resource path, adding a header, or using a query parameter."},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"Advantages:"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"* Very similar to existing upload mechanism."}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_7eb6d5dd","line":550,"range":{"start_line":550,"start_character":0,"end_line":550,"end_character":0},"updated":"2016-01-27 21:02:47.000000000","message":"I\u0027m wondering about the potential that some sites may not want to support conversion.\n\nIf the import call handles both \"import\" and \"conversion\", is it confusing (from a DefCore point of view) if a site then only supports a subset of an API call\u0027s arguments?\n\nWould it be clearer if we had two resources, for example:\n\n /import (vanilla, format doesn\u0027t change)\n /convert (resource which allows conversion)\n\nA site which didn\u0027t support conversion could return 403 against /convert, rather than 2003 or 403 against /import depending on the parameters.\n\nI\u0027m not sure. Do others think it\u0027s likely that everyone will be happy to deploy the extra resources that conversion will require? For existing deployments it would probably require adding more hardware (disks).","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"239e3b5e71370660ac228312f3a5921fa602633c","unresolved":false,"context_lines":[{"line_number":547,"context_line":"This would be a tweak to the existing v2 upload call, to make it asynchronous --"},{"line_number":548,"context_line":"but in a backwards compatible way. Backwards compatibility could be achieved by"},{"line_number":549,"context_line":"either using a different resource path, adding a header, or using a query parameter."},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"Advantages:"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"* Very similar to existing upload mechanism."}],"source_content_type":"text/x-rst","patch_set":1,"id":"7af24918_98e60d43","line":550,"range":{"start_line":550,"start_character":0,"end_line":550,"end_character":0},"in_reply_to":"7a5de9d1_7eb6d5dd","updated":"2016-03-04 19:30:01.000000000","message":"We\u0027re not requiring conversion, but we need to support it upon import for those clouds who store images in a different format from that in which they\u0027re uploaded.  Flavio\u0027s patch removing the \"target_*\" from the import body moves the complexity of this away from the user and to the deployer.  Those deployers who don\u0027t want to add additional resources can choose not to do conversion.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"40e70417f0da278f5a3e36490c169306ad0944e6","unresolved":false,"context_lines":[{"line_number":547,"context_line":"This would be a tweak to the existing v2 upload call, to make it asynchronous --"},{"line_number":548,"context_line":"but in a backwards compatible way. Backwards compatibility could be achieved by"},{"line_number":549,"context_line":"either using a different resource path, adding a header, or using a query parameter."},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"Advantages:"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"* Very similar to existing upload mechanism."}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_581d39bc","line":550,"range":{"start_line":550,"start_character":0,"end_line":550,"end_character":0},"in_reply_to":"7af24918_98e60d43","updated":"2016-03-22 17:11:49.000000000","message":"\u003e We\u0027re not requiring conversion\n\nSure. We basically just need to not paint ourselves into a corner with respect to conversion.\n\nI missed the discussion around .target_*\u0027.\n\nIs this what we\u0027re saying:\n\n I upload a \u0027raw\u0027 (telling glance it\u0027s raw) and glance converts  it into the default format.\n\n A cloud which doesn\u0027t want to do conversion can reject all formats except the default.\n\nI just want to make sure that we\u0027re not designing something which can only ever support storing all images in the same format. For example, let\u0027s say Glance is used by Nova which wants qcow2 and Magnum which wants whatever it is Magnum uses. What are the plans there? Just re-add target_* at some point?","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e4fc99a5a2f99eceeef4ecefd33ff1e0f2ac22a2","unresolved":false,"context_lines":[{"line_number":557,"context_line":"Disadvantages:"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"* Initially uploaded data is not cached for retry. (Same as existing upload.)"},{"line_number":560,"context_line":"* Users/libraries are expected to switch to the new method."},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"Independent fileIds"},{"line_number":563,"context_line":"-------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_612e6c8d","line":560,"updated":"2016-01-25 23:44:49.000000000","message":"+ discoverability and interoperability issues we have now","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e4fc99a5a2f99eceeef4ecefd33ff1e0f2ac22a2","unresolved":false,"context_lines":[{"line_number":560,"context_line":"* Users/libraries are expected to switch to the new method."},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"Independent fileIds"},{"line_number":563,"context_line":"-------------------"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"Here, the uploaded bytes are not initially part of a particular"},{"line_number":566,"context_line":"image. This would work the same way as the import-from-Swift case,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_565c4718","line":563,"updated":"2016-01-25 23:44:49.000000000","message":"TBH, I see the staging area a lot like this but with some obvious differences.\n\nFor example, the data is uploaded in a staging area \"controlled\" by the image. You can still have shared/independent quota if you want (needs to be discussed further).\n\nThere\u0027s no API to actually manage it but you do that through the image itself.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e10996328e1d81fd76f30a19164cd3e03e646afb","unresolved":false,"context_lines":[{"line_number":560,"context_line":"* Users/libraries are expected to switch to the new method."},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"Independent fileIds"},{"line_number":563,"context_line":"-------------------"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"Here, the uploaded bytes are not initially part of a particular"},{"line_number":566,"context_line":"image. This would work the same way as the import-from-Swift case,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_d031f8ed","line":563,"in_reply_to":"9a68dd71_565c4718","updated":"2016-01-27 21:02:47.000000000","message":"Sure. I think it does add some more complexity though, because operating on one thing can affect all the other things. It makes it  more like a Rubik\u0027s cube than a jigsaw (if that makes any sense).","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"f0cdc24cb890b0ac62227d62060fb5a80ee56456","unresolved":false,"context_lines":[{"line_number":570,"context_line":""},{"line_number":571,"context_line":"First you upload the bytes with a ``POST``. This stores the bytes and"},{"line_number":572,"context_line":"generates a unique fileId. At this point the bytes are not \u0027part\u0027 of"},{"line_number":573,"context_line":"any image. You then make a call for an image to consume that fileId"},{"line_number":574,"context_line":"(analogous to consuming a Swift object). You then (optionally) delete"},{"line_number":575,"context_line":"the original fileId."},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"This could be implemented in slightly different ways."}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_e6cfb3b1","line":574,"range":{"start_line":573,"start_character":11,"end_line":574,"end_character":40},"updated":"2016-01-27 13:53:55.000000000","message":"I\u0027m assuming this would be the POST v2/images/{image_id}/import call, where image_id is in \u0027queued\u0027 status?","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e10996328e1d81fd76f30a19164cd3e03e646afb","unresolved":false,"context_lines":[{"line_number":570,"context_line":""},{"line_number":571,"context_line":"First you upload the bytes with a ``POST``. This stores the bytes and"},{"line_number":572,"context_line":"generates a unique fileId. At this point the bytes are not \u0027part\u0027 of"},{"line_number":573,"context_line":"any image. You then make a call for an image to consume that fileId"},{"line_number":574,"context_line":"(analogous to consuming a Swift object). You then (optionally) delete"},{"line_number":575,"context_line":"the original fileId."},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"This could be implemented in slightly different ways."}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_ed269d15","line":574,"range":{"start_line":573,"start_character":11,"end_line":574,"end_character":40},"in_reply_to":"7a5de9d1_e6cfb3b1","updated":"2016-01-27 21:02:47.000000000","message":"Once the blob was uploaded the import should be (almost) the exact same as Swift. (So, yes!)","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7abe512685827a52adc874ab19620857fcb39be5","unresolved":false,"context_lines":[{"line_number":579,"context_line":"* A fileId could be completely unassociated with any image, in which"},{"line_number":580,"context_line":"  case it could be reused as source data for more than one image."},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"* Alternatively the fileId could be restricted to a particular image by"},{"line_number":583,"context_line":"  requiring the image uuid to be specified when creating the fileId. In"},{"line_number":584,"context_line":"  both cases, the only time a fileId would impact image state is when the"},{"line_number":585,"context_line":"  image is consuming the fileId and goes through the usual ``queued``,"},{"line_number":586,"context_line":"  ``saving``, ``active`` stages."}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_ab8a0d62","line":583,"range":{"start_line":582,"start_character":69,"end_line":583,"end_character":68},"updated":"2016-02-01 18:35:56.000000000","message":"I missed this the first time through.  If we did this, then you wouldn\u0027t have to worry about allowing updates to the FileId object, since the data would immediately be associated with a specific image_id.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e4fc99a5a2f99eceeef4ecefd33ff1e0f2ac22a2","unresolved":false,"context_lines":[{"line_number":588,"context_line":"Advantages:"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"* Swift and Glance work in the same way. (Initial data is not considerd"},{"line_number":591,"context_line":"  \u0027part\u0027 of the image.)"},{"line_number":592,"context_line":"* Can be extended to uploading several fileIds sequentially or in"},{"line_number":593,"context_line":"  parallel."},{"line_number":594,"context_line":"* fileIds are cached for retry if the import fails"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_e17d7c6d","line":591,"updated":"2016-01-25 23:44:49.000000000","message":"How would you upload the data to Glance in this scenario? Separate endpoint? Completely different resource (this seems to be proposed in the alternative below)","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e10996328e1d81fd76f30a19164cd3e03e646afb","unresolved":false,"context_lines":[{"line_number":588,"context_line":"Advantages:"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"* Swift and Glance work in the same way. (Initial data is not considerd"},{"line_number":591,"context_line":"  \u0027part\u0027 of the image.)"},{"line_number":592,"context_line":"* Can be extended to uploading several fileIds sequentially or in"},{"line_number":593,"context_line":"  parallel."},{"line_number":594,"context_line":"* fileIds are cached for retry if the import fails"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_59b0d3f4","line":591,"in_reply_to":"9a68dd71_e17d7c6d","updated":"2016-01-27 21:02:47.000000000","message":"There are several options for how it could be presented in terms of API.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e4fc99a5a2f99eceeef4ecefd33ff1e0f2ac22a2","unresolved":false,"context_lines":[{"line_number":590,"context_line":"* Swift and Glance work in the same way. (Initial data is not considerd"},{"line_number":591,"context_line":"  \u0027part\u0027 of the image.)"},{"line_number":592,"context_line":"* Can be extended to uploading several fileIds sequentially or in"},{"line_number":593,"context_line":"  parallel."},{"line_number":594,"context_line":"* fileIds are cached for retry if the import fails"},{"line_number":595,"context_line":"* fileIds can each have their own size and checksum (for quota/integrity)"},{"line_number":596,"context_line":"* seperation of concerns (less impact on existing code areas, eg image"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_418fa874","line":593,"updated":"2016-01-25 23:44:49.000000000","message":"I think we can do this in the current proposal as well. That\u0027s the long term  plan, at least.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e4fc99a5a2f99eceeef4ecefd33ff1e0f2ac22a2","unresolved":false,"context_lines":[{"line_number":593,"context_line":"  parallel."},{"line_number":594,"context_line":"* fileIds are cached for retry if the import fails"},{"line_number":595,"context_line":"* fileIds can each have their own size and checksum (for quota/integrity)"},{"line_number":596,"context_line":"* seperation of concerns (less impact on existing code areas, eg image"},{"line_number":597,"context_line":"  delete would never have to handle deleting more than one data blob.)"},{"line_number":598,"context_line":"* No new image states are required."},{"line_number":599,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_b67a6375","line":596,"updated":"2016-01-25 23:44:49.000000000","message":"I wouldn\u0027t discard entirely that in the future the current proposal could evolve into something like this.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e10996328e1d81fd76f30a19164cd3e03e646afb","unresolved":false,"context_lines":[{"line_number":593,"context_line":"  parallel."},{"line_number":594,"context_line":"* fileIds are cached for retry if the import fails"},{"line_number":595,"context_line":"* fileIds can each have their own size and checksum (for quota/integrity)"},{"line_number":596,"context_line":"* seperation of concerns (less impact on existing code areas, eg image"},{"line_number":597,"context_line":"  delete would never have to handle deleting more than one data blob.)"},{"line_number":598,"context_line":"* No new image states are required."},{"line_number":599,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_2d57d503","line":596,"in_reply_to":"9a68dd71_b67a6375","updated":"2016-01-27 21:02:47.000000000","message":"Do you have an outline of this in mind?","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e4fc99a5a2f99eceeef4ecefd33ff1e0f2ac22a2","unresolved":false,"context_lines":[{"line_number":595,"context_line":"* fileIds can each have their own size and checksum (for quota/integrity)"},{"line_number":596,"context_line":"* seperation of concerns (less impact on existing code areas, eg image"},{"line_number":597,"context_line":"  delete would never have to handle deleting more than one data blob.)"},{"line_number":598,"context_line":"* No new image states are required."},{"line_number":599,"context_line":""},{"line_number":600,"context_line":"Disadvantages:"},{"line_number":601,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a68dd71_f69d3bbc","line":598,"updated":"2016-01-25 23:44:49.000000000","message":"this is a nice pro :)","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e10996328e1d81fd76f30a19164cd3e03e646afb","unresolved":false,"context_lines":[{"line_number":595,"context_line":"* fileIds can each have their own size and checksum (for quota/integrity)"},{"line_number":596,"context_line":"* seperation of concerns (less impact on existing code areas, eg image"},{"line_number":597,"context_line":"  delete would never have to handle deleting more than one data blob.)"},{"line_number":598,"context_line":"* No new image states are required."},{"line_number":599,"context_line":""},{"line_number":600,"context_line":"Disadvantages:"},{"line_number":601,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_be068d1e","line":598,"in_reply_to":"7a5de9d1_41779102","updated":"2016-01-27 21:02:47.000000000","message":"\u003e if the validation fails, it will be indistinguishable from a upload failure...we\u0027ll definitely still want the \"message\" field\n\nI actually like the idea of the message field. It seems a richer way to communicate about stuff than via the image state. It means we can just use the state for enforcement duties. (Potentially nova could use the message too?)","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"239e3b5e71370660ac228312f3a5921fa602633c","unresolved":false,"context_lines":[{"line_number":595,"context_line":"* fileIds can each have their own size and checksum (for quota/integrity)"},{"line_number":596,"context_line":"* seperation of concerns (less impact on existing code areas, eg image"},{"line_number":597,"context_line":"  delete would never have to handle deleting more than one data blob.)"},{"line_number":598,"context_line":"* No new image states are required."},{"line_number":599,"context_line":""},{"line_number":600,"context_line":"Disadvantages:"},{"line_number":601,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7af24918_58d005f8","line":598,"in_reply_to":"7a5de9d1_be068d1e","updated":"2016-03-04 19:30:01.000000000","message":"I\u0027m thinking more and more that a schematized message field that included a \"message_type\" and had a precise JSON schema for each type is the way to go here.  That way the message becomes both human and machine readable and can contain useful items like upload size and checksum.  An example of what I\u0027m thinking is here: https://etherpad.openstack.org/p/glance-mitaka-midcycle-image-schema-proposal","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"f0cdc24cb890b0ac62227d62060fb5a80ee56456","unresolved":false,"context_lines":[{"line_number":595,"context_line":"* fileIds can each have their own size and checksum (for quota/integrity)"},{"line_number":596,"context_line":"* seperation of concerns (less impact on existing code areas, eg image"},{"line_number":597,"context_line":"  delete would never have to handle deleting more than one data blob.)"},{"line_number":598,"context_line":"* No new image states are required."},{"line_number":599,"context_line":""},{"line_number":600,"context_line":"Disadvantages:"},{"line_number":601,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_41779102","line":598,"in_reply_to":"9a68dd71_f69d3bbc","updated":"2016-01-27 13:53:55.000000000","message":"I\u0027m not so sure about this, but maybe I\u0027m misunderstanding the workflow.  I\u0027m thinking this is what happens:\n\n1. POST v2/images -\u003e creates image with image_id in \u0027queued\u0027 status\n2. POST v2/bikeshed -\u003e saves data, returns file_id\n3. POST v2/images/{image_id}/import -\u003e file_id passed in request body, image goes to \u0027saving\u0027 status?\n\nAt this point the validation workflow kicks in, so the image isn\u0027t actually being saved until it passes validation.  We could keep the image in \u0027saved\u0027 the entire time for validation + upload to backend, but if the validation fails, it will be indistinguishable from a upload failure.  And maybe that\u0027s fine, the end user may not care.  But we\u0027ll definitely still want the \"message\" field added to the Image object so we can get some info out to the end user.  So maybe you\u0027re right about a new state not needed.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"f0cdc24cb890b0ac62227d62060fb5a80ee56456","unresolved":false,"context_lines":[{"line_number":599,"context_line":""},{"line_number":600,"context_line":"Disadvantages:"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"* More code, eg to list fileIds"},{"line_number":603,"context_line":"* More API calls than the simple async upload case"},{"line_number":604,"context_line":"* Users/libraries are expected to switch to the new method."},{"line_number":605,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_c1fdc16f","line":602,"updated":"2016-01-27 13:53:55.000000000","message":"(these aren\u0027t arguments against, just thinking this through)\n\n+ need a FileId object (timestamp, checksum, size)\n+ need a way for the user to update the FileId object (otherwise, all you\u0027ve got is a UUID, no way to tell what exactly what data you\u0027ve got associated with the file_id); maybe a simple \"notes\" field would work\n+ need a quota on how many/total size of these","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"cd8756d48227dff656d3fccac834fe8d74fad65d","unresolved":false,"context_lines":[{"line_number":599,"context_line":""},{"line_number":600,"context_line":"Disadvantages:"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"* More code, eg to list fileIds"},{"line_number":603,"context_line":"* More API calls than the simple async upload case"},{"line_number":604,"context_line":"* Users/libraries are expected to switch to the new method."},{"line_number":605,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_b8b697da","line":602,"in_reply_to":"7a5de9d1_8a4fcf91","updated":"2016-01-28 04:17:29.000000000","message":"\u003e Can you give an example of where update would be needed?\n\nSure.  I\u0027m talking about the FileId object, i.e., the thing that would represent your uploaded blob.  In other words, the user does POST v2/bikeshed (or something) to upload the data and somehow gets a FileId back.  Then the user does GET v2/bikeshed/{fileid} and gets back some JSON like\n\n{\n  \"fileid\": \"6d1aa8b6-a0b9-4a66-969e-c28aa766c173\",\n  \"checksum\": \"440a50aa0159e0eabea519268b8f3e39\",\n  \"size\": 598456,\n  \"status\": active\n}\n\nIf you have 2 of these things, how are you going to tell them apart?  With Swift, you have the ability to name your blob something like \"CentOS 7\" or \"Debian NGINX\" and also add metadata to it.  You may have created an image in Glance, but there\u0027s nothing relating this fileId to that image until you make the import call.  So to make this usable, I think we\u0027ll have to allow PATCH v2/bikeshed/{fileid} so a user can at least add a name or some free-form notes to the FileId object:\n\n{\n  \"fileid\": \"6d1aa8b6-a0b9-4a66-969e-c28aa766c173\",\n  \"checksum\": \"440a50aa0159e0eabea519268b8f3e39\",\n  \"size\": 598456,\n  \"status\": \"active\",\n  \"name\": \"CentOS 7 with custom wigglyshnertz packages\",\n  \"note\": \"This is the one that needs 30GB RAM\"\n}","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7abe512685827a52adc874ab19620857fcb39be5","unresolved":false,"context_lines":[{"line_number":599,"context_line":""},{"line_number":600,"context_line":"Disadvantages:"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"* More code, eg to list fileIds"},{"line_number":603,"context_line":"* More API calls than the simple async upload case"},{"line_number":604,"context_line":"* Users/libraries are expected to switch to the new method."},{"line_number":605,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_0bc9e1ab","line":602,"in_reply_to":"7a5de9d1_b8b697da","updated":"2016-02-01 18:35:56.000000000","message":"If we restrict a file_id to being associated with a specific image_id, then we don\u0027t need to worry about allowing for updates.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e10996328e1d81fd76f30a19164cd3e03e646afb","unresolved":false,"context_lines":[{"line_number":599,"context_line":""},{"line_number":600,"context_line":"Disadvantages:"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"* More code, eg to list fileIds"},{"line_number":603,"context_line":"* More API calls than the simple async upload case"},{"line_number":604,"context_line":"* Users/libraries are expected to switch to the new method."},{"line_number":605,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_8a4fcf91","line":602,"in_reply_to":"7a5de9d1_c1fdc16f","updated":"2016-01-27 21:02:47.000000000","message":"\u003e need a FileId object (timestamp, checksum, size)\n\n(In my mind at least) this is what allows multi-part upload in the future. For example how would swift large objects work if each sub-object didn\u0027t have a size/checksum? I see it as kind of similar, you need to stream the component parts in both cases (swift download/future glance multi-part upload).\n\n\u003e need a way for the user to update the FileId object (otherwise, all you\u0027ve got is a UUID, no way to tell what exactly what data you\u0027ve got associated with the file_id)\n\nCan you give an example of where update would be needed? (In the import-from-swift case, the source swift object will be treated as an opaque blob. I\u0027d see the FileIds as being the same.)\n\n\u003e need a quota on how many/total size of these\n\n(Again, in my mind) I think we need to quota the blobs anyway (any data which lives between requests). It\u0027s maybe just \nmore clearly the case with this approach. And it\u0027s not clear how you quota the blobs without a size/checksum for each one.","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"e10996328e1d81fd76f30a19164cd3e03e646afb","unresolved":false,"context_lines":[{"line_number":618,"context_line":"* Simple API available for standard uploads"},{"line_number":619,"context_line":"* More advanced APIs available to those who need them"},{"line_number":620,"context_line":"* Could implement the simple case first"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"Disadvantages:"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"* More code"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a5de9d1_0d93f95c","line":621,"updated":"2016-01-27 21:02:47.000000000","message":"FWIW I think I like this hybrid approach best.\n\nThere\u0027s a simple call which should be familiar to users of the existing upload. That\u0027s actually probably what 99% of users would end up using, and keeps things as simple as possible for new users of the API who just want to try out creating their first image, or anyone who want\u0027s to show how easy it is to create an image using the OpenStack API.\n\nThe more complex call can be used directly by (probably not that many) power users, or neatly wrapped in libraries.\n\nIn contrast, the one-size-fits-all call means the simple upload of some bytes is more complicated than it really needs to be and is less familiar to existing users of the v2 api. Its also less obvious (to me anyway) that it could easily be extended to support multi-part upload (without introducing more complexity in the server).","commit_id":"a33161b6dc8ae4ff6a88c0581eb967a9af7b448d"}]}
