Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1611117

Summary: rhel atomic:7.5 image does not have tzdata files, causing tzselect to fail
Product: Red Hat Enterprise Linux 7 Reporter: Suhaas Bhat <subhat>
Component: rhel7-atomic-containerAssignee: Frantisek Kluknavsky <fkluknav>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: low    
Version: 7.5CC: codonell, dornelas, fkluknav, per.carlson, rbost, weshen
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-28 15:43:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1186913    

Description Suhaas Bhat 2018-08-02 05:53:38 UTC
Description of problem:
Cannot set local timezone on rhel-atomic as it does not have the required files included.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Atomic Host release 7.5

How reproducible:
Fully 

Steps to Reproduce:
 
# docker run tzdata /bin/sh -c "tzselect"


Actual results:
/usr/bin/tzselect: line 63: /usr/share/zoneinfo/iso3166.tab: No such file or directory
/usr/bin/tzselect: time zone files are not set up correctly

Expected results:

Options should be given

Additional info:

Workarounds:
1. Bind mounting it from the host 
2. Add it from the Dockerfile using tar
Expected it to be at default present there.

Comment 2 Patsy Griffin 2018-08-03 02:41:29 UTC
Hi,

Thanks for reporting this.

I'm concerned about why iso3166.tab is missing.  This file should always be installed with tzdata.  Can you provide more information about how your docker was set-up?  Can you provide instructions for a reproducer?

Also the version of tzdata currently installed on your host.

Thanks,
Patsy

Comment 3 Derrick Ornelas 2018-08-03 03:28:25 UTC
The rhel-atomic / rhel-minimal container image is a very minimal RHEL 7 base image built and shipped by Red Hat.  A better description of the image can be found in the Container Catalog here:

  https://access.redhat.com/containers/?tab=overview#/registry.access.redhat.com/rhel-atomic


The tzdata package is installed because it's a dependency of glibc-common, etc., but it appears that Engineering has deleted all of the files that it actually provides:

# docker run --rm -ti registry.access.redhat.com/rhel7-atomic bash
bash-4.2# rpm -Vv tzdata
.........    /usr/share/doc/tzdata-2018e (not installed)
.........  d /usr/share/doc/tzdata-2018e/README (not installed)
.........  d /usr/share/doc/tzdata-2018e/theory.html (not installed)
.........  d /usr/share/doc/tzdata-2018e/tz-art.html (not installed)
.........  d /usr/share/doc/tzdata-2018e/tz-link.html (not installed)
missing     /usr/share/zoneinfo
missing     /usr/share/zoneinfo/Africa
missing     /usr/share/zoneinfo/Africa/Abidjan
missing     /usr/share/zoneinfo/Africa/Accra
missing     /usr/share/zoneinfo/Africa/Addis_Ababa
missing     /usr/share/zoneinfo/Africa/Algiers
missing     /usr/share/zoneinfo/Africa/Asmara
missing     /usr/share/zoneinfo/Africa/Asmera
[... trimmed for length ...]
missing     /usr/share/zoneinfo/iso3166.tab
[... trimmed for length ...]
missing     /usr/share/zoneinfo/tzdata.zi
missing     /usr/share/zoneinfo/zone.tab
missing     /usr/share/zoneinfo/zone1970.tab


This was very likely done to cut down on the size of the image, as they want it to be as small as possible.  All doc files are not installed by default as well.  

I think the expected solution here is to pass in /etc/localtime to the container:

# date
Thu Aug  2 23:22:18 EDT 2018

# docker run --rm -ti registry.access.redhat.com/rhel7-atomic date
Fri Aug  3 03:22:36 UTC 2018

# docker run --rm -ti -v /etc/localtime:/etc/localtime:ro rhel7-atomic date
Thu Aug  2 23:22:49 EDT 2018


I think this should accomplish the goal of setting local time, as long as you're not trying to use java (see bug 1399749)

Comment 4 Carlos O'Donell 2018-08-03 03:56:01 UTC
(In reply to Derrick Ornelas from comment #3)
> I think the expected solution here is to pass in /etc/localtime to the
> container:
> 
> # date
> Thu Aug  2 23:22:18 EDT 2018
> 
> # docker run --rm -ti registry.access.redhat.com/rhel7-atomic date
> Fri Aug  3 03:22:36 UTC 2018
> 
> # docker run --rm -ti -v /etc/localtime:/etc/localtime:ro rhel7-atomic date
> Thu Aug  2 23:22:49 EDT 2018
> 
> 
> I think this should accomplish the goal of setting local time, as long as
> you're not trying to use java (see bug 1399749)

If that's the case then the bug is that '/usr/bin/tzselect' wasn't also removed, because it can't possibly operate in such a trimmed down environment.

I'd retitle and assign to rhel atomic team to remove tzselect to further make the installation smaller.

Comment 5 Frantisek Kluknavsky 2018-09-04 16:53:06 UTC
Yes, tzdata was intentionally removed as Derrick explained. Thanks for the hint to remove tzselect as well.

There are more problems lurking in the atomic image, caused by brute removal. The best work-around is to use the regular full-size rhel image.

Comment 6 Frantisek Kluknavsky 2018-11-02 15:36:06 UTC
Somebody may still need tzselect and bind-mount data from the host. Let us remove it and see.

Comment 11 Edward Shen 2018-11-19 06:31:48 UTC
Sorry for removing the needinfo flag.

Comment 14 errata-xmlrpc 2018-11-28 15:43:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3697

Comment 17 Red Hat Bugzilla 2023-09-15 00:11:16 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days