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

Prefetchfiles snapshotter #496

Closed
wants to merge 1 commit into from

Conversation

billie60
Copy link
Contributor

Hello, in order to complete the transmitting and persistence of the prefetch-files param in the nydusd command(persistence means restoring the correct nydusd command when accidentally restarting the snapshotter) , the following modifications are made to the nydus-snapshotter. Those modifications can achieve prefetch-files transmitting when creating a single container, but it is not flexible. For example, when executing commands in the following order:

  1. crictl runp busybox-sandbox.yaml
  2. crictl runp wordpress-sandbox.yaml
  3. crictl create <pod_id> busybox.yaml busybox-sandbox.yaml
    At this point, the busybox container is created, but the prefetch-files is the path of wordpress. To solve this problem, I attempted to define PrefetchList in the States structure as a dictionary and add each prefetch-files parameter to the dictionary. Then, monitor the create container event though NRI plugin and obtain the image name of the comtainer being created, and find the corresponding image name in PrefetchList dictionary to build nydusd cmd. However, this method did not achieve the effect I wanted, because the corresponding image name will transmit from NRI only after the nydusd command is completed, which results in the failure to correctly add the prefetch-files parameter. So currently, I haven't come up with a better way to optimize the code. What should I do next? Please give me some suggestions. Thanks.

@billie60 billie60 force-pushed the prefetchfiles-snapshotter branch 2 times, most recently from 03b2384 to e7ea4a1 Compare June 19, 2023 07:26
@sctb512
Copy link
Member

sctb512 commented Jun 19, 2023

It seems that the file changes in #493 also existed in this PR. Please remove irrelevant code and make sure each PR is independent.

@billie60 billie60 closed this Jun 29, 2023
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.

2 participants