-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[teleport-update] Move teleport binaries to new path {deb,rpm} #49110
base: master
Are you sure you want to change the base?
Conversation
set -eu | ||
|
||
case "$1" in | ||
configure) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use teleport-update link
to accomplish this instead. It will create links from /usr/local/teleport-system/bin
to /usr/local/bin
without overriding auto-update-managed links.
NEW_PATH="$NEW_BASE_DIR/$BASENAME" | ||
|
||
if [ -e "$FILE" ] && [ ! -L "$FILE" ]; then | ||
echo "Removing old binary at $FILE..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why we'd want to remove binaries here? teleport-update link
will fail in this case. Should we change that behavior?
echo "Removing symlinks from old paths..." | ||
|
||
for FILE in "${OLD_PATHS[@]}"; do | ||
if [ -L "$FILE" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will remove updater-managed symlinks when the package is removed. We only want to remove symlinks into /usr/local/teleport-system
. I think we should add a teleport-update unlink
command for this.
|
||
echo "Post-upgrade cleanup and symlink creation completed." | ||
;; | ||
remove|deconfigure) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we run this on deconfigure
, or just remove
? Seems like we'd want these symlinks to stay around until the package is fully removed.
In this PR teleport binaries moved to new location according:
https://github.com/gravitational/teleport/blob/master/rfd/0184-agent-auto-updates.md?plain=1#L1774-L1780
Related: https://github.com/gravitational/cloud/issues/10289