バグを説明する
ツールボックスバージョン0.0.97にアップグレードした後、ツールボックスを起動できなくなりました。
toolbox enter work
出力:
DEBU Running as real user ID 1000
DEBU Resolved absolute path to the executable as /usr/bin/toolbox
DEBU Running on a cgroups v1 host
DEBU Checking if /etc/subgid and /etc/subuid have entries for user x
DEBU TOOLBOX_PATH is /usr/bin/toolbox
DEBU Toolbox config directory is /home/x/.config/toolbox
DEBU Current Podman version is 2.1.1
DEBU Old Podman version is 2.1.1
DEBU Migration not needed: Podman version 2.1.1 is unchanged
DEBU Resolving container and image names
DEBU Container: 'work'
DEBU Image: ''
DEBU Release: ''
DEBU Resolved container and image names
DEBU Container: 'work'
DEBU Image: 'fedora-toolbox:31'
DEBU Release: '31'
DEBU Checking if container work exists
DEBU Inspecting mounts of container work
DEBU Starting container work
DEBU Inspecting entry point of container work
DEBU Entry point PID is a float64
DEBU Entry point of container work is toolbox (PID=0)
Error: invalid entry point PID of container work
更新の前後で作成されたコンテナの出力は同じです。 ツールボックスは、0.0.96にダウングレードした後に開始でき、開始後に0.0.97に入力できます。
動作を再現する方法の手順
期待される動作
ツールボックスが開始されます
実際の動作
エラーがError: invalid entry point PID of container work
スローされ、ツールボックスが起動しません。
toolbox --version
(v0.0.90 +)の出力toolbox version 0.0.97
ツールボックスパッケージ情報( rpm -q toolbox
)
toolbox-0.0.97-1-x86_64 (arch)
podman version
出力
Version: 2.1.1
API Version: 2.0.0
Go Version: go1.15.2
Git Commit: 9f6d6ba0b314d86521b66183c9ce48eaa2da1de2
Built: Sat Sep 26 16:50:37 2020
OS/Arch: linux/amd64
ポッドマンパッケージ情報( rpm -q podman
)
podman-2.1.1-1-x86_64 (arch)
OSに関する情報
Archlinux
まったく同じ問題が発生しています(Arch Linuxでも)。 0.0.96にダウングレードすることでうまくいきました。
これらは、Fedora32ツールボックスのPodmanログです。
$ podman logs fedora-toolbox-32
level=debug msg="Running as real user ID 0"
level=debug msg="Resolved absolute path to the executable as /usr/bin/toolbox"
level=debug msg="TOOLBOX_PATH is /usr/bin/toolbox"
level=debug msg="XDG_RUNTIME_DIR is unset"
level=debug msg="XDG_RUNTIME_DIR set to /run/user/1000"
level=debug msg="Creating /run/.toolboxenv"
level=debug msg="Monitoring host"
level=debug msg="Path /run/host/etc exists"
level=debug msg="Resolved /etc/localtime to /usr/share/zoneinfo/Europe/Amsterdam"
Error: /etc/localtime points to unknown location
私は同じように見えます
level=debug msg="Running as real user ID 0"
level=debug msg="Resolved absolute path to the executable as /usr/bin/toolbox"
level=debug msg="TOOLBOX_PATH is /usr/bin/toolbox"
level=debug msg="XDG_RUNTIME_DIR is unset"
level=debug msg="XDG_RUNTIME_DIR set to /run/user/1000"
level=debug msg="Creating /run/.toolboxenv"
level=debug msg="Monitoring host"
level=debug msg="Path /run/host/etc exists"
level=debug msg="Preparing to redirect /etc/localtime to /run/host/etc/localtime"
level=debug msg="/run/host/etc/localtime is a symbolic link"
level=debug msg="Redirecting /etc/localtime to /run/host/etc/localtime"
level=debug msg="Resolved /etc/localtime to /usr/share/zoneinfo/Europe/Copenhagen"
Error: /etc/localtime points to unknown location
これは4c9b80aee2b2ee3162b82e309718a23792d0e103が原因である可能性がありますか?
Manjaro(archベース)で同じ問題が発生しています。 コミットを行ったところ、b9a0bd5f0c2a2421ec15eea286ca20f03b7152d2が原因であることがわかりました。 4c9b80aee2b2ee3162b82e309718a23792d0e103は、正しく機能する最後のもののようです。
Arch Linuxで0.0.98.1を試した人はいますか?
好奇心から、Archホストシステムには/etc/localtime
ませんか?
はい、Archホストには/ etc / localtimeがあります。 / usr / share / zoneinfo /へのシンボリックリンクです。
問題は、ツールボックスに次のものがあることです。
const zoneInfoRoot = "/run/host/usr/share/zoneinfo"
if !strings.HasPrefix(localTimeEvaled, zoneInfoRoot) {
return errors.New("/etc/localtime points to unknown location")
}
zoneInfoRootを"/usr/share/zoneinfo"
、ツールボックスはうまく機能します。
updateTimeZoneFromLocalTime()
呼び出す前に、/ etc / localtimeリンクは、/ run / host / etc / localtimeが指すのと同じパスを指すように更新されます。
ホストファイルはツールボックスについて何も知らないため、/ etc / localtimeが/ run / hostを指すようにする方法がわかりません。
ですから、私が何かを見逃していない限り、おそらく他の誰かに明らかなことでさえ、 zoneInfoRoot
は単に変更/修正する必要があります。 / etc / localtimeが/ run / host / usr / share / zoneinfo / ...と/ usr / share / zoneinfo / ...を指す両方のユースケースがある場合、両方の可能性を確認できると思います。一致するプレフィックスに基づいてtimeZone
を解決します。
はい、Archホストには/ etc / localtimeがあります。 へのシンボリックリンクです
/ usr / share / zoneinfo /。
わかりました。FedoraCoreOSの状況とは異なります。
これはhttps://github.com/containers/toolbox/pull/634で対処する必要があり
ただし、ArchとUbuntuの両方で相対的なシンボリックリンクを使用する必要があることに注意する必要があります。 もしそうなら、相対シンボリックリンクはchrootのような状況を処理できるので、これは引き続き機能します。 たとえば、Fedoraワークステーションには次のものがあります。
$ ls -l /etc/localtime
lrwxrwxrwx. 1 root root 35 Jan 5 18:20 /etc/localtime -> ../usr/share/zoneinfo/Europe/Prague
一方、Ubuntu 18.04では、次のように表示されます。
$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 33 lis 11 16:21 /etc/localtime -> /usr/share/zoneinfo/Europe/Prague
しかし、 timedatectl
を使用すると、修正されます。
$ timedatectl set-timezone Europe/Prague
$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 35 led 12 20:29 /etc/localtime -> ../usr/share/zoneinfo/Europe/Prague
はい、/ etc / localtimeシンボリックリンクを絶対値に変更することは有効な回避策です。 とりあえずこれを使います、ありがとう。
しかし、私は#634をマージする必要があると思います。 このような絶対シンボリックリンクをサポートしないことにはあまり意味がありません。
閉鎖。 これがまだ修正されていないと思われる場合は、再度開くか、コメントを残してください。
そして、Toolboxをテストしてくれてありがとう。
最も参考になるコメント
まったく同じ問題が発生しています(Arch Linuxでも)。 0.0.96にダウングレードすることでうまくいきました。
これらは、Fedora32ツールボックスのPodmanログです。