Bug 1316674 - ERROR -- : Failed to apply time and timezone configuration: /bin/timedatectl exit code: 1
ERROR -- : Failed to apply time and timezone configuration: /bin/timedatectl ...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.5.0
All All
high Severity high
: GA
: 5.6.0
Assigned To: Joe Vlcek
Jeff Teehan
appliance:timezone:black
: ZStream
Depends On:
Blocks: 1318752
  Show dependency treegraph
 
Reported: 2016-03-10 13:06 EST by Kevin Morey
Modified: 2016-10-03 12:10 EDT (History)
9 users (show)

See Also:
Fixed In Version: 5.6.0.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1318752 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:42:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Unknown


Attachments (Terms of Use)

  None (edit)
Description Kevin Morey 2016-03-10 13:06:24 EST
Description of problem:
When using the appliance_console to set the timezone this error is thrown each time. I have tested this 3 times all on brand new VMware based appliances with the same result. From the looks of things the date is fine but the time does'nt get set properly. It is not until i run ntpdate that the time is properly adjusted. 

This is a big problem as it affects our ability to perform certain actions with Azure and EC2 as it as the Azure ARM and AWS SDK gems rely on time to be correctly set.

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

How reproducible:
100%

Steps to Reproduce:
1. run appliance_console on a new appliance
2. attempt to change the timezone to Pacific Time

Actual results:
Date and Time Configuration

        Timezone area: United States
        Timezone city: Pacific
        Date:          2016-03-10
        Time:          09:53:30

Apply time and timezone configuration? (Y/N): y
Applying time and timezone configuration...
Failed to apply time and timezone configuration

Press any key to continue.

Expected results:
Time to be set correctly

Additional info:

appliance_console output:
Date and Time Configuration

        Timezone area: United States
        Timezone city: Pacific
        Date:          2016-03-10
        Time:          09:53:30

Apply time and timezone configuration? (Y/N): y
Applying time and timezone configuration...
Failed to apply time and timezone configuration

Press any key to continue.


From the shell:
# date
Thu Mar 10 14:56:55 PST 2016

# cat /var/www/miq/vmdb/log/appliance_console.log
# Logfile created on 2016-03-10 14:53:34 -0800 by logger.rb/47272
E, [2016-03-10T14:53:34.604931 #12001] ERROR -- : Failed to apply time and timezone configuration: /bin/timedatectl exit code: 1


cat /var/log/messages
Mar 10 17:53:01 localhost dbus-daemon: dbus[774]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Mar 10 17:53:01 localhost dbus[774]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Mar 10 17:53:01 localhost systemd: Starting Time & Date Service...
Mar 10 17:53:01 localhost dbus[774]: [system] Successfully activated service 'org.freedesktop.timedate1'
Mar 10 17:53:01 localhost systemd: Started Time & Date Service.
Mar 10 17:53:01 localhost dbus-daemon: dbus[774]: [system] Successfully activated service 'org.freedesktop.timedate1'
Mar 10 17:53:33 localhost dbus[774]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Mar 10 17:53:33 localhost dbus-daemon: dbus[774]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Mar 10 17:53:34 localhost systemd: Starting Time & Date Service...
Mar 10 17:53:34 localhost dbus[774]: [system] Successfully activated service 'org.freedesktop.timedate1'
Mar 10 17:53:34 localhost systemd: Started Time & Date Service.
Mar 10 17:53:34 localhost dbus-daemon: dbus[774]: [system] Successfully activated service 'org.freedesktop.timedate1'
Mar 10 17:53:34 localhost systemd-timedated: Changed time zone to 'US/Pacific'.
Mar 10 17:56:40 localhost systemd: Starting Cleanup of Temporary Directories...
Mar 10 17:56:40 localhost systemd: Started Cleanup of Temporary Directories.
Mar 10 17:56:40 localhost dbus-daemon: dbus[774]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Mar 10 17:56:40 localhost dbus[774]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Mar 10 17:56:41 localhost systemd: Starting Time & Date Service...
Mar 10 17:56:41 localhost dbus[774]: [system] Successfully activated service 'org.freedesktop.timedate1'
Mar 10 17:56:41 localhost systemd: Started Time & Date Service.
Mar 10 17:56:41 localhost dbus-daemon: dbus[774]: [system] Successfully activated service 'org.freedesktop.timedate1'

# ntpdate clock.redhat.com
10 Mar 10:04:12 ntpdate[12185]: step time server 10.11.160.238 offset -17999.788328 sec

# date
Thu Mar 10 10:04:22 PST 2016
Comment 3 CFME Bot 2016-03-28 14:25:35 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/805898b9552aebb23c8dfbc320da5c1c586f0f70

commit 805898b9552aebb23c8dfbc320da5c1c586f0f70
Author:     Joe VLcek <jvlcek@redhat.com>
AuthorDate: Fri Mar 11 15:26:57 2016 -0500
Commit:     Joe VLcek <jvlcek@redhat.com>
CommitDate: Wed Mar 23 17:48:58 2016 -0400

    Separate setting timezone from setting date and time.
    
    Move timezone and date_time from appliance_console.rb to new classes
    and added disabling of automatic time synchronization when setting date
    and time.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1316674

 gems/pending/appliance_console.rb                  | 125 ++++-------
 .../appliance_console/date_time_configuration.rb   | 118 +++++++++++
 gems/pending/appliance_console/locales/en.yml      |   4 +-
 gems/pending/appliance_console/prompts.rb          |  12 +-
 .../appliance_console/timezone_configuration.rb    |  93 +++++++++
 .../date_time_configuration_spec.rb                | 230 +++++++++++++++++++++
 .../pending/spec/appliance_console/prompts_spec.rb |  16 --
 .../timezone_configuration_spec.rb                 |  99 +++++++++
 8 files changed, 582 insertions(+), 115 deletions(-)
 create mode 100644 gems/pending/appliance_console/date_time_configuration.rb
 create mode 100644 gems/pending/appliance_console/timezone_configuration.rb
 create mode 100644 gems/pending/spec/appliance_console/date_time_configuration_spec.rb
 create mode 100644 gems/pending/spec/appliance_console/timezone_configuration_spec.rb
Comment 4 Mike McCune 2016-03-28 18:50:27 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 8 CFME Bot 2016-04-14 08:11:45 EDT
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=de7dfa01fd3e2fa56c510a107ed37a8e88b18d93

commit de7dfa01fd3e2fa56c510a107ed37a8e88b18d93
Author:     Joe VLcek <jvlcek@redhat.com>
AuthorDate: Fri Mar 11 15:26:57 2016 -0500
Commit:     Joe VLcek <jvlcek@redhat.com>
CommitDate: Wed Mar 30 16:38:29 2016 -0400

    Separate setting timezone from setting date and time.
    
    Move timezone and date_time from appliance_console.rb to new classes
    and added disabling of automatic time synchronization when setting date
    and time.
    
    Fixes BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1316674
    
    cherry-pick of:
    https://github.com/ManageIQ/manageiq/pull/7246
    
    Fixes 5.5.z BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1318752
    
    Cherry pick was not clean for gems/pending/appliance_console.rb due to
    minor issues.

 gems/pending/appliance_console.rb                  | 125 ++++-------
 .../appliance_console/date_time_configuration.rb   | 118 +++++++++++
 gems/pending/appliance_console/locales/en.yml      |   4 +-
 gems/pending/appliance_console/prompts.rb          |  12 +-
 .../appliance_console/timezone_configuration.rb    |  93 +++++++++
 .../date_time_configuration_spec.rb                | 230 +++++++++++++++++++++
 .../pending/spec/appliance_console/prompts_spec.rb |  16 --
 .../timezone_configuration_spec.rb                 |  99 +++++++++
 8 files changed, 582 insertions(+), 115 deletions(-)
 create mode 100644 gems/pending/appliance_console/date_time_configuration.rb
 create mode 100644 gems/pending/appliance_console/timezone_configuration.rb
 create mode 100644 gems/pending/spec/appliance_console/date_time_configuration_spec.rb
 create mode 100644 gems/pending/spec/appliance_console/timezone_configuration_spec.rb
Comment 9 CFME Bot 2016-04-14 08:11:50 EDT
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=9d47e6a7c2602fec86d7fd3c82ef05acfe3aa4e2

commit 9d47e6a7c2602fec86d7fd3c82ef05acfe3aa4e2
Merge: 9f2426a 9c51cf0
Author:     Gregg Tanzillo <gtanzill@redhat.com>
AuthorDate: Thu Apr 14 08:11:25 2016 -0400
Commit:     Gregg Tanzillo <gtanzill@redhat.com>
CommitDate: Thu Apr 14 08:11:25 2016 -0400

    Merge branch 'bz_1318752' into '5.5.z'
    
    Separate setting timezone from setting date and time.
    
    Move timezone and date_time from appliance_console.rb to new classes
    and added disabling of automatic time synchronization when setting date
    and time.
    
    Fixes BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1316674
    
    cherry-pick of:
    https://github.com/ManageIQ/manageiq/pull/7246
    
    Fixes 5.5.z BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1318752
    
    Cherry pick was not clean for gems/pending/appliance_console.rb due to
    minor issues.
    
    See merge request !879

 gems/pending/appliance_console.rb                  | 125 ++++-------
 .../appliance_console/date_time_configuration.rb   | 118 +++++++++++
 gems/pending/appliance_console/locales/en.yml      |   4 +-
 gems/pending/appliance_console/prompts.rb          |  12 +-
 .../appliance_console/timezone_configuration.rb    |  93 +++++++++
 .../date_time_configuration_spec.rb                | 232 +++++++++++++++++++++
 .../pending/spec/appliance_console/prompts_spec.rb |  16 --
 .../timezone_configuration_spec.rb                 | 101 +++++++++
 8 files changed, 586 insertions(+), 115 deletions(-)
Comment 10 CFME Bot 2016-04-14 10:59:37 EDT
New commit detected on cfme_productization/master:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=e624097747444d5e95136c2a2f69bee6a158732c

commit e624097747444d5e95136c2a2f69bee6a158732c
Author:     Joe VLcek <jvlcek@redhat.com>
AuthorDate: Thu Mar 31 12:21:21 2016 -0400
Commit:     Joe VLcek <jvlcek@redhat.com>
CommitDate: Thu Mar 31 12:21:21 2016 -0400

    Separate setting timezone from setting date and time.
    
    Move timezone and date_time from appliance_console.rb to new classes and added disabling of automatic time synchronization when setting date and time.
    
    Fixes BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1316674
    
    Upstream PR:
    cherry-pick of: https://github.com/ManageIQ/manageiq/pull/7246

 manageiq/gems/pending/appliance_console/locales/en_productization.yml | 1 +
 1 file changed, 1 insertion(+)
Comment 11 CFME Bot 2016-04-14 10:59:41 EDT
New commit detected on cfme_productization/master:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=71771a198e045ef4f9c70c3c3530e8bc1d091b00

commit 71771a198e045ef4f9c70c3c3530e8bc1d091b00
Merge: ef8433e e624097
Author:     Gregg Tanzillo <gtanzill@redhat.com>
AuthorDate: Thu Apr 14 10:21:34 2016 -0400
Commit:     Gregg Tanzillo <gtanzill@redhat.com>
CommitDate: Thu Apr 14 10:21:34 2016 -0400

    Merge branch 'bz_1318752' into 'master'
    
    Separate setting timezone from setting date and time.
    
    Move timezone and date_time from appliance_console.rb to new classes and added disabling of automatic time synchronization when setting date and time.
    
    Fixes BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1316674
    
    Upstream PR:
    cherry-pick of: https://github.com/ManageIQ/manageiq/pull/7246
    
    See merge request !209

 manageiq/gems/pending/appliance_console/locales/en_productization.yml | 1 +
 1 file changed, 1 insertion(+)
Comment 12 Jeff Teehan 2016-04-18 13:42:25 EDT
I can see it's been moved, but I'm not sure how to actually set the timezone.  The automatic on and off is working correctly.
Comment 13 Joe Vlcek 2016-04-19 08:50:34 EDT
(In reply to Jeff Teehan from comment #12)
> I can see it's been moved, but I'm not sure how to actually set the
> timezone.  The automatic on and off is working correctly.

Timezone now has it's own option from the top menu.

In the below output of the appliance_console main menu to set the
timezone one would select "5) Set Timezone"

Let me know if this doesn't answer your questions.

JoeV

- - -
Advanced Setting

1) Set DHCP Network Configuration
2) Set Static Network Configuration
3) Test Network Configuration
4) Set Hostname
5) Set Timezone
6) Set Date and Time
7) Restore Database From Backup
8) Configure Database
9) Configure External Authentication (httpd)
10) Generate Custom Encryption Key
11) Stop EVM Server Processes
12) Start EVM Server Processes
13) Restart Appliance
14) Shut Down Appliance
15) Summary Information
16) Quit

