)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e431d97050565bcb3314e7288591c01f80e1a85d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"37ef6fc3_1b6116d9","updated":"2023-05-18 15:49:29.000000000","message":"Here\u0027s an issue we need to deal with.\n\nWe need to provide a way for an image consumer to know if the hash will ever be available.  What I mean is, currently, if an image goes \u0027active\u0027 with no os_hash_value, then it\u0027s never going to get one.  With this background computation proposal, an image may go active with no hash, but it will be added later ... or maybe not, depending on how the cloud is configured.  A security-conscious consumer may want to wait until the os_hash_value is available to use the image, so we need to provide a way to let them know whether there\u0027s any point in waiting or not.\n\nI think this will have to be done via an os_glance_* image property, because in addition to legacy images with no hash, it will be possible for the operator to change behavior with the config option ... so if we did something like expose the do_secure_hash in the discovery API, it wouldn\u0027t necessarily tell you that if you wait for an \u0027active\u0027 image without an os_hash_value, you won\u0027t be waiting in vain.\n\nMaybe something like os_glance_hash-computation with value \u0027in-progress\u0027? (This would allow room if we want to do something like \u0027failed\u0027 as well).\n\nThis would leave consumers in the situation:\n\n- \u0027active\u0027 image, no os_hash_value  --\u003e if you don\u0027t care, just use it\n- \u0027active\u0027 image, no os_hash_value  --\u003e if you care, look for os_glance_hash-computation\n  - not present, never going to get os_hash_value\n  - present and \u0027in-progress\u0027  --\u003e wait for \u0027failed\u0027 or for (the property disappears and os_hash_value is populated)\n  \nWe need to think about what it would make sense for a consumer to poll for, but I do think we need to handle this case.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4d10584d4a06bdf73f786fee3e94ca8493e5cc7e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3076b5b3_77e17915","updated":"2023-05-18 13:45:06.000000000","message":"Looks like we discussed, thanks. I think we need to define the state transitions for the verification case though. I got the impression abhi was maybe going to ponder the async part, so maybe he\u0027s thinking about what that might be. I guess we could also just mention that here as \"to be defined\" and leave it to the implementation, I dunno.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d17a6ac18115de6a462f801255f15479ffafae94","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"92be9c89_ebfc5d3d","in_reply_to":"37ef6fc3_1b6116d9","updated":"2023-05-18 15:56:09.000000000","message":"Oh yeah, I meant to say something about this, glad you remembered.\n\nWhat if we set the os_hash_algo when we start, and then only set the hash value when we complete? Then you can see \"okay, this is *going* to have a sha256 soon\" and potentially even start your own local hash to be ready to compare later. You could then just nuke the hash_algo if you give up indicating that this won\u0027t ever have one.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f540f2e8fcbea3c73ffb14fb54d7385960c59c25","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"83040446_d0d18f9f","in_reply_to":"58906e7b_628eb1cc","updated":"2023-05-19 11:39:14.000000000","message":"Done","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"ebab019442a746f1379da6ac61e5f21e609985f7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ffc267d5_bdcaf537","in_reply_to":"92be9c89_ebfc5d3d","updated":"2023-05-18 16:08:12.000000000","message":"I couldn\u0027t remember when the os_hash_algo got set.  Your proposal sounds good:\n\n- \u0027active\u0027 image, no os_hash_algo --\u003e never going to get an os_hash_value\n- \u0027active\u0027 image, has os_hash_algo --\u003e poll for \u0027active\u0027 + os_hash_algo until you get os_hash_value (can\u0027t poll only for os_hash_value because you might never get one)\n\nThat set of stuff to poll for seems a bit complicated; maybe someone can think of something better.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"35d2bc906d6e429d5e6eefe1095266a46df1ae59","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"58906e7b_628eb1cc","in_reply_to":"ffc267d5_bdcaf537","updated":"2023-05-18 16:13:11.000000000","message":"Well, if you care about the hash you\u0027re going to have to poll regardless of how we expose it. If you provided validation_data then you\u0027re polling for active. If you didn\u0027t (and you care) then you\u0027re just polling for:\n```\n if not hash_algo:\n   # fail because you care about the hash and it\u0027s not coming\n elif hash_value \u003d\u003d expected:\n   break\n else:\n   continue # ...polling\n```\n\nYou could put status in there too if you care, but assuming we pop hash_algo off whenever we fail, I think it\u0027s okay.\n\nAnyway, I think this would be a new workflow of what gets set when, so I think we can control setting algo and value in whatever order we want.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"380e8db5039c4b8edc7c453ab470ab170c1b512b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"d0825951_bf3195ae","updated":"2023-05-23 12:25:17.000000000","message":"Formatting issue for you to address; content LGTM at first look.","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b2f7d8146d32aca39c7cdd37a51b9204bac5469c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"399e3ab9_ae254775","updated":"2023-05-19 14:08:59.000000000","message":"I\u0027m happy with this as far as what it covers. Normally I would want a spec like this to also cover how it\u0027s going to do it (i.e. what the mechanics behind the scenes are that will handle the async part, whether we make this actually an import plugin, etc). But I know the glance convention is less strict in that regard. Are others comfortable just sussing that out on the implementation patches?","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"45aa42d255097162f42346e0ceaf3360dae3cf8e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"3710890c_66c5c5f9","updated":"2023-05-22 15:08:50.000000000","message":"Looks good, one suggestion inline.","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f540f2e8fcbea3c73ffb14fb54d7385960c59c25","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"04b32246_78c180e0","updated":"2023-05-19 11:39:14.000000000","message":"Thanks everyone for the reviews.","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8676b68d215250c322653197ad458527883b8891","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a587e558_91eabf30","updated":"2023-05-23 03:36:08.000000000","message":"Looks good to me, thank you!","commit_id":"335dd0c61600aa83e8b2f5f21c92d569e1f05b33"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a37819aa1775c87efc402305d2c35abc4b374740","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"1ea36540_53e6676f","updated":"2023-06-01 16:05:54.000000000","message":"Nit noted inline, but this otherwise LGTM.","commit_id":"bd64e855754925e2770497a390e8adca02dd124c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"863f70a077537c8fe1d10c4da6116a032cd20391","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"da498bab_de8c6f20","updated":"2023-06-06 13:57:10.000000000","message":"Sorry I missed that we still need to get the response fixed up.","commit_id":"bd64e855754925e2770497a390e8adca02dd124c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"31140f82e1c6e27d21db1ac9ebf836e13be5b03c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"3b3376a3_0de91c81","updated":"2023-05-31 10:19:18.000000000","message":"Thanks Pranali for the review","commit_id":"bd64e855754925e2770497a390e8adca02dd124c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"38cc38a8391a26118ebab343e2b463210dde86de","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"c7b07efb_2e3eb5ca","updated":"2023-06-07 22:00:00.000000000","message":"Update LGTM.","commit_id":"a5bcf0c19af59869d6b027edacd94e977ba39a46"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"7578294273595b0ec6222e8c47147a94d42b0507","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"369e203f_b423e9f5","updated":"2023-06-08 04:03:28.000000000","message":"Update looks good, approving the spec! Thanks all the reviewers!","commit_id":"a5bcf0c19af59869d6b027edacd94e977ba39a46"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1c03d5c7f52fbec2d7cf18a0523e6250195aa67c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"c72bc85b_24bffad4","updated":"2023-06-07 15:05:12.000000000","message":"Yep, I think this is what we want and what we already discussed. We just never updated the request/response examples.\n\nThanks!","commit_id":"a5bcf0c19af59869d6b027edacd94e977ba39a46"}],"specs/2023.2/approved/glance/new-location-info-apis.rst":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4d10584d4a06bdf73f786fee3e94ca8493e5cc7e","unresolved":true,"context_lines":[{"line_number":92,"context_line":"we\u0027ve registered the location and not wait for the hash calculation since"},{"line_number":93,"context_line":"it is a long running task. After the hash calculation completes, image"},{"line_number":94,"context_line":"properties will be updated with the ``checksum``, ``os_hash_algo`` and"},{"line_number":95,"context_line":"``os_hash_value`` values."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"If the hash calculation fails, we will add a retry mechanism that will"},{"line_number":98,"context_line":"reinitiate the task. If after all the retries, the hash calculation still"}],"source_content_type":"text/x-rst","patch_set":1,"id":"a8d5d213_d7d913a8","line":95,"updated":"2023-05-18 13:45:06.000000000","message":"I think that we need to also define what happens if `validation_data` is provided, in terms of image status lifecycle. When we were discussing this yesterday, I mentioned potentially using the import workflow for the add in some way, which might mean the instance goes from queued-\u003eimporting-\u003eactive. If not, we need to figure out what that state transition looks like so users know what to expect.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f540f2e8fcbea3c73ffb14fb54d7385960c59c25","unresolved":false,"context_lines":[{"line_number":92,"context_line":"we\u0027ve registered the location and not wait for the hash calculation since"},{"line_number":93,"context_line":"it is a long running task. After the hash calculation completes, image"},{"line_number":94,"context_line":"properties will be updated with the ``checksum``, ``os_hash_algo`` and"},{"line_number":95,"context_line":"``os_hash_value`` values."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"If the hash calculation fails, we will add a retry mechanism that will"},{"line_number":98,"context_line":"reinitiate the task. If after all the retries, the hash calculation still"}],"source_content_type":"text/x-rst","patch_set":1,"id":"622b7833_83e0999e","line":95,"in_reply_to":"1aa4edf4_90fc7d35","updated":"2023-05-19 11:39:14.000000000","message":"Done\n\nModified the points little bit but the idea is same.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c4c227d38ed920625c770a6c3262eb7cbe2e843a","unresolved":true,"context_lines":[{"line_number":92,"context_line":"we\u0027ve registered the location and not wait for the hash calculation since"},{"line_number":93,"context_line":"it is a long running task. After the hash calculation completes, image"},{"line_number":94,"context_line":"properties will be updated with the ``checksum``, ``os_hash_algo`` and"},{"line_number":95,"context_line":"``os_hash_value`` values."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"If the hash calculation fails, we will add a retry mechanism that will"},{"line_number":98,"context_line":"reinitiate the task. If after all the retries, the hash calculation still"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1aa4edf4_90fc7d35","line":95,"in_reply_to":"a8d5d213_d7d913a8","updated":"2023-05-18 14:58:10.000000000","message":"+1\n\nif do_secure_hash True and validation data not None, image transition will be (queued,importing,active) -- This will only happen for http_store where user can possibly provide validation data. (Here image hash will be calculated and verified before setting image to active state)\n\nif do_secure_hash True and no validation data, image transition will be (queued,active) -- This is for consumer where validation data will not be provided. (Here image hash calculation will be done and updated after setting image to active state) \n\nif do_secure_hash False and validation data, image transition will be (queued,active) This will only happen for http_store where user can possibly provide validation data. (Here image hash will not be calculated and verified but directly set to image with values provided by the user)\n\nif do_secure_hash False and validation data None, image transition will be (queued,active) This will happen for consumers as well as http store, here we will not calculate and set hash values.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"35b0528503b3735ae1d4650c8e3b57366ea85fde","unresolved":true,"context_lines":[{"line_number":94,"context_line":"properties will be updated with the ``checksum``, ``os_hash_algo`` and"},{"line_number":95,"context_line":"``os_hash_value`` values."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"If the hash calculation fails, we will add a retry mechanism that will"},{"line_number":98,"context_line":"reinitiate the task. If after all the retries, the hash calculation still"},{"line_number":99,"context_line":"fails, we will not update the hash and checksum values and image will"},{"line_number":100,"context_line":"stay in ``active`` state."}],"source_content_type":"text/x-rst","patch_set":1,"id":"614e8f07_08671331","line":97,"updated":"2023-05-18 15:01:38.000000000","message":"As discussed on IRC we should add new config option http_retries for retry operation with default value of may be 3 times.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f540f2e8fcbea3c73ffb14fb54d7385960c59c25","unresolved":false,"context_lines":[{"line_number":94,"context_line":"properties will be updated with the ``checksum``, ``os_hash_algo`` and"},{"line_number":95,"context_line":"``os_hash_value`` values."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"If the hash calculation fails, we will add a retry mechanism that will"},{"line_number":98,"context_line":"reinitiate the task. If after all the retries, the hash calculation still"},{"line_number":99,"context_line":"fails, we will not update the hash and checksum values and image will"},{"line_number":100,"context_line":"stay in ``active`` state."}],"source_content_type":"text/x-rst","patch_set":1,"id":"f07707e1_c9234152","line":97,"in_reply_to":"614e8f07_08671331","updated":"2023-05-19 11:39:14.000000000","message":"I was thinking about it and would ``http_retries`` be a good name for it? it\u0027s a background process that will be calculating hash so something like ``hash_calc_retries``, unless we would like to use the same option for more cases then ``http_retries`` should be good.\nI will keep it ``http_retries`` here for now but will update it if my suggestion makes sense.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4d10584d4a06bdf73f786fee3e94ca8493e5cc7e","unresolved":true,"context_lines":[{"line_number":195,"context_line":"  This will add a new location to an existing image."},{"line_number":196,"context_line":"  The request body will contain the location URL and ``validation_data`` [4]_"},{"line_number":197,"context_line":"  (optional). The purpose of including validation_data in the request body"},{"line_number":198,"context_line":"  is for th HTTP store case when we would like to add the user provided hash"},{"line_number":199,"context_line":"  and checksum values to the HTTP image."},{"line_number":200,"context_line":"  The request parameter ``validation data`` will behave in the following"},{"line_number":201,"context_line":"  manner with the ``do_secure_hash`` config option:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"516eb282_e24ced26","line":198,"range":{"start_line":198,"start_character":9,"end_line":198,"end_character":11},"updated":"2023-05-18 13:45:06.000000000","message":"\"the\"\n\nAlso, this is a nit and not super important, but I feel like it\u0027s not necessary to say that this is \"for the http case\" because it can (and should, when possible) be used with any of the protocols, *if* you know the hash ahead of time.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f540f2e8fcbea3c73ffb14fb54d7385960c59c25","unresolved":false,"context_lines":[{"line_number":195,"context_line":"  This will add a new location to an existing image."},{"line_number":196,"context_line":"  The request body will contain the location URL and ``validation_data`` [4]_"},{"line_number":197,"context_line":"  (optional). The purpose of including validation_data in the request body"},{"line_number":198,"context_line":"  is for th HTTP store case when we would like to add the user provided hash"},{"line_number":199,"context_line":"  and checksum values to the HTTP image."},{"line_number":200,"context_line":"  The request parameter ``validation data`` will behave in the following"},{"line_number":201,"context_line":"  manner with the ``do_secure_hash`` config option:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"0c6b8cd9_ec93c367","line":198,"range":{"start_line":198,"start_character":9,"end_line":198,"end_character":11},"in_reply_to":"516eb282_e24ced26","updated":"2023-05-19 11:39:14.000000000","message":"Done","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"ddac18ae54f7ccf29cf50bb8a7564694f234c94e","unresolved":true,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    .. code-block:: json"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        {"},{"line_number":244,"context_line":"            \"checksum\": \"b874c39491a2377b8490f5f1e89761a4\","},{"line_number":245,"context_line":"            \"container_format\": \"bare\","},{"line_number":246,"context_line":"            \"created_at\": \"2023-05-03T21:30:21Z\","},{"line_number":247,"context_line":"            \"disk_format\": \"qcow2\","},{"line_number":248,"context_line":"            \"file\": \"/v2/images/57124e08-3691-4713-82cc-213dc5c7e242/file\","},{"line_number":249,"context_line":"            \"id\": \"57124e08-3691-4713-82cc-213dc5c7e242\","},{"line_number":250,"context_line":"            \"min_disk\": 0,"},{"line_number":251,"context_line":"            \"min_ram\": 0,"},{"line_number":252,"context_line":"            \"name\": \"test-image\","},{"line_number":253,"context_line":"            \"owner\": \"d6634f35c00f409883ecb10361b556c3\","},{"line_number":254,"context_line":"            \"properties\": {"},{"line_number":255,"context_line":"              \"os_hidden\": false,"},{"line_number":256,"context_line":"              \"os_hash_algo\": \"sha512\","},{"line_number":257,"context_line":"              \"os_hash_value\": \"6b813aa46bb90b4da216a4d19376593fa3f4fc7e617f03a92b7fe11e9a3981cbe8f0959dbebe36225e5f53dc4492341a4863cac4ed1ee0909f3fc78ef9c3e869\","},{"line_number":258,"context_line":"              \"stores\": \"lvmdriver-1\","},{"line_number":259,"context_line":"            },"},{"line_number":260,"context_line":"            \"protected\": false,"},{"line_number":261,"context_line":"            \"schema\": \"/v2/schemas/image\","},{"line_number":262,"context_line":"            \"size\": 16300544,"},{"line_number":263,"context_line":"            \"status\": \"active\","},{"line_number":264,"context_line":"            \"tags\": [],"},{"line_number":265,"context_line":"            \"updated_at\": \"2023-05-03T21:32:35Z\","},{"line_number":266,"context_line":"            \"virtual_size\": 117440512,"},{"line_number":267,"context_line":"            \"visibility\": \"shared\""},{"line_number":268,"context_line":"        }"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    - Error - 409 (Location already exists or if image is not in QUEUED"},{"line_number":271,"context_line":"      state), 403 (Forbidden for users that are not owner), 400 (BadRequest"}],"source_content_type":"text/x-rst","patch_set":1,"id":"6edeb851_c7d3fb65","line":268,"range":{"start_line":243,"start_character":0,"end_line":268,"end_character":9},"updated":"2023-05-18 11:53:04.000000000","message":"still not sure about this, let\u0027s see the conclusion of discussion here https://review.opendev.org/c/openstack/glance/+/881940/14/api-ref/source/v2/images-images-v2.inc#843","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"863f70a077537c8fe1d10c4da6116a032cd20391","unresolved":true,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    .. code-block:: json"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        {"},{"line_number":244,"context_line":"            \"checksum\": \"b874c39491a2377b8490f5f1e89761a4\","},{"line_number":245,"context_line":"            \"container_format\": \"bare\","},{"line_number":246,"context_line":"            \"created_at\": \"2023-05-03T21:30:21Z\","},{"line_number":247,"context_line":"            \"disk_format\": \"qcow2\","},{"line_number":248,"context_line":"            \"file\": \"/v2/images/57124e08-3691-4713-82cc-213dc5c7e242/file\","},{"line_number":249,"context_line":"            \"id\": \"57124e08-3691-4713-82cc-213dc5c7e242\","},{"line_number":250,"context_line":"            \"min_disk\": 0,"},{"line_number":251,"context_line":"            \"min_ram\": 0,"},{"line_number":252,"context_line":"            \"name\": \"test-image\","},{"line_number":253,"context_line":"            \"owner\": \"d6634f35c00f409883ecb10361b556c3\","},{"line_number":254,"context_line":"            \"properties\": {"},{"line_number":255,"context_line":"              \"os_hidden\": false,"},{"line_number":256,"context_line":"              \"os_hash_algo\": \"sha512\","},{"line_number":257,"context_line":"              \"os_hash_value\": \"6b813aa46bb90b4da216a4d19376593fa3f4fc7e617f03a92b7fe11e9a3981cbe8f0959dbebe36225e5f53dc4492341a4863cac4ed1ee0909f3fc78ef9c3e869\","},{"line_number":258,"context_line":"              \"stores\": \"lvmdriver-1\","},{"line_number":259,"context_line":"            },"},{"line_number":260,"context_line":"            \"protected\": false,"},{"line_number":261,"context_line":"            \"schema\": \"/v2/schemas/image\","},{"line_number":262,"context_line":"            \"size\": 16300544,"},{"line_number":263,"context_line":"            \"status\": \"active\","},{"line_number":264,"context_line":"            \"tags\": [],"},{"line_number":265,"context_line":"            \"updated_at\": \"2023-05-03T21:32:35Z\","},{"line_number":266,"context_line":"            \"virtual_size\": 117440512,"},{"line_number":267,"context_line":"            \"visibility\": \"shared\""},{"line_number":268,"context_line":"        }"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    - Error - 409 (Location already exists or if image is not in QUEUED"},{"line_number":271,"context_line":"      state), 403 (Forbidden for users that are not owner), 400 (BadRequest"}],"source_content_type":"text/x-rst","patch_set":1,"id":"89e5b2cb_5b5184a8","line":268,"range":{"start_line":243,"start_character":0,"end_line":268,"end_character":9},"in_reply_to":"3c2890d8_b1a8cf45","updated":"2023-06-06 13:57:10.000000000","message":"No, the response should be the location object, a superset of the request. It is not RESTful to return a different schema than was PUT/POSTed.","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bf88b280232e5a6778a38af9a75b03793ce9de4c","unresolved":true,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    .. code-block:: json"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        {"},{"line_number":244,"context_line":"            \"checksum\": \"b874c39491a2377b8490f5f1e89761a4\","},{"line_number":245,"context_line":"            \"container_format\": \"bare\","},{"line_number":246,"context_line":"            \"created_at\": \"2023-05-03T21:30:21Z\","},{"line_number":247,"context_line":"            \"disk_format\": \"qcow2\","},{"line_number":248,"context_line":"            \"file\": \"/v2/images/57124e08-3691-4713-82cc-213dc5c7e242/file\","},{"line_number":249,"context_line":"            \"id\": \"57124e08-3691-4713-82cc-213dc5c7e242\","},{"line_number":250,"context_line":"            \"min_disk\": 0,"},{"line_number":251,"context_line":"            \"min_ram\": 0,"},{"line_number":252,"context_line":"            \"name\": \"test-image\","},{"line_number":253,"context_line":"            \"owner\": \"d6634f35c00f409883ecb10361b556c3\","},{"line_number":254,"context_line":"            \"properties\": {"},{"line_number":255,"context_line":"              \"os_hidden\": false,"},{"line_number":256,"context_line":"              \"os_hash_algo\": \"sha512\","},{"line_number":257,"context_line":"              \"os_hash_value\": \"6b813aa46bb90b4da216a4d19376593fa3f4fc7e617f03a92b7fe11e9a3981cbe8f0959dbebe36225e5f53dc4492341a4863cac4ed1ee0909f3fc78ef9c3e869\","},{"line_number":258,"context_line":"              \"stores\": \"lvmdriver-1\","},{"line_number":259,"context_line":"            },"},{"line_number":260,"context_line":"            \"protected\": false,"},{"line_number":261,"context_line":"            \"schema\": \"/v2/schemas/image\","},{"line_number":262,"context_line":"            \"size\": 16300544,"},{"line_number":263,"context_line":"            \"status\": \"active\","},{"line_number":264,"context_line":"            \"tags\": [],"},{"line_number":265,"context_line":"            \"updated_at\": \"2023-05-03T21:32:35Z\","},{"line_number":266,"context_line":"            \"virtual_size\": 117440512,"},{"line_number":267,"context_line":"            \"visibility\": \"shared\""},{"line_number":268,"context_line":"        }"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    - Error - 409 (Location already exists or if image is not in QUEUED"},{"line_number":271,"context_line":"      state), 403 (Forbidden for users that are not owner), 400 (BadRequest"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3c2890d8_b1a8cf45","line":268,"range":{"start_line":243,"start_character":0,"end_line":268,"end_character":9},"in_reply_to":"6edeb851_c7d3fb65","updated":"2023-06-06 13:35:56.000000000","message":"This seems still unclear since there is no conclusion of the discussion pointed here, should we go ahead with the full image response ?","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a2c581a07fe3d2a641dcc115caa253c4ff004dd9","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    .. code-block:: json"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        {"},{"line_number":244,"context_line":"            \"checksum\": \"b874c39491a2377b8490f5f1e89761a4\","},{"line_number":245,"context_line":"            \"container_format\": \"bare\","},{"line_number":246,"context_line":"            \"created_at\": \"2023-05-03T21:30:21Z\","},{"line_number":247,"context_line":"            \"disk_format\": \"qcow2\","},{"line_number":248,"context_line":"            \"file\": \"/v2/images/57124e08-3691-4713-82cc-213dc5c7e242/file\","},{"line_number":249,"context_line":"            \"id\": \"57124e08-3691-4713-82cc-213dc5c7e242\","},{"line_number":250,"context_line":"            \"min_disk\": 0,"},{"line_number":251,"context_line":"            \"min_ram\": 0,"},{"line_number":252,"context_line":"            \"name\": \"test-image\","},{"line_number":253,"context_line":"            \"owner\": \"d6634f35c00f409883ecb10361b556c3\","},{"line_number":254,"context_line":"            \"properties\": {"},{"line_number":255,"context_line":"              \"os_hidden\": false,"},{"line_number":256,"context_line":"              \"os_hash_algo\": \"sha512\","},{"line_number":257,"context_line":"              \"os_hash_value\": \"6b813aa46bb90b4da216a4d19376593fa3f4fc7e617f03a92b7fe11e9a3981cbe8f0959dbebe36225e5f53dc4492341a4863cac4ed1ee0909f3fc78ef9c3e869\","},{"line_number":258,"context_line":"              \"stores\": \"lvmdriver-1\","},{"line_number":259,"context_line":"            },"},{"line_number":260,"context_line":"            \"protected\": false,"},{"line_number":261,"context_line":"            \"schema\": \"/v2/schemas/image\","},{"line_number":262,"context_line":"            \"size\": 16300544,"},{"line_number":263,"context_line":"            \"status\": \"active\","},{"line_number":264,"context_line":"            \"tags\": [],"},{"line_number":265,"context_line":"            \"updated_at\": \"2023-05-03T21:32:35Z\","},{"line_number":266,"context_line":"            \"virtual_size\": 117440512,"},{"line_number":267,"context_line":"            \"visibility\": \"shared\""},{"line_number":268,"context_line":"        }"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    - Error - 409 (Location already exists or if image is not in QUEUED"},{"line_number":271,"context_line":"      state), 403 (Forbidden for users that are not owner), 400 (BadRequest"}],"source_content_type":"text/x-rst","patch_set":1,"id":"b9de66c9_842c0fb4","line":268,"range":{"start_line":243,"start_character":0,"end_line":268,"end_character":9},"in_reply_to":"89e5b2cb_5b5184a8","updated":"2023-06-07 10:05:08.000000000","message":"Done\nagain not sure if the current response is limited or enough but that\u0027s what we get in the locations attribute when we do image-show","commit_id":"de5d4a80d3432eeea58b524420b4f48d07167431"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b2f7d8146d32aca39c7cdd37a51b9204bac5469c","unresolved":true,"context_lines":[{"line_number":128,"context_line":"    Polling for ``active`` image status is optional since the image gets"},{"line_number":129,"context_line":"    active when ``validation_data`` is not provided and hash calculation"},{"line_number":130,"context_line":"    is ongoing in the background i.e. this case. The ``os_hash_algo`` value"},{"line_number":131,"context_line":"    will be popped if hash calculation fails."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"* ``do_secure_hash`` is ``False`` and ``validation_data`` is not None:"},{"line_number":134,"context_line":"  Image transition: (queued, active)"}],"source_content_type":"text/x-rst","patch_set":2,"id":"980d3532_01caf9a5","line":131,"updated":"2023-05-19 14:08:59.000000000","message":"This covers both cases of do_secure_hash\u003d(True|False) in a way that the client behavior is the same, which I think is good. The same thing happens if we\u0027re not going to hash as does if we intended to but now can\u0027t for some other reason.","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e53a6c817d3ea7e3bc4cf3e9161663514143d25b","unresolved":true,"context_lines":[{"line_number":128,"context_line":"    Polling for ``active`` image status is optional since the image gets"},{"line_number":129,"context_line":"    active when ``validation_data`` is not provided and hash calculation"},{"line_number":130,"context_line":"    is ongoing in the background i.e. this case. The ``os_hash_algo`` value"},{"line_number":131,"context_line":"    will be popped if hash calculation fails."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"* ``do_secure_hash`` is ``False`` and ``validation_data`` is not None:"},{"line_number":134,"context_line":"  Image transition: (queued, active)"}],"source_content_type":"text/x-rst","patch_set":2,"id":"a4f2b8ff_42f24fb3","line":131,"in_reply_to":"980d3532_01caf9a5","updated":"2023-05-22 19:36:15.000000000","message":"I\u0027m not sure if i understand. For the case do_secure_hash\u003dFalse, we won\u0027t be going through the hash calculation process in background. Are we referring to the case where when do_secure_hash\u003dFalse, and hash calculation fails so we will fall back to the same scenario as if do_secure_hash was False? i.e. no hash value but image is active","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1c5ebb7801347b1565873ef617c1875d07311374","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    Polling for ``active`` image status is optional since the image gets"},{"line_number":129,"context_line":"    active when ``validation_data`` is not provided and hash calculation"},{"line_number":130,"context_line":"    is ongoing in the background i.e. this case. The ``os_hash_algo`` value"},{"line_number":131,"context_line":"    will be popped if hash calculation fails."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"* ``do_secure_hash`` is ``False`` and ``validation_data`` is not None:"},{"line_number":134,"context_line":"  Image transition: (queued, active)"}],"source_content_type":"text/x-rst","patch_set":2,"id":"f2791cdd_21317c65","line":131,"in_reply_to":"a4f2b8ff_42f24fb3","updated":"2023-05-22 19:43:50.000000000","message":"Right, if do_secure_hash\u003dFalse, then we won\u0027t set os_hash_algo to indicate that it is \"pending\" and thus the client polling logic will be the same whether we\u0027ve tried and given up doing the hash or aren\u0027t trying at all. It just means the client doesn\u0027t need three possibilities to check for.\n\nAnd it case it wasn\u0027t clear, I was saying \"what is here is *good*\" :)","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a9b10291d5398d78408ac450e872cddd755fe82e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    Polling for ``active`` image status is optional since the image gets"},{"line_number":129,"context_line":"    active when ``validation_data`` is not provided and hash calculation"},{"line_number":130,"context_line":"    is ongoing in the background i.e. this case. The ``os_hash_algo`` value"},{"line_number":131,"context_line":"    will be popped if hash calculation fails."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"* ``do_secure_hash`` is ``False`` and ``validation_data`` is not None:"},{"line_number":134,"context_line":"  Image transition: (queued, active)"}],"source_content_type":"text/x-rst","patch_set":2,"id":"a39bd66b_fb62f26d","line":131,"in_reply_to":"f2791cdd_21317c65","updated":"2023-05-22 19:47:52.000000000","message":"Ack, yeah the flow is kind of consistent in that way. just wanted to know if I understood what you were trying to convey. Thanks Dan!","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b2f7d8146d32aca39c7cdd37a51b9204bac5469c","unresolved":true,"context_lines":[{"line_number":252,"context_line":"  to add the hash values to the image. The cases of ``validation_data`` with"},{"line_number":253,"context_line":"  ``do_secure_hash`` are described in the `Proposed change`_ section."},{"line_number":254,"context_line":"  An example where ``validation_data`` will be provided is the HTTP store case,"},{"line_number":255,"context_line":"  where the user will provided hash and checksum values for the HTTP image."},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"  Unlike old location API, we will not provide support of adding a location"},{"line_number":258,"context_line":"  on a particular index. If we want to get the benefit of indexes, we can"}],"source_content_type":"text/x-rst","patch_set":2,"id":"defcda9f_43cfe638","line":255,"range":{"start_line":255,"start_character":22,"end_line":255,"end_character":30},"updated":"2023-05-19 14:08:59.000000000","message":"This should be \"provide\".","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e53a6c817d3ea7e3bc4cf3e9161663514143d25b","unresolved":false,"context_lines":[{"line_number":252,"context_line":"  to add the hash values to the image. The cases of ``validation_data`` with"},{"line_number":253,"context_line":"  ``do_secure_hash`` are described in the `Proposed change`_ section."},{"line_number":254,"context_line":"  An example where ``validation_data`` will be provided is the HTTP store case,"},{"line_number":255,"context_line":"  where the user will provided hash and checksum values for the HTTP image."},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"  Unlike old location API, we will not provide support of adding a location"},{"line_number":258,"context_line":"  on a particular index. If we want to get the benefit of indexes, we can"}],"source_content_type":"text/x-rst","patch_set":2,"id":"07ce2681_ccfb3931","line":255,"range":{"start_line":255,"start_character":22,"end_line":255,"end_character":30},"in_reply_to":"defcda9f_43cfe638","updated":"2023-05-22 19:36:15.000000000","message":"Done","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"45aa42d255097162f42346e0ceaf3360dae3cf8e","unresolved":true,"context_lines":[{"line_number":469,"context_line":"  APIs."},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"* Add a new configuration parameter ``do_secure_hash`` in glance and document"},{"line_number":472,"context_line":"  it\u0027s impact."},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"* Add SDK support to call the new APIs."},{"line_number":475,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"6f86329f_b084d8c5","line":472,"updated":"2023-05-22 15:08:50.000000000","message":"Similar we need to document about http_retries config option as well","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e53a6c817d3ea7e3bc4cf3e9161663514143d25b","unresolved":false,"context_lines":[{"line_number":469,"context_line":"  APIs."},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"* Add a new configuration parameter ``do_secure_hash`` in glance and document"},{"line_number":472,"context_line":"  it\u0027s impact."},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"* Add SDK support to call the new APIs."},{"line_number":475,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"4068ea4f_f80c7213","line":472,"in_reply_to":"6f86329f_b084d8c5","updated":"2023-05-22 19:36:15.000000000","message":"Done","commit_id":"40dac0d6246719500bb6aeef0b8ab19bf642ab96"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"380e8db5039c4b8edc7c453ab470ab170c1b512b","unresolved":true,"context_lines":[{"line_number":98,"context_line":"``do_secure_hash`` and ``validation_data``:"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* ``do_secure_hash`` is ``True`` and ``validation_data`` is not None:"},{"line_number":101,"context_line":"  Image transition: (queued, importing, active)"},{"line_number":102,"context_line":"  In this case the consumer provides the hash values for validation and"},{"line_number":103,"context_line":"  hash is calculated by glance."},{"line_number":104,"context_line":"  An example of this case will be providing validation_data for HTTP store."}],"source_content_type":"text/x-rst","patch_set":3,"id":"3ad996f0_7e6b4d76","line":101,"updated":"2023-05-23 12:25:17.000000000","message":"Don\u0027t forget that in RST, you must put a blank line between paragraphs. All the points are jammed together in a single paragraph in the HTML version:\n\nhttps://56e0692a88cb55dd6667-d8297188bf8b86f9edb8392954d0ac22.ssl.cf2.rackcdn.com/883491/3/check/openstack-tox-docs/91ca399/docs/specs/2023.2/approved/glance/new-location-info-apis.html\n\nIt would be good to separate them out to make it easier to read.","commit_id":"335dd0c61600aa83e8b2f5f21c92d569e1f05b33"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"4852b67a10f15f6ac9a0f2a51299d61c7d7489d9","unresolved":false,"context_lines":[{"line_number":98,"context_line":"``do_secure_hash`` and ``validation_data``:"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* ``do_secure_hash`` is ``True`` and ``validation_data`` is not None:"},{"line_number":101,"context_line":"  Image transition: (queued, importing, active)"},{"line_number":102,"context_line":"  In this case the consumer provides the hash values for validation and"},{"line_number":103,"context_line":"  hash is calculated by glance."},{"line_number":104,"context_line":"  An example of this case will be providing validation_data for HTTP store."}],"source_content_type":"text/x-rst","patch_set":3,"id":"f9ec05fe_15936239","line":101,"in_reply_to":"3ad996f0_7e6b4d76","updated":"2023-05-24 10:20:32.000000000","message":"Done\nThanks Brian for pointing out the rendering, i forgot to check.\nIt should be good now\nhttps://b6ff6f0e1bf6dfd52eb1-a7815a9e1b3d1577ce50a16fa096c383.ssl.cf1.rackcdn.com/883491/4/check/openstack-tox-docs/ac0a1c8/docs/specs/2023.2/approved/glance/new-location-info-apis.html","commit_id":"335dd0c61600aa83e8b2f5f21c92d569e1f05b33"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4a941a6689cced8f4692c674634c1a4983458ac7","unresolved":true,"context_lines":[{"line_number":104,"context_line":"  In this case the consumer provides the hash values for validation and"},{"line_number":105,"context_line":"  hash is calculated by glance."},{"line_number":106,"context_line":"  An example of this case will be providing validation_data for HTTP store."},{"line_number":107,"context_line":"  Here image hash will be calculated and verified before setting image to"},{"line_number":108,"context_line":"  active state."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"* ``do_secure_hash`` is ``True`` and ``validation_data`` is None:"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"8e138489_b2e412a9","line":108,"range":{"start_line":107,"start_character":2,"end_line":108,"end_character":15},"updated":"2023-05-30 13:23:20.000000000","message":"If I understand it correctly, hash \u0026 checksum calculation will happen in the background after location registration and at line #89 it\u0027s mentioned that \u0027image will be set to \u0027active\u0027 state after registering the location even if hash calculation is ongoing in background\u0027, so how it is possible to calculate hash \u0026 verify it before setting image to \u0027active\u0027 state?","commit_id":"dd10beb321a0b9638b052dc7154db49b38f6f3d2"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"31140f82e1c6e27d21db1ac9ebf836e13be5b03c","unresolved":true,"context_lines":[{"line_number":104,"context_line":"  In this case the consumer provides the hash values for validation and"},{"line_number":105,"context_line":"  hash is calculated by glance."},{"line_number":106,"context_line":"  An example of this case will be providing validation_data for HTTP store."},{"line_number":107,"context_line":"  Here image hash will be calculated and verified before setting image to"},{"line_number":108,"context_line":"  active state."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"* ``do_secure_hash`` is ``True`` and ``validation_data`` is None:"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"52991812_dde1e0e0","line":108,"range":{"start_line":107,"start_character":2,"end_line":108,"end_character":15},"in_reply_to":"61804432_9677c25c","updated":"2023-05-31 10:19:18.000000000","message":"Yes, your analysis is correct.\nIn this section we are going through different cases with the combination of values of do_secure_hash and validation_data i.e. total 4 cases\n\nThe two cases you mentioned are,\n1) do_secure_hash is True and validation_data is not None\nHere we want to confirm if the hash calculation of the image matches the validation_data which is the purpose of added security by providing validation_data\nHence we don\u0027t set the image to active state until calculated hash \u003d validation_data\n\nThere is merit in having this as async operation since glance would return immediately when nova or cinder requests this operation. Even though the image won\u0027t be usable immediately, nova and cinder don\u0027t have to wait for the hash calculation to complete.\n\n2) do_secure_hash is True and validation_data is None\nHere we don\u0027t have any way of verifying if the calculated hash is correct and we have to trust glance that the calculated values are indeed correct.\nAgain we don\u0027t want to halt the callers (cinder and nova) for operation completion so we will keep this async and hash calculation will be performed in the background\nThe reason to set image as active in this case is, nova expects snapshots to be fast and then uses the image to launch multiple more VMs\nHash is good for security but shouldn\u0027t be mandatory to create VMs or bootable volumes so that\u0027s a trade off we have to make until the hash calculation is complete but it matches with what we have today so should be fine.","commit_id":"dd10beb321a0b9638b052dc7154db49b38f6f3d2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3a294d0639596eb6cdf4c5f9b865cbf65f386695","unresolved":true,"context_lines":[{"line_number":104,"context_line":"  In this case the consumer provides the hash values for validation and"},{"line_number":105,"context_line":"  hash is calculated by glance."},{"line_number":106,"context_line":"  An example of this case will be providing validation_data for HTTP store."},{"line_number":107,"context_line":"  Here image hash will be calculated and verified before setting image to"},{"line_number":108,"context_line":"  active state."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"* ``do_secure_hash`` is ``True`` and ``validation_data`` is None:"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"b419ed5c_4d47e8e4","line":108,"range":{"start_line":107,"start_character":2,"end_line":108,"end_character":15},"in_reply_to":"8e138489_b2e412a9","updated":"2023-05-30 13:34:06.000000000","message":"The hash calculation will happen in the background only for the case where the user does *not* provide it. This example is for when they *do*, in which case we calculate the hash to confirm that it matches before we set the image to active. That makes the hash values basically \"this is what I know the image to be, confirm before you allow other people to use it.\"","commit_id":"dd10beb321a0b9638b052dc7154db49b38f6f3d2"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"96357963adf76452727e61579b782d121cb4e983","unresolved":true,"context_lines":[{"line_number":104,"context_line":"  In this case the consumer provides the hash values for validation and"},{"line_number":105,"context_line":"  hash is calculated by glance."},{"line_number":106,"context_line":"  An example of this case will be providing validation_data for HTTP store."},{"line_number":107,"context_line":"  Here image hash will be calculated and verified before setting image to"},{"line_number":108,"context_line":"  active state."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"* ``do_secure_hash`` is ``True`` and ``validation_data`` is None:"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"61804432_9677c25c","line":108,"range":{"start_line":107,"start_character":2,"end_line":108,"end_character":15},"in_reply_to":"b419ed5c_4d47e8e4","updated":"2023-05-31 07:56:02.000000000","message":"\u0027user does not provide it\u0027 meaning validation data is None, right? \nThis case is do_secure_hash is True \u0026 validation_data is not None, and hash \u0026 checksum calculation is required that means it will happen in the background, right? Please correct me if i\u0027m wrong.\nWhat i understand from all the scenarios explained here is,\nwhenever do_secure_hash is true, start a async operation to calculate hash irrespective of validation_data value and if validation data is passed then validate it with the calculated values -\u003e set status to importing -\u003e validation successful -\u003e set status to active, and all these thing will process in background.\n\nBut when validation data is None \u0026 do_secure_hash is true(which is next case explain below) then we will have to set the status to active immediately after registering the location and hash calculation will happen in the background?","commit_id":"dd10beb321a0b9638b052dc7154db49b38f6f3d2"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4a941a6689cced8f4692c674634c1a4983458ac7","unresolved":true,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"  Image transition: (queued, active)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"  In this case validation data will not be provided by the consumer and"},{"line_number":142,"context_line":"  hash is not calculated by glance."},{"line_number":143,"context_line":"  An example of this case will be providing validation_data for HTTP store."},{"line_number":144,"context_line":"  Here image hash will not be calculated and verified but directly set to"}],"source_content_type":"text/x-rst","patch_set":4,"id":"4fe8985c_5f260b1d","line":141,"range":{"start_line":141,"start_character":36,"end_line":141,"end_character":51},"updated":"2023-05-30 13:23:20.000000000","message":"If validation_data is not None means it should be provided by the consumer, right?","commit_id":"dd10beb321a0b9638b052dc7154db49b38f6f3d2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3a294d0639596eb6cdf4c5f9b865cbf65f386695","unresolved":true,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"  Image transition: (queued, active)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"  In this case validation data will not be provided by the consumer and"},{"line_number":142,"context_line":"  hash is not calculated by glance."},{"line_number":143,"context_line":"  An example of this case will be providing validation_data for HTTP store."},{"line_number":144,"context_line":"  Here image hash will not be calculated and verified but directly set to"}],"source_content_type":"text/x-rst","patch_set":4,"id":"cbbe7976_83e01e29","line":141,"range":{"start_line":141,"start_character":36,"end_line":141,"end_character":51},"in_reply_to":"4fe8985c_5f260b1d","updated":"2023-05-30 13:34:06.000000000","message":"Yes, and you\u0027re right, this needs to be \"will be provided\".","commit_id":"dd10beb321a0b9638b052dc7154db49b38f6f3d2"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"31140f82e1c6e27d21db1ac9ebf836e13be5b03c","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"  Image transition: (queued, active)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"  In this case validation data will not be provided by the consumer and"},{"line_number":142,"context_line":"  hash is not calculated by glance."},{"line_number":143,"context_line":"  An example of this case will be providing validation_data for HTTP store."},{"line_number":144,"context_line":"  Here image hash will not be calculated and verified but directly set to"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5fa7804c_b0a0607c","line":141,"range":{"start_line":141,"start_character":36,"end_line":141,"end_character":51},"in_reply_to":"cbbe7976_83e01e29","updated":"2023-05-31 10:19:18.000000000","message":"Done","commit_id":"dd10beb321a0b9638b052dc7154db49b38f6f3d2"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a37819aa1775c87efc402305d2c35abc4b374740","unresolved":true,"context_lines":[{"line_number":90,"context_line":"the hash calculation is ongoing in the background. This is done so that the"},{"line_number":91,"context_line":"image can be used to create instances and bootable volumes instantly after"},{"line_number":92,"context_line":"we\u0027ve registered the location and not wait for the hash calculation since"},{"line_number":93,"context_line":"it is a long running task. After the hash calculation completes, image"},{"line_number":94,"context_line":"properties will be updated with the ``checksum``, ``os_hash_algo`` and"},{"line_number":95,"context_line":"``os_hash_value`` values."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Following are the cases of image transition with different values of"},{"line_number":98,"context_line":"``do_secure_hash`` and ``validation_data``:"}],"source_content_type":"text/x-rst","patch_set":5,"id":"64f31428_f03b5346","line":95,"range":{"start_line":93,"start_character":27,"end_line":95,"end_character":25},"updated":"2023-06-01 16:05:54.000000000","message":"nit: os_hash_algo will be set earlier so that a consumer can do the polling you describe at line 123.  I think we\u0027re all agreed on that, so I\u0027m not going to hold up the spec.","commit_id":"bd64e855754925e2770497a390e8adca02dd124c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f634176d4f2bd3b34a2faa5e91e6417fd3533f4","unresolved":true,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        {"},{"line_number":294,"context_line":"            \"url\": \"cinder://lvmdriver-1/1a304872-b0ca-4992-b2c2-6874c6d5d5f9\","},{"line_number":295,"context_line":"            \"metadata\": \"{\u0027store\u0027: \u0027lvmdriver-1\u0027}\""},{"line_number":296,"context_line":"        }"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    - Error - 409 (Location already exists or if image is not in QUEUED"}],"source_content_type":"text/x-rst","patch_set":6,"id":"103df9da_0a549093","line":295,"updated":"2023-06-07 13:29:58.000000000","message":"If we passed validation_data, and we\u0027re going to use it to validate the image, we should return it here as well, so that another user (who can see this) can see that it\u0027s being validated, and against what. And because it\u0027s needed to be RESTful.","commit_id":"719974203d0d13c3cf751053c46a8dc80f82f497"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"36b9418dcb22adffdabad71e66c02e8d7c95c689","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        {"},{"line_number":294,"context_line":"            \"url\": \"cinder://lvmdriver-1/1a304872-b0ca-4992-b2c2-6874c6d5d5f9\","},{"line_number":295,"context_line":"            \"metadata\": \"{\u0027store\u0027: \u0027lvmdriver-1\u0027}\""},{"line_number":296,"context_line":"        }"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    - Error - 409 (Location already exists or if image is not in QUEUED"}],"source_content_type":"text/x-rst","patch_set":6,"id":"ce44a36b_d31d446d","line":295,"in_reply_to":"103df9da_0a549093","updated":"2023-06-07 14:25:07.000000000","message":"I added that and removed it, don\u0027t know why i keep doing this.\nDone","commit_id":"719974203d0d13c3cf751053c46a8dc80f82f497"}]}
