Skip to content

Deployment scripts into installation directory#513

Merged
EnekoGonzalez3 merged 35 commits intodevelopfrom
417-deployment-scripts-into-installation-directory
Feb 12, 2026
Merged

Deployment scripts into installation directory#513
EnekoGonzalez3 merged 35 commits intodevelopfrom
417-deployment-scripts-into-installation-directory

Conversation

@EnekoGonzalez3
Copy link
Contributor

No description provided.

EnekoGonzalez3 and others added 24 commits November 18, 2025 21:06
…multiple modules. Streamlined target properties for better maintainability and enhanced include directories and link libraries for various executables and tests, ensuring proper encapsulation of dependencies.
…nolog library. This includes generating and installing configuration files for CMake and pkg-config, enhancing the library's usability and integration with other projects.
…nd pkg-config. This includes new CMakeLists and test executables to verify correct package discovery and linking functionality.
…d add json-c requirement in pkg-config file. Solve tests to actually work.
…new dependency paths for improved package configuration and discovery tests.
…nd testing. Ensure required dependencies are found and provide clearer messages for uninstalled packages. Enhance test executables to utilize build tree when necessary.
…ript. This way the deploy functionalities are modularized like build and install and main script is simplified.
…olog client library. Updated test outputs to confirm successful linking in both CMake and pkg-config discovery scenarios.
…417-deployment-scripts-into-installation-directory
…417-deployment-scripts-into-installation-directory
Resolved conflicts by prioritizing develop branch changes.
@EnekoGonzalez3 EnekoGonzalez3 self-assigned this Jan 29, 2026
These files were incorrectly removed during the merge conflict resolution.
They are required by ChronoStore/test/CMakeLists.txt.
Re-add the installation step for deploy_local.sh and deploy_cluster.sh
that was removed during the develop merge. These scripts need to be
installed to the tools directory.
- local_single_user_deploy.sh now delegates start/stop/clean to deploy_local.sh
- single_user_deploy.sh now delegates start/stop/clean to deploy_cluster.sh
- Both scripts retain build/install modes that require the source repo
- Removes ~900 lines of duplicated code
- Ensures consistency between repo scripts and installed scripts
The pgrep command returns exit code 1 when no processes match, which with
set -e causes the script to exit. Adding '|| true' allows the script to
continue when no ChronoLog processes are running, which is the expected
case for the clean operation.
@EnekoGonzalez3 EnekoGonzalez3 marked this pull request as ready for review February 2, 2026 21:53
The stop and clean steps were not passing the -w flag to
local_single_user_deploy.sh, causing them to default to
$HOME/chronolog-install/chronolog (/root/chronolog-install/chronolog
in the container) instead of the correct install path at
/home/grc-iit/chronolog-install/chronolog.
stop_service and kill_service were using basename for pkill -f matching
(e.g. "chrono_player"), which matched any process with that string in
its command line — including the parent bash -c process in CI whose
argument text contained the literal process names. This caused the stop
step to SIGTERM itself (exit 143). Use the full binary path for
pkill/pgrep -f so only actual daemon processes are matched.
Same issue as deploy_local.sh: pkill -ef was matching against basename
(e.g. "chrono_player") which could match the parent bash -c process in
CI. Changed parallel_remote_{stop,kill,check}_processes to accept and
use full binary paths instead of basenames for pkill/pgrep -f matching.
@EnekoGonzalez3 EnekoGonzalez3 marked this pull request as draft February 6, 2026 01:36
EnekoGonzalez3 and others added 4 commits February 5, 2026 23:15
deploy_cluster.sh: The -e (verbose) short option was outside the -o
string, causing getopt to treat it as the start of parameters. This
made --long unrecognized, so no arguments were parsed and the script
silently did nothing — root cause of distributed-deployment CI failure.

single_user_deploy.sh: Added missing commas between the first 7 long
option names (build-type:build-dir:... -> build-type:,build-dir:,...).
Without commas getopt treats them as a single long option name.
In deploy_cluster.sh, `set -e` is enabled and `check_op_validity()` uses
`((count++))` to count selected operations. When count is 0, the
post-increment `((count++))` evaluates to 0 (falsy), returning exit
code 1. Since it's the last command in a `&&` chain, `set -e` triggers
and the script exits before ever calling start(). This caused the
distributed deployment CI to silently fail with no processes launched.

Fix by using `count=$((count + 1))` which is an assignment (always
succeeds) instead of an arithmetic evaluation that can return non-zero.

Also fix single_user_deploy.sh to propagate errors from delegated
operations instead of always printing "Done" and exiting 0.
deploy_cluster.sh uses `set -e` but has 25 instances of
`[[ "${verbose}" == "true" ]] && echo "..."` for debug logging.
When verbose is false (the default), `[[ ]]` returns 1, `&&`
short-circuits, and the line returns 1. When this is the last
statement in a function, the function returns 1, and `set -e`
kills the script at the call site.

The second CI run showed this: check_op_validity now passes (first
fix worked), but check_recording_group_mapping returns 1 from its
verbose line, killing the start flow at prepare_hosts.

Fix all 25 verbose lines by appending `|| true` to ensure they
always return 0 regardless of the verbose flag.

Also fix parallel-ssh pkill calls (lines 514, 531) which return
non-zero when no matching process exists — would break stop/clean.
@EnekoGonzalez3 EnekoGonzalez3 marked this pull request as ready for review February 6, 2026 19:19
@EnekoGonzalez3 EnekoGonzalez3 merged commit 93c20a4 into develop Feb 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move Deployment Scripts into Installation Directory

3 participants