Bug 1356688

Summary: appliance_console is unable to set time-zone for america/argentina "Failed to apply timezone configuration"
Product: Red Hat CloudForms Management Engine Reporter: Reartes Guillermo <greartes>
Component: ApplianceAssignee: Nick Carboni <ncarboni>
Status: CLOSED CURRENTRELEASE QA Contact: luke couzens <lcouzens>
Severity: low Docs Contact:
Priority: medium    
Version: 5.6.0CC: abellott, cpelland, jhardy, lcouzens, ncarboni, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: appliance:cli
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1402118 (view as bug list) Environment:
Last Closed: 2017-06-12 16:32:00 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: 1402118    

Description Reartes Guillermo 2016-07-14 17:41:25 UTC
Description of problem:

One cannot use 'appliance_console' option 5 'set timezone' to set the timezone:
* 4 'america'. 6 'argentina' 

I tried with another timezone (canada/atlantic) and it works ok.
I did not try if other timezones have problems.
 

Version-Release number of selected component (if applicable):
5.6.0.13

How reproducible:
always

Steps to Reproduce:
1. run appliance console 
2. option 5 'set timezone'
3. select 4 'america'
4. press Q and type 6 'argentina'
5. press Y to apply the change
6. "Failed to apply timezone configuration
Timezone not configured"
 

Actual results:
Cannot set the timezone

Expected results:
Being able to do so

Additional info #2:

Timezone Configuration

        Timezone area: America
        Timezone city: Argentina

Apply timezone configuration? (Y/N): y
Activate starting
Applying timezone to America/Argentina...
Failed to apply timezone configuration
Timezone not configured

Press any key to continue.

Additional info #2:

[root@cfme1 ~]# timedatectl list-timezones | grep Argentina
America/Argentina/Buenos_Aires
America/Argentina/Catamarca
America/Argentina/Cordoba
America/Argentina/Jujuy
America/Argentina/La_Rioja
America/Argentina/Mendoza
America/Argentina/Rio_Gallegos
America/Argentina/Salta
America/Argentina/San_Juan
America/Argentina/San_Luis
America/Argentina/Tucuman
America/Argentina/Ushuaia

Additional info #3:

If one exit 'appliance_console' and manually:

# timedatectl set-timezone America/Argentina/Buenos_Aires

and then executes the 'appliance_console' command again:

Welcome to the CFME Virtual Appliance.

To modify the configuration, use a web browser to access the management page.

Hostname:                cfme1.example.com
IP Address:              192.168.100.20
Netmask:                 255.255.255.0
Gateway:                 192.168.100.1
Primary DNS:             192.168.100.1
Secondary DNS:           
Search Order:            example.com
MAC Address:             52:54:00:6e:f3:57
Timezone:                America/Argentina/Buenos_Aires
Local Database:          running
CFME Database:           postgres @ localhost
Database/Region:         vmdb_production / 1
External Auth:           not configured
CFME Version:            5.6.0.13
CFME Console:            https://192.168.100.20


Press any key to continue.

I do not know if that is enough, or 'appliance_console' does more stuff under the hood.

Comment 3 CFME Bot 2016-12-06 17:25:39 UTC
New commit detected on ManageIQ/manageiq-gems-pending/master:
https://github.com/ManageIQ/manageiq-gems-pending/commit/0dd2abf75d3b26c63e98a9af1a5eb480aca02b43

commit 0dd2abf75d3b26c63e98a9af1a5eb480aca02b43
Author:     Nick Carboni <ncarboni>
AuthorDate: Tue Nov 29 15:05:35 2016 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Tue Nov 29 15:05:35 2016 -0500

    Allow the use of all timezones in the console
    
    Previously we had some custom logic about how to find the list
    of timezones to display to the user.
    Instead of that, we can use LinuxAdmin::TimeDate.timezones to get
    the same list.
    
    This also allows the use of timezones which are nested more than
    two levels (such as America/Argentina/Buenos_Aires)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1356688

 .../appliance_console/timezone_configuration.rb    | 81 ++++++------------
 .../timezone_configuration_spec.rb                 | 96 +++++++++++-----------
 2 files changed, 71 insertions(+), 106 deletions(-)

Comment 5 luke couzens 2017-02-28 12:30:35 UTC
Verified in 5.8.0.2