From 88c46f71b10087bdcff0dafb164f2a34ef60eab3 Mon Sep 17 00:00:00 2001 From: CamDavidsonPilon Date: Mon, 16 Sep 2024 14:01:00 -0400 Subject: [PATCH] some update updates --- CHANGELOG.md | 6 +++--- pioreactor/cli/pio.py | 4 ++-- update_scripts/upcoming/update.sh | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f32fe98f..e62a4f9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,10 @@ ### Upcoming #### Highlights - - Workers now have a webserver on them. This is one of the largest architectural changes to Pioreactor, and lays the foundation for better plugin and calibration cluster management, plus future features. - - As an example, in your browser, you can enter the url: http://some_worker.local/unit_api/jobs/running to see a list of jobs running on a worker. + - Workers now have a webserver on them. This is one of the largest architectural changes to Pioreactor, and lays the foundation for better plugin, version, and calibration cluster management, plus future features. + - As an example, in your browser, you can enter the url: http://some-worker.local/unit_api/jobs/running to see a list of jobs running on a worker. - Note: there is no interactive user interface for workers, just an API - Previous actions that would involve SSHing from leader to a worker are replaced by web requests. - - APIs that initiate a background task either return with the result, or return a task id that be be looked up at `/api/task_status/`. #### Bug fixes - fixed an issue where a calibrated OD reading would be mapped to max OD signal if it was too low. @@ -16,6 +15,7 @@ - We no longer recommend the Raspberry Pi Zero (the original Zero, not the Zero 2.) since supporting a web server + pioreactor functions is too much for a single core. - `watchdog` is neutered. It used to try to "wake-up" a job, but this was flaky and causing more problems than it solved. - removed python library dependency `sh` + - APIs that initiate a background task either return with the result, or return a task id that be be looked up at `/api/task_status/`. #### Enhancements - Better MQTT re-connection logic. diff --git a/pioreactor/cli/pio.py b/pioreactor/cli/pio.py index 67f96ba3..d687f9ed 100644 --- a/pioreactor/cli/pio.py +++ b/pioreactor/cli/pio.py @@ -392,14 +392,14 @@ def update_app( # fmt: off commands_and_priority.extend( [ - (f"rm -rf {tmp_rls_dir}", -99), + (f"sudo rm -rf {tmp_rls_dir}", -99), (f"unzip {source} -d {tmp_rls_dir}", 0), (f"unzip {tmp_rls_dir}/wheels_{version_installed}.zip -d {tmp_rls_dir}/wheels", 1), (f"sudo bash {tmp_rls_dir}/pre_update.sh", 2), (f"sudo bash {tmp_rls_dir}/update.sh", 4), (f"sudo bash {tmp_rls_dir}/post_update.sh", 20), (f"mv {tmp_rls_dir}/pioreactorui_*.tar.gz {tmp_dir}/pioreactorui_archive", 98), # move ui folder to be accessed by a `pio update ui` - (f"rm -rf {tmp_rls_dir}", 99), + (f"sudo rm -rf {tmp_rls_dir}", 99), ] ) diff --git a/update_scripts/upcoming/update.sh b/update_scripts/upcoming/update.sh index 2f962c83..9b67cef8 100644 --- a/update_scripts/upcoming/update.sh +++ b/update_scripts/upcoming/update.sh @@ -48,6 +48,7 @@ if [ "$HOSTNAME" != "$LEADER_HOSTNAME" ]; then # install lighttp and set up mods unzip "$SCRIPT_DIR"/lighttpd_packages.zip -d "$SCRIPT_DIR"/lighttpd_packages + sudo chown -R pioreactor:pioreactor "$SCRIPT_DIR"/lighttpd_packages # required so this can be deleted by pioreactor user if needed to run again. dpkg -i "$SCRIPT_DIR"/lighttpd_packages/*.deb # install our own lighttpd service