)]}'
{"controllerconfig/controllerconfig/scripts/controller_config":[{"author":{"_account_id":14174,"name":"Bart Wensley","email":"bartwensley@hotmail.com","username":"bartwensley"},"change_message_id":"21fa5804d9948fb6bcdfaa34acae709960a8c258","unresolved":true,"context_lines":[{"line_number":232,"context_line":"    echo \"Configuring controller node...\""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    # Remove the flag if it exists"},{"line_number":235,"context_line":"    if [ -e ${ACTIVE_CONTROLLER_NOT_FOUND_FLAG} ]"},{"line_number":236,"context_line":"    then"},{"line_number":237,"context_line":"        rm -f ${ACTIVE_CONTROLLER_NOT_FOUND_FLAG}"},{"line_number":238,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"480ea9ee_3e9fa27f","line":235,"range":{"start_line":235,"start_character":4,"end_line":235,"end_character":49},"updated":"2020-12-04 20:06:05.000000000","message":"nit: remove the \"if\" statement since the \"rm -f\" is always safe to do","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":28676,"name":"Andy Ning","email":"andy.ning@windriver.com","username":"andy.wrs"},"change_message_id":"a11ef4cd2063617d519b68377119c938400acc9e","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    echo \"Configuring controller node...\""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    # Remove the flag if it exists"},{"line_number":235,"context_line":"    if [ -e ${ACTIVE_CONTROLLER_NOT_FOUND_FLAG} ]"},{"line_number":236,"context_line":"    then"},{"line_number":237,"context_line":"        rm -f ${ACTIVE_CONTROLLER_NOT_FOUND_FLAG}"},{"line_number":238,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"f12880a1_23b510c5","line":235,"range":{"start_line":235,"start_character":4,"end_line":235,"end_character":49},"in_reply_to":"480ea9ee_3e9fa27f","updated":"2020-12-04 20:51:25.000000000","message":"Ack","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"99db05ae26de71060543b374a1d6894a695074d1","unresolved":true,"context_lines":[{"line_number":244,"context_line":"        if [ $? -ne 0 ]"},{"line_number":245,"context_line":"        then"},{"line_number":246,"context_line":"            # \u0027controller-platform-nfs\u0027 is not available, try to config using"},{"line_number":247,"context_line":"            # locally cached hieredata."},{"line_number":248,"context_line":"            echo \"No active controller found, will try to config using local cached hieradata.\""},{"line_number":249,"context_line":"            ACTIVE_CONTROLLER_NOT_FOUND\u003dtrue"},{"line_number":250,"context_line":"            touch ${ACTIVE_CONTROLLER_NOT_FOUND_FLAG}"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"5a8455f1_b0b0c2b5","line":247,"range":{"start_line":247,"start_character":29,"end_line":247,"end_character":38},"updated":"2020-12-04 18:27:23.000000000","message":"hiearadata","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":28676,"name":"Andy Ning","email":"andy.ning@windriver.com","username":"andy.wrs"},"change_message_id":"a11ef4cd2063617d519b68377119c938400acc9e","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        if [ $? -ne 0 ]"},{"line_number":245,"context_line":"        then"},{"line_number":246,"context_line":"            # \u0027controller-platform-nfs\u0027 is not available, try to config using"},{"line_number":247,"context_line":"            # locally cached hieredata."},{"line_number":248,"context_line":"            echo \"No active controller found, will try to config using local cached hieradata.\""},{"line_number":249,"context_line":"            ACTIVE_CONTROLLER_NOT_FOUND\u003dtrue"},{"line_number":250,"context_line":"            touch ${ACTIVE_CONTROLLER_NOT_FOUND_FLAG}"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"5af00f9d_e8f1d1d0","line":247,"range":{"start_line":247,"start_character":29,"end_line":247,"end_character":38},"in_reply_to":"5a8455f1_b0b0c2b5","updated":"2020-12-04 20:51:25.000000000","message":"Ack","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":14174,"name":"Bart Wensley","email":"bartwensley@hotmail.com","username":"bartwensley"},"change_message_id":"21fa5804d9948fb6bcdfaa34acae709960a8c258","unresolved":true,"context_lines":[{"line_number":403,"context_line":"        fi"},{"line_number":404,"context_line":"    fi"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    # Keep the /opt/branding directory to preserve any new files"},{"line_number":407,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":408,"context_line":"    then"},{"line_number":409,"context_line":"        rm -rf /opt/branding/*.tgz"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"8f96ed00_ea377941","line":406,"range":{"start_line":406,"start_character":4,"end_line":406,"end_character":64},"updated":"2020-12-04 20:06:05.000000000","message":"Move the comment inside the if statement.","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":28676,"name":"Andy Ning","email":"andy.ning@windriver.com","username":"andy.wrs"},"change_message_id":"a11ef4cd2063617d519b68377119c938400acc9e","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        fi"},{"line_number":404,"context_line":"    fi"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    # Keep the /opt/branding directory to preserve any new files"},{"line_number":407,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":408,"context_line":"    then"},{"line_number":409,"context_line":"        rm -rf /opt/branding/*.tgz"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"28ca97ee_ef97cbda","line":406,"range":{"start_line":406,"start_character":4,"end_line":406,"end_character":64},"in_reply_to":"8f96ed00_ea377941","updated":"2020-12-04 20:51:25.000000000","message":"Ack","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":14174,"name":"Bart Wensley","email":"bartwensley@hotmail.com","username":"bartwensley"},"change_message_id":"21fa5804d9948fb6bcdfaa34acae709960a8c258","unresolved":true,"context_lines":[{"line_number":411,"context_line":"    fi"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    # banner customization always returns 0, success:"},{"line_number":414,"context_line":"    /usr/sbin/install_banner_customization"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":417,"context_line":"    then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"f07bfa4f_e5564272","line":414,"range":{"start_line":414,"start_character":4,"end_line":414,"end_character":42},"updated":"2020-12-04 20:06:05.000000000","message":"I think this relies on /opt/platform/config so should it also be skipped? If so, just use one if statement for lines 409 to 422.","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":28676,"name":"Andy Ning","email":"andy.ning@windriver.com","username":"andy.wrs"},"change_message_id":"a11ef4cd2063617d519b68377119c938400acc9e","unresolved":true,"context_lines":[{"line_number":411,"context_line":"    fi"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    # banner customization always returns 0, success:"},{"line_number":414,"context_line":"    /usr/sbin/install_banner_customization"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":417,"context_line":"    then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"079b05f9_6ef60d78","line":414,"range":{"start_line":414,"start_character":4,"end_line":414,"end_character":42},"in_reply_to":"f07bfa4f_e5564272","updated":"2020-12-04 20:51:25.000000000","message":"\u003e I think this relies on /opt/platform/config so should it also be skipped? If so, just use one if statement for lines 409 to 422.\n\nThis is actually safe without the check. But I\u0027ll move it inside the if statement for code to be more clear.","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":14174,"name":"Bart Wensley","email":"bartwensley@hotmail.com","username":"bartwensley"},"change_message_id":"21fa5804d9948fb6bcdfaa34acae709960a8c258","unresolved":true,"context_lines":[{"line_number":505,"context_line":"        fi"},{"line_number":506,"context_line":"    fi"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"    # Copy the hieradata and the staging secured vault"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":511,"context_line":"    then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"f2f9d963_b0d5a818","line":508,"range":{"start_line":508,"start_character":4,"end_line":508,"end_character":54},"updated":"2020-12-04 20:06:05.000000000","message":"This should be inside the if statement.","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":28676,"name":"Andy Ning","email":"andy.ning@windriver.com","username":"andy.wrs"},"change_message_id":"a11ef4cd2063617d519b68377119c938400acc9e","unresolved":false,"context_lines":[{"line_number":505,"context_line":"        fi"},{"line_number":506,"context_line":"    fi"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"    # Copy the hieradata and the staging secured vault"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":511,"context_line":"    then"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"f535ef33_459eaae7","line":508,"range":{"start_line":508,"start_character":4,"end_line":508,"end_character":54},"in_reply_to":"f2f9d963_b0d5a818","updated":"2020-12-04 20:51:25.000000000","message":"Ack","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"99db05ae26de71060543b374a1d6894a695074d1","unresolved":true,"context_lines":[{"line_number":524,"context_line":"            umount_platform_dir"},{"line_number":525,"context_line":"            fatal_error \"Failed to copy puppet directory ${PUPPET_PATH} into cache dir ${PUPPET_CACHE}\""},{"line_number":526,"context_line":"        fi"},{"line_number":527,"context_line":"    fi"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":530,"context_line":"    then"},{"line_number":531,"context_line":"        cp -RL $VAULT_DIR /tmp"},{"line_number":532,"context_line":"        if [ $? -ne 0 ]"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"2cfa7c4f_b1fad940","line":529,"range":{"start_line":527,"start_character":0,"end_line":529,"end_character":43},"updated":"2020-12-04 18:27:23.000000000","message":"This looks like it can be combined with previous if [ !${ACTIVE_CONTROLLER_NOT_FOUND} statements or a function to be run when active controller found","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":28676,"name":"Andy Ning","email":"andy.ning@windriver.com","username":"andy.wrs"},"change_message_id":"a11ef4cd2063617d519b68377119c938400acc9e","unresolved":false,"context_lines":[{"line_number":524,"context_line":"            umount_platform_dir"},{"line_number":525,"context_line":"            fatal_error \"Failed to copy puppet directory ${PUPPET_PATH} into cache dir ${PUPPET_CACHE}\""},{"line_number":526,"context_line":"        fi"},{"line_number":527,"context_line":"    fi"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":530,"context_line":"    then"},{"line_number":531,"context_line":"        cp -RL $VAULT_DIR /tmp"},{"line_number":532,"context_line":"        if [ $? -ne 0 ]"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"afb677e2_ae4f4dfe","line":529,"range":{"start_line":527,"start_character":0,"end_line":529,"end_character":43},"in_reply_to":"2cfa7c4f_b1fad940","updated":"2020-12-04 20:51:25.000000000","message":"Ack","commit_id":"cbce88d34c828302c2bc63935b52df2c4bb29e33"},{"author":{"_account_id":15435,"name":"Al Bailey","email":"albailey1974@gmail.com","username":"albailey"},"change_message_id":"8fab2eb5c52d165d5f0f15e106022c081e06d960","unresolved":true,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"mount_platform_dir()"},{"line_number":119,"context_line":"{"},{"line_number":120,"context_line":"    if [ ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":121,"context_line":"    then"},{"line_number":122,"context_line":"        return"},{"line_number":123,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"bf7bea41_441e25aa","line":120,"updated":"2020-12-07 14:37:59.000000000","message":"Is this the correct syntax","commit_id":"fa7d32872e0fc4a78c0ffde09d539422ce9e212d"},{"author":{"_account_id":28431,"name":"Don Penney","email":"dpenney@redhat.com","username":"dpenney"},"change_message_id":"7ed604e7fdf6a1aff308345a742d0df26567587c","unresolved":true,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"mount_platform_dir()"},{"line_number":119,"context_line":"{"},{"line_number":120,"context_line":"    if [ ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":121,"context_line":"    then"},{"line_number":122,"context_line":"        return"},{"line_number":123,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"219c4afd_2900963f","line":120,"in_reply_to":"05a9632f_7c709cb7","updated":"2020-12-07 15:09:33.000000000","message":"This is not bash syntax, or at least you\u0027re using it in a misleading way. You\u0027re not setting ACTIVE_CONTROLLER_NOT_FOUND to the boolean true, you\u0027re just setting it to a string. This is also prone to easily being broken by someone in the future, like if the spot where you are setting this variable ends up in a subprocess for whatever reason, or if someone decides this is incomplete because it\u0027s not globally set with a default \"false\" value.\n\nPlease be consistent with the script and do your checks as:\nif [ -e \"${ACTIVE_CONTROLLER_NOT_FOUND_FLAG}\" ]","commit_id":"fa7d32872e0fc4a78c0ffde09d539422ce9e212d"},{"author":{"_account_id":28676,"name":"Andy Ning","email":"andy.ning@windriver.com","username":"andy.wrs"},"change_message_id":"a5638c059315cc5d8d9f7b9357a907f26008ec39","unresolved":true,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"mount_platform_dir()"},{"line_number":119,"context_line":"{"},{"line_number":120,"context_line":"    if [ ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":121,"context_line":"    then"},{"line_number":122,"context_line":"        return"},{"line_number":123,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"05a9632f_7c709cb7","line":120,"in_reply_to":"bf7bea41_441e25aa","updated":"2020-12-07 14:54:12.000000000","message":"\u003e Is this the correct syntax\n\nYes, [ ${ACTIVE_CONTROLLER_NOT_FOUND} ] will be true if it is set (or defined) to a value. Otherwise it will be false.\n\nThis can be tested by:\n  [ ${foobar} ] \u0026\u0026 echo \"foobar is set\" || echo \"foobar is unset\"","commit_id":"fa7d32872e0fc4a78c0ffde09d539422ce9e212d"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"e573cae3a51e7104b027c60bd702b9cb0f00abf0","unresolved":true,"context_lines":[{"line_number":503,"context_line":"    fi"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":507,"context_line":"    then"},{"line_number":508,"context_line":"        # Copy the hieradata"},{"line_number":509,"context_line":"        rm -rf ${PUPPET_DOWNLOAD}"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"cbc4c4b8_86a60139","line":506,"updated":"2020-12-04 21:23:45.000000000","message":"nit: looks like this could\u0027ve been also combined with the if statements above","commit_id":"fa7d32872e0fc4a78c0ffde09d539422ce9e212d"},{"author":{"_account_id":28431,"name":"Don Penney","email":"dpenney@redhat.com","username":"dpenney"},"change_message_id":"7ed604e7fdf6a1aff308345a742d0df26567587c","unresolved":true,"context_lines":[{"line_number":503,"context_line":"    fi"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":507,"context_line":"    then"},{"line_number":508,"context_line":"        # Copy the hieradata"},{"line_number":509,"context_line":"        rm -rf ${PUPPET_DOWNLOAD}"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"8c76eddc_adb94c76","line":506,"in_reply_to":"a33c8402_f8289c9c","updated":"2020-12-07 15:09:33.000000000","message":"I agree with John. You\u0027ve basically got a block of code that only runs if there\u0027s an active controller. Do it all within the one check","commit_id":"fa7d32872e0fc4a78c0ffde09d539422ce9e212d"},{"author":{"_account_id":28676,"name":"Andy Ning","email":"andy.ning@windriver.com","username":"andy.wrs"},"change_message_id":"f1809e357137df12a338e0dfbae43c832102292e","unresolved":true,"context_lines":[{"line_number":503,"context_line":"    fi"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":507,"context_line":"    then"},{"line_number":508,"context_line":"        # Copy the hieradata"},{"line_number":509,"context_line":"        rm -rf ${PUPPET_DOWNLOAD}"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"a33c8402_f8289c9c","line":506,"in_reply_to":"cbc4c4b8_86a60139","updated":"2020-12-04 22:08:14.000000000","message":"\u003e nit: looks like this could\u0027ve been also combined with the if statements above\n\nI try to keep the code segments unchanged as much as possible so I\u0027ll leave this as it is.","commit_id":"fa7d32872e0fc4a78c0ffde09d539422ce9e212d"},{"author":{"_account_id":28431,"name":"Don Penney","email":"dpenney@redhat.com","username":"dpenney"},"change_message_id":"538244885843efd1ea693b15955bed48b5c0c847","unresolved":true,"context_lines":[{"line_number":506,"context_line":"    if [ ! ${ACTIVE_CONTROLLER_NOT_FOUND} ]"},{"line_number":507,"context_line":"    then"},{"line_number":508,"context_line":"        # Copy the hieradata"},{"line_number":509,"context_line":"        rm -rf ${PUPPET_DOWNLOAD}"},{"line_number":510,"context_line":"        cp -R ${PUPPET_PATH} ${PUPPET_DOWNLOAD}"},{"line_number":511,"context_line":"        if [ $? -ne 0 ]"},{"line_number":512,"context_line":"        then"},{"line_number":513,"context_line":"            umount_platform_dir"},{"line_number":514,"context_line":"            fatal_error \"Failed to copy puppet directory ${PUPPET_PATH} into download dir ${PUPPET_DOWNLOAD}\""},{"line_number":515,"context_line":"        fi"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"        # Make a copy in cache"},{"line_number":518,"context_line":"        rm -rf ${PUPPET_CACHE}"},{"line_number":519,"context_line":"        cp -R ${PUPPET_PATH} ${PUPPET_CACHE}"},{"line_number":520,"context_line":"        if [ $? -ne 0 ]"},{"line_number":521,"context_line":"        then"},{"line_number":522,"context_line":"            umount_platform_dir"},{"line_number":523,"context_line":"            fatal_error \"Failed to copy puppet directory ${PUPPET_PATH} into cache dir ${PUPPET_CACHE}\""},{"line_number":524,"context_line":"        fi"},{"line_number":525,"context_line":""},{"line_number":526,"context_line":"        # Copy the staging secured vault"},{"line_number":527,"context_line":"        cp -RL $VAULT_DIR /tmp"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"3c7aa406_35fb4cb0","line":524,"range":{"start_line":509,"start_character":13,"end_line":524,"end_character":10},"updated":"2020-12-07 15:45:48.000000000","message":"I would suggest just dropping the original /tmp PUPPET_DOWNLOAD path and just use the /etc path for this script. I don\u0027t think it serves any purpose to have both","commit_id":"fa7d32872e0fc4a78c0ffde09d539422ce9e212d"},{"author":{"_account_id":28431,"name":"Don Penney","email":"dpenney@redhat.com","username":"dpenney"},"change_message_id":"71a65035939575ef2e591bb0910eb73f225b4fe7","unresolved":true,"context_lines":[{"line_number":399,"context_line":"        fi"},{"line_number":400,"context_line":"    fi"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    if [ ! -e \"${ACTIVE_CONTROLLER_NOT_FOUND_FLAG}\" ]"},{"line_number":403,"context_line":"    then"},{"line_number":404,"context_line":"        # Keep the /opt/branding directory to preserve any new files"},{"line_number":405,"context_line":"        rm -rf /opt/branding/*.tgz"},{"line_number":406,"context_line":"        cp $CONFIG_DIR/branding/*.tgz /opt/branding 2\u003e/dev/null"},{"line_number":407,"context_line":"    fi"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    if [ ! -e \"${ACTIVE_CONTROLLER_NOT_FOUND_FLAG}\" ]"},{"line_number":410,"context_line":"    then"},{"line_number":411,"context_line":"        # banner customization always returns 0, success:"},{"line_number":412,"context_line":"        /usr/sbin/install_banner_customization"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        cp $CONFIG_DIR/hosts /etc/hosts"},{"line_number":415,"context_line":"        if [ $? -ne 0 ]"},{"line_number":416,"context_line":"        then"},{"line_number":417,"context_line":"            fatal_error \"Unable to copy $CONFIG_DIR/hosts\""},{"line_number":418,"context_line":"        fi"},{"line_number":419,"context_line":"    fi"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"    hostname \u003e /etc/hostname"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"16afdd9e_8ae0dd5d","line":418,"range":{"start_line":402,"start_character":3,"end_line":418,"end_character":10},"updated":"2020-12-07 16:09:03.000000000","message":"I thought I had commented on this, but can\u0027t find my comment now. This is all related code and should be part of a single check.","commit_id":"4f6d351fcdb94e5d93923c3f1f72bc3cb3e8f54e"},{"author":{"_account_id":28431,"name":"Don Penney","email":"dpenney@redhat.com","username":"dpenney"},"change_message_id":"4d055659273ca603871fe8c10bfd490d27be252a","unresolved":true,"context_lines":[{"line_number":164,"context_line":"    if [ -e \"${ACTIVE_CONTROLLER_NOT_FOUND_FLAG}\" ]"},{"line_number":165,"context_line":"    then"},{"line_number":166,"context_line":"        return"},{"line_number":167,"context_line":"    fi"},{"line_number":168,"context_line":"    if [ -e \"${PLATFORM_SIMPLEX_FLAG}\" ]"},{"line_number":169,"context_line":"    then"},{"line_number":170,"context_line":"        umount $PLATFORM_DIR"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"d9c4fede_5b170559","line":167,"updated":"2020-12-07 16:11:10.000000000","message":"nit: add a line break, as you did in the function above.","commit_id":"5d9dd987da58e578126927f5a67679b460d7fd6b"},{"author":{"_account_id":28676,"name":"Andy Ning","email":"andy.ning@windriver.com","username":"andy.wrs"},"change_message_id":"3edabe328924ee1f72404c167397f80184368ab9","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    if [ -e \"${ACTIVE_CONTROLLER_NOT_FOUND_FLAG}\" ]"},{"line_number":165,"context_line":"    then"},{"line_number":166,"context_line":"        return"},{"line_number":167,"context_line":"    fi"},{"line_number":168,"context_line":"    if [ -e \"${PLATFORM_SIMPLEX_FLAG}\" ]"},{"line_number":169,"context_line":"    then"},{"line_number":170,"context_line":"        umount $PLATFORM_DIR"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"edd5402a_bc20ba9e","line":167,"in_reply_to":"d9c4fede_5b170559","updated":"2020-12-07 16:18:26.000000000","message":"Ack","commit_id":"5d9dd987da58e578126927f5a67679b460d7fd6b"},{"author":{"_account_id":28431,"name":"Don Penney","email":"dpenney@redhat.com","username":"dpenney"},"change_message_id":"4d055659273ca603871fe8c10bfd490d27be252a","unresolved":true,"context_lines":[{"line_number":403,"context_line":"    then"},{"line_number":404,"context_line":"        # Keep the /opt/branding directory to preserve any new files"},{"line_number":405,"context_line":"        rm -rf /opt/branding/*.tgz"},{"line_number":406,"context_line":"        cp $CONFIG_DIR/branding/*.tgz /opt/branding 2\u003e/dev/null"},{"line_number":407,"context_line":"        # banner customization always returns 0, success:"},{"line_number":408,"context_line":"        /usr/sbin/install_banner_customization"},{"line_number":409,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"382ffaf4_f9ee0d7e","line":406,"updated":"2020-12-07 16:11:10.000000000","message":"Keep the previous line break here.","commit_id":"5d9dd987da58e578126927f5a67679b460d7fd6b"},{"author":{"_account_id":28676,"name":"Andy Ning","email":"andy.ning@windriver.com","username":"andy.wrs"},"change_message_id":"3edabe328924ee1f72404c167397f80184368ab9","unresolved":false,"context_lines":[{"line_number":403,"context_line":"    then"},{"line_number":404,"context_line":"        # Keep the /opt/branding directory to preserve any new files"},{"line_number":405,"context_line":"        rm -rf /opt/branding/*.tgz"},{"line_number":406,"context_line":"        cp $CONFIG_DIR/branding/*.tgz /opt/branding 2\u003e/dev/null"},{"line_number":407,"context_line":"        # banner customization always returns 0, success:"},{"line_number":408,"context_line":"        /usr/sbin/install_banner_customization"},{"line_number":409,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"d462f776_8007e3e7","line":406,"in_reply_to":"382ffaf4_f9ee0d7e","updated":"2020-12-07 16:18:26.000000000","message":"Ack","commit_id":"5d9dd987da58e578126927f5a67679b460d7fd6b"},{"author":{"_account_id":28431,"name":"Don Penney","email":"dpenney@redhat.com","username":"dpenney"},"change_message_id":"5f0716fec9dae06e732c03e9d1814cee6e5e1df9","unresolved":true,"context_lines":[{"line_number":498,"context_line":"            fatal_error \"Unable to copy .conf files to /etc/postgresql\""},{"line_number":499,"context_line":"        fi"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"        # Copy the hieradata"},{"line_number":502,"context_line":"        rm -rf ${PUPPET_DOWNLOAD}"},{"line_number":503,"context_line":"        cp -R ${PUPPET_PATH} ${PUPPET_DOWNLOAD}"},{"line_number":504,"context_line":"        if [ $? -ne 0 ]"},{"line_number":505,"context_line":"        then"},{"line_number":506,"context_line":"            umount_platform_dir"},{"line_number":507,"context_line":"            fatal_error \"Failed to copy puppet directory ${PUPPET_PATH} into download dir ${PUPPET_DOWNLOAD}\""},{"line_number":508,"context_line":"        fi"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        # Make a copy in cache"},{"line_number":511,"context_line":"        rm -rf ${PUPPET_CACHE}"},{"line_number":512,"context_line":"        cp -R ${PUPPET_PATH} ${PUPPET_CACHE}"},{"line_number":513,"context_line":"        if [ $? -ne 0 ]"},{"line_number":514,"context_line":"        then"},{"line_number":515,"context_line":"            umount_platform_dir"},{"line_number":516,"context_line":"            fatal_error \"Failed to copy puppet directory ${PUPPET_PATH} into cache dir ${PUPPET_CACHE}\""},{"line_number":517,"context_line":"        fi"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        # Copy the staging secured vault"},{"line_number":520,"context_line":"        cp -RL $VAULT_DIR /tmp"}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"5b37ece2_8b16891a","line":517,"range":{"start_line":501,"start_character":1,"end_line":517,"end_character":10},"updated":"2020-12-07 16:43:28.000000000","message":"You may not have seen my earlier comment on this, so I\u0027ll make it again:\nI would suggest just dropping the original /tmp PUPPET_DOWNLOAD path and just use the /etc path for this script. I don\u0027t think it serves any purpose to have both","commit_id":"6f2ad213bc236f20afd5d272c9942695ae16b0c8"},{"author":{"_account_id":28431,"name":"Don Penney","email":"dpenney@redhat.com","username":"dpenney"},"change_message_id":"b72a18fd40bd92258c71ee51652ad66a7925af82","unresolved":true,"context_lines":[{"line_number":493,"context_line":"            fatal_error \"Unable to copy .conf files to /etc/postgresql\""},{"line_number":494,"context_line":"        fi"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        # Make a copy in cache"},{"line_number":497,"context_line":"        rm -rf ${PUPPET_CACHE}"},{"line_number":498,"context_line":"        cp -R ${PUPPET_PATH} ${PUPPET_CACHE}"},{"line_number":499,"context_line":"        if [ $? -ne 0 ]"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"7d3a326a_58b1b817","line":496,"range":{"start_line":496,"start_character":10,"end_line":496,"end_character":30},"updated":"2020-12-08 14:06:41.000000000","message":"Suggest: Copy the hieradata to cache directory","commit_id":"ea6c36c12350a7f8b44af21b85e29e05aefcd99b"},{"author":{"_account_id":14174,"name":"Bart Wensley","email":"bartwensley@hotmail.com","username":"bartwensley"},"change_message_id":"f085f6cbb436b7111d52440c59dbc67c4cbd374f","unresolved":true,"context_lines":[{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    if [ -f ${HOST_HIERA} ]; then"},{"line_number":522,"context_line":"        echo \"$0: Running puppet manifest apply\""},{"line_number":523,"context_line":"\tpuppet-manifest-apply.sh ${HIERADATA_PATH} ${IPADDR} controller"},{"line_number":524,"context_line":"\tRC\u003d$?"},{"line_number":525,"context_line":"\tif [ $RC -ne 0 ];"},{"line_number":526,"context_line":"\tthen"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"e41f5303_be048629","line":523,"range":{"start_line":523,"start_character":0,"end_line":523,"end_character":1},"updated":"2020-12-08 12:59:39.000000000","message":"Can you please remove the tabs on this and the next few lines.","commit_id":"ea6c36c12350a7f8b44af21b85e29e05aefcd99b"}]}
