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

[launcher] Add configurable /dev/shm size and tmpfs mount option #448

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

Conversation

alexmwu
Copy link
Contributor

@alexmwu alexmwu commented May 8, 2024

CS operators can use tee-dev-shm-size to increase the size of the /dev/shm mount for the workload.

CS operators can use tee-mount to specify tmpfs mounts in the running container. For example: type=tmpfs,source=tmpfs,destination=/tmp;type=tmpfs,source=tmpfs,destination=/tmp2,size=12345.
This interacts with the tee.launch_policy.allow_mount_destination launch policy that configures what the allowable mount points for a given workload are.

@alexmwu
Copy link
Contributor Author

alexmwu commented May 8, 2024

/gcbrun

@alexmwu alexmwu force-pushed the tmpfs branch 2 times, most recently from 15af756 to d11dd9c Compare May 10, 2024 22:45
@alexmwu
Copy link
Contributor Author

alexmwu commented May 10, 2024

/gcbrun

@alexmwu alexmwu force-pushed the tmpfs branch 2 times, most recently from 18e7333 to f60e1c8 Compare May 10, 2024 23:01
@alexmwu
Copy link
Contributor Author

alexmwu commented May 10, 2024

/gcbrun

@alexmwu alexmwu force-pushed the tmpfs branch 2 times, most recently from 1d38d36 to 9609cf4 Compare June 21, 2024 23:11
CS operators can use tee-dev-shm-size to increase the size of the
/dev/shm mount for the workload.
@alexmwu alexmwu changed the title Add configurable /dev/shm size for CS workloads [launcher] Add configurable /dev/shm size and tmpfs mount option Jun 22, 2024
@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 22, 2024

/gcbrun

@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 24, 2024

/gcbrun

@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 24, 2024

/gcbrun

@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 24, 2024

/gcbrun

@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 25, 2024

/gcbrun

@alexmwu alexmwu force-pushed the tmpfs branch 2 times, most recently from 29195f6 to 6244399 Compare June 26, 2024 18:50
@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 26, 2024

/gcbrun

@alexmwu alexmwu requested a review from jkl73 June 26, 2024 18:51
@alexmwu alexmwu marked this pull request as ready for review June 26, 2024 19:06
@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 26, 2024

/gcbrun

@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 26, 2024

/gcbrun

@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 26, 2024

/gcbrun

1 similar comment
@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 27, 2024

/gcbrun

@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 28, 2024

/gcbrun

launcher/spec/launch_spec.go Outdated Show resolved Hide resolved
launcher/spec/launch_spec.go Show resolved Hide resolved
launcher/spec/launch_spec.go Show resolved Hide resolved
launcher/spec/launch_spec.go Outdated Show resolved Hide resolved
launcher/cloudbuild.yaml Outdated Show resolved Hide resolved
Comment on lines 108 to 114
// default is debug only for memoryMonitoring
if v, ok := imageLabels[memoryMonitoring]; ok {
launchPolicy.AllowedMemoryMonitoring, err = toPolicy(memoryMonitoring, v)
if err != nil {
return LaunchPolicy{}, fmt.Errorf("invalid image LABEL '%s'; contact the image author", memoryMonitoring)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeated from above?

Add tmpfs mount support, with destination and size options.
Add launchermount package and LaunchPolicy for AllowedMountDestinations.
launchermount has a new Mount interface and a TmpfsMount type.
LaunchPolicy now supports tee.launch_policy.allow_mount_destination,
    which specifies allowed parent filepaths to mount on via a PATH-like string.
This tests the allowed mount points for tmpfs mounts and /dev/shm size.
@alexmwu
Copy link
Contributor Author

alexmwu commented Jul 3, 2024

/gcbrun

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.

None yet

2 participants