Skip to content
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

Move working directory scripts after reboot #1766

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mebays
Copy link

@mebays mebays commented Apr 16, 2024

Issue #, if available: #1765

Description of changes:

Group the file working directory file provisioning and scripts after reboot in case the files are not there after a restart.

Testing Done

Building on a hardened image without this threw and error in the linked issue. After the changes the build process moved passed the issue. Then hits the issue with permissions of kubelet and awscli which has two pull requests #1513 and #1717.

@mebays
Copy link
Author

mebays commented Apr 16, 2024

Actual cause after digging into this. The reason this occurred is al2 includes /tmp in the root file system.

$ mount | grep tmp
devtmpfs on /dev type devtmpfs (rw,nosuid,size=3960632k,nr_inodes=990158,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=793780k,mode=700,uid=1000,gid=1000)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=793780k,mode=700)

On the instance where this failed (hardened instance), /tmp is a tmpfs which gets thrown out on restart.

tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=5242880k)

This seems like a common scenario where /tmp is a tmpfs. But I figured I would include what the actual cause was from.

@mebays mebays changed the title Group working directory scripts after reboot Move working directory scripts after reboot May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant