Skip to content

Commit

Permalink
Merge #123458
Browse files Browse the repository at this point in the history
123458: roachprod: fix `start.sh` profile check r=srosenberg,renatolabs a=herkolategan

Previously, multiple entries would be created in "${HOME}/.profile" since the check for "${HOME}/.profile-cockroach" would always fail. This updates the check to look for the correct file based on the virtual cluster label.

Fixes: #121267

Epic: None
Release Note: None

Co-authored-by: Herko Lategan <herko@cockroachlabs.com>
  • Loading branch information
craig[bot] and herkolategan committed May 7, 2024
2 parents e90d15c + 3d58c70 commit dad3a70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/roachprod/install/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ sudo systemctl reset-failed "${VIRTUAL_CLUSTER_LABEL}" 2>/dev/null || true

# The first time we run, install a small script that shows some helpful
# information when we ssh in.
if [ ! -e "${HOME}/.profile-cockroach" ]; then
if [ ! -e "${HOME}/.profile-${VIRTUAL_CLUSTER_LABEL}" ]; then
cat > "${HOME}/.profile-${VIRTUAL_CLUSTER_LABEL}" <<EOQ
echo ""
if systemctl is-active -q ${VIRTUAL_CLUSTER_LABEL}; then
Expand Down

0 comments on commit dad3a70

Please sign in to comment.