)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"276b702c04b97042664b62256b9f02375625af3a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"03aa0430_55e5ffbf","updated":"2023-07-19 22:31:22.000000000","message":"thanks brian. approving it to fix the case of single image in glance","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"c02ef978983681f7aa1186f4caf6ace9a9d71fbc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1f62b76d_9b85e7de","updated":"2023-07-19 20:20:39.000000000","message":"thanks, 1 comment inline","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"}],"lib/tempest":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"40588c5ee0dd29e51010d357d18d73e0f04c4c56","unresolved":true,"context_lines":[{"line_number":197,"context_line":"    local images"},{"line_number":198,"context_line":"    local num_images"},{"line_number":199,"context_line":"    local image_uuid"},{"line_number":200,"context_line":"    local image_uuid_alt"},{"line_number":201,"context_line":"    local password"},{"line_number":202,"context_line":"    local line"},{"line_number":203,"context_line":"    local flavors"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"f27495d9_1a0a4bd6","line":200,"updated":"2023-07-19 20:28:03.000000000","message":"Here it is initialized...","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"40588c5ee0dd29e51010d357d18d73e0f04c4c56","unresolved":true,"context_lines":[{"line_number":218,"context_line":"    # testing. Here we simply look for images stored in Glance"},{"line_number":219,"context_line":"    # and set the appropriate variables for use in the tempest config"},{"line_number":220,"context_line":"    # We ignore ramdisk and kernel images, look for the default image"},{"line_number":221,"context_line":"    # ``DEFAULT_IMAGE_NAME``. If not found, we set the ``image_uuid`` to the"},{"line_number":222,"context_line":"    # first image returned and set ``image_uuid_alt`` to the second,"},{"line_number":223,"context_line":"    # if there is more than one returned..."},{"line_number":224,"context_line":"    # ... Also ensure we only take active images, so we don\u0027t get snapshots in process"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"5ff5e97c_d02090bb","line":221,"updated":"2023-07-19 20:28:03.000000000","message":"Here it\u0027s mentioned in a comment...","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"c02ef978983681f7aa1186f4caf6ace9a9d71fbc","unresolved":true,"context_lines":[{"line_number":247,"context_line":"                exit 1"},{"line_number":248,"context_line":"                ;;"},{"line_number":249,"context_line":"            1)"},{"line_number":250,"context_line":"                if [ -z \"$image_uuid\" ]; then"},{"line_number":251,"context_line":"                    image_uuid\u003d${images[0]}"},{"line_number":252,"context_line":"                fi"},{"line_number":253,"context_line":"                image_uuid_alt\u003d$image_uuid"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"30cdbe0c_fe10f650","line":250,"range":{"start_line":250,"start_character":0,"end_line":250,"end_character":45},"updated":"2023-07-19 20:20:39.000000000","message":"I think there is no case where image_uuid is set but not alt one.","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"40588c5ee0dd29e51010d357d18d73e0f04c4c56","unresolved":true,"context_lines":[{"line_number":248,"context_line":"                ;;"},{"line_number":249,"context_line":"            1)"},{"line_number":250,"context_line":"                if [ -z \"$image_uuid\" ]; then"},{"line_number":251,"context_line":"                    image_uuid\u003d${images[0]}"},{"line_number":252,"context_line":"                fi"},{"line_number":253,"context_line":"                image_uuid_alt\u003d$image_uuid"},{"line_number":254,"context_line":"                ;;"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"0458e631_5e3560d3","line":251,"updated":"2023-07-19 20:28:03.000000000","message":"Since image_uuid is set, this is never hit","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"276b702c04b97042664b62256b9f02375625af3a","unresolved":true,"context_lines":[{"line_number":248,"context_line":"                ;;"},{"line_number":249,"context_line":"            1)"},{"line_number":250,"context_line":"                if [ -z \"$image_uuid\" ]; then"},{"line_number":251,"context_line":"                    image_uuid\u003d${images[0]}"},{"line_number":252,"context_line":"                fi"},{"line_number":253,"context_line":"                image_uuid_alt\u003d$image_uuid"},{"line_number":254,"context_line":"                ;;"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"f21ac690_efce47ff","line":251,"in_reply_to":"0458e631_5e3560d3","updated":"2023-07-19 22:31:22.000000000","message":"yeah this is issue and this also make case where image_uuid_alt can be unset","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"c02ef978983681f7aa1186f4caf6ace9a9d71fbc","unresolved":true,"context_lines":[{"line_number":250,"context_line":"                if [ -z \"$image_uuid\" ]; then"},{"line_number":251,"context_line":"                    image_uuid\u003d${images[0]}"},{"line_number":252,"context_line":"                fi"},{"line_number":253,"context_line":"                image_uuid_alt\u003d$image_uuid"},{"line_number":254,"context_line":"                ;;"},{"line_number":255,"context_line":"            *)"},{"line_number":256,"context_line":"                if [ -z \"$image_uuid\" ]; then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"7fc01f1f_25cd1dc0","line":253,"range":{"start_line":253,"start_character":0,"end_line":253,"end_character":42},"updated":"2023-07-19 20:20:39.000000000","message":"let\u0027s check if that is already set or not\n\nif [ -z \"$image_uuid_alt\" ]; then\n    image_uuid_alt\u003d${images[0]}","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"276b702c04b97042664b62256b9f02375625af3a","unresolved":true,"context_lines":[{"line_number":250,"context_line":"                if [ -z \"$image_uuid\" ]; then"},{"line_number":251,"context_line":"                    image_uuid\u003d${images[0]}"},{"line_number":252,"context_line":"                fi"},{"line_number":253,"context_line":"                image_uuid_alt\u003d$image_uuid"},{"line_number":254,"context_line":"                ;;"},{"line_number":255,"context_line":"            *)"},{"line_number":256,"context_line":"                if [ -z \"$image_uuid\" ]; then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"4a99d231_7daf5277","line":253,"range":{"start_line":253,"start_character":0,"end_line":253,"end_character":42},"in_reply_to":"2ed2ac84_b425161c","updated":"2023-07-19 22:31:22.000000000","message":"I checked the code again and do not think we are setting it anywhere image_uuid_alt as \"\" only this \u0027case\u0027 set it. But I am fine if we want to set it always when there is only one image in glance.","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"40588c5ee0dd29e51010d357d18d73e0f04c4c56","unresolved":true,"context_lines":[{"line_number":250,"context_line":"                if [ -z \"$image_uuid\" ]; then"},{"line_number":251,"context_line":"                    image_uuid\u003d${images[0]}"},{"line_number":252,"context_line":"                fi"},{"line_number":253,"context_line":"                image_uuid_alt\u003d$image_uuid"},{"line_number":254,"context_line":"                ;;"},{"line_number":255,"context_line":"            *)"},{"line_number":256,"context_line":"                if [ -z \"$image_uuid\" ]; then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"2ed2ac84_b425161c","line":253,"range":{"start_line":253,"start_character":0,"end_line":253,"end_character":42},"in_reply_to":"7fc01f1f_25cd1dc0","updated":"2023-07-19 20:28:03.000000000","message":"I had something like this locally but on L302 below and it always was \"\"","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3916830e0d5f1b3d7db7dec49493ef770c3d1a3b","unresolved":true,"context_lines":[{"line_number":255,"context_line":"            *)"},{"line_number":256,"context_line":"                if [ -z \"$image_uuid\" ]; then"},{"line_number":257,"context_line":"                    image_uuid\u003d${images[0]}"},{"line_number":258,"context_line":"                    if [ -z \"$image_uuid_alt\" ]; then"},{"line_number":259,"context_line":"                        image_uuid_alt\u003d${images[1]}"},{"line_number":260,"context_line":"                    fi"},{"line_number":261,"context_line":"                elif [ -z \"$image_uuid_alt\" ]; then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"a9e28519_688a9fea","line":258,"updated":"2023-07-19 20:56:50.000000000","message":"This check can also be safely removed, since as I\u0027ve shown above image_uuid_alt is never initialized when we get here","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3916830e0d5f1b3d7db7dec49493ef770c3d1a3b","unresolved":true,"context_lines":[{"line_number":258,"context_line":"                    if [ -z \"$image_uuid_alt\" ]; then"},{"line_number":259,"context_line":"                        image_uuid_alt\u003d${images[1]}"},{"line_number":260,"context_line":"                    fi"},{"line_number":261,"context_line":"                elif [ -z \"$image_uuid_alt\" ]; then"},{"line_number":262,"context_line":"                    for image in ${images[@]}; do"},{"line_number":263,"context_line":"                        if [[ \"$image\" !\u003d \"$image_uuid\" ]]; then"},{"line_number":264,"context_line":"                            image_uuid_alt\u003d$image"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"b6cfdd9b_a1a7a587","line":261,"updated":"2023-07-19 20:56:50.000000000","message":"And this should change to an \u0027if\u0027, just in case images[1] was somehow not set?","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3916830e0d5f1b3d7db7dec49493ef770c3d1a3b","unresolved":true,"context_lines":[{"line_number":268,"context_line":"                fi"},{"line_number":269,"context_line":"                ;;"},{"line_number":270,"context_line":"        esac"},{"line_number":271,"context_line":"    fi"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    # (Re)create ``tempest.conf``"},{"line_number":274,"context_line":"    # Create every time because the image UUIDS are going to change"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"6b3c17b9_b0a4f85b","line":271,"updated":"2023-07-19 20:56:50.000000000","message":"So if we get to this point, and both image_uuid and image_uuid_alt are not set, the code below can fail. Is there ever a case where it can be not set and still valid?","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"276b702c04b97042664b62256b9f02375625af3a","unresolved":true,"context_lines":[{"line_number":268,"context_line":"                fi"},{"line_number":269,"context_line":"                ;;"},{"line_number":270,"context_line":"        esac"},{"line_number":271,"context_line":"    fi"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    # (Re)create ``tempest.conf``"},{"line_number":274,"context_line":"    # Create every time because the image UUIDS are going to change"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"c656333f_18ca6105","line":271,"in_reply_to":"6b3c17b9_b0a4f85b","updated":"2023-07-19 22:31:22.000000000","message":"no we should not have case where those are not set so I am ok to set them always when there is one image in glance. but in the case of for loop(multiple images in glance)it is ok to check if that is set or not before setting it.","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3916830e0d5f1b3d7db7dec49493ef770c3d1a3b","unresolved":true,"context_lines":[{"line_number":299,"context_line":"            flavor_ref\u003d42"},{"line_number":300,"context_line":"            if [[ ! ( $available_flavors \u003d~ \u0027m1.micro\u0027 ) ]]; then"},{"line_number":301,"context_line":"                # Determine the alt flavor disk size based on the alt image size."},{"line_number":302,"context_line":"                disk\u003d$(image_size_in_gib $image_uuid_alt)"},{"line_number":303,"context_line":"                openstack --os-cloud devstack-admin flavor create --id 84 --ram 192 --disk $disk --vcpus 1 --property hw_rng:allowed\u003dTrue m1.micro"},{"line_number":304,"context_line":"            fi"},{"line_number":305,"context_line":"            flavor_ref_alt\u003d84"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"4df327ef_15966ffc","line":302,"updated":"2023-07-19 20:56:50.000000000","message":"This is the call that was failing for me locally without the above change. I guess it could be under an if to just avoid it, but then image_uuid_alt is also used below in the writing of tempest.conf.","commit_id":"e261bd809e81c01c153cdcdb50be47ed3c89c46a"}]}