Choose the advanced setting:
Comment 14 Jeff Teehan 2016-04-19 11:14:33 EDT
I see this in the following build.  Myabe it didn't get added.
5.6.0.1-beta2.20160413141124_e25ac0e

Here is my appliance:  https://10.16.7.174/

Advanced Setting

1) Set DHCP Network Configuration
2) Set Static Network Configuration
3) Test Network Configuration
4) Set Hostname
5) Set Date and Time
6) Restore Database From Backup
7) Configure Database
8) Extend Temporary Storage
9) Configure External Authentication (httpd)
10) Generate Custom Encryption Key
11) Harden Appliance Using SCAP Configuration
12) Stop EVM Server Processes
13) Start EVM Server Processes
14) Restart Appliance
15) Shut Down Appliance
16) Summary Information
17) Quit

Choose the advanced setting:
Comment 15 Joe Vlcek 2016-04-19 12:23:39 EDT
Jeff, The needed changes were merge on 20160414. So they wouldn't be in the
build from 20160413.

https://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme_productization/merge_requests/209
Comment 16 Jeff Teehan 2016-04-21 12:58:37 EDT
Part Two was fixed in 5.6.0.2 and is now working properly.  Moving to verified on Beta2.1
Comment 18 errata-xmlrpc 2016-06-29 11:42:04 EDT
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-2016:1348
Comment 19 Jeff Teehan 2016-10-03 12:10:21 EDT
Added Polarion test case

Note You need to log in before you can comment on or make changes to this bug.