89luca89 / 89luca89/distrobox

[Error] /etc/localtime integration with the host failed, runtime sync for /etc/localtime disabled. Error: An error occurred

未關閉
#1,624 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Go
星號
13k
分支
541
平均合併
20 小時 47 分鐘
30 天內合併 PR
4

描述

**Describe the bug**
Fails to create an ubuntu 22.04 container after failing to bind mount /etc/localtime

**To Reproduce**
1. `distrobox create -i ubuntu:22.04 -n ubuntu-test --init --home $HOME/containers/ubuntu-test`
2. `distrobox enter ubuntu-test`

**Expected behavior**
Container is successfully created

**Logs**
```
+ mount_bind /run/host/etc/localtime /etc/localtime ro
+ source_dir=/run/host/etc/localtime
+ target_dir=/etc/localtime
+ mount_flags=
+ [ 3 -gt 2 ]
+ mount_flags=ro
+ [ -L /run/host/etc/localtime ]
+ init_readlink /run/host/etc/localtime
+ ls -l /run/host/etc/localtime
+ grep -Eo \->.*
+ cut -d -f2-
+ sed s|\.\./|/|g
+ source_dir=/usr/share/zoneinfo/America/Chicago
+ printf %s /usr/share/zoneinfo/America/Chicago
+ grep -q /run/host
+ source_dir=/run/host/usr/share/zoneinfo/America/Chicago
+ [ ! -d /run/host/usr/share/zoneinfo/America/Chicago ]
+ [ ! -f /run/host/usr/share/zoneinfo/America/Chicago ]
+ [ -e /etc/localtime ]
+ findmnt /etc/localtime
+ [ -L /etc/localtime ]
+ rm -f /etc/localtime
+ [ -d /run/host/usr/share/zoneinfo/America/Chicago ]
+ [ -f /run/host/usr/share/zoneinfo/America/Chicago ]
+ dirname /etc/localtime
+ [ ! -d /etc ]
+ touch /etc/localtime
+ [ ro = ]
+ mount --rbind -o ro /run/host/usr/share/zoneinfo/America/Chicago /etc/localtime
mount: /etc/localtime: filesystem was mounted, but any subsequent operation failed: Unknown error 5005.
+ printf Warning: failed to bind mount %s to %s using option %s\n /run/host/usr/share/zoneinfo/America/Chicago /etc/localtime ro
Warning: failed to bind mount /run/host/usr/share/zoneinfo/America/Chicago to /etc/localtime using option ro
+ return 1
+ printf Warning: %s integration with the host failed, runtime sync for %s disabled.\n /etc/localtime /etc/localtime
Warning: /etc/localtime integration with the host failed, runtime sync for /etc/localtime disabled.
+ [ -f /run/host/etc/localtime ]
+ rm -f /etc/localtime
rm: cannot remove '/etc/localtime': Device or resource busy
+ [ 1 -ne 0 ]
+ printf Error: An error occurred\n
Error: An error occurred
time="2024-12-01T23:52:32-06:00" level=debug msg="Called logs.PersistentPostRunE(podman --log-level debug logs ubuntu-intune)"
time="2024-12-01T23:52:32-06:00" level=debug msg="Shutting down engines"
time="2024-12-01T23:52:32-06:00" level=info msg="Received shutdown.Stop(), terminating!" PID=47893
```

Full log (and podman log) is attached.
[podman.log](https://github.com/user-attachments/files/17973207/podman.log)
[distrobox.log](https://github.com/user-attachments/files/17973208/distrobox.log)

**Desktop (please complete the following information):**
- Are you using podman, docker or lilipod?
- podman
- Which version or podman, docker or lilipod?
- podman version 5.3.1
- Which version of distrobox?
- distrobox: 1.8.0
- Which host distribution?
- KDE Linux (based on Arch Linux)
- How did you install distrobox?
- pacman (arch repos)

**Additional context**

as far as I can tell, my `/etc/localtime` is just a regular symlink pointing to `/usr/share/zoneinfo/America/Chicago`

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。