-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"/etc/zoneinfo/local: No such file" after creating a container with --tz local #23550
Comments
From what I can tell, the issue seems to stem from podman/vendor/github.com/containers/common/pkg/timezone/timezone.go Lines 26 to 35 in 9007553
Since Since the fix looks simple enough, Id happily open a PR, if its alright to use the CI for running the tests. |
PR are welcome, note that the code you linked is in c/common so the fix must be submitted there first then we can update the dependency in podman once this is merged there. I guess swapping both cases will make it work. |
More specifically, when timezone is "local", ignore the value of TZDIR entirely - previously, ConfigureContainerTimeZone would check TZDIR first, and then look for a literal "local" timezone. This lead to a "/etc/zoneinfo/local: No such file or directory" error with `podman start` on NixOS. See: containers/podman#23550 Signed-off-by: Vivienne Watermeier <[email protected]>
@vivienne-w I see commit here linked, are you going to open a PR in c/common? |
The special value local must always be higher priority then the TZDIR env so make sure local is matched before. Without this we joined local on the TZDIR path which of course does not result in a valid timezone path. I will add a regession test in podman. Fixes: containers/podman#23550 Signed-off-by: Paul Holzinger <[email protected]>
Regression test for containers#23550. Setting the TZDIR env should make no difference for the local timezone as this is not a real timezone name that is resolved from that directory. Signed-off-by: Paul Holzinger <[email protected]>
Regression test for containers#23550. Setting the TZDIR env should make no difference for the local timezone as this is not a real timezone name that is resolved from that directory. Signed-off-by: Paul Holzinger <[email protected]>
Regression test for containers#23550. Setting the TZDIR env should make no difference for the local timezone as this is not a real timezone name that is resolved from that directory. Signed-off-by: Paul Holzinger <[email protected]>
Regression test for containers#23550. Setting the TZDIR env should make no difference for the local timezone as this is not a real timezone name that is resolved from that directory. Signed-off-by: Paul Holzinger <[email protected]>
Regression test for containers#23550. Setting the TZDIR env should make no difference for the local timezone as this is not a real timezone name that is resolved from that directory. Signed-off-by: Paul Holzinger <[email protected]>
Regression test for containers#23550. Setting the TZDIR env should make no difference for the local timezone as this is not a real timezone name that is resolved from that directory. Signed-off-by: Paul Holzinger <[email protected]>
Regression test for containers#23550. Setting the TZDIR env should make no difference for the local timezone as this is not a real timezone name that is resolved from that directory. Signed-off-by: Paul Holzinger <[email protected]> (cherry picked from commit fb3a0e9) Signed-off-by: Paul Holzinger <[email protected]>
The special value local must always be higher priority then the TZDIR env so make sure local is matched before. Without this we joined local on the TZDIR path which of course does not result in a valid timezone path. I will add a regression test in podman. Fixes: containers/podman#23550 Signed-off-by: Paul Holzinger <[email protected]>
Issue Description
When creating a container on NixOS with
--tz local
, it later fails to start with this error:Error: unable to start container "73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8": configuring timezone for container 73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8: setting timezone for container 73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8: stat /etc/zoneinfo/local: no such file or directory
Steps to reproduce the issue
podman create --tz local --name test debian
podman start test
Describe the results you received
Error: unable to start container "73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8": configuring timezone for container 73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8: setting timezone for container 73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8: stat /etc/zoneinfo/local: no such file or directory
Describe the results you expected
The container starts normally, with the correct timezone configured.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
OS: NixOS
Additional information
I assume this issue is related to NixOS setting
TZDIR
.The text was updated successfully, but these errors were encountered: