)]}'
{"doc/source/admin/new-location-apis.rst":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"f4a4ef1df36e0eb029173cdeb3590dd683e7ca7c","unresolved":true,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":".. warning::"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    When ``do_secure_hash`` is set to ``True``, the image will be in"},{"line_number":86,"context_line":"    ``active`` state while the hash calculation will be on-going in the"},{"line_number":87,"context_line":"    background. This will prevent operations like ``delete image`` to"},{"line_number":88,"context_line":"    be performed on the image. Operators using tooling which relies on"},{"line_number":89,"context_line":"    the image status will need to either add checks for image tasks"},{"line_number":90,"context_line":"    to report ``success`` or disable hashing with the ``do_secure_hash``"},{"line_number":91,"context_line":"    configuration option set to ``False``."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":".. note:: Usage of this API for end users is only allowed if http"},{"line_number":94,"context_line":"          store is enabled in the deployment."}],"source_content_type":"text/x-rst","patch_set":2,"id":"acd01a98_f6734a1a","line":91,"range":{"start_line":85,"start_character":0,"end_line":91,"end_character":42},"updated":"2025-05-14 07:42:09.000000000","message":"This is what mentioned in spec\n\n\nHere image hash calculation will be done and updated after setting\n  image to active state.\n  This is a tricky case because the consumer will have no idea if the\n  ``active`` image will ever have a hash value or not and if it should\n  wait for the hash to be populated in the image or not.\n  To handle this, we will set the ``os_hash_algo`` value in the image\n  properties so the consumer will know that hash calculation is ongoing\n  for this image and the hash will be populated here.\n  Here are the following cases:\n\n  * ``active`` image and no ``os_hash_algo``: This image will not have hash\n    value populated.\n  * ``active`` image and has ``os_hash_algo``:  Poll for ``active`` image\n    status and ``os_hash_algo`` until you get ``os_hash_value``.\n    Polling for ``active`` image status is optional since the image gets\n    active when ``validation_data`` is not provided and hash calculation\n    is ongoing in the background i.e. this case. The ``os_hash_algo`` value\n    will be popped if hash calculation fails.\n\n\n\nhttps://review.opendev.org/c/openstack/glance-specs/+/883491/8/specs/2023.2/approved/glance/new-location-info-apis.rst#117","commit_id":"fc889da7ea6913b40b2f933b8f6b9f2eddbd5fe5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"67f2523f803f0061264cec29e53445290d35eb9c","unresolved":true,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":".. warning::"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    When ``do_secure_hash`` is set to ``True``, the image will be in"},{"line_number":86,"context_line":"    ``active`` state while the hash calculation will be on-going in the"},{"line_number":87,"context_line":"    background. This will prevent operations like ``delete image`` to"},{"line_number":88,"context_line":"    be performed on the image. Operators using tooling which relies on"},{"line_number":89,"context_line":"    the image status will need to either add checks for image tasks"},{"line_number":90,"context_line":"    to report ``success`` or disable hashing with the ``do_secure_hash``"},{"line_number":91,"context_line":"    configuration option set to ``False``."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":".. note:: Usage of this API for end users is only allowed if http"},{"line_number":94,"context_line":"          store is enabled in the deployment."}],"source_content_type":"text/x-rst","patch_set":2,"id":"dffe3f9d_bd12ad60","line":91,"range":{"start_line":85,"start_character":0,"end_line":91,"end_character":42},"in_reply_to":"acd01a98_f6734a1a","updated":"2025-05-14 07:43:16.000000000","message":"I think based on this draft, we can add wait mechanism in tempest WDYT?","commit_id":"fc889da7ea6913b40b2f933b8f6b9f2eddbd5fe5"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1ba70f1dd07e0f8a192e3ed5b2d73ae2fd80f3fa","unresolved":true,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":".. warning::"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    When ``do_secure_hash`` is set to ``True``, the image will be in"},{"line_number":86,"context_line":"    ``active`` state while the hash calculation will be on-going in the"},{"line_number":87,"context_line":"    background. This will prevent operations like ``delete image`` to"},{"line_number":88,"context_line":"    be performed on the image. Operators using tooling which relies on"},{"line_number":89,"context_line":"    the image status will need to either add checks for image tasks"},{"line_number":90,"context_line":"    to report ``success`` or disable hashing with the ``do_secure_hash``"},{"line_number":91,"context_line":"    configuration option set to ``False``."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":".. note:: Usage of this API for end users is only allowed if http"},{"line_number":94,"context_line":"          store is enabled in the deployment."}],"source_content_type":"text/x-rst","patch_set":2,"id":"f6388441_b1ee352b","line":91,"range":{"start_line":85,"start_character":0,"end_line":91,"end_character":42},"in_reply_to":"dffe3f9d_bd12ad60","updated":"2025-05-14 08:39:12.000000000","message":"So the os_hash_value field was for notifying the user that hash calculation is done. The problem with using this mechanism in tempest is:\na) we need to know if hash calculation is enabled or not (if disabled, os_hash_value will never be populated)\nb) if the hash calculation fails, we keep checking the os_hash_value in an infinite loop and we need to introduce a timeout mechanism to fail it -- which will also increase the running time of tests\n\nUsing the tasks API is simpler and better because:\na) if hashing is disabled, there are no tasks and we skip the tasks check\nb) if hashing is enabled and a task fails, we fail-fast the test and don\u0027t waste any time waiting for timeout\n\nThe same applies for automated tooling scripts hence i didn\u0027t mention the ``os_hash_value`` part here.","commit_id":"fc889da7ea6913b40b2f933b8f6b9f2eddbd5fe5"}]}
