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

Consolidating state files #3721

Open
apostasie opened this issue Dec 3, 2024 · 2 comments
Open

Consolidating state files #3721

apostasie opened this issue Dec 3, 2024 · 2 comments

Comments

@apostasie
Copy link
Contributor

What is the problem you're trying to solve

We currently have:

StateDir:

ls -lA ~/.local/share/nerdctl/1935db59/containers/default/431f831244a436778b81cfd332e5f9395707b9f63ae9b02ca5307cb2b4c8fa31/
total 208
-rw------- 1 dmp dmp 185103 Dec  2 20:06 431f831244a436778b81cfd332e5f9395707b9f63ae9b02ca5307cb2b4c8fa31-json.log
-rw------- 1 dmp dmp    258 Dec  2 16:02 431f831244a436778b81cfd332e5f9395707b9f63ae9b02ca5307cb2b4c8fa31-json.log.1
-rw-r--r-- 1 dmp dmp      3 Dec  2 12:59 hostname
-rw------- 1 dmp dmp     73 Dec  2 12:59 lifecycle.json
-rw------- 1 dmp dmp     66 Dec  2 12:59 log-config.json
-rw-rw-r-- 1 dmp dmp      0 Dec  2 12:59 oci-hook.createRuntime.log
-rw-rw-r-- 1 dmp dmp      0 Dec  2 12:59 oci-hook.postStop.log
-rw-r--r-- 1 dmp dmp     43 Dec  2 12:59 resolv.conf

And separately, EtcHosts:

ls -lA ~/.local/share/nerdctl/1935db59/etchosts/default/431f831244a436778b81cfd332e5f9395707b9f63ae9b02ca5307cb2b4c8fa31/
total 8
-rw-r--r-- 1 dmp dmp 260 Dec  2 16:02 hosts
-rw-r--r-- 1 dmp dmp 465 Dec  2 12:59 meta.json

I do not know if there was a reason for keeping these separate?

From a glance, it looks like etchosts is unnecessary and could be folded inside the container statedir.

Thoughts?

Describe the solution you'd like

Merge.

Additional context

No response

@AkihiroSuda
Copy link
Member

Initially this was /var/lib/nerdctl/hosts.d/<NS>/<ID> (#63) and then moved to the current layout in #65.

I don't remember why I didn't consolidate everything in the single dir 😓 .
Probably because the networking stuff relates to CNI and nerdctl itself rather than to containerd.

@apostasie
Copy link
Contributor Author

Initially this was /var/lib/nerdctl/hosts.d/<NS>/<ID> (#63) and then moved to the current layout in #65.

I don't remember why I didn't consolidate everything in the single dir 😓 . Probably because the networking stuff relates to CNI and nerdctl itself rather than to containerd.

All fine.

Let me see if I can come up with something smooth to transition them without too much legacy handling code (these are just transient anyhow, it should be fine).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants