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

apiclient/apiserver: add ephemeral-storage commands #15

Conversation

tzneal
Copy link
Contributor

@tzneal tzneal commented Jun 25, 2024

Issue number:

Closes #

Description of changes:

Adds apiclient/apiserver commands for initializing ephemeral storage and binding directories to that storage

Testing done:

Updated containerd package to run the new apiclient commands:

diff --git a/packages/containerd/containerd.service b/packages/containerd/containerd.service
index fc18c2ba..e483c3c1 100644
--- a/packages/containerd/containerd.service
+++ b/packages/containerd/containerd.service
@@ -9,6 +9,8 @@ Slice=runtime.slice
 EnvironmentFile=/etc/network/proxy.env
 EnvironmentFile=-/etc/containerd/nvidia.env
 ExecStart=/usr/bin/containerd
+ExecStartPre=apiclient ephemeral-storage init
+ExecStartPre=apiclient ephemeral-storage bind --dirs /var/lib/containerd /var/lib/kubelet /var/log/pods
 Type=notify
 Delegate=yes
 KillMode=process

I then launched an instance with 0 ephemeral disks, 1 disk, and multiple disks and ensured they all started up correctly. For the instance with > 0 disks, I ensured that our disk was faster:

bash-5.1# cd /var/log/pods
bash-5.1# dd if=/dev/zero of=./test bs=512k count=4096 oflag=direct
cd4096+0 records in
4096+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 1.50426 s, 1.4 GB/s

bash-5.1# cd /var/log
bash-5.1# dd if=/dev/zero of=./test bs=512k count=4096 oflag=direct
4096+0 records in
4096+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 18.6687 s, 115 MB/s

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@tzneal tzneal force-pushed the add-ephemeral-storage-apiclient-commands branch from 9724e27 to a2ffe35 Compare July 2, 2024 17:59
Copy link
Contributor

@bcressey bcressey left a comment

Choose a reason for hiding this comment

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

Nice, thanks for contributing this!

sources/models/src/ephemeral_storage.rs Outdated Show resolved Hide resolved
sources/api/apiclient/src/main.rs Outdated Show resolved Hide resolved
sources/api/apiclient/src/main.rs Outdated Show resolved Hide resolved
sources/api/apiclient/src/main.rs Outdated Show resolved Hide resolved
sources/api/apiserver/src/server/ephemeral_storage.rs Outdated Show resolved Hide resolved
sources/api/apiserver/src/server/ephemeral_storage.rs Outdated Show resolved Hide resolved
sources/api/apiserver/src/server/ephemeral_storage.rs Outdated Show resolved Hide resolved
sources/api/apiserver/src/server/ephemeral_storage.rs Outdated Show resolved Hide resolved
sources/api/apiserver/src/server/ephemeral_storage.rs Outdated Show resolved Hide resolved
sources/api/openapi.yaml Outdated Show resolved Hide resolved
sources/api/openapi.yaml Outdated Show resolved Hide resolved
sources/api/apiclient/src/main.rs Outdated Show resolved Hide resolved
sources/api/apiserver/src/server/ephemeral_storage.rs Outdated Show resolved Hide resolved
sources/api/apiserver/src/server/ephemeral_storage.rs Outdated Show resolved Hide resolved
sources/api/apiserver/src/server/ephemeral_storage.rs Outdated Show resolved Hide resolved
@tzneal tzneal force-pushed the add-ephemeral-storage-apiclient-commands branch from 79ac256 to eaf5931 Compare August 13, 2024 13:40
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.

4 participants