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

nerdctl rename broken (with --network host, none) #3341

Closed
apostasie opened this issue Aug 22, 2024 · 3 comments · Fixed by #3344
Closed

nerdctl rename broken (with --network host, none) #3341

apostasie opened this issue Aug 22, 2024 · 3 comments · Fixed by #3344
Labels
bug Something isn't working

Comments

@apostasie
Copy link
Contributor

Description

nerdctl run --network host -d --name test1 debian sleep Inf
nerdctl rename test1 test2
FATA[0000] open /home/dmp.linux/.local/share/nerdctl/1935db59/etchosts/default/bda418243819bf46ac0f8a52f88310ba6ed77e4038febda296df158f65295889/meta.json: no such file or directory

Futhermore, this will leave the system in a broken state, where the destination name is locked.

This is likely related to #2613 which I was debugging before hitting this.

Steps to reproduce the issue

na

Describe the results you received and expected

na

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

@apostasie apostasie added the kind/unconfirmed-bug-claim Unconfirmed bug claim label Aug 22, 2024
@AkihiroSuda AkihiroSuda added bug Something isn't working and removed kind/unconfirmed-bug-claim Unconfirmed bug claim labels Aug 22, 2024
@apostasie
Copy link
Contributor Author

Debugging notes:

  • with network=host, hoststore never writes the meta file (which is causing the rename to fail)
  • it works with ocihooks - in applyNetworkSettings, which is called onCreateRuntime, and again onStartContainer

@apostasie
Copy link
Contributor Author

In summary, when network=host, if we are to mimic docker behavior:

  • hostname should be the host hostname (and not the container id)
  • the container /etc/hosts should include entries from the host /etc/hosts UNLESS --add-host is specified
  • --add-host should work

I find the exception on number 2 to be ridiculous, and would rather treat it as a bug on Docker side rather than implementing it.

@apostasie apostasie changed the title nerdctl rename broken (with --network host) nerdctl rename broken (with --network host, none) Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants