Dale Bradman created AMBARI-20829:
-------------------------------------

             Summary: cached_kinit_executor fails to handle non-ms timestamps
                 Key: AMBARI-20829
                 URL: https://issues.apache.org/jira/browse/AMBARI-20829
             Project: Ambari
          Issue Type: Bug
          Components: ambari-upgrade
    Affects Versions: trunk
            Reporter: Dale Bradman


This error message was printed during an Express upgrade to HDP-2.5.3.0.

Traceback (most recent call last):
  File 
"/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py",
 line 259, in <module>
    HiveMetastore().execute()
  File 
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
 line 280, in execute
    method(env)
  File 
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
 line 696, in restart
    self.pre_upgrade_restart(env, upgrade_type=upgrade_type)
  File 
"/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py",
 line 114, in pre_upgrade_restart
    self.upgrade_schema(env)
  File 
"/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py",
 line 198, in upgrade_schema
    status_params.tmp_dir)
  File 
"/usr/lib/python2.6/site-packages/resource_management/libraries/functions/security_commons.py",
 line 208, in cached_kinit_executor
    if (now - datetime.strptime(last_run_time, "%Y-%m-%d %H:%M:%S.%f") > 
timedelta(minutes=expiration_time)):
  File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data '2016-12-19 22:37:33' does not match format '%Y-%m-%d 
%H:%M:%S.%f'

Doing some digging, the 
/usr/lib/python2.6/site-packages/resource_management/libraries/functions/security_commons.py
 does not handle non millisecond timestamps (line 205). 
 
The timestamp it is trying to analyse here is the 
/var/lib/ambari-agent/tmp/kinit_executor_cache/<<hash(hive.service.keytab|hive.principal.name)>>.
 The timestamp within this file matches that of the error: “'2016-12-19 
22:37:33'” – which contains no miliseconds. There are other files in this 
directory all of which have timesstamps with miliseconds.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to