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.
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:
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.