-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63504/
-----------------------------------------------------------

Review request for Ambari, Myroslav Papirkovskyy, Sid Wagle, and Vitalyi 
Brodetskyi.


Bugs: AMBARI-22349
    https://issues.apache.org/jira/browse/AMBARI-22349


Repository: ambari


Description
-------

[root@gc6401 ~]# ambari-agent  restart
    Restarting ambari-agent
    Verifying Python version compatibility...
    Using python  /usr/bin/python
    ambari-agent is not running. No PID found at 
/var/run/ambari-agent/ambari-agent.pid
    Verifying Python version compatibility...
    Using python  /usr/bin/python
    Checking for previously running Ambari Agent...
    Checking ambari-common dir...
    Starting ambari-agent
    /var/lib/ambari-agent/bin/ambari-agent: line 185: 10328 Killed              
    nohup $PYTHON $AMBARI_AGENT_PY_SCRIPT "$@" > $OUTFILE 2>&1
    Verifying ambari-agent process status...
    ERROR: ambari-agent start failed. For more details, see 
/var/log/ambari-agent/ambari-agent.out:
    ====================
        self.topology_cache = 
ClusterTopologyCache(self.config.cluster_cache_dir, self.config)
      File 
"/usr/lib/python2.6/site-packages/ambari_agent/ClusterTopologyCache.py", line 
50, in __init__
        super(ClusterTopologyCache, self).__init__(cluster_cache_dir)
      File "/usr/lib/python2.6/site-packages/ambari_agent/ClusterCache.py", 
line 72, in __init__
        self.rewrite_cache(cache_dict, self.hash)
      File "/usr/lib/python2.6/site-packages/ambari_agent/ClusterCache.py", 
line 98, in rewrite_cache
        self.on_cache_update()
      File 
"/usr/lib/python2.6/site-packages/ambari_agent/ClusterTopologyCache.py", line 
75, in on_cache_update
        current_host_id = self.current_host_ids_to_cluster[cluster_id]
    KeyError: '2'
    ====================
    Agent out at: /var/log/ambari-agent/ambari-agent.out
    Agent log at: /var/log/ambari-agent/ambari-agent.log
    

This happens because topology contains invalid hostname and cannot be loaded
correctly.


Diffs
-----

  ambari-agent/src/main/python/ambari_agent/ClusterCache.py b924420f8b 
  ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py e7ad8d255f 
  ambari-agent/src/main/python/ambari_agent/main.py 3948290519 
  ambari-agent/src/test/python/ambari_agent/TestAgentStompResponses.py 
2154fca8d3 


Diff: https://reviews.apache.org/r/63504/diff/1/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk

Reply via email to