-
-
Notifications
You must be signed in to change notification settings - Fork 201
chore: preserve binaries across reboots #708
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
Conversation
3cbd337
to
b0b0b54
Compare
|
||
if [ ! -f "${ADMINMGR_CUSTOM_DIR}/admin-mgr" ]; then | ||
echo "Copying existing admin-mgr binary from /usr/bin/admin-mgr to ${ADMINMGR_CUSTOM_DIR}" | ||
cp "/usr/bin/admin-mgr" "${ADMINMGR_CUSTOM_DIR}/admin-mgr" |
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.
Not sure what the ideal place is since we're doing this for each of the services, but the general flow of operations here could use a comment describing it
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.
Though about pulling this out in a generic function - but its maintainability might take a hit given the number of args and options per service. Will take a different approach, so that we also save on boot time overhead
cp "/usr/bin/admin-mgr" "${ADMINMGR_CUSTOM_DIR}/admin-mgr" | ||
fi | ||
|
||
rm -f "/usr/bin/admin-mgr" |
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.
All this has to be executed each time the machine starts up?
What if we shipped a dangling symlink as part of the image, and the init script moved the base version of the binary to the data vol as part of the very first boot? Maybe that's complicating things unnecessarily though
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.
I think that'd be better - copying over a few config files doesn't bring much overhead, but copying over tens of MB on every boot can bring a noticeable overhead, especially if we aim for our boot times to generate minimal friction
6591bdc
to
3cab4a8
Compare
* chore: preserve binaries across reboots * chore: add shims * chore: reference binaries using dangling symlinks
What kind of change does this PR introduce?
Bug fix, feature, docs update, ...
What is the current behavior?
Please link any relevant issues here.
What is the new behavior?
Feel free to include screenshots if it includes visual changes.
Additional context
Add any other context or screenshots.