You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Jayush Luniya (JIRA)" <ji...@apache.org> on 2015/01/14 02:56:34 UTC

[jira] [Commented] (AMBARI-9117) Ambari Upgrade leaves empty package directory after services were moved to common services

    [ https://issues.apache.org/jira/browse/AMBARI-9117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14276371#comment-14276371 ] 

Jayush Luniya commented on AMBARI-9117:
---------------------------------------

This is caused because of incorrect cleanup during upgrade. If you check /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services after upgrade you will see empty package directory for each service. This results in an empty archive.zip to be created which is replicated to the ambari-agent cache as an empty folder.
Because of the empty packageDir, stack inheritence will return the packageDir for HDP2.2 HDFS to be /var/lib/ambari-agent/cache/resources/stacks/HDP/2.0.6/services/HDFS/package instead of var/lib/ambari-agent/cache/resources/common-services/HDFS/2.1.0.2.0/package because of which you are seeing this failure.
root@c6401 FLUME# pwd
/var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/FLUME
root@c6401 FLUME# ls -l package/
total 0
-rwxr-xr-x 1 root root 0 Jan 9 03:02 archive.zip
Workaround: 
If you delete the empty package folders (i.e. folders with empty archive.zip as well) from /var/lib/ambari-server/resources/stacks/HDP and /var/lib/ambari-agent/cache/stacks/HDP and then start the ambari-server and ambari-agent the issue should resolve itself. I will look at how we can add this cleanup.

> Ambari Upgrade leaves empty package directory after services were moved to common services
> ------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-9117
>                 URL: https://issues.apache.org/jira/browse/AMBARI-9117
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-agent, ambari-server
>    Affects Versions: 2.0.0
>            Reporter: Jayush Luniya
>            Assignee: Jayush Luniya
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> After upgrading Ambari from 1.7.0 to 2.0.0, the Dashboard does not come up because the agent host check fails since the common services scripts are not copied to /var/lib/ambari-agent/cache/
> This could be related to AMBARI-8695
> STR:
> 1. Install Ambari 1.7.0 on a single node cluster, and add HDP 2.2 with HDFS and ZK
> 2. Upgrade Ambari to 2.0.0
> Stop all services
> ambari-server stop
> ambari-agent stop
> wget -nv -O /etc/yum.repos.d/ambari.repo http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/trunk/ambari.repo
> yum clean all
> yum upgrade ambari-server ambari-log4j
> # Note, there's currently in a bug in ambari-server.py,
> # Need to change 
> # if upgrade and compare_versions(version, "1.7.0") >= 0:
> # to
> # if upgrade and compare_versions(version, "1.7.0") == 0:
> ambari-server upgrade
> yum upgrade ambari-agent
> rpm -qa | grep ambari
> ambari-server start
> ambari-agent start
> less /var/log/ambari-agent/ambari-agent.log
> INFO 2015-01-07 21:33:16,239 ActionQueue.py:203 - Executing command with id = 1-1 for role = check_host of cluster null.
> INFO 2015-01-07 21:33:16,244 PythonExecutor.py:84 - Running command ['/usr/bin/python2.6',
>  u'/var/lib/ambari-agent/cache/custom_actions/check_host.py',
>  u'ACTIONEXECUTE',
> ...skipping...
>     raise AgentException(message)
> AgentException: 'Script /var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_server.py does not exist'
> WARNING 2015-01-09 00:00:10,207 FileCache.py:144 - Error occured during cache update. Error tolerate setting is set to true, so ignoring this error and continuing with current cache. Error
>  details: Can not unpack zip file to directory /var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/ZOOKEEPER/package : File is not a zip file
> ERROR 2015-01-09 00:00:10,208 CustomServiceOrchestrator.py:201 - Caught an exception while executing custom service command: <class 'AgentException.AgentException'>: 'Script /var/lib/ambar
> i-agent/cache/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_server.py does not exist'; 'Script /var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scrip
> ts/zookeeper_server.py does not exist'
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py", line 136, in runCommand
>     script_path = self.resolve_script_path(base_dir, script)
>   File "/usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py", line 270, in resolve_script_path
>     raise AgentException(message)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)