)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"910a9aaead0e8f0ecdba200c367099f6e570b5a1","unresolved":true,"context_lines":[{"line_number":12,"context_line":"minutes during upgrade activation where platform cpus are running"},{"line_number":13,"context_line":"close to 100% and this may contribute to the rabbitmq problems."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Modifying the code wait to for the upgrade-activated stage"},{"line_number":16,"context_line":"before allowing re-affine completion"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Test Plan:"},{"line_number":19,"context_line":"Upgrade stx7 to stx8 and confirm that all platform tasks"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"6e260501_35fdff47","line":16,"range":{"start_line":15,"start_character":0,"end_line":16,"end_character":36},"updated":"2023-10-05 15:22:34.000000000","message":"change this to reflect what we are actually waiting for.\n\nOn active controller, if upgrade in progress we wait until upgrade-activated ...","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d96c5e4b5e0904ee4c731b75ad9378ff2646170f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"minutes during upgrade activation where platform cpus are running"},{"line_number":13,"context_line":"close to 100% and this may contribute to the rabbitmq problems."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Modifying the code wait to for the upgrade-activated stage"},{"line_number":16,"context_line":"before allowing re-affine completion"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Test Plan:"},{"line_number":19,"context_line":"Upgrade stx7 to stx8 and confirm that all platform tasks"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"e3036f92_a87c95a2","line":16,"range":{"start_line":15,"start_character":0,"end_line":16,"end_character":36},"in_reply_to":"6e260501_35fdff47","updated":"2023-10-17 15:01:52.000000000","message":"Done","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"910a9aaead0e8f0ecdba200c367099f6e570b5a1","unresolved":true,"context_lines":[{"line_number":18,"context_line":"Test Plan:"},{"line_number":19,"context_line":"Upgrade stx7 to stx8 and confirm that all platform tasks"},{"line_number":20,"context_line":"are affined to platform cores after the step activation-complete"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: 2038537"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ifc863587f8ffaf6b6478ae9edc352449430824b7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"40d70ed7_47481fa2","line":21,"updated":"2023-10-05 15:22:34.000000000","message":"should manually test more of the upgrade completed state (eg, completing, no upgrade, etc)","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d55e01bd227f6775615bec5ccc02b65c62da0142","unresolved":false,"context_lines":[{"line_number":18,"context_line":"Test Plan:"},{"line_number":19,"context_line":"Upgrade stx7 to stx8 and confirm that all platform tasks"},{"line_number":20,"context_line":"are affined to platform cores after the step activation-complete"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: 2038537"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ifc863587f8ffaf6b6478ae9edc352449430824b7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bac66bff_e34b8f35","line":21,"in_reply_to":"40d70ed7_47481fa2","updated":"2023-10-19 13:23:49.000000000","message":"Ack","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"b7078c1993c8ba99383d655514ae5f5457995887","unresolved":true,"context_lines":[{"line_number":19,"context_line":"PASS: Perform platform upgrade stx7 to stx8 in AIO-SX, AIO-DX and"},{"line_number":20,"context_line":"      confirm that all platform tasks are affined to platform cores"},{"line_number":21,"context_line":"      after the step activation-complete"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: 2038537"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: Ifc863587f8ffaf6b6478ae9edc352449430824b7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"ed64e220_9e0d7503","line":22,"updated":"2023-10-27 13:45:20.000000000","message":"Test Plan should include bootstrap test for AIO and and host-unlock of standalone worker\n(since we officially decouple workerconfig.service)","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"3af2c3fa226d488778aa80e8d008e588d32ed51e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"PASS: Perform platform upgrade stx7 to stx8 in AIO-SX, AIO-DX and"},{"line_number":20,"context_line":"      confirm that all platform tasks are affined to platform cores"},{"line_number":21,"context_line":"      after the step activation-complete"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: 2038537"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: Ifc863587f8ffaf6b6478ae9edc352449430824b7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"791d2e4b_0a961229","line":22,"in_reply_to":"ed64e220_9e0d7503","updated":"2023-10-31 12:36:54.000000000","message":"Done","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"fd0016672ab902c42f49070eeb036ff597e345a8","unresolved":true,"context_lines":[{"line_number":19,"context_line":"The start() of the script exits if the configuration is not AIO"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Test Plan:"},{"line_number":22,"context_line":"PASS: Perform platform upgrade stx7 to stx8 in AIO-SX, AIO-DX and"},{"line_number":23,"context_line":"      confirm that all platform tasks are affined to platform cores"},{"line_number":24,"context_line":"      after the step activation-complete"},{"line_number":25,"context_line":"PASS: Performed complete platform upgrade,sucsessfully unlocked the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"3c39ce9e_6675577a","line":22,"updated":"2023-10-31 15:54:03.000000000","message":"Please confirm the DX upgrade is verified with the latest patchset#29 or newer","commit_id":"fad2d73cb34c92e55963e8e03585d8d86cf2fe31"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"457b2682cf3a5c956ea3ffae7decc26629398a0f","unresolved":true,"context_lines":[{"line_number":19,"context_line":"The start() of the script exits if the configuration is not AIO"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Test Plan:"},{"line_number":22,"context_line":"PASS: Perform platform upgrade stx7 to stx8 in AIO-SX, AIO-DX and"},{"line_number":23,"context_line":"      confirm that all platform tasks are affined to platform cores"},{"line_number":24,"context_line":"      after the step activation-complete"},{"line_number":25,"context_line":"PASS: Performed complete platform upgrade,sucsessfully unlocked the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"e4c2994a_7718354e","line":22,"in_reply_to":"3c39ce9e_6675577a","updated":"2023-10-31 19:30:46.000000000","message":"Hi John, I have tested DX upgrade with latest changes.","commit_id":"fad2d73cb34c92e55963e8e03585d8d86cf2fe31"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"5ca674ca00a981ba936a84bfce8b161de7a04679","unresolved":false,"context_lines":[{"line_number":19,"context_line":"The start() of the script exits if the configuration is not AIO"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Test Plan:"},{"line_number":22,"context_line":"PASS: Perform platform upgrade stx7 to stx8 in AIO-SX, AIO-DX and"},{"line_number":23,"context_line":"      confirm that all platform tasks are affined to platform cores"},{"line_number":24,"context_line":"      after the step activation-complete"},{"line_number":25,"context_line":"PASS: Performed complete platform upgrade,sucsessfully unlocked the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"1ea865e6_3c7fb95a","line":22,"in_reply_to":"e4c2994a_7718354e","updated":"2023-11-01 23:29:24.000000000","message":"Done","commit_id":"fad2d73cb34c92e55963e8e03585d8d86cf2fe31"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"2e3280f9bb8c1ff0c66bf3f31ca2f2277b93c504","unresolved":true,"context_lines":[{"line_number":24,"context_line":"      after the step activation-complete"},{"line_number":25,"context_line":"PASS: Performed complete platform upgrade,sucsessfully unlocked the"},{"line_number":26,"context_line":"      node."},{"line_number":27,"context_line":"PASS: Install AIO-DX + worker, confirm Bootstrap completes and standalone"},{"line_number":28,"context_line":"      worker node is unlocked."},{"line_number":29,"context_line":"PASS: Built package successfully."},{"line_number":30,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"b31c4048_6b23f972","line":27,"range":{"start_line":27,"start_character":63,"end_line":27,"end_character":73},"updated":"2023-10-31 22:00:39.000000000","message":"long line ; wrapping","commit_id":"6d65b94fec6191c9ba635e00b5cafa557f430bb4"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"5ca674ca00a981ba936a84bfce8b161de7a04679","unresolved":false,"context_lines":[{"line_number":24,"context_line":"      after the step activation-complete"},{"line_number":25,"context_line":"PASS: Performed complete platform upgrade,sucsessfully unlocked the"},{"line_number":26,"context_line":"      node."},{"line_number":27,"context_line":"PASS: Install AIO-DX + worker, confirm Bootstrap completes and standalone"},{"line_number":28,"context_line":"      worker node is unlocked."},{"line_number":29,"context_line":"PASS: Built package successfully."},{"line_number":30,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"78592d8d_b25b81c9","line":27,"range":{"start_line":27,"start_character":63,"end_line":27,"end_character":73},"in_reply_to":"b31c4048_6b23f972","updated":"2023-11-01 23:29:24.000000000","message":"Done","commit_id":"6d65b94fec6191c9ba635e00b5cafa557f430bb4"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":36077,"name":"Joshua Reed","display_name":"Joshua Reed","email":"joshua.reed@windriver.com","username":"jreed","status":"Wind River"},"change_message_id":"7ca17d41fe4d705dd1eaa90c69f64f73ed7c11a6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"0863a23f_c35fcf80","updated":"2023-10-17 17:56:20.000000000","message":"General comment: Please make sure individual lines of code do not run too long. Instead wrap them.","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d55e01bd227f6775615bec5ccc02b65c62da0142","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"76dd23e9_ccba5f2a","updated":"2023-10-19 13:23:49.000000000","message":"Hi Heitor, Please take a look at the endpoint that I have used to check whether platform upgrade is in progress for all system configurations. If any change required please suggest me.","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"be0c978d7adbafe8124f5dae1128b52dff6d9e38","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"c977a5dd_17fa07c1","updated":"2023-10-24 21:21:42.000000000","message":"looks okay, but I think there\u0027s room for improvement.","commit_id":"a300acfe3c7fb88a89a948b326ec8e13ed48a495"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"7bc2a7974b2dd875d17074b5a4ecdd2356499938","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"b33c53c8_788dd33b","updated":"2023-10-27 13:40:23.000000000","message":"minor changes requested","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"b82023b99dc8b6ab0d7fbf0ed396bc93721e87be","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"bf107778_ee858c9e","updated":"2023-10-27 17:01:08.000000000","message":"updated code looks Ok.\n- missing removal of Before\u003dworkerconfig.service\n- need to test standalone worker (and add to testplan)","commit_id":"9cc72499dc6673a2a2f46a84ed94036044202e96"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"889a99ce2918a90cc9d4a07e59f34702beb47231","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"809238ad_1ccee4a2","updated":"2023-10-27 18:19:23.000000000","message":"lgtm","commit_id":"15723261465a2a7f8ed8dfbaa0da7a5c50f48593"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"57131b54592ef0a1e306dabb3de90cebf7453c45","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":30,"id":"9d13f63a_e39d2a39","updated":"2023-10-31 15:16:01.000000000","message":"lgtm","commit_id":"fad2d73cb34c92e55963e8e03585d8d86cf2fe31"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"4e25fdd7a9b62b1bc5026751687cac4c02cd2a11","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":31,"id":"a2edb090_c594c80f","updated":"2023-10-31 20:08:15.000000000","message":"looks good to me; great work","commit_id":"6d65b94fec6191c9ba635e00b5cafa557f430bb4"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"5ca674ca00a981ba936a84bfce8b161de7a04679","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":32,"id":"b814a5b6_6b759b48","updated":"2023-11-01 23:29:24.000000000","message":"Fixed the standby cpu hug issue and make se standby can exit loop\n* moved sleep to end of while loop\n* moved the overall upgrade check into while loop\n\nother changes:\n* more comments why we need the check\n* Moved the new code into new function.\n* Minor logic simplification, less if else/levels.\n* Removed \u0027hostname\u0027 since it not actually used by API.\n* made logs more consistent with the other logs in this script.\n* reduced number of logs per-check to 1 so it less chatty\n\nAdditional testing on AIO-DX\n- Manual tested script on controller-0, controller-1\n- Manually force upgrade to occur and complete (see logs below)\n- verify both controllers exit and no cpu-hogs\n\n\nLogs look like this:\ntail -f /var/log/daemon.log | stdbuf -o0 grep \"affine-tasks.sh\"\n2023-11-01T18:09:25.337 controller-0 affine-tasks.sh(1086769): info : Starting.\n2023-11-01T18:09:25.341 controller-0 affine-tasks.sh(1086769): info : Affine all tasks, CPUS: 0-7; online\u003d0-7 (0xff), isol\u003d, nonisol\u003d0-7 (0xff)\n2023-11-01T18:09:25.948 controller-0 affine-tasks.sh(1086769): info : Affined 203 processes to all cores.\n2023-11-01T18:09:26.010 controller-0 affine-tasks.sh(1086769): info : kubelet is ready\n2023-11-01T18:09:26.398 controller-0 affine-tasks.sh(1086769): info : Affine drbd tasks, CPUS\u003d0-7\n2023-11-01T18:11:58.202 controller-0 affine-tasks.sh(1086769): info : K8S is ready\n2023-11-01T18:11:58.206 controller-0 affine-tasks.sh(1086769): info : Warning: /sys/fs/cgroup/cpuset/docker not ready.\n2023-11-01T18:11:58.335 controller-0 affine-tasks.sh(1086769): info : System Inventory Service (sysinv-api) is reachable via direct request URL\n2023-11-01T18:12:00.279 controller-0 affine-tasks.sh(1086769): info : Upgrade wait, elapsed 155 seconds. Reason: upgrade in progress\n. .\n2023-11-01T18:20:30.087 controller-0 affine-tasks.sh(1086769): info : Upgrade wait, elapsed 665 seconds. Reason: upgrade in progress\n2023-11-01T18:21:02.034 controller-0 affine-tasks.sh(1086769): info : Platform upgrade state: activation-complete\n2023-11-01T18:21:02.039 controller-0 affine-tasks.sh(1086769): info : Platform upgrade reached completion\n2023-11-01T18:21:02.043 controller-0 affine-tasks.sh(1086769): info : Affine all tasks, PLATFORM_CPUS\u003d0,1\n2023-11-01T18:21:04.213 controller-0 affine-tasks.sh(1086769): info : Affine drbd tasks, CPUS\u003d0,1\n2023-11-01T18:21:04.319 controller-0 affine-tasks.sh(1086769): info : Affined 202 processes to platform cores.\n2023-11-01T18:21:04.322 controller-0 affine-tasks.sh(1086769): info : Complete.\n\n\n// and this:\ntail -f /var/log/daemon.log | stdbuf -o0 grep \"affine-tasks.sh\"\n2023-11-01T19:00:47.991 controller-1 affine-tasks.sh(269825): info : Starting.\n2023-11-01T19:00:47.997 controller-1 affine-tasks.sh(269825): info : Affine all tasks, CPUS: 0-7; online\u003d0-7 (0xff), isol\u003d, nonisol\u003d0-7 (0xff)\n2023-11-01T19:00:48.430 controller-1 affine-tasks.sh(269825): info : Affined 110 processes to all cores.\n2023-11-01T19:00:48.486 controller-1 affine-tasks.sh(269825): info : kubelet is ready\n2023-11-01T19:00:48.619 controller-1 affine-tasks.sh(269825): info : Affine drbd tasks, CPUS\u003d0-7\n2023-11-01T19:03:20.352 controller-1 affine-tasks.sh(269825): info : K8S is ready\n2023-11-01T19:03:20.357 controller-1 affine-tasks.sh(269825): info : Warning: /sys/fs/cgroup/cpuset/docker not ready.\n2023-11-01T19:03:20.537 controller-1 affine-tasks.sh(269825): info : System Inventory Service (sysinv-api) is reachable via direct request URL\n2023-11-01T19:03:20.586 controller-1 affine-tasks.sh(269825): info : Platform upgrade is not in progress\n2023-11-01T19:03:20.591 controller-1 affine-tasks.sh(269825): info : Affine all tasks, PLATFORM_CPUS\u003d0,1\n2023-11-01T19:03:21.831 controller-1 affine-tasks.sh(269825): info : Affine drbd tasks, CPUS\u003d0,1\n2023-11-01T19:03:21.904 controller-1 affine-tasks.sh(269825): info : Affined 105 processes to platform cores.\n2023-11-01T19:03:21.908 controller-1 affine-tasks.sh(269825): info : Complete.","commit_id":"eb925db9f4bc952b3184fa86687e26da1d01a57f"}],"utilities/worker-utils/worker-utils/affine-tasks.sh":[{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"2abde8909523ff9e8ff671704d25043f3d655a73","unresolved":true,"context_lines":[{"line_number":603,"context_line":"        fi"},{"line_number":604,"context_line":"    fi"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    # Affine all floating tasks back to platform cores"},{"line_number":607,"context_line":"    if [ \"$(curl -sf http://pxecontroller:6385/v1/upgrade/${hostname}/upgrade_in_progress 2\u003e/dev/null)\" \u003d \"true\" ]; then"},{"line_number":608,"context_line":"        if _wait_for_sysinv_api; then"},{"line_number":609,"context_line":"            affine_tasks_to_platform_cores"},{"line_number":610,"context_line":"        fi"},{"line_number":611,"context_line":"    fi"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"    # Remove pidfile after successful completion"},{"line_number":614,"context_line":"    rm -f ${PIDFILE}"}],"source_content_type":"text/x-sh","patch_set":2,"id":"21c46edf_3fc97614","line":611,"range":{"start_line":606,"start_character":0,"end_line":611,"end_character":6},"updated":"2023-10-04 18:43:17.000000000","message":"The whole reason for the wait_for_sysinv_api was to be able to use sysinv commands  AND since the active controller has sysinv-api process. We don\u0027t want to prevent affining from occuring, we just want to wait long enough before finishing the affine task.\n\nLogic should be closer to..\n\n# Wait for platform upgrade to be upgrade-activated\n# if there is upgrade in progress\nif is_upgrade_in_progress; then\n   if active_controller; then\n       _wait_for_sysinv_api\n       \u003cissue \u0027sysinv upgrade show\u0027 and wait for upgrade-activated, or None\u003e\n       _wait_for_upgrade_activated; then\n       if\n   fi\nfi\n\naffine_tasks_to_platform_cores\n\n\nI am assuming that your if/curl check is equiv of \u0027if is_upgrade_in_progress\u0027.\nYou can\u0027t use the \u0027wait_for_sysinv_api\u0027 unless you know its active, eg, think of the standby controller. You may be able to get the upgrade-activated using a curl/REST command also.\nYou can see what APIs are used by specifying \u0027--debug\u0027 as option to \u0027sysinv --debug upgrade show\u0027 CLI command.","commit_id":"ec44b937acc52bf063922486914fc73cdf7c6af2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d96c5e4b5e0904ee4c731b75ad9378ff2646170f","unresolved":false,"context_lines":[{"line_number":603,"context_line":"        fi"},{"line_number":604,"context_line":"    fi"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    # Affine all floating tasks back to platform cores"},{"line_number":607,"context_line":"    if [ \"$(curl -sf http://pxecontroller:6385/v1/upgrade/${hostname}/upgrade_in_progress 2\u003e/dev/null)\" \u003d \"true\" ]; then"},{"line_number":608,"context_line":"        if _wait_for_sysinv_api; then"},{"line_number":609,"context_line":"            affine_tasks_to_platform_cores"},{"line_number":610,"context_line":"        fi"},{"line_number":611,"context_line":"    fi"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"    # Remove pidfile after successful completion"},{"line_number":614,"context_line":"    rm -f ${PIDFILE}"}],"source_content_type":"text/x-sh","patch_set":2,"id":"de61799f_60f9cab3","line":611,"range":{"start_line":606,"start_character":0,"end_line":611,"end_character":6},"in_reply_to":"21c46edf_3fc97614","updated":"2023-10-17 15:01:52.000000000","message":"Done","commit_id":"ec44b937acc52bf063922486914fc73cdf7c6af2"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"910a9aaead0e8f0ecdba200c367099f6e570b5a1","unresolved":true,"context_lines":[{"line_number":487,"context_line":"}"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"function is_active_controller {"},{"line_number":490,"context_line":"    active_controller\u003d`sm-query service management-ip | grep \"enabled-active\"`"},{"line_number":491,"context_line":"    if [ -z \"$active_controller\" ] ; then"},{"line_number":492,"context_line":"        return 0"},{"line_number":493,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":4,"id":"36e487c6_c04fba15","line":490,"range":{"start_line":490,"start_character":0,"end_line":490,"end_character":78},"updated":"2023-10-05 15:22:34.000000000","message":"is OK but to be consistent with this code replace the backticks with $(cmd)","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d96c5e4b5e0904ee4c731b75ad9378ff2646170f","unresolved":false,"context_lines":[{"line_number":487,"context_line":"}"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"function is_active_controller {"},{"line_number":490,"context_line":"    active_controller\u003d`sm-query service management-ip | grep \"enabled-active\"`"},{"line_number":491,"context_line":"    if [ -z \"$active_controller\" ] ; then"},{"line_number":492,"context_line":"        return 0"},{"line_number":493,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":4,"id":"574c5710_fa439f1e","line":490,"range":{"start_line":490,"start_character":0,"end_line":490,"end_character":78},"in_reply_to":"36e487c6_c04fba15","updated":"2023-10-17 15:01:52.000000000","message":"Done","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"910a9aaead0e8f0ecdba200c367099f6e570b5a1","unresolved":true,"context_lines":[{"line_number":618,"context_line":"                                 2\u003e/dev/null)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"    UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027)"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    if [ ${is_upgrade_in_progress} \u003d \"true\" ]; then"},{"line_number":623,"context_line":"        if is_active_controller; then"},{"line_number":624,"context_line":"            _wait_for_sysinv_api"}],"source_content_type":"text/x-sh","patch_set":4,"id":"097e839e_72e4598d","line":621,"updated":"2023-10-05 15:22:34.000000000","message":"Add redirect stderr to dev null.\nhandle return code","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"7dc433abc091a436ab22ae0d18faffdd9b7410ec","unresolved":true,"context_lines":[{"line_number":618,"context_line":"                                 2\u003e/dev/null)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"    UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027)"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    if [ ${is_upgrade_in_progress} \u003d \"true\" ]; then"},{"line_number":623,"context_line":"        if is_active_controller; then"},{"line_number":624,"context_line":"            _wait_for_sysinv_api"}],"source_content_type":"text/x-sh","patch_set":4,"id":"f076209a_b7cc6787","line":621,"in_reply_to":"097e839e_72e4598d","updated":"2023-10-17 18:41:57.000000000","message":"Actually the \"-s\" option for silent mean you don\u0027t require 2\u003e/dev/null","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d55e01bd227f6775615bec5ccc02b65c62da0142","unresolved":false,"context_lines":[{"line_number":618,"context_line":"                                 2\u003e/dev/null)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"    UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027)"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    if [ ${is_upgrade_in_progress} \u003d \"true\" ]; then"},{"line_number":623,"context_line":"        if is_active_controller; then"},{"line_number":624,"context_line":"            _wait_for_sysinv_api"}],"source_content_type":"text/x-sh","patch_set":4,"id":"a9643290_b9952d4a","line":621,"in_reply_to":"f076209a_b7cc6787","updated":"2023-10-19 13:23:49.000000000","message":"Done","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"910a9aaead0e8f0ecdba200c367099f6e570b5a1","unresolved":true,"context_lines":[{"line_number":623,"context_line":"        if is_active_controller; then"},{"line_number":624,"context_line":"            _wait_for_sysinv_api"},{"line_number":625,"context_line":"            while true; do"},{"line_number":626,"context_line":"                if [ $UPGRADE_STATE \u003d \"activation-completed\" ]; then"},{"line_number":627,"context_line":"                    break"},{"line_number":628,"context_line":"                fi"},{"line_number":629,"context_line":"                LOG \"Waiting for upgrade state to be activation-completed...\""}],"source_content_type":"text/x-sh","patch_set":4,"id":"23527664_2fa0ce6f","line":626,"updated":"2023-10-05 15:22:34.000000000","message":"need to move the UPGRADE_STATE system command within this loop since we are waiting for it to change.\n\nAnd it has to be after _wait_for_sysinv_api .","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d96c5e4b5e0904ee4c731b75ad9378ff2646170f","unresolved":false,"context_lines":[{"line_number":623,"context_line":"        if is_active_controller; then"},{"line_number":624,"context_line":"            _wait_for_sysinv_api"},{"line_number":625,"context_line":"            while true; do"},{"line_number":626,"context_line":"                if [ $UPGRADE_STATE \u003d \"activation-completed\" ]; then"},{"line_number":627,"context_line":"                    break"},{"line_number":628,"context_line":"                fi"},{"line_number":629,"context_line":"                LOG \"Waiting for upgrade state to be activation-completed...\""}],"source_content_type":"text/x-sh","patch_set":4,"id":"01e11d9d_3a5437fc","line":626,"in_reply_to":"23527664_2fa0ce6f","updated":"2023-10-17 15:01:52.000000000","message":"Done","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"910a9aaead0e8f0ecdba200c367099f6e570b5a1","unresolved":true,"context_lines":[{"line_number":624,"context_line":"            _wait_for_sysinv_api"},{"line_number":625,"context_line":"            while true; do"},{"line_number":626,"context_line":"                if [ $UPGRADE_STATE \u003d \"activation-completed\" ]; then"},{"line_number":627,"context_line":"                    break"},{"line_number":628,"context_line":"                fi"},{"line_number":629,"context_line":"                LOG \"Waiting for upgrade state to be activation-completed...\""},{"line_number":630,"context_line":"                sleep ${INIT_INTERVAL_SECONDS}"}],"source_content_type":"text/x-sh","patch_set":4,"id":"470b3dc7_32dbbc27","line":627,"updated":"2023-10-05 15:22:34.000000000","message":"need to also handle None case, i.e., after \"completing\" there will be no upgrade at all, would happen if we finish the upgrade *immediately* .","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d96c5e4b5e0904ee4c731b75ad9378ff2646170f","unresolved":false,"context_lines":[{"line_number":624,"context_line":"            _wait_for_sysinv_api"},{"line_number":625,"context_line":"            while true; do"},{"line_number":626,"context_line":"                if [ $UPGRADE_STATE \u003d \"activation-completed\" ]; then"},{"line_number":627,"context_line":"                    break"},{"line_number":628,"context_line":"                fi"},{"line_number":629,"context_line":"                LOG \"Waiting for upgrade state to be activation-completed...\""},{"line_number":630,"context_line":"                sleep ${INIT_INTERVAL_SECONDS}"}],"source_content_type":"text/x-sh","patch_set":4,"id":"6e11ea2b_ae6b4ab2","line":627,"in_reply_to":"470b3dc7_32dbbc27","updated":"2023-10-17 15:01:52.000000000","message":"Done","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"910a9aaead0e8f0ecdba200c367099f6e570b5a1","unresolved":true,"context_lines":[{"line_number":631,"context_line":"            done"},{"line_number":632,"context_line":"        fi"},{"line_number":633,"context_line":"    fi"},{"line_number":634,"context_line":"    # Affine all floating tasks back to platform cores"},{"line_number":635,"context_line":"    affine_tasks_to_platform_cores"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"    # Remove pidfile after successful completion"}],"source_content_type":"text/x-sh","patch_set":4,"id":"b8bfe6a9_1fed14af","line":634,"updated":"2023-10-05 15:22:34.000000000","message":"add line separator","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d96c5e4b5e0904ee4c731b75ad9378ff2646170f","unresolved":false,"context_lines":[{"line_number":631,"context_line":"            done"},{"line_number":632,"context_line":"        fi"},{"line_number":633,"context_line":"    fi"},{"line_number":634,"context_line":"    # Affine all floating tasks back to platform cores"},{"line_number":635,"context_line":"    affine_tasks_to_platform_cores"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"    # Remove pidfile after successful completion"}],"source_content_type":"text/x-sh","patch_set":4,"id":"81071ab1_9e52ed5c","line":634,"in_reply_to":"b8bfe6a9_1fed14af","updated":"2023-10-17 15:01:52.000000000","message":"Done","commit_id":"d1735dfe52f6948a2156d4e5bc9d09a85b47df0f"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"29d5e4fa9cea45e56c3a94b9d9136aa192328c12","unresolved":true,"context_lines":[{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress 2\u003e/dev/null)"},{"line_number":621,"context_line":"    rc\u003d$?"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ] \u0026\u0026 [ ${rc} -eq 0 ]; then"}],"source_content_type":"text/x-sh","patch_set":8,"id":"fbf857a2_ba4cf92e","line":620,"range":{"start_line":620,"start_character":71,"end_line":620,"end_character":82},"updated":"2023-10-11 19:34:31.000000000","message":"This is running the command $( hostname ) , not using the variable you defined.\nIf you actually wanted the localhost hostname, then line: 617 should be:\nhostname\u003d$(hostname -s)\n\nNot actually sure how that upgrade_in_progress API works; I would have thought you were after the overall platform upgrade in progress, rather than querying the specific localhost name; suggest review other users of that API to be certain.\n\nFor some init scripts that need to know difference between active and standby controller, like /etc/init.d/ceph-init-wrapper , have seen stuff like this..\n\nhost\u003d$(hostname)\nif [[ \"$system_type\" \u003d\u003d \"All-in-one\" ]] \u0026\u0026 [[ \"$system_mode\" !\u003d \"simplex\" ]]; then\n    # On 2 node configuration we have a floating monitor\n    host\u003d\"controller\"\nfi","commit_id":"bf7fab4b3f2e7305cd90e7916b98357b5cd5dd59"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"9099f09e873916cd724b530de399f8fdb51deb43","unresolved":false,"context_lines":[{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress 2\u003e/dev/null)"},{"line_number":621,"context_line":"    rc\u003d$?"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ] \u0026\u0026 [ ${rc} -eq 0 ]; then"}],"source_content_type":"text/x-sh","patch_set":8,"id":"7ba2c442_ba76e900","line":620,"range":{"start_line":620,"start_character":71,"end_line":620,"end_character":82},"in_reply_to":"fbf857a2_ba4cf92e","updated":"2023-10-24 20:11:09.000000000","message":"Done","commit_id":"bf7fab4b3f2e7305cd90e7916b98357b5cd5dd59"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"29d5e4fa9cea45e56c3a94b9d9136aa192328c12","unresolved":true,"context_lines":[{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress 2\u003e/dev/null)"},{"line_number":621,"context_line":"    rc\u003d$?"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ] \u0026\u0026 [ ${rc} -eq 0 ]; then"},{"line_number":624,"context_line":"        LOG \"System upgrade in progress\""}],"source_content_type":"text/x-sh","patch_set":8,"id":"e1fcf263_0aad0b1a","line":621,"updated":"2023-10-11 19:34:31.000000000","message":"You should check return code before checking output contents.\nIn this case we redirected stderr to /dev/null , so the is_upgrade_in_progress would be empty, and the next check may work as intended anyway without RC check.\n\nThe usual usage pattern is like this:\n\nCONTROLLER_UUID\u003d`curl -sf http://controller:${http_port}/feed/rel-${SW_VERSION}/install_uuid`\nif [ $? -ne 0 ]\nthen\n    fatal_error \"Unable to retrieve installation uuid from active controller\"\nfi\n\nif [ \"$INSTALL_UUID\" !\u003d \"$CONTROLLER_UUID\" ]\nthen\n    fatal_error \"This node is running a different load than the active controller and must be reinstalled\"\nfi","commit_id":"bf7fab4b3f2e7305cd90e7916b98357b5cd5dd59"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d96c5e4b5e0904ee4c731b75ad9378ff2646170f","unresolved":false,"context_lines":[{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress 2\u003e/dev/null)"},{"line_number":621,"context_line":"    rc\u003d$?"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ] \u0026\u0026 [ ${rc} -eq 0 ]; then"},{"line_number":624,"context_line":"        LOG \"System upgrade in progress\""}],"source_content_type":"text/x-sh","patch_set":8,"id":"1f318829_81ab4ecb","line":621,"in_reply_to":"e1fcf263_0aad0b1a","updated":"2023-10-17 15:01:52.000000000","message":"Done","commit_id":"bf7fab4b3f2e7305cd90e7916b98357b5cd5dd59"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"29d5e4fa9cea45e56c3a94b9d9136aa192328c12","unresolved":true,"context_lines":[{"line_number":627,"context_line":"            while true; do"},{"line_number":628,"context_line":"                UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":629,"context_line":"                if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || [ $UPGRADE_STATE \u003d \"completing\" ] || \\"},{"line_number":630,"context_line":"                    [ \"${is_upgrade_in_progress}\" \u003d \"false\" ]"},{"line_number":631,"context_line":"                then"},{"line_number":632,"context_line":"                    LOG \"Completed upgrade activation\""},{"line_number":633,"context_line":"                    break"}],"source_content_type":"text/x-sh","patch_set":8,"id":"111b22b8_67bac7e8","line":630,"range":{"start_line":630,"start_character":20,"end_line":630,"end_character":61},"updated":"2023-10-11 19:34:31.000000000","message":"This doesn\u0027t do anything. You only go into this block if upgrade_in_progress is \u0027true\u0027, and that specific variable is not re-evaluated to \u0027false\u0027.\n\nBy \u0027None\u0027 case, I meant that if you do \u0027system upgrade-show\u0027 and there is no upgrade, perhaps due to progressing beyond the point of completing and the upgrade is deleted there will be no output... likely the \"UPGRADE_STATE\" variable will be empty in that case so perhaps you can just check [ -z \"{UPGRADE_STATE}\" ] .","commit_id":"bf7fab4b3f2e7305cd90e7916b98357b5cd5dd59"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d96c5e4b5e0904ee4c731b75ad9378ff2646170f","unresolved":true,"context_lines":[{"line_number":627,"context_line":"            while true; do"},{"line_number":628,"context_line":"                UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":629,"context_line":"                if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || [ $UPGRADE_STATE \u003d \"completing\" ] || \\"},{"line_number":630,"context_line":"                    [ \"${is_upgrade_in_progress}\" \u003d \"false\" ]"},{"line_number":631,"context_line":"                then"},{"line_number":632,"context_line":"                    LOG \"Completed upgrade activation\""},{"line_number":633,"context_line":"                    break"}],"source_content_type":"text/x-sh","patch_set":8,"id":"f9c678ac_2b148259","line":630,"range":{"start_line":630,"start_character":20,"end_line":630,"end_character":61},"in_reply_to":"111b22b8_67bac7e8","updated":"2023-10-17 15:01:52.000000000","message":"Variable upgrade_in_progress is evaluated to false in 2 cases when upgrade is completed and when upgrade not in progress, As I am already in block when its \"upgrade_in_progress\"\u003d\"true\" the condition \"${is_upgrade_in_progress}\" \u003d \"false\" is reached when its complete which means we can run function affine_tasks_to_platform_cores just in case we missed the state \"activation-complete\", \"completing\" even when upgrade is complete.","commit_id":"bf7fab4b3f2e7305cd90e7916b98357b5cd5dd59"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":627,"context_line":"            while true; do"},{"line_number":628,"context_line":"                UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":629,"context_line":"                if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || [ $UPGRADE_STATE \u003d \"completing\" ] || \\"},{"line_number":630,"context_line":"                    [ \"${is_upgrade_in_progress}\" \u003d \"false\" ]"},{"line_number":631,"context_line":"                then"},{"line_number":632,"context_line":"                    LOG \"Completed upgrade activation\""},{"line_number":633,"context_line":"                    break"}],"source_content_type":"text/x-sh","patch_set":8,"id":"b28b6935_96d12e6b","line":630,"range":{"start_line":630,"start_character":20,"end_line":630,"end_character":61},"in_reply_to":"f9c678ac_2b148259","updated":"2023-10-24 10:37:20.000000000","message":"Ack","commit_id":"bf7fab4b3f2e7305cd90e7916b98357b5cd5dd59"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"b575d08cedb068c83a5b31303ea03bb2fb193be8","unresolved":true,"context_lines":[{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003dcurl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress"},{"line_number":621,"context_line":"    if [ $? -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""}],"source_content_type":"text/x-sh","patch_set":10,"id":"0bef6940_c282dfd0","line":619,"range":{"start_line":619,"start_character":27,"end_line":619,"end_character":37},"updated":"2023-10-17 18:45:18.000000000","message":"This is no longer capturing the bash command output.\nShould be:\nis_upgrade_in_progress\u003d$(COMMAND)","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d55e01bd227f6775615bec5ccc02b65c62da0142","unresolved":false,"context_lines":[{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003dcurl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress"},{"line_number":621,"context_line":"    if [ $? -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""}],"source_content_type":"text/x-sh","patch_set":10,"id":"b05cbfb5_26091a67","line":619,"range":{"start_line":619,"start_character":27,"end_line":619,"end_character":37},"in_reply_to":"0bef6940_c282dfd0","updated":"2023-10-19 13:23:49.000000000","message":"Done","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"7dc433abc091a436ab22ae0d18faffdd9b7410ec","unresolved":true,"context_lines":[{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003dcurl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress"},{"line_number":621,"context_line":"    if [ $? -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":10,"id":"6a6d1a52_b95688d6","line":620,"range":{"start_line":619,"start_character":0,"end_line":620,"end_character":102},"updated":"2023-10-17 18:41:57.000000000","message":"Note that on another system that is not in doing an upgrade, I get this:\n\ncontroller-0:~$ sudo curl -f http://pxecontroller:6385/v1/upgrade/controller-2/upgrade_in_progress\ncurl: (22) The requested URL returned error: 401 Unauthorized\n\ncontroller-0:~$ sudo curl -f http://pxecontroller:6385/v1/upgrade/controller-1/upgrade_in_progress\ncurl: (22) The requested URL returned error: 401 Unauthorized\n\ncontroller-0:~$ sudo curl -f http://pxecontroller:6385/v1/upgrade/controller-0/upgrade_in_progress\ncurl: (22) The requested URL returned error: 401 Unauthorized\n\ncontroller-0:~$ sudo curl -f http://pxecontroller:6385/v1/upgrade/upgrade_in_progress\ncurl: (22) The requested URL returned error: 401 Unauthorized\n\ncontroller-0:~$ echo $?\n22\n\n\nSo in my case the output is not string \u0027false\", it is just empty.\nHowever i\u0027m confused about intended API.","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":36077,"name":"Joshua Reed","display_name":"Joshua Reed","email":"joshua.reed@windriver.com","username":"jreed","status":"Wind River"},"change_message_id":"7ca17d41fe4d705dd1eaa90c69f64f73ed7c11a6","unresolved":true,"context_lines":[{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003dcurl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress"},{"line_number":621,"context_line":"    if [ $? -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":10,"id":"c7992668_928f4f0c","line":620,"updated":"2023-10-17 17:56:20.000000000","message":"Where does pxecontroller:6385 come from? I warn against hard coding this.","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d55e01bd227f6775615bec5ccc02b65c62da0142","unresolved":false,"context_lines":[{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003dcurl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress"},{"line_number":621,"context_line":"    if [ $? -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":10,"id":"afcaace7_669f9cc7","line":620,"in_reply_to":"0aa70588_f28d0f8b","updated":"2023-10-19 13:23:49.000000000","message":"Done","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"df3089d952b0a51ef0da420f81996c6520c4ace1","unresolved":false,"context_lines":[{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003dcurl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress"},{"line_number":621,"context_line":"    if [ $? -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":10,"id":"f1e41085_785c27b9","line":620,"range":{"start_line":619,"start_character":0,"end_line":620,"end_character":102},"in_reply_to":"430295c8_c77da4c5","updated":"2023-10-26 18:54:26.000000000","message":"Done","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"9099f09e873916cd724b530de399f8fdb51deb43","unresolved":true,"context_lines":[{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003dcurl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress"},{"line_number":621,"context_line":"    if [ $? -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":10,"id":"430295c8_c77da4c5","line":620,"range":{"start_line":619,"start_character":0,"end_line":620,"end_character":102},"in_reply_to":"6a6d1a52_b95688d6","updated":"2023-10-24 20:11:09.000000000","message":"I tried it in SX and DX ,it worked .\n\nexample:\n\n[sysadmin@controller-0 ~(keystone_admin)]$ hostname\u003d$(hostname -s)\n[sysadmin@controller-0 ~(keystone_admin)]$ curl -sf http://pxecontroller:6385/v1/upgrade/${hostname}/upgrade_in_progress\ntrue[sysadmin@controller-0 ~(keystone_admin)]$","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"9099f09e873916cd724b530de399f8fdb51deb43","unresolved":true,"context_lines":[{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003dcurl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress"},{"line_number":621,"context_line":"    if [ $? -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":10,"id":"ca2d1c32_99aed75a","line":620,"in_reply_to":"c7992668_928f4f0c","updated":"2023-10-24 20:11:09.000000000","message":"This particular url is used by another code as well and I got it from software management team.\nBelow is the code that already is using it.\nhttps://opendev.org/starlingx/metal/src/commit/e81d0bf4e7f6c3ff0c814ac48b923dc8d889df03/kickstart/files/kickstart.cfg#L2783-L2784","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":36077,"name":"Joshua Reed","display_name":"Joshua Reed","email":"joshua.reed@windriver.com","username":"jreed","status":"Wind River"},"change_message_id":"0b444105b997107484b919a8b8588c2ed21c34fe","unresolved":false,"context_lines":[{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003dcurl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress"},{"line_number":621,"context_line":"    if [ $? -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":10,"id":"c58b31da_ec85a9ef","line":620,"in_reply_to":"ca2d1c32_99aed75a","updated":"2023-10-24 20:13:40.000000000","message":"This doesn\u0027t seem maintainable as it is hard coded, but its not a priority so am resolving this comment.","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":36077,"name":"Joshua Reed","display_name":"Joshua Reed","email":"joshua.reed@windriver.com","username":"jreed","status":"Wind River"},"change_message_id":"7ca17d41fe4d705dd1eaa90c69f64f73ed7c11a6","unresolved":true,"context_lines":[{"line_number":617,"context_line":"    hostname\u003d\"hostname\""},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003dcurl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/$(hostname)/upgrade_in_progress"},{"line_number":621,"context_line":"    if [ $? -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":10,"id":"0aa70588_f28d0f8b","line":620,"in_reply_to":"d0fdaf65_0964aaa4","updated":"2023-10-17 17:56:20.000000000","message":"\u003e linters: E003 Indent not multiple of 4\n\nPlease fix.","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"d55e01bd227f6775615bec5ccc02b65c62da0142","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                while true; do"},{"line_number":629,"context_line":"                    source /etc/platform/openrc"},{"line_number":630,"context_line":"                    UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":631,"context_line":"                    if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || [ $UPGRADE_STATE \u003d \"completing\" ]"},{"line_number":632,"context_line":"                    then"},{"line_number":633,"context_line":"                        LOG \"Completed upgrade activation\""},{"line_number":634,"context_line":"                        break"}],"source_content_type":"text/x-sh","patch_set":10,"id":"85243d23_a66d522d","line":631,"in_reply_to":"2ec7efab_c15d20cd","updated":"2023-10-19 13:23:49.000000000","message":"Done","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":36077,"name":"Joshua Reed","display_name":"Joshua Reed","email":"joshua.reed@windriver.com","username":"jreed","status":"Wind River"},"change_message_id":"7ca17d41fe4d705dd1eaa90c69f64f73ed7c11a6","unresolved":true,"context_lines":[{"line_number":628,"context_line":"                while true; do"},{"line_number":629,"context_line":"                    source /etc/platform/openrc"},{"line_number":630,"context_line":"                    UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":631,"context_line":"                    if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || [ $UPGRADE_STATE \u003d \"completing\" ]"},{"line_number":632,"context_line":"                    then"},{"line_number":633,"context_line":"                        LOG \"Completed upgrade activation\""},{"line_number":634,"context_line":"                        break"}],"source_content_type":"text/x-sh","patch_set":10,"id":"2ec7efab_c15d20cd","line":631,"in_reply_to":"af389c29_f2e26dd2","updated":"2023-10-17 17:56:20.000000000","message":"\u003e linters: E011 Then keyword is not on same line as if or elif keyword\n\nPlease fix.","commit_id":"41c7ffdce290b6a0f7c8841b6aed029d8c0d44bd"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"a1ab4778d169c847aff3eb898986a888c9e5ca45","unresolved":true,"context_lines":[{"line_number":489,"context_line":"function is_active_controller {"},{"line_number":490,"context_line":"    active_controller\u003d$(sm-query service management-ip | grep \"enabled-active\")"},{"line_number":491,"context_line":"    if [ -z \"$active_controller\" ] ; then"},{"line_number":492,"context_line":"        return 1"},{"line_number":493,"context_line":"    else"},{"line_number":494,"context_line":"        return 0"},{"line_number":495,"context_line":"    fi"},{"line_number":496,"context_line":"}"},{"line_number":497,"context_line":""}],"source_content_type":"text/x-sh","patch_set":13,"id":"efaf7f3f_65e63cc7","line":494,"range":{"start_line":492,"start_character":0,"end_line":494,"end_character":16},"updated":"2023-10-19 13:46:39.000000000","message":"You are right; I got this routine elsewhere and they ended up explicitly checking the return code and handling that backwards and not like linux function return codes.\n\nIn bash for functions, return 0 for true (success), or 1 for false (failure).\n\nKeep as-is, but you could also use the true command.  ;-)\n\nif [ -z \"$active_controller\" ]; then\n    true\nelse\n    false\nfi","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":489,"context_line":"function is_active_controller {"},{"line_number":490,"context_line":"    active_controller\u003d$(sm-query service management-ip | grep \"enabled-active\")"},{"line_number":491,"context_line":"    if [ -z \"$active_controller\" ] ; then"},{"line_number":492,"context_line":"        return 1"},{"line_number":493,"context_line":"    else"},{"line_number":494,"context_line":"        return 0"},{"line_number":495,"context_line":"    fi"},{"line_number":496,"context_line":"}"},{"line_number":497,"context_line":""}],"source_content_type":"text/x-sh","patch_set":13,"id":"dfc48f73_f31ad292","line":494,"range":{"start_line":492,"start_character":0,"end_line":494,"end_character":16},"in_reply_to":"efaf7f3f_65e63cc7","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"a1ab4778d169c847aff3eb898986a888c9e5ca45","unresolved":true,"context_lines":[{"line_number":617,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/${hostname}/upgrade_in_progress)"},{"line_number":621,"context_line":"    rc\u003d$?"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    if [ \"${rc}\" -ne 0 ]; then"}],"source_content_type":"text/x-sh","patch_set":13,"id":"6d0665ea_efcc41e5","line":620,"range":{"start_line":620,"start_character":34,"end_line":620,"end_character":102},"updated":"2023-10-19 13:46:39.000000000","message":"You mentioned you are still debugging this.","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"501dc23bf8062b91dc1cca523808a677e2be9eb3","unresolved":true,"context_lines":[{"line_number":617,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/${hostname}/upgrade_in_progress)"},{"line_number":621,"context_line":"    rc\u003d$?"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    if [ \"${rc}\" -ne 0 ]; then"}],"source_content_type":"text/x-sh","patch_set":13,"id":"8bab9832_7c5ec93b","line":620,"range":{"start_line":620,"start_character":34,"end_line":620,"end_character":102},"in_reply_to":"6d0665ea_efcc41e5","updated":"2023-10-19 22:14:48.000000000","message":"hostname should have \"\"\u0027s\n\nhttp://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":617,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":620,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/${hostname}/upgrade_in_progress)"},{"line_number":621,"context_line":"    rc\u003d$?"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    if [ \"${rc}\" -ne 0 ]; then"}],"source_content_type":"text/x-sh","patch_set":13,"id":"2fcf766f_d740ea23","line":620,"range":{"start_line":620,"start_character":34,"end_line":620,"end_character":102},"in_reply_to":"8bab9832_7c5ec93b","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":34064,"name":"Gleb Aronsky","email":"gleb.aronsky@windriver.com","username":"garonsky"},"change_message_id":"83bb59d8ae446dd5981c86c344461612e2fb1a11","unresolved":true,"context_lines":[{"line_number":631,"context_line":"                    source /etc/platform/openrc"},{"line_number":632,"context_line":"                    while true; do"},{"line_number":633,"context_line":"                        UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":634,"context_line":"                        if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || \\"},{"line_number":635,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ]"},{"line_number":636,"context_line":"                        then"},{"line_number":637,"context_line":"                            LOG \"Completed upgrade activation\""}],"source_content_type":"text/x-sh","patch_set":13,"id":"a0a6fd32_970bbb2b","line":634,"updated":"2023-10-19 13:47:37.000000000","message":"In cases where $UPGRADE_STATE is an empty string, you should put \"\" around $UPGRADE_STATE to avoid a bash script error.","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":631,"context_line":"                    source /etc/platform/openrc"},{"line_number":632,"context_line":"                    while true; do"},{"line_number":633,"context_line":"                        UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":634,"context_line":"                        if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || \\"},{"line_number":635,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ]"},{"line_number":636,"context_line":"                        then"},{"line_number":637,"context_line":"                            LOG \"Completed upgrade activation\""}],"source_content_type":"text/x-sh","patch_set":13,"id":"dccd21db_297a46fb","line":634,"in_reply_to":"a0a6fd32_970bbb2b","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"501dc23bf8062b91dc1cca523808a677e2be9eb3","unresolved":true,"context_lines":[{"line_number":631,"context_line":"                    source /etc/platform/openrc"},{"line_number":632,"context_line":"                    while true; do"},{"line_number":633,"context_line":"                        UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":634,"context_line":"                        if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || \\"},{"line_number":635,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ]"},{"line_number":636,"context_line":"                        then"},{"line_number":637,"context_line":"                            LOG \"Completed upgrade activation\""}],"source_content_type":"text/x-sh","patch_set":13,"id":"ef4e26a4_d45a5149","line":634,"in_reply_to":"a0a6fd32_970bbb2b","updated":"2023-10-19 22:14:48.000000000","message":"Same for the caseS below.","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"a1ab4778d169c847aff3eb898986a888c9e5ca45","unresolved":true,"context_lines":[{"line_number":631,"context_line":"                    source /etc/platform/openrc"},{"line_number":632,"context_line":"                    while true; do"},{"line_number":633,"context_line":"                        UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":634,"context_line":"                        if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || \\"},{"line_number":635,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ]"},{"line_number":636,"context_line":"                        then"},{"line_number":637,"context_line":"                            LOG \"Completed upgrade activation\""},{"line_number":638,"context_line":"                            break"},{"line_number":639,"context_line":"                        fi"},{"line_number":640,"context_line":"                        LOG \"Waiting for upgrade state to be activation-completed or completing ...\""}],"source_content_type":"text/x-sh","patch_set":13,"id":"92b1d8a4_bb481a43","line":637,"range":{"start_line":634,"start_character":0,"end_line":637,"end_character":0},"updated":"2023-10-19 13:46:39.000000000","message":"you are still missing the None case.\nie., upgrade deleted, no upgrade in progress, UPGRADE_STATE will be empty string.","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":631,"context_line":"                    source /etc/platform/openrc"},{"line_number":632,"context_line":"                    while true; do"},{"line_number":633,"context_line":"                        UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":634,"context_line":"                        if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || \\"},{"line_number":635,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ]"},{"line_number":636,"context_line":"                        then"},{"line_number":637,"context_line":"                            LOG \"Completed upgrade activation\""},{"line_number":638,"context_line":"                            break"},{"line_number":639,"context_line":"                        fi"},{"line_number":640,"context_line":"                        LOG \"Waiting for upgrade state to be activation-completed or completing ...\""}],"source_content_type":"text/x-sh","patch_set":13,"id":"86933de4_901efdde","line":637,"range":{"start_line":634,"start_character":0,"end_line":637,"end_character":0},"in_reply_to":"92b1d8a4_bb481a43","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"afc4f69a26906b0c7168a7ad4f6d5907d1978c51"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"501dc23bf8062b91dc1cca523808a677e2be9eb3","unresolved":true,"context_lines":[{"line_number":488,"context_line":""},{"line_number":489,"context_line":"function is_active_controller {"},{"line_number":490,"context_line":"    active_controller\u003d$(sm-query service management-ip | grep \"enabled-active\")"},{"line_number":491,"context_line":"    if [ -z \"$active_controller\" ] ; then"},{"line_number":492,"context_line":"        false"},{"line_number":493,"context_line":"    else"},{"line_number":494,"context_line":"        true"}],"source_content_type":"text/x-sh","patch_set":14,"id":"ed0499d5_4ec9a4f4","line":491,"range":{"start_line":491,"start_character":14,"end_line":491,"end_character":31},"updated":"2023-10-19 22:14:48.000000000","message":"Should have {}\u0027s around the active_controller variable ; ${active_controller}","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":488,"context_line":""},{"line_number":489,"context_line":"function is_active_controller {"},{"line_number":490,"context_line":"    active_controller\u003d$(sm-query service management-ip | grep \"enabled-active\")"},{"line_number":491,"context_line":"    if [ -z \"$active_controller\" ] ; then"},{"line_number":492,"context_line":"        false"},{"line_number":493,"context_line":"    else"},{"line_number":494,"context_line":"        true"}],"source_content_type":"text/x-sh","patch_set":14,"id":"34e8f02e_f62b0266","line":491,"range":{"start_line":491,"start_character":14,"end_line":491,"end_character":31},"in_reply_to":"ed0499d5_4ec9a4f4","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"501dc23bf8062b91dc1cca523808a677e2be9eb3","unresolved":true,"context_lines":[{"line_number":503,"context_line":"        then"},{"line_number":504,"context_line":"            break"},{"line_number":505,"context_line":"        fi"},{"line_number":506,"context_line":"        LOG \"Waiting for sysinv-api to be ready...\""},{"line_number":507,"context_line":"        sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":508,"context_line":"    done"},{"line_number":509,"context_line":"}"}],"source_content_type":"text/x-sh","patch_set":14,"id":"f176e958_48f2edeb","line":506,"range":{"start_line":506,"start_character":8,"end_line":506,"end_character":12},"updated":"2023-10-19 22:14:48.000000000","message":"Log should include how long the next wait is (INIT_INTERVAL_SECONDS).\n\nAlso, and much more importantly, this looks like a wait forever loop ; there is no timeout. There needs to be a timeout or a loop threshold.\n\nSince this is WIP I won\u0027t -1 it.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":503,"context_line":"        then"},{"line_number":504,"context_line":"            break"},{"line_number":505,"context_line":"        fi"},{"line_number":506,"context_line":"        LOG \"Waiting for sysinv-api to be ready...\""},{"line_number":507,"context_line":"        sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":508,"context_line":"    done"},{"line_number":509,"context_line":"}"}],"source_content_type":"text/x-sh","patch_set":14,"id":"e1ad5940_1da74151","line":506,"range":{"start_line":506,"start_character":8,"end_line":506,"end_character":12},"in_reply_to":"f176e958_48f2edeb","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"73cc121c0126ac08199f1d7d6ae11b7e67691a80","unresolved":true,"context_lines":[{"line_number":503,"context_line":"        then"},{"line_number":504,"context_line":"            break"},{"line_number":505,"context_line":"        fi"},{"line_number":506,"context_line":"        LOG \"Waiting for sysinv-api to be ready...\""},{"line_number":507,"context_line":"        sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":508,"context_line":"    done"},{"line_number":509,"context_line":"}"}],"source_content_type":"text/x-sh","patch_set":14,"id":"920535c4_53b287f9","line":506,"range":{"start_line":506,"start_character":8,"end_line":506,"end_character":12},"in_reply_to":"f176e958_48f2edeb","updated":"2023-10-23 13:59:54.000000000","message":"check how time against $SECONDS is used, and break out after new constant like 300 seconds. by the time pods stabilize sysinv typically running.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"501dc23bf8062b91dc1cca523808a677e2be9eb3","unresolved":true,"context_lines":[{"line_number":619,"context_line":"    rc\u003d$?"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    if [ \"${rc}\" -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"},{"line_number":624,"context_line":"        if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ]; then"},{"line_number":625,"context_line":"            LOG \"System upgrade in progress\""}],"source_content_type":"text/x-sh","patch_set":14,"id":"a7517737_e07df3d2","line":622,"range":{"start_line":622,"start_character":13,"end_line":622,"end_character":39},"updated":"2023-10-19 22:14:48.000000000","message":"Why not use the ERROR log macro like is used on line 532 above.\n\nThis error log text should contain the word \"Error:\" , the command being executed , or at least the hostname, and the return code.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":619,"context_line":"    rc\u003d$?"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    if [ \"${rc}\" -ne 0 ]; then"},{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"},{"line_number":624,"context_line":"        if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ]; then"},{"line_number":625,"context_line":"            LOG \"System upgrade in progress\""}],"source_content_type":"text/x-sh","patch_set":14,"id":"1ad59eea_061f5afb","line":622,"range":{"start_line":622,"start_character":13,"end_line":622,"end_character":39},"in_reply_to":"a7517737_e07df3d2","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"501dc23bf8062b91dc1cca523808a677e2be9eb3","unresolved":true,"context_lines":[{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"},{"line_number":624,"context_line":"        if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ]; then"},{"line_number":625,"context_line":"            LOG \"System upgrade in progress\""},{"line_number":626,"context_line":"            while true; do"},{"line_number":627,"context_line":"                if is_active_controller; then"},{"line_number":628,"context_line":"                    _wait_for_sysinv_api"}],"source_content_type":"text/x-sh","patch_set":14,"id":"05de1bf6_6415ee97","line":625,"range":{"start_line":625,"start_character":12,"end_line":625,"end_character":16},"updated":"2023-10-19 22:14:48.000000000","message":"All the logs where a hostname is in context should start with the hostname.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        LOG \"Upgrade api is not correct\""},{"line_number":623,"context_line":"    else"},{"line_number":624,"context_line":"        if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ]; then"},{"line_number":625,"context_line":"            LOG \"System upgrade in progress\""},{"line_number":626,"context_line":"            while true; do"},{"line_number":627,"context_line":"                if is_active_controller; then"},{"line_number":628,"context_line":"                    _wait_for_sysinv_api"}],"source_content_type":"text/x-sh","patch_set":14,"id":"5b88bd29_2b2e2781","line":625,"range":{"start_line":625,"start_character":12,"end_line":625,"end_character":16},"in_reply_to":"05de1bf6_6415ee97","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"eba5b0e91e77be485526503f63b6cdefd3e82da5","unresolved":true,"context_lines":[{"line_number":623,"context_line":"    else"},{"line_number":624,"context_line":"        if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ]; then"},{"line_number":625,"context_line":"            LOG \"System upgrade in progress\""},{"line_number":626,"context_line":"            while true; do"},{"line_number":627,"context_line":"                if is_active_controller; then"},{"line_number":628,"context_line":"                    _wait_for_sysinv_api"},{"line_number":629,"context_line":"                    source /etc/platform/openrc"}],"source_content_type":"text/x-sh","patch_set":14,"id":"b105c709_fc9e7b0f","line":626,"range":{"start_line":626,"start_character":0,"end_line":626,"end_character":6},"updated":"2023-10-19 15:29:32.000000000","message":"Don;t think we want this while loop.\nWe don\u0027t want to \"wait to be on active controller\".\n\nif active then\n    wait_for_upgrade_state_completed\nfi\n\nIf not active- we don\u0027t wait for anything more.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":623,"context_line":"    else"},{"line_number":624,"context_line":"        if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ]; then"},{"line_number":625,"context_line":"            LOG \"System upgrade in progress\""},{"line_number":626,"context_line":"            while true; do"},{"line_number":627,"context_line":"                if is_active_controller; then"},{"line_number":628,"context_line":"                    _wait_for_sysinv_api"},{"line_number":629,"context_line":"                    source /etc/platform/openrc"}],"source_content_type":"text/x-sh","patch_set":14,"id":"fa8def9d_47089f77","line":626,"range":{"start_line":626,"start_character":0,"end_line":626,"end_character":6},"in_reply_to":"b105c709_fc9e7b0f","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"501dc23bf8062b91dc1cca523808a677e2be9eb3","unresolved":true,"context_lines":[{"line_number":625,"context_line":"            LOG \"System upgrade in progress\""},{"line_number":626,"context_line":"            while true; do"},{"line_number":627,"context_line":"                if is_active_controller; then"},{"line_number":628,"context_line":"                    _wait_for_sysinv_api"},{"line_number":629,"context_line":"                    source /etc/platform/openrc"},{"line_number":630,"context_line":"                    while true; do"},{"line_number":631,"context_line":"                        UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"}],"source_content_type":"text/x-sh","patch_set":14,"id":"91a2525d_6fd6f895","line":628,"range":{"start_line":628,"start_character":20,"end_line":628,"end_character":40},"updated":"2023-10-19 22:14:48.000000000","message":"Need error handling for when the infinite loop inside is corrected.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            LOG \"System upgrade in progress\""},{"line_number":626,"context_line":"            while true; do"},{"line_number":627,"context_line":"                if is_active_controller; then"},{"line_number":628,"context_line":"                    _wait_for_sysinv_api"},{"line_number":629,"context_line":"                    source /etc/platform/openrc"},{"line_number":630,"context_line":"                    while true; do"},{"line_number":631,"context_line":"                        UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"}],"source_content_type":"text/x-sh","patch_set":14,"id":"5b64c3ea_fbbd317f","line":628,"range":{"start_line":628,"start_character":20,"end_line":628,"end_character":40},"in_reply_to":"91a2525d_6fd6f895","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"501dc23bf8062b91dc1cca523808a677e2be9eb3","unresolved":true,"context_lines":[{"line_number":630,"context_line":"                    while true; do"},{"line_number":631,"context_line":"                        UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":632,"context_line":"                        if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || \\"},{"line_number":633,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ] || [ $UPGRADE_STATE\u003d\"\" ]"},{"line_number":634,"context_line":"                        then"},{"line_number":635,"context_line":"                            LOG \"Completed upgrade activation\""},{"line_number":636,"context_line":"                            break"}],"source_content_type":"text/x-sh","patch_set":14,"id":"41682cd8_3e1251fc","line":633,"range":{"start_line":633,"start_character":81,"end_line":633,"end_character":82},"updated":"2023-10-19 22:14:48.000000000","message":"Missing spaces around \u0027\u003d\u0027\nWill be a syntax error in bash\nDon\u0027t forget the quotes around UPGRADE_STATE on both sides.as well.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                    while true; do"},{"line_number":631,"context_line":"                        UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":632,"context_line":"                        if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || \\"},{"line_number":633,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ] || [ $UPGRADE_STATE\u003d\"\" ]"},{"line_number":634,"context_line":"                        then"},{"line_number":635,"context_line":"                            LOG \"Completed upgrade activation\""},{"line_number":636,"context_line":"                            break"}],"source_content_type":"text/x-sh","patch_set":14,"id":"76349a2d_5fabf809","line":633,"range":{"start_line":633,"start_character":81,"end_line":633,"end_character":82},"in_reply_to":"41682cd8_3e1251fc","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"501dc23bf8062b91dc1cca523808a677e2be9eb3","unresolved":true,"context_lines":[{"line_number":632,"context_line":"                        if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || \\"},{"line_number":633,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ] || [ $UPGRADE_STATE\u003d\"\" ]"},{"line_number":634,"context_line":"                        then"},{"line_number":635,"context_line":"                            LOG \"Completed upgrade activation\""},{"line_number":636,"context_line":"                            break"},{"line_number":637,"context_line":"                        fi"},{"line_number":638,"context_line":"                        LOG \"Waiting for upgrade state to be activation-completed or completing ...\""}],"source_content_type":"text/x-sh","patch_set":14,"id":"97af5f4a_acf44e94","line":635,"range":{"start_line":635,"start_character":28,"end_line":635,"end_character":32},"updated":"2023-10-19 22:14:48.000000000","message":"All the logs where a hostname is in context should start with the hostname.\nThis is the last time I mention it.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                        if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || \\"},{"line_number":633,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ] || [ $UPGRADE_STATE\u003d\"\" ]"},{"line_number":634,"context_line":"                        then"},{"line_number":635,"context_line":"                            LOG \"Completed upgrade activation\""},{"line_number":636,"context_line":"                            break"},{"line_number":637,"context_line":"                        fi"},{"line_number":638,"context_line":"                        LOG \"Waiting for upgrade state to be activation-completed or completing ...\""}],"source_content_type":"text/x-sh","patch_set":14,"id":"197c20e3_cb6605e2","line":635,"range":{"start_line":635,"start_character":28,"end_line":635,"end_character":32},"in_reply_to":"97af5f4a_acf44e94","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"73cc121c0126ac08199f1d7d6ae11b7e67691a80","unresolved":true,"context_lines":[{"line_number":632,"context_line":"                        if [ $UPGRADE_STATE \u003d \"activation-complete\" ] || \\"},{"line_number":633,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ] || [ $UPGRADE_STATE\u003d\"\" ]"},{"line_number":634,"context_line":"                        then"},{"line_number":635,"context_line":"                            LOG \"Completed upgrade activation\""},{"line_number":636,"context_line":"                            break"},{"line_number":637,"context_line":"                        fi"},{"line_number":638,"context_line":"                        LOG \"Waiting for upgrade state to be activation-completed or completing ...\""}],"source_content_type":"text/x-sh","patch_set":14,"id":"31bc6030_e945934b","line":635,"range":{"start_line":635,"start_character":28,"end_line":635,"end_character":32},"in_reply_to":"97af5f4a_acf44e94","updated":"2023-10-23 13:59:54.000000000","message":"see last LOG related comment below.  ;-)","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"eba5b0e91e77be485526503f63b6cdefd3e82da5","unresolved":true,"context_lines":[{"line_number":633,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ] || [ $UPGRADE_STATE\u003d\"\" ]"},{"line_number":634,"context_line":"                        then"},{"line_number":635,"context_line":"                            LOG \"Completed upgrade activation\""},{"line_number":636,"context_line":"                            break"},{"line_number":637,"context_line":"                        fi"},{"line_number":638,"context_line":"                        LOG \"Waiting for upgrade state to be activation-completed or completing ...\""},{"line_number":639,"context_line":"                        sleep ${INIT_INTERVAL_SECONDS}"}],"source_content_type":"text/x-sh","patch_set":14,"id":"deae73fe_8317b928","line":636,"range":{"start_line":636,"start_character":0,"end_line":636,"end_character":2},"updated":"2023-10-19 15:29:32.000000000","message":"This will only break out of last while loop.\nThe overall function will never exit.\n\nYou would have to use: break 2, but we shouldn\u0027t require nested while loop anyway.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":633,"context_line":"                            [ $UPGRADE_STATE \u003d \"completing\" ] || [ $UPGRADE_STATE\u003d\"\" ]"},{"line_number":634,"context_line":"                        then"},{"line_number":635,"context_line":"                            LOG \"Completed upgrade activation\""},{"line_number":636,"context_line":"                            break"},{"line_number":637,"context_line":"                        fi"},{"line_number":638,"context_line":"                        LOG \"Waiting for upgrade state to be activation-completed or completing ...\""},{"line_number":639,"context_line":"                        sleep ${INIT_INTERVAL_SECONDS}"}],"source_content_type":"text/x-sh","patch_set":14,"id":"7867c9a9_fe116ae6","line":636,"range":{"start_line":636,"start_character":0,"end_line":636,"end_character":2},"in_reply_to":"deae73fe_8317b928","updated":"2023-10-24 10:37:20.000000000","message":"Done","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"501dc23bf8062b91dc1cca523808a677e2be9eb3","unresolved":true,"context_lines":[{"line_number":653,"context_line":"    # Remove pidfile after successful completion"},{"line_number":654,"context_line":"    rm -f ${PIDFILE}"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    LOG \"Complete.\""},{"line_number":657,"context_line":"}"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"function stop {"}],"source_content_type":"text/x-sh","patch_set":14,"id":"551f3564_9d05e8e5","line":656,"range":{"start_line":656,"start_character":4,"end_line":656,"end_character":8},"updated":"2023-10-19 22:14:48.000000000","message":"Should had hostname here as well","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"73cc121c0126ac08199f1d7d6ae11b7e67691a80","unresolved":true,"context_lines":[{"line_number":653,"context_line":"    # Remove pidfile after successful completion"},{"line_number":654,"context_line":"    rm -f ${PIDFILE}"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    LOG \"Complete.\""},{"line_number":657,"context_line":"}"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"function stop {"}],"source_content_type":"text/x-sh","patch_set":14,"id":"bbe267bb_64b8737d","line":656,"range":{"start_line":656,"start_character":4,"end_line":656,"end_character":8},"in_reply_to":"551f3564_9d05e8e5","updated":"2023-10-23 13:59:54.000000000","message":"NOTE for all these LOG usages, it goes through logger, they actually all have hostname.  logs look like this:\n\ndaemon.log.1.gz:2023-09-21T06:58:32.000 controller-0 affine-tasks.sh(16539): info : Complete.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"657c74e13cf4859f21e73c9791a537c3c726483a","unresolved":false,"context_lines":[{"line_number":653,"context_line":"    # Remove pidfile after successful completion"},{"line_number":654,"context_line":"    rm -f ${PIDFILE}"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    LOG \"Complete.\""},{"line_number":657,"context_line":"}"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"function stop {"}],"source_content_type":"text/x-sh","patch_set":14,"id":"ecaefd44_e386944b","line":656,"range":{"start_line":656,"start_character":4,"end_line":656,"end_character":8},"in_reply_to":"551f3564_9d05e8e5","updated":"2023-10-24 10:37:20.000000000","message":"This LOG is a part of Script completion not upgrade.","commit_id":"f540b7bbacf9a9a8e224960af90fa1b0db9a10d2"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"ef68154ae881c0496dc394a317189657a41004ce","unresolved":true,"context_lines":[{"line_number":62,"context_line":"CHECK_INTERVAL_SECONDS\u003d30"},{"line_number":63,"context_line":"PRINT_INTERVAL_SECONDS\u003d300"},{"line_number":64,"context_line":"STABILIZATION_SECONDS\u003d150"},{"line_number":65,"context_line":"Timeout_seconds\u003d300"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"# Define pidfile"},{"line_number":68,"context_line":"LNAME\u003d$(readlink -n -f $0)"}],"source_content_type":"text/x-sh","patch_set":16,"id":"42ad8496_649ca807","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":15},"updated":"2023-10-23 14:30:29.000000000","message":"constants should be capitalized","commit_id":"eb787754977e26c1b349dd070441d8159afd4a5a"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"9099f09e873916cd724b530de399f8fdb51deb43","unresolved":false,"context_lines":[{"line_number":62,"context_line":"CHECK_INTERVAL_SECONDS\u003d30"},{"line_number":63,"context_line":"PRINT_INTERVAL_SECONDS\u003d300"},{"line_number":64,"context_line":"STABILIZATION_SECONDS\u003d150"},{"line_number":65,"context_line":"Timeout_seconds\u003d300"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"# Define pidfile"},{"line_number":68,"context_line":"LNAME\u003d$(readlink -n -f $0)"}],"source_content_type":"text/x-sh","patch_set":16,"id":"2074d1ef_7772e8c2","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":15},"in_reply_to":"42ad8496_649ca807","updated":"2023-10-24 20:11:09.000000000","message":"Done","commit_id":"eb787754977e26c1b349dd070441d8159afd4a5a"},{"author":{"_account_id":34064,"name":"Gleb Aronsky","email":"gleb.aronsky@windriver.com","username":"garonsky"},"change_message_id":"908e66fb459567696f9ab182c3023e7b062bdbec","unresolved":true,"context_lines":[{"line_number":622,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":625,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":626,"context_line":"    rc\u003d$?"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    if [ \"${rc}\" -ne 0 ]; then"}],"source_content_type":"text/x-sh","patch_set":16,"id":"fc90c7d7_c19607ad","line":625,"updated":"2023-10-24 20:33:21.000000000","message":"the spacing is off here","commit_id":"eb787754977e26c1b349dd070441d8159afd4a5a"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"0fb58598834cc803c3ca411ab592824d0c7c6d79","unresolved":false,"context_lines":[{"line_number":622,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":625,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":626,"context_line":"    rc\u003d$?"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    if [ \"${rc}\" -ne 0 ]; then"}],"source_content_type":"text/x-sh","patch_set":16,"id":"2502a86c_0d436ef7","line":625,"in_reply_to":"c55de731_a770d643","updated":"2023-10-24 21:02:07.000000000","message":"Done","commit_id":"eb787754977e26c1b349dd070441d8159afd4a5a"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"35aba13300491ca8a9c1718b845b8db276f52403","unresolved":true,"context_lines":[{"line_number":622,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":625,"context_line":"                                  http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":626,"context_line":"    rc\u003d$?"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    if [ \"${rc}\" -ne 0 ]; then"}],"source_content_type":"text/x-sh","patch_set":16,"id":"c55de731_a770d643","line":625,"in_reply_to":"fc90c7d7_c19607ad","updated":"2023-10-24 20:41:50.000000000","message":"I got indentation error when I tried to place url right below word curl.","commit_id":"eb787754977e26c1b349dd070441d8159afd4a5a"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"ef68154ae881c0496dc394a317189657a41004ce","unresolved":true,"context_lines":[{"line_number":636,"context_line":"                    source /etc/platform/openrc"},{"line_number":637,"context_line":"                    UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":638,"context_line":"                    if [ \"${UPGRADE_STATE}\" \u003d \"activation-complete\" ] || \\"},{"line_number":639,"context_line":"                        [ \"${UPGRADE_STATE}\" \u003d \"completing\" ] || [ \"${UPGRADE_STATE}\" \u003d \"\" ]"},{"line_number":640,"context_line":"                    then"},{"line_number":641,"context_line":"                        LOG \"Completed upgrade activation on host: ${hostname}\""},{"line_number":642,"context_line":"                        break"}],"source_content_type":"text/x-sh","patch_set":16,"id":"1bf041ac_b382065e","line":639,"updated":"2023-10-23 14:30:29.000000000","message":"\u0027completing\u0027 could also be encountered on upgrade-abort; in which case we do not want to affine all platform cores?","commit_id":"eb787754977e26c1b349dd070441d8159afd4a5a"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"9099f09e873916cd724b530de399f8fdb51deb43","unresolved":true,"context_lines":[{"line_number":636,"context_line":"                    source /etc/platform/openrc"},{"line_number":637,"context_line":"                    UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":638,"context_line":"                    if [ \"${UPGRADE_STATE}\" \u003d \"activation-complete\" ] || \\"},{"line_number":639,"context_line":"                        [ \"${UPGRADE_STATE}\" \u003d \"completing\" ] || [ \"${UPGRADE_STATE}\" \u003d \"\" ]"},{"line_number":640,"context_line":"                    then"},{"line_number":641,"context_line":"                        LOG \"Completed upgrade activation on host: ${hostname}\""},{"line_number":642,"context_line":"                        break"}],"source_content_type":"text/x-sh","patch_set":16,"id":"8f14b355_5fbc50ae","line":639,"in_reply_to":"1bf041ac_b382065e","updated":"2023-10-24 20:11:09.000000000","message":"for upgrade-abort success case the state will be UPGRADE_ABORT_COMPLETING \u003d \u0027abort-completing\u0027","commit_id":"eb787754977e26c1b349dd070441d8159afd4a5a"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"3dede9f0fd1fb855a1c721bcebf30cb130b4aa4d","unresolved":false,"context_lines":[{"line_number":636,"context_line":"                    source /etc/platform/openrc"},{"line_number":637,"context_line":"                    UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":638,"context_line":"                    if [ \"${UPGRADE_STATE}\" \u003d \"activation-complete\" ] || \\"},{"line_number":639,"context_line":"                        [ \"${UPGRADE_STATE}\" \u003d \"completing\" ] || [ \"${UPGRADE_STATE}\" \u003d \"\" ]"},{"line_number":640,"context_line":"                    then"},{"line_number":641,"context_line":"                        LOG \"Completed upgrade activation on host: ${hostname}\""},{"line_number":642,"context_line":"                        break"}],"source_content_type":"text/x-sh","patch_set":16,"id":"dad3dc07_c5e0c760","line":639,"in_reply_to":"8f14b355_5fbc50ae","updated":"2023-10-26 18:59:19.000000000","message":"Ack","commit_id":"eb787754977e26c1b349dd070441d8159afd4a5a"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"be0c978d7adbafe8124f5dae1128b52dff6d9e38","unresolved":true,"context_lines":[{"line_number":489,"context_line":"}"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"function is_active_controller {"},{"line_number":492,"context_line":"    active_controller\u003d$(sudo sm-query service management-ip | grep \"enabled-active\")"},{"line_number":493,"context_line":"    if [ -z \"${active_controller}\" ] ; then"},{"line_number":494,"context_line":"        false"},{"line_number":495,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":20,"id":"7e5b51f9_ca4c8b8b","line":492,"range":{"start_line":492,"start_character":24,"end_line":492,"end_character":29},"updated":"2023-10-24 21:21:42.000000000","message":"if this script is running as root, sudo isn\u0027t going to do anything","commit_id":"a300acfe3c7fb88a89a948b326ec8e13ed48a495"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"30a974b5101d4fb2a906b7a3eccce1aa6790ffc9","unresolved":false,"context_lines":[{"line_number":489,"context_line":"}"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"function is_active_controller {"},{"line_number":492,"context_line":"    active_controller\u003d$(sudo sm-query service management-ip | grep \"enabled-active\")"},{"line_number":493,"context_line":"    if [ -z \"${active_controller}\" ] ; then"},{"line_number":494,"context_line":"        false"},{"line_number":495,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":20,"id":"2f099068_1a8137a0","line":492,"range":{"start_line":492,"start_character":24,"end_line":492,"end_character":29},"in_reply_to":"7e5b51f9_ca4c8b8b","updated":"2023-10-25 12:28:19.000000000","message":"I tried running this command on stx6 and stx7 . The output is empty if we run it without sudo, so to avoid any failure I have added sudo.","commit_id":"a300acfe3c7fb88a89a948b326ec8e13ed48a495"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"be0c978d7adbafe8124f5dae1128b52dff6d9e38","unresolved":true,"context_lines":[{"line_number":617,"context_line":"    fi"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    # When platform upgrade in progress wait for upgrade to be"},{"line_number":620,"context_line":"    # activation-complete then assign platform tasks to all"},{"line_number":621,"context_line":"    # platform cores"},{"line_number":622,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"}],"source_content_type":"text/x-sh","patch_set":20,"id":"4fb188d9_2003a7ee","line":621,"range":{"start_line":620,"start_character":26,"end_line":621,"end_character":20},"updated":"2023-10-24 21:21:42.000000000","message":"nit: the code being added is not assigning tasks to platform cores (that\u0027s down at line 670), but rather just waiting if necessary.","commit_id":"a300acfe3c7fb88a89a948b326ec8e13ed48a495"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"30a974b5101d4fb2a906b7a3eccce1aa6790ffc9","unresolved":false,"context_lines":[{"line_number":617,"context_line":"    fi"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    # When platform upgrade in progress wait for upgrade to be"},{"line_number":620,"context_line":"    # activation-complete then assign platform tasks to all"},{"line_number":621,"context_line":"    # platform cores"},{"line_number":622,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"}],"source_content_type":"text/x-sh","patch_set":20,"id":"6f945f8e_ff2f2f68","line":621,"range":{"start_line":620,"start_character":26,"end_line":621,"end_character":20},"in_reply_to":"4fb188d9_2003a7ee","updated":"2023-10-25 12:28:19.000000000","message":"Done","commit_id":"a300acfe3c7fb88a89a948b326ec8e13ed48a495"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"be0c978d7adbafe8124f5dae1128b52dff6d9e38","unresolved":true,"context_lines":[{"line_number":632,"context_line":"            LOG \"System upgrade in progress on host: ${hostname}\""},{"line_number":633,"context_line":"            t0\u003d${SECONDS}"},{"line_number":634,"context_line":"            while true; do"},{"line_number":635,"context_line":"                # During the platform upgrade in DX it takes sometime(usually 5 min)"},{"line_number":636,"context_line":"                # to be on active controller during the step system upgrade-activate,"},{"line_number":637,"context_line":"                # added a check here to get on active controller along with"},{"line_number":638,"context_line":"                # wait for upgrade-activate to complete."},{"line_number":639,"context_line":"                # As per the document step \"system upgrade-activate\" may take"},{"line_number":640,"context_line":"                # more than half an hour to complete. Giving a chance to be on a"},{"line_number":641,"context_line":"                # active controller within this time to perform system commands"},{"line_number":642,"context_line":"                if is_active_controller; then"},{"line_number":643,"context_line":"                    dt\u003d$(( ${SECONDS} - ${t0} ))"},{"line_number":644,"context_line":"                    if [ ${dt} -ge ${TIMEOUT_ACTIVE_CONTROLLER} ]; then"}],"source_content_type":"text/x-sh","patch_set":20,"id":"e589f49a_37f5d3c2","line":641,"range":{"start_line":635,"start_character":0,"end_line":641,"end_character":79},"updated":"2023-10-24 21:21:42.000000000","message":"I think this could be reworded to be more clear.  As I understand it, if a platform upgrade is in progress, and we\u0027re running on the active controller, then we want to wait for the platform upgrade to complete before we fall through to line 670 to affine the platform tasks back to just the platform cores.","commit_id":"a300acfe3c7fb88a89a948b326ec8e13ed48a495"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"30a974b5101d4fb2a906b7a3eccce1aa6790ffc9","unresolved":false,"context_lines":[{"line_number":632,"context_line":"            LOG \"System upgrade in progress on host: ${hostname}\""},{"line_number":633,"context_line":"            t0\u003d${SECONDS}"},{"line_number":634,"context_line":"            while true; do"},{"line_number":635,"context_line":"                # During the platform upgrade in DX it takes sometime(usually 5 min)"},{"line_number":636,"context_line":"                # to be on active controller during the step system upgrade-activate,"},{"line_number":637,"context_line":"                # added a check here to get on active controller along with"},{"line_number":638,"context_line":"                # wait for upgrade-activate to complete."},{"line_number":639,"context_line":"                # As per the document step \"system upgrade-activate\" may take"},{"line_number":640,"context_line":"                # more than half an hour to complete. Giving a chance to be on a"},{"line_number":641,"context_line":"                # active controller within this time to perform system commands"},{"line_number":642,"context_line":"                if is_active_controller; then"},{"line_number":643,"context_line":"                    dt\u003d$(( ${SECONDS} - ${t0} ))"},{"line_number":644,"context_line":"                    if [ ${dt} -ge ${TIMEOUT_ACTIVE_CONTROLLER} ]; then"}],"source_content_type":"text/x-sh","patch_set":20,"id":"00094afb_ffcb9b3d","line":641,"range":{"start_line":635,"start_character":0,"end_line":641,"end_character":79},"in_reply_to":"e589f49a_37f5d3c2","updated":"2023-10-25 12:28:19.000000000","message":"Done","commit_id":"a300acfe3c7fb88a89a948b326ec8e13ed48a495"},{"author":{"_account_id":35757,"name":"Bruce Jones","email":"bruce.jones@windriver.com","username":"bejones"},"change_message_id":"fb64cd41651517502b3da093c0d69afc0b69345d","unresolved":true,"context_lines":[{"line_number":501,"context_line":"    # Wait for the sysinv-api process. This also implies that"},{"line_number":502,"context_line":"    # this controller is currently the active controller.."},{"line_number":503,"context_line":"    t0\u003d${SECONDS}"},{"line_number":504,"context_line":"    while true; do"},{"line_number":505,"context_line":"        dt\u003d$(( ${SECONDS} - ${t0} ))"},{"line_number":506,"context_line":"        if [ ${dt} -ge ${SYSINV_API_TIMEOUT_SECONDS} ]; then"},{"line_number":507,"context_line":"            ERROR \"Timeout waiting for the sysinv api to be ready\""}],"source_content_type":"text/x-sh","patch_set":23,"id":"04ee9935_74b9a39f","line":504,"updated":"2023-10-25 19:15:48.000000000","message":"Is it possible that this loop will never terminate?  SHouldn\u0027t we limit the number of retries instead of looping forwever?","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"1c1cd6fed63ff327caab3782473f3f3ffe85acb5","unresolved":false,"context_lines":[{"line_number":501,"context_line":"    # Wait for the sysinv-api process. This also implies that"},{"line_number":502,"context_line":"    # this controller is currently the active controller.."},{"line_number":503,"context_line":"    t0\u003d${SECONDS}"},{"line_number":504,"context_line":"    while true; do"},{"line_number":505,"context_line":"        dt\u003d$(( ${SECONDS} - ${t0} ))"},{"line_number":506,"context_line":"        if [ ${dt} -ge ${SYSINV_API_TIMEOUT_SECONDS} ]; then"},{"line_number":507,"context_line":"            ERROR \"Timeout waiting for the sysinv api to be ready\""}],"source_content_type":"text/x-sh","patch_set":23,"id":"3b4a7581_d478e225","line":504,"in_reply_to":"04ee9935_74b9a39f","updated":"2023-10-25 19:44:19.000000000","message":"it will exit after the bash $SECONDS elapsed time delta \u003e $SYSINV_API_TIMEOUT_SECONDS","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"24974824c66f914bf7eaa4e11c135ba6e471d43a","unresolved":true,"context_lines":[{"line_number":625,"context_line":"    # activation-complete"},{"line_number":626,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":629,"context_line":"        http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":630,"context_line":"    rc\u003d$?"},{"line_number":631,"context_line":""}],"source_content_type":"text/x-sh","patch_set":23,"id":"ea118676_9c3abba4","line":628,"updated":"2023-10-25 20:44:24.000000000","message":"has this path been verified in AIO-SX - it may not respond at this point in the initialization?","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"92c4af37fdfaf370ff00af7ae18ed10b130c2d5b","unresolved":true,"context_lines":[{"line_number":625,"context_line":"    # activation-complete"},{"line_number":626,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":629,"context_line":"        http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":630,"context_line":"    rc\u003d$?"},{"line_number":631,"context_line":""}],"source_content_type":"text/x-sh","patch_set":23,"id":"ef2e0643_b2a91caf","line":628,"in_reply_to":"77ce885c_aa7430ac","updated":"2023-10-26 15:23:41.000000000","message":"FYI reviewing the sysinv API upgrade_in_progress; the code ignores hostname uuid, so it doesn\u0027t currently matter what string is there for hostname.","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"df3089d952b0a51ef0da420f81996c6520c4ace1","unresolved":false,"context_lines":[{"line_number":625,"context_line":"    # activation-complete"},{"line_number":626,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":629,"context_line":"        http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":630,"context_line":"    rc\u003d$?"},{"line_number":631,"context_line":""}],"source_content_type":"text/x-sh","patch_set":23,"id":"5321a4e1_777c5747","line":628,"in_reply_to":"7d0da32a_19b55f00","updated":"2023-10-26 18:54:26.000000000","message":"Done","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"fafa558b45b1eff9d0f53604005ba62d122640a6","unresolved":true,"context_lines":[{"line_number":625,"context_line":"    # activation-complete"},{"line_number":626,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":629,"context_line":"        http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":630,"context_line":"    rc\u003d$?"},{"line_number":631,"context_line":""}],"source_content_type":"text/x-sh","patch_set":23,"id":"77ce885c_aa7430ac","line":628,"in_reply_to":"a45d8015_72d82855","updated":"2023-10-26 14:58:09.000000000","message":"possible solution:\nwait for sysinv to be up by polling curl command for sysinv REST is alive.\n\ni\u0027m thinking may need similar for \u0027sm\u0027. and SM may not be up before workerconfig, TBD, else need logic that doesnt depend on sm.","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"4a7eff99bd127f1a8edf657e5a70c8923e297a59","unresolved":true,"context_lines":[{"line_number":625,"context_line":"    # activation-complete"},{"line_number":626,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":629,"context_line":"        http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":630,"context_line":"    rc\u003d$?"},{"line_number":631,"context_line":""}],"source_content_type":"text/x-sh","patch_set":23,"id":"a45d8015_72d82855","line":628,"in_reply_to":"ea118676_9c3abba4","updated":"2023-10-25 21:07:47.000000000","message":"this API only works if sysinv is actually running!  The 6385 is sysinv port.\n\nThere is potentially another way on AIO-SX only -- verify restore is in progress since that used by AIO-SX upgrade.","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"48b431dac7c14cd5204f12da7348101f35924105","unresolved":true,"context_lines":[{"line_number":625,"context_line":"    # activation-complete"},{"line_number":626,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":629,"context_line":"        http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":630,"context_line":"    rc\u003d$?"},{"line_number":631,"context_line":""}],"source_content_type":"text/x-sh","patch_set":23,"id":"7d0da32a_19b55f00","line":628,"in_reply_to":"ef2e0643_b2a91caf","updated":"2023-10-26 16:06:13.000000000","message":"I have found that the affine-tasks.sh script runs twice during the SX platform upgrade.\n1. when on a localhost it checks if upgrade in progress and the assign some number of tasks\n2. When on controller-0, after restoring and unlocking the host . It checks for upgrade in progress, it gets true as value . It waits for activation complete and then assign tasks.\n\nTests per case\n1. on localhost\n2023-10-26T11:16:20.000 localhost affine-tasks.sh(9852): info : Warning: /sys/fs/cgroup/cpuset/docker not ready.\n2023-10-26T11:16:20.000 localhost affine-tasks.sh(9852): info : Hostname is controller-0\n2023-10-26T11:16:20.000 localhost affine-tasks.sh(9852): info : Platform upgrade is not in progress\n2023-10-26T11:16:20.000 localhost affine-tasks.sh(9852): info : Affine all tasks, PLATFORM_CPUS\u003d0,1\n2023-10-26T11:16:21.000 localhost affine-tasks.sh(9852): info : Affine drbd tasks, CPUS\u003d0,1\n2023-10-26T11:16:21.262 localhost affine-tasks.sh[9852]: info removed ‘/etc/platform/.task_affining_incomplete’\n2023-10-26T11:16:21.000 localhost affine-tasks.sh(9852): info : Affined 155 processes to platform cores.\n2023-10-26T11:16:21.000 localhost affine-tasks.sh(9852): info : Complete.\n\n2. on controller\n2023-10-26T11:41:19.000 controller-0 affine-tasks.sh(2164): info : Hostname is controller-0\n2023-10-26T11:41:20.000 controller-0 affine-tasks.sh(2164): info : System upgrade in progress on host: controller-0\n2023-10-26T11:41:20.718 controller-0 systemd[1]: info Created slice User Slice of root.\n\nwaits for upgrade to activation-complete\n\n\n2023-10-26T11:51:37.000 controller-0 affine-tasks.sh(2164): info : Upgrade state is : activation-complete\n2023-10-26T11:51:37.000 controller-0 affine-tasks.sh(2164): info : Completed upgrade activation on host: controller-0\n2023-10-26T11:51:37.000 controller-0 affine-tasks.sh(2164): info : Affine all tasks, PLATFORM_CPUS\u003d0,1\n2023-10-26T11:51:37.000 controller-0 affine-tasks.sh(2164): info : Affine drbd tasks, CPUS\u003d0,1\n2023-10-26T11:51:37.700 controller-0 affine-tasks.sh[2164]: info removed ‘/etc/platform/.task_affining_incomplete’\n2023-10-26T11:51:37.000 controller-0 affine-tasks.sh(2164): info : Affined 171 processes to platform cores.\n2023-10-26T11:51:37.000 controller-0 affine-tasks.sh(2164): info : Complete.","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"4a7eff99bd127f1a8edf657e5a70c8923e297a59","unresolved":true,"context_lines":[{"line_number":635,"context_line":"        if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ]; then"},{"line_number":636,"context_line":"            LOG \"System upgrade in progress on host: ${hostname}\""},{"line_number":637,"context_line":"            while true; do"},{"line_number":638,"context_line":"                if is_active_controller; then"},{"line_number":639,"context_line":"                    # If a platform upgrade is in progress and running on a"},{"line_number":640,"context_line":"                    # active controller , then wait for platform upgrade to either"},{"line_number":641,"context_line":"                    # activation-complete or completing or complete the upgrade."}],"source_content_type":"text/x-sh","patch_set":23,"id":"b8841b37_0b0bc25d","line":638,"range":{"start_line":638,"start_character":19,"end_line":638,"end_character":39},"updated":"2023-10-25 21:07:47.000000000","message":"had some offline discussion here.we are not certain if SM is running yet to use this API. wondering if this actually got in on AIO-DX because polling in loop.","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"df3089d952b0a51ef0da420f81996c6520c4ace1","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ]; then"},{"line_number":636,"context_line":"            LOG \"System upgrade in progress on host: ${hostname}\""},{"line_number":637,"context_line":"            while true; do"},{"line_number":638,"context_line":"                if is_active_controller; then"},{"line_number":639,"context_line":"                    # If a platform upgrade is in progress and running on a"},{"line_number":640,"context_line":"                    # active controller , then wait for platform upgrade to either"},{"line_number":641,"context_line":"                    # activation-complete or completing or complete the upgrade."}],"source_content_type":"text/x-sh","patch_set":23,"id":"c0e81c38_7779d862","line":638,"range":{"start_line":638,"start_character":19,"end_line":638,"end_character":39},"in_reply_to":"a1993f77_00e0303e","updated":"2023-10-26 18:54:26.000000000","message":"Done","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"48b431dac7c14cd5204f12da7348101f35924105","unresolved":true,"context_lines":[{"line_number":635,"context_line":"        if [ \"${is_upgrade_in_progress}\" \u003d \"true\" ]; then"},{"line_number":636,"context_line":"            LOG \"System upgrade in progress on host: ${hostname}\""},{"line_number":637,"context_line":"            while true; do"},{"line_number":638,"context_line":"                if is_active_controller; then"},{"line_number":639,"context_line":"                    # If a platform upgrade is in progress and running on a"},{"line_number":640,"context_line":"                    # active controller , then wait for platform upgrade to either"},{"line_number":641,"context_line":"                    # activation-complete or completing or complete the upgrade."}],"source_content_type":"text/x-sh","patch_set":23,"id":"a1993f77_00e0303e","line":638,"range":{"start_line":638,"start_character":19,"end_line":638,"end_character":39},"in_reply_to":"b8841b37_0b0bc25d","updated":"2023-10-26 16:06:13.000000000","message":"Yes, This did take time .It did work because it is in loop.","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"38f59d92b000d851db4544f04991e098044c9f1f","unresolved":true,"context_lines":[{"line_number":656,"context_line":"                            break"},{"line_number":657,"context_line":"                        fi"},{"line_number":658,"context_line":"                    fi"},{"line_number":659,"context_line":"                else"},{"line_number":660,"context_line":"                    LOG \"not an active controller.. waiting to be active in\" \\"},{"line_number":661,"context_line":"                        \"${INIT_INTERVAL_SECONDS} seconds\""},{"line_number":662,"context_line":"                    sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":663,"context_line":"                fi"},{"line_number":664,"context_line":"            done"},{"line_number":665,"context_line":"        else"},{"line_number":666,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":23,"id":"f5f148d0_ddf0c8a7","line":663,"range":{"start_line":659,"start_character":0,"end_line":663,"end_character":18},"updated":"2023-10-25 16:17:56.000000000","message":"this logic not right; we not supposed to be waiting for swact to occur","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":35757,"name":"Bruce Jones","email":"bruce.jones@windriver.com","username":"bejones"},"change_message_id":"fb64cd41651517502b3da093c0d69afc0b69345d","unresolved":true,"context_lines":[{"line_number":656,"context_line":"                            break"},{"line_number":657,"context_line":"                        fi"},{"line_number":658,"context_line":"                    fi"},{"line_number":659,"context_line":"                else"},{"line_number":660,"context_line":"                    LOG \"not an active controller.. waiting to be active in\" \\"},{"line_number":661,"context_line":"                        \"${INIT_INTERVAL_SECONDS} seconds\""},{"line_number":662,"context_line":"                    sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":663,"context_line":"                fi"},{"line_number":664,"context_line":"            done"},{"line_number":665,"context_line":"        else"},{"line_number":666,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":23,"id":"b5474ad0_d04adfe1","line":663,"range":{"start_line":659,"start_character":0,"end_line":663,"end_character":18},"in_reply_to":"0ee2574f_d94452be","updated":"2023-10-25 19:15:48.000000000","message":"One other issue here.  This code is in a \u0027while true\u0027 loop. Is there a potential to just hang here forever?  Maybe this should be limited to a small number of re-tries?","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"543b5ef6e9a6cdcd45ca69bb74603abf9f644724","unresolved":true,"context_lines":[{"line_number":656,"context_line":"                            break"},{"line_number":657,"context_line":"                        fi"},{"line_number":658,"context_line":"                    fi"},{"line_number":659,"context_line":"                else"},{"line_number":660,"context_line":"                    LOG \"not an active controller.. waiting to be active in\" \\"},{"line_number":661,"context_line":"                        \"${INIT_INTERVAL_SECONDS} seconds\""},{"line_number":662,"context_line":"                    sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":663,"context_line":"                fi"},{"line_number":664,"context_line":"            done"},{"line_number":665,"context_line":"        else"},{"line_number":666,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":23,"id":"b67f944b_3af8cf85","line":663,"range":{"start_line":659,"start_character":0,"end_line":663,"end_character":18},"in_reply_to":"3a120143_4c438c0a","updated":"2023-10-25 19:58:13.000000000","message":"will block on AIO, but not worker-only nodes. the start() filters out (controller AND worker)","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"1c1cd6fed63ff327caab3782473f3f3ffe85acb5","unresolved":true,"context_lines":[{"line_number":656,"context_line":"                            break"},{"line_number":657,"context_line":"                        fi"},{"line_number":658,"context_line":"                    fi"},{"line_number":659,"context_line":"                else"},{"line_number":660,"context_line":"                    LOG \"not an active controller.. waiting to be active in\" \\"},{"line_number":661,"context_line":"                        \"${INIT_INTERVAL_SECONDS} seconds\""},{"line_number":662,"context_line":"                    sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":663,"context_line":"                fi"},{"line_number":664,"context_line":"            done"},{"line_number":665,"context_line":"        else"},{"line_number":666,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":23,"id":"e52d42e2_40c5ed92","line":663,"range":{"start_line":659,"start_character":0,"end_line":663,"end_character":18},"in_reply_to":"b5474ad0_d04adfe1","updated":"2023-10-25 19:44:19.000000000","message":"wanted active-controller to wait forever if this loop started during upgrade and only exit if completed or no more upgrade. the active has the dominant amount of cpu intensive work.\n\nideally want inactive-controller to do the same;\n\nBUT inactive does not have assess to sysinv-cli, i think it only has access to the upgrade_in_progress API curl command. so on the inactive-controller, i think options are:\na) do nothing then exit\nb) wait some grace period then exit\nc) poll the curl API upgrade_in_progress and wait for \u0027false\u0027 then exit","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"d23ee2375826a860795ac1bd0b2872251415d6de","unresolved":true,"context_lines":[{"line_number":656,"context_line":"                            break"},{"line_number":657,"context_line":"                        fi"},{"line_number":658,"context_line":"                    fi"},{"line_number":659,"context_line":"                else"},{"line_number":660,"context_line":"                    LOG \"not an active controller.. waiting to be active in\" \\"},{"line_number":661,"context_line":"                        \"${INIT_INTERVAL_SECONDS} seconds\""},{"line_number":662,"context_line":"                    sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":663,"context_line":"                fi"},{"line_number":664,"context_line":"            done"},{"line_number":665,"context_line":"        else"},{"line_number":666,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":23,"id":"3a120143_4c438c0a","line":663,"range":{"start_line":659,"start_character":0,"end_line":663,"end_character":18},"in_reply_to":"b5474ad0_d04adfe1","updated":"2023-10-25 19:49:16.000000000","message":"would this not also block workerconfig.service on the standby AIO or worker node from starting during an upgrade?  \n\nhttps://opendev.org/starlingx/utilities/src/branch/master/utilities/worker-utils/worker-utils/affine-tasks.service#L4","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"4a7eff99bd127f1a8edf657e5a70c8923e297a59","unresolved":true,"context_lines":[{"line_number":656,"context_line":"                            break"},{"line_number":657,"context_line":"                        fi"},{"line_number":658,"context_line":"                    fi"},{"line_number":659,"context_line":"                else"},{"line_number":660,"context_line":"                    LOG \"not an active controller.. waiting to be active in\" \\"},{"line_number":661,"context_line":"                        \"${INIT_INTERVAL_SECONDS} seconds\""},{"line_number":662,"context_line":"                    sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":663,"context_line":"                fi"},{"line_number":664,"context_line":"            done"},{"line_number":665,"context_line":"        else"},{"line_number":666,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":23,"id":"f35460e0_4984f45e","line":663,"range":{"start_line":659,"start_character":0,"end_line":663,"end_character":18},"in_reply_to":"b67f944b_3af8cf85","updated":"2023-10-25 21:07:47.000000000","message":"Agreement between John/Jim: we want option a) just exit the loop on standby; but that sleep needs to be inside the while loop","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"df3089d952b0a51ef0da420f81996c6520c4ace1","unresolved":false,"context_lines":[{"line_number":656,"context_line":"                            break"},{"line_number":657,"context_line":"                        fi"},{"line_number":658,"context_line":"                    fi"},{"line_number":659,"context_line":"                else"},{"line_number":660,"context_line":"                    LOG \"not an active controller.. waiting to be active in\" \\"},{"line_number":661,"context_line":"                        \"${INIT_INTERVAL_SECONDS} seconds\""},{"line_number":662,"context_line":"                    sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":663,"context_line":"                fi"},{"line_number":664,"context_line":"            done"},{"line_number":665,"context_line":"        else"},{"line_number":666,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":23,"id":"26a2bf98_882c7b5f","line":663,"range":{"start_line":659,"start_character":0,"end_line":663,"end_character":18},"in_reply_to":"f35460e0_4984f45e","updated":"2023-10-26 18:54:26.000000000","message":"Done","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"576262239300f1ba8bde622208bdb61facd77d99","unresolved":true,"context_lines":[{"line_number":656,"context_line":"                            break"},{"line_number":657,"context_line":"                        fi"},{"line_number":658,"context_line":"                    fi"},{"line_number":659,"context_line":"                else"},{"line_number":660,"context_line":"                    LOG \"not an active controller.. waiting to be active in\" \\"},{"line_number":661,"context_line":"                        \"${INIT_INTERVAL_SECONDS} seconds\""},{"line_number":662,"context_line":"                    sleep ${INIT_INTERVAL_SECONDS}"},{"line_number":663,"context_line":"                fi"},{"line_number":664,"context_line":"            done"},{"line_number":665,"context_line":"        else"},{"line_number":666,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":23,"id":"0ee2574f_d94452be","line":663,"range":{"start_line":659,"start_character":0,"end_line":663,"end_character":18},"in_reply_to":"f5f148d0_ddf0c8a7","updated":"2023-10-25 17:25:58.000000000","message":"want @John Kung to weigh in here.\nThe primary benefit is to have the active controller wait for the upgrade.\ni get the feeling this could leave controller-1 unaffined forever until host lock/unlock","commit_id":"c0ade021a3b6d474eaee8bb4f5c894591e8d22ac"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"7bc2a7974b2dd875d17074b5a4ecdd2356499938","unresolved":true,"context_lines":[{"line_number":522,"context_line":""},{"line_number":523,"context_line":"function _wait_for_sysinv_REST {"},{"line_number":524,"context_line":"    while true; do"},{"line_number":525,"context_line":"        sysinv_REST\u003d$(curl -sf http://controller:6385/v1)"},{"line_number":526,"context_line":"        rc\u003d$?"},{"line_number":527,"context_line":"        if [ $rc -eq 0 ]; then"},{"line_number":528,"context_line":"            LOG \"System Inventory Service (sysinv-api) is reachable via direct request URL\""}],"source_content_type":"text/x-sh","patch_set":25,"id":"0572b151_798d5386","line":525,"range":{"start_line":525,"start_character":38,"end_line":525,"end_character":48},"updated":"2023-10-27 13:40:23.000000000","message":"@John:\nshould this be: controller, or, pxecontroller?","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"ea01b9b392abbc7d5e62c10c7f62b3e62198b7db","unresolved":false,"context_lines":[{"line_number":522,"context_line":""},{"line_number":523,"context_line":"function _wait_for_sysinv_REST {"},{"line_number":524,"context_line":"    while true; do"},{"line_number":525,"context_line":"        sysinv_REST\u003d$(curl -sf http://controller:6385/v1)"},{"line_number":526,"context_line":"        rc\u003d$?"},{"line_number":527,"context_line":"        if [ $rc -eq 0 ]; then"},{"line_number":528,"context_line":"            LOG \"System Inventory Service (sysinv-api) is reachable via direct request URL\""}],"source_content_type":"text/x-sh","patch_set":25,"id":"de750f24_d0a8a296","line":525,"range":{"start_line":525,"start_character":38,"end_line":525,"end_character":48},"in_reply_to":"0572b151_798d5386","updated":"2023-10-27 16:36:56.000000000","message":"Done","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"1777011dd004b6463d44a3b401fe0c911762b3bd","unresolved":false,"context_lines":[{"line_number":522,"context_line":""},{"line_number":523,"context_line":"function _wait_for_sysinv_REST {"},{"line_number":524,"context_line":"    while true; do"},{"line_number":525,"context_line":"        sysinv_REST\u003d$(curl -sf http://controller:6385/v1)"},{"line_number":526,"context_line":"        rc\u003d$?"},{"line_number":527,"context_line":"        if [ $rc -eq 0 ]; then"},{"line_number":528,"context_line":"            LOG \"System Inventory Service (sysinv-api) is reachable via direct request URL\""}],"source_content_type":"text/x-sh","patch_set":25,"id":"28b78db0_7fc56f6d","line":525,"range":{"start_line":525,"start_character":38,"end_line":525,"end_character":48},"in_reply_to":"0572b151_798d5386","updated":"2023-10-27 15:56:58.000000000","message":"john indicated to me, keep as \u0027controller\u0027","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"7bc2a7974b2dd875d17074b5a4ecdd2356499938","unresolved":true,"context_lines":[{"line_number":524,"context_line":"    while true; do"},{"line_number":525,"context_line":"        sysinv_REST\u003d$(curl -sf http://controller:6385/v1)"},{"line_number":526,"context_line":"        rc\u003d$?"},{"line_number":527,"context_line":"        if [ $rc -eq 0 ]; then"},{"line_number":528,"context_line":"            LOG \"System Inventory Service (sysinv-api) is reachable via direct request URL\""},{"line_number":529,"context_line":"            break"},{"line_number":530,"context_line":"        else"}],"source_content_type":"text/x-sh","patch_set":25,"id":"6d94ff59_23d1de5c","line":527,"range":{"start_line":527,"start_character":12,"end_line":527,"end_character":16},"updated":"2023-10-27 13:40:23.000000000","message":"simplify this to $? -eq 0\nwe not use the rc variable for anything","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"ea01b9b392abbc7d5e62c10c7f62b3e62198b7db","unresolved":false,"context_lines":[{"line_number":524,"context_line":"    while true; do"},{"line_number":525,"context_line":"        sysinv_REST\u003d$(curl -sf http://controller:6385/v1)"},{"line_number":526,"context_line":"        rc\u003d$?"},{"line_number":527,"context_line":"        if [ $rc -eq 0 ]; then"},{"line_number":528,"context_line":"            LOG \"System Inventory Service (sysinv-api) is reachable via direct request URL\""},{"line_number":529,"context_line":"            break"},{"line_number":530,"context_line":"        else"}],"source_content_type":"text/x-sh","patch_set":25,"id":"ed4355c3_91375e5b","line":527,"range":{"start_line":527,"start_character":12,"end_line":527,"end_character":16},"in_reply_to":"6d94ff59_23d1de5c","updated":"2023-10-27 16:36:56.000000000","message":"Done","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"7bc2a7974b2dd875d17074b5a4ecdd2356499938","unresolved":true,"context_lines":[{"line_number":527,"context_line":"        if [ $rc -eq 0 ]; then"},{"line_number":528,"context_line":"            LOG \"System Inventory Service (sysinv-api) is reachable via direct request URL\""},{"line_number":529,"context_line":"            break"},{"line_number":530,"context_line":"        else"},{"line_number":531,"context_line":"            LOG \"Unable to communicate with the System Inventory Service (sysinv-api)\""},{"line_number":532,"context_line":"        fi"},{"line_number":533,"context_line":"        LOG \" Waiting for System Inventory Service\" \\"},{"line_number":534,"context_line":"            \"to be reachable in ${CHECK_INTERVAL_SECONDS}\""},{"line_number":535,"context_line":"        sleep ${CHECK_INTERVAL_SECONDS}"}],"source_content_type":"text/x-sh","patch_set":25,"id":"0a834ba0_2894097c","line":532,"range":{"start_line":530,"start_character":0,"end_line":532,"end_character":0},"updated":"2023-10-27 13:40:23.000000000","message":"redundant you are printing same thing in L533","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"ea01b9b392abbc7d5e62c10c7f62b3e62198b7db","unresolved":false,"context_lines":[{"line_number":527,"context_line":"        if [ $rc -eq 0 ]; then"},{"line_number":528,"context_line":"            LOG \"System Inventory Service (sysinv-api) is reachable via direct request URL\""},{"line_number":529,"context_line":"            break"},{"line_number":530,"context_line":"        else"},{"line_number":531,"context_line":"            LOG \"Unable to communicate with the System Inventory Service (sysinv-api)\""},{"line_number":532,"context_line":"        fi"},{"line_number":533,"context_line":"        LOG \" Waiting for System Inventory Service\" \\"},{"line_number":534,"context_line":"            \"to be reachable in ${CHECK_INTERVAL_SECONDS}\""},{"line_number":535,"context_line":"        sleep ${CHECK_INTERVAL_SECONDS}"}],"source_content_type":"text/x-sh","patch_set":25,"id":"4884bc00_c9625265","line":532,"range":{"start_line":530,"start_character":0,"end_line":532,"end_character":0},"in_reply_to":"0a834ba0_2894097c","updated":"2023-10-27 16:36:56.000000000","message":"Done","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"53633a048211317c7a4e07ca6d8c2a9748cf8e1e","unresolved":true,"context_lines":[{"line_number":638,"context_line":"    fi"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"    # Check whether system inventory service is reachable"},{"line_number":641,"context_line":"    _wait_for_sysinv_REST"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    # When platform upgrade in progress wait for upgrade to be"},{"line_number":644,"context_line":"    # activation-complete"}],"source_content_type":"text/x-sh","patch_set":25,"id":"f5914fd1_a1848014","line":641,"updated":"2023-10-26 20:08:01.000000000","message":"has this change been verified on initial AIO bootstrap - Wouldnt this block AIO manifest apply (workerconfig) from completing ?https://opendev.org/starlingx/utilities/src/branch/master/utilities/worker-utils/worker-utils/affine-tasks.service#L4","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"ea01b9b392abbc7d5e62c10c7f62b3e62198b7db","unresolved":false,"context_lines":[{"line_number":638,"context_line":"    fi"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"    # Check whether system inventory service is reachable"},{"line_number":641,"context_line":"    _wait_for_sysinv_REST"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    # When platform upgrade in progress wait for upgrade to be"},{"line_number":644,"context_line":"    # activation-complete"}],"source_content_type":"text/x-sh","patch_set":25,"id":"3ff0f6f1_cd80c0e5","line":641,"in_reply_to":"8994378a_7493aff9","updated":"2023-10-27 16:36:56.000000000","message":"Done","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"7bc2a7974b2dd875d17074b5a4ecdd2356499938","unresolved":true,"context_lines":[{"line_number":638,"context_line":"    fi"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"    # Check whether system inventory service is reachable"},{"line_number":641,"context_line":"    _wait_for_sysinv_REST"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    # When platform upgrade in progress wait for upgrade to be"},{"line_number":644,"context_line":"    # activation-complete"}],"source_content_type":"text/x-sh","patch_set":25,"id":"8994378a_7493aff9","line":641,"in_reply_to":"f5914fd1_a1848014","updated":"2023-10-27 13:40:23.000000000","message":"the Before\u003dworkerconfig.service should be removed in L4 since workerconfig not on AIO, and this start() filters out (controller AND worker). the workerconfig.service was not present on AIO.\n\nThis is no longer a dependency.","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"7bc2a7974b2dd875d17074b5a4ecdd2356499938","unresolved":true,"context_lines":[{"line_number":670,"context_line":"                    else"},{"line_number":671,"context_line":"                        # Below condition takes care of assigning platform tasks"},{"line_number":672,"context_line":"                        # if  \"activation-failed\""},{"line_number":673,"context_line":"                        if [ \"${UPGRADE_STATE}\" \u003d \"activation-failed\" ]; then"},{"line_number":674,"context_line":"                            ERROR \" Upgrade activation failed on host : ${hostname}\""},{"line_number":675,"context_line":"                            break"},{"line_number":676,"context_line":"                        fi"}],"source_content_type":"text/x-sh","patch_set":25,"id":"d9f17870_87bfd698","line":673,"range":{"start_line":673,"start_character":29,"end_line":673,"end_character":70},"updated":"2023-10-27 13:40:23.000000000","message":"move this check to L665.  this is too complicated.\njust add, \", ${UPGRADE_STATE}.\" to LOG L668\n\nthis code is not responsible for upgrades; this isn\u0027t an ERROR for task affining\n\ndon\u0027t need to look at task affining logs to debug upgrade failures.","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"ea01b9b392abbc7d5e62c10c7f62b3e62198b7db","unresolved":false,"context_lines":[{"line_number":670,"context_line":"                    else"},{"line_number":671,"context_line":"                        # Below condition takes care of assigning platform tasks"},{"line_number":672,"context_line":"                        # if  \"activation-failed\""},{"line_number":673,"context_line":"                        if [ \"${UPGRADE_STATE}\" \u003d \"activation-failed\" ]; then"},{"line_number":674,"context_line":"                            ERROR \" Upgrade activation failed on host : ${hostname}\""},{"line_number":675,"context_line":"                            break"},{"line_number":676,"context_line":"                        fi"}],"source_content_type":"text/x-sh","patch_set":25,"id":"2aa861c9_7377eb58","line":673,"range":{"start_line":673,"start_character":29,"end_line":673,"end_character":70},"in_reply_to":"d9f17870_87bfd698","updated":"2023-10-27 16:36:56.000000000","message":"Done","commit_id":"e4d83b1accee9928e969bad15cf875765098d735"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"2930ba9afcefee534626873e18c2d6bb02dfd611","unresolved":true,"context_lines":[{"line_number":642,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":645,"context_line":"        http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    if [ \"$?\" -ne 0 ]; then"},{"line_number":648,"context_line":"        ERROR \"Upgrade api returned ${rc} for the hostname: ${hostname}\""}],"source_content_type":"text/x-sh","patch_set":26,"id":"53821fba_67eb7b22","line":645,"range":{"start_line":645,"start_character":15,"end_line":645,"end_character":28},"updated":"2023-10-27 18:53:59.000000000","message":"nit: should be \u0027controller\u0027 as well for consistency with l.525","commit_id":"9cc72499dc6673a2a2f46a84ed94036044202e96"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"72c1c372f7d003714d963c3c489fe75a915b3347","unresolved":false,"context_lines":[{"line_number":642,"context_line":"    hostname\u003d$(hostname -s)"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"    is_upgrade_in_progress\u003d$(curl -sf \\"},{"line_number":645,"context_line":"        http://pxecontroller:6385/v1/upgrade/\"${hostname}\"/upgrade_in_progress)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    if [ \"$?\" -ne 0 ]; then"},{"line_number":648,"context_line":"        ERROR \"Upgrade api returned ${rc} for the hostname: ${hostname}\""}],"source_content_type":"text/x-sh","patch_set":26,"id":"e1c947a6_6ee247ad","line":645,"range":{"start_line":645,"start_character":15,"end_line":645,"end_character":28},"in_reply_to":"53821fba_67eb7b22","updated":"2023-10-31 12:36:43.000000000","message":"Done","commit_id":"9cc72499dc6673a2a2f46a84ed94036044202e96"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"2930ba9afcefee534626873e18c2d6bb02dfd611","unresolved":true,"context_lines":[{"line_number":654,"context_line":"                    # If a platform upgrade is in progress and running on a"},{"line_number":655,"context_line":"                    # active controller , then wait for platform upgrade to either"},{"line_number":656,"context_line":"                    # activation-complete or completing or complete the upgrade."},{"line_number":657,"context_line":"                    _wait_for_sysinv_api"},{"line_number":658,"context_line":"                    source /etc/platform/openrc"},{"line_number":659,"context_line":"                    UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":660,"context_line":"                    if [ \"${UPGRADE_STATE}\" \u003d \"activation-complete\" ] || \\"}],"source_content_type":"text/x-sh","patch_set":26,"id":"8b551427_226bf027","line":657,"updated":"2023-10-27 18:53:59.000000000","message":"not sure if this check is even needed since already did _wait_for_sysinv_REST ?","commit_id":"9cc72499dc6673a2a2f46a84ed94036044202e96"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"72c1c372f7d003714d963c3c489fe75a915b3347","unresolved":false,"context_lines":[{"line_number":654,"context_line":"                    # If a platform upgrade is in progress and running on a"},{"line_number":655,"context_line":"                    # active controller , then wait for platform upgrade to either"},{"line_number":656,"context_line":"                    # activation-complete or completing or complete the upgrade."},{"line_number":657,"context_line":"                    _wait_for_sysinv_api"},{"line_number":658,"context_line":"                    source /etc/platform/openrc"},{"line_number":659,"context_line":"                    UPGRADE_STATE\u003d$(system upgrade-show | grep state | awk \u0027{ print $4; }\u0027 2\u003e/dev/null)"},{"line_number":660,"context_line":"                    if [ \"${UPGRADE_STATE}\" \u003d \"activation-complete\" ] || \\"}],"source_content_type":"text/x-sh","patch_set":26,"id":"4f155c5f_87633a89","line":657,"in_reply_to":"8b551427_226bf027","updated":"2023-10-31 12:36:43.000000000","message":"Done","commit_id":"9cc72499dc6673a2a2f46a84ed94036044202e96"},{"author":{"_account_id":9926,"name":"John Kung","email":"john.kung@windriver.com","username":"jkung"},"change_message_id":"420f42e0ade7670a0c8f1df98a2fd317137c6cb2","unresolved":true,"context_lines":[{"line_number":497,"context_line":"    fi"},{"line_number":498,"context_line":"}"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"function _wait_for_sysinv_api {"},{"line_number":501,"context_line":"    # Wait for the sysinv-api process. This also implies that"},{"line_number":502,"context_line":"    # this controller is currently the active controller.."},{"line_number":503,"context_line":"    t0\u003d${SECONDS}"}],"source_content_type":"text/x-sh","patch_set":29,"id":"c851ef27_61158e23","line":500,"updated":"2023-10-31 12:02:22.000000000","message":"This method is not referenced anymore","commit_id":"d66eeafdcaf786691b87b6061ae49e7f41dc64bc"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"72c1c372f7d003714d963c3c489fe75a915b3347","unresolved":false,"context_lines":[{"line_number":497,"context_line":"    fi"},{"line_number":498,"context_line":"}"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"function _wait_for_sysinv_api {"},{"line_number":501,"context_line":"    # Wait for the sysinv-api process. This also implies that"},{"line_number":502,"context_line":"    # this controller is currently the active controller.."},{"line_number":503,"context_line":"    t0\u003d${SECONDS}"}],"source_content_type":"text/x-sh","patch_set":29,"id":"4f6531ad_7e174fb4","line":500,"in_reply_to":"c851ef27_61158e23","updated":"2023-10-31 12:36:43.000000000","message":"Done","commit_id":"d66eeafdcaf786691b87b6061ae49e7f41dc64bc"},{"author":{"_account_id":33390,"name":"Heitor Matsui","display_name":"Heitor Matsui","email":"HeitorVieira.Matsui@windriver.com","username":"heitormatsui"},"change_message_id":"dd4a6fa618e206b4683e6f320419db26adeb3fb8","unresolved":true,"context_lines":[{"line_number":62,"context_line":"CHECK_INTERVAL_SECONDS\u003d30"},{"line_number":63,"context_line":"PRINT_INTERVAL_SECONDS\u003d300"},{"line_number":64,"context_line":"STABILIZATION_SECONDS\u003d150"},{"line_number":65,"context_line":"SYSINV_API_TIMEOUT_SECONDS\u003d900"},{"line_number":66,"context_line":"ACTIVE_CONTROLLER_INTERVAL\u003d60"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"# Define pidfile"}],"source_content_type":"text/x-sh","patch_set":30,"id":"26b2e1d9_240a46c9","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":30},"updated":"2023-10-31 15:33:32.000000000","message":"Where are you using this variable? I did not find any reference.","commit_id":"fad2d73cb34c92e55963e8e03585d8d86cf2fe31"},{"author":{"_account_id":35296,"name":"Saba Touheed Maqbool Ahmed Mujawar","email":"sabatouheed.mujawar@windriver.com","username":"smujawar"},"change_message_id":"457b2682cf3a5c956ea3ffae7decc26629398a0f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"CHECK_INTERVAL_SECONDS\u003d30"},{"line_number":63,"context_line":"PRINT_INTERVAL_SECONDS\u003d300"},{"line_number":64,"context_line":"STABILIZATION_SECONDS\u003d150"},{"line_number":65,"context_line":"SYSINV_API_TIMEOUT_SECONDS\u003d900"},{"line_number":66,"context_line":"ACTIVE_CONTROLLER_INTERVAL\u003d60"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"# Define pidfile"}],"source_content_type":"text/x-sh","patch_set":30,"id":"3dbca666_b8bce3e8","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":30},"in_reply_to":"26b2e1d9_240a46c9","updated":"2023-10-31 19:30:46.000000000","message":"Done","commit_id":"fad2d73cb34c92e55963e8e03585d8d86cf2fe31"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"2e3280f9bb8c1ff0c66bf3f31ca2f2277b93c504","unresolved":true,"context_lines":[{"line_number":503,"context_line":"            LOG \"System Inventory Service (sysinv-api) is reachable via direct request URL\""},{"line_number":504,"context_line":"            break"},{"line_number":505,"context_line":"        fi"},{"line_number":506,"context_line":"        LOG \" Waiting for System Inventory Service\" \\"},{"line_number":507,"context_line":"            \"to be reachable in ${CHECK_INTERVAL_SECONDS} seconds\""},{"line_number":508,"context_line":"        sleep ${CHECK_INTERVAL_SECONDS}"},{"line_number":509,"context_line":"    done"}],"source_content_type":"text/x-sh","patch_set":31,"id":"b5161e7b_7bf36104","line":506,"range":{"start_line":506,"start_character":13,"end_line":506,"end_character":14},"updated":"2023-10-31 22:00:39.000000000","message":"why a space ?","commit_id":"6d65b94fec6191c9ba635e00b5cafa557f430bb4"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"5ca674ca00a981ba936a84bfce8b161de7a04679","unresolved":false,"context_lines":[{"line_number":503,"context_line":"            LOG \"System Inventory Service (sysinv-api) is reachable via direct request URL\""},{"line_number":504,"context_line":"            break"},{"line_number":505,"context_line":"        fi"},{"line_number":506,"context_line":"        LOG \" Waiting for System Inventory Service\" \\"},{"line_number":507,"context_line":"            \"to be reachable in ${CHECK_INTERVAL_SECONDS} seconds\""},{"line_number":508,"context_line":"        sleep ${CHECK_INTERVAL_SECONDS}"},{"line_number":509,"context_line":"    done"}],"source_content_type":"text/x-sh","patch_set":31,"id":"f0b59ae3_4cacfbe0","line":506,"range":{"start_line":506,"start_character":13,"end_line":506,"end_character":14},"in_reply_to":"b5161e7b_7bf36104","updated":"2023-11-01 23:29:24.000000000","message":"Done","commit_id":"6d65b94fec6191c9ba635e00b5cafa557f430bb4"},{"author":{"_account_id":28464,"name":"Eric MacDonald","display_name":"Eric","email":"eric.macdonald@windriver.com","username":"rocksolidmtce"},"change_message_id":"2e3280f9bb8c1ff0c66bf3f31ca2f2277b93c504","unresolved":true,"context_lines":[{"line_number":641,"context_line":"                    fi"},{"line_number":642,"context_line":"                    LOG \"Try in ${ACTIVE_CONTROLLER_INTERVAL} seconds to reach desired upgrade state\""},{"line_number":643,"context_line":"                    sleep ${ACTIVE_CONTROLLER_INTERVAL}"},{"line_number":644,"context_line":"                fi"},{"line_number":645,"context_line":"            done"},{"line_number":646,"context_line":"        else"},{"line_number":647,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":31,"id":"81af863b_44050146","line":644,"range":{"start_line":644,"start_character":16,"end_line":644,"end_character":18},"updated":"2023-10-31 22:00:39.000000000","message":"Will this also be run on the standby controller ? \nIf so you have an infinite loop using / wasting significant cpu during upgrade.","commit_id":"6d65b94fec6191c9ba635e00b5cafa557f430bb4"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"ac5b09500c280d0a228cbba75af66b2d4eb9bf25","unresolved":true,"context_lines":[{"line_number":641,"context_line":"                    fi"},{"line_number":642,"context_line":"                    LOG \"Try in ${ACTIVE_CONTROLLER_INTERVAL} seconds to reach desired upgrade state\""},{"line_number":643,"context_line":"                    sleep ${ACTIVE_CONTROLLER_INTERVAL}"},{"line_number":644,"context_line":"                fi"},{"line_number":645,"context_line":"            done"},{"line_number":646,"context_line":"        else"},{"line_number":647,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":31,"id":"c5b15478_508f537d","line":644,"range":{"start_line":644,"start_character":16,"end_line":644,"end_character":18},"in_reply_to":"81af863b_44050146","updated":"2023-11-01 14:25:15.000000000","message":"agree, sleep should be in the while loop","commit_id":"6d65b94fec6191c9ba635e00b5cafa557f430bb4"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"5ca674ca00a981ba936a84bfce8b161de7a04679","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                    fi"},{"line_number":642,"context_line":"                    LOG \"Try in ${ACTIVE_CONTROLLER_INTERVAL} seconds to reach desired upgrade state\""},{"line_number":643,"context_line":"                    sleep ${ACTIVE_CONTROLLER_INTERVAL}"},{"line_number":644,"context_line":"                fi"},{"line_number":645,"context_line":"            done"},{"line_number":646,"context_line":"        else"},{"line_number":647,"context_line":"            LOG \"Platform upgrade is not in progress\""}],"source_content_type":"text/x-sh","patch_set":31,"id":"c6f49052_89c0e1d0","line":644,"range":{"start_line":644,"start_character":16,"end_line":644,"end_character":18},"in_reply_to":"c5b15478_508f537d","updated":"2023-11-01 23:29:24.000000000","message":"Done","commit_id":"6d65b94fec6191c9ba635e00b5cafa557f430bb4"},{"author":{"_account_id":28715,"name":"Jim Gauld","email":"James.Gauld@windriver.com","username":"jgauld"},"change_message_id":"d7163916f431c5df1c6c0a9f914d9eed423248de","unresolved":false,"context_lines":[{"line_number":62,"context_line":"CHECK_INTERVAL_SECONDS\u003d30"},{"line_number":63,"context_line":"PRINT_INTERVAL_SECONDS\u003d300"},{"line_number":64,"context_line":"STABILIZATION_SECONDS\u003d150"},{"line_number":65,"context_line":"ACTIVE_CONTROLLER_INTERVAL\u003d60"},{"line_number":66,"context_line":"SYSINV_URL\u003d\"http://controller:6385\""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"# Define pidfile"}],"source_content_type":"text/x-sh","patch_set":32,"id":"06e8bcbf_7ff323bc","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":3},"updated":"2023-11-01 23:37:02.000000000","message":"no longer used","commit_id":"eb925db9f4bc952b3184fa86687e26da1d01a57f"}]}
