fix(upgrade): bind mount /lib during upgrade (needed for ARM)#70
Merged
Merged
Conversation
On aarch64 (e.g., SL Micro 5.5), /lib/ld-linux-aarch64.so.1 is a symlink into /lib64, so bind-mounting only /lib64 from the upgrade container over the host breaks the dynamic linker inside the chroot and `chroot $HOST_DIR /tmp/elemental upgrade` fails with "No such file or directory". Bind-mounting /lib alongside /lib64 brings in a usable ld-linux-aarch64.so.1 and the chroot works on both x86_64 and aarch64. This ports the V1 fix in harvester/harvester#10458 to Upgrade V2. Refs: harvester/harvester#10765 Signed-off-by: Zespre Chang <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR updates the node OS upgrade script to make the “newer elemental binary needs newer glibc” bind-mount workaround function correctly on aarch64/ARM systems where the dynamic linker path under /lib can depend on content under /lib64.
Changes:
- Bind-mount
/libinto the host chroot alongside the existing/lib64bind mount when the glibc workaround is triggered. - Unmount the newly added
/libbind mount after the elemental upgrade attempt.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
608
to
611
| if [ -n "$glibc_too_old" ]; then | ||
| umount $HOST_DIR/lib64 | ||
| umount $HOST_DIR/lib | ||
| fi |
tserong
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
Solution:
On aarch64 (e.g., SL Micro 5.5), /lib/ld-linux-aarch64.so.1 is a symlink into /lib64, so bind-mounting only /lib64 from the upgrade container over the host breaks the dynamic linker inside the chroot and
chroot $HOST_DIR /tmp/elemental upgradefails with "No such file or directory". Bind-mounting /lib alongside /lib64 brings in a usable ld-linux-aarch64.so.1 and the chroot works on both x86_64 and aarch64.Related Issue(s):
harvester/harvester#10765
Test plan:
Additional documentation or context
This ports the V1 fix in harvester/harvester#10458 to Upgrade V2.