2017年2月24日金曜日

HostCleanupでうまくパッケージが消せない(アンインストールできない)

基本情報:

https://cwiki.apache.org/confluence/display/AMBARI/Host+Cleanup+for+Ambari+and+Stack

HostCleanup.pyは下記のResultファイルを作ります

[root@node4 ~]# ls -ltr /var/lib/ambari-agent/data/*.result
-rw-r--r-- 1 root root   855 Feb 24 02:20 /var/lib/ambari-agent/data/hostcheck.result
-rw-r--r-- 1 root root   911 Feb 24 02:20 /var/lib/ambari-agent/data/hostcheck_custom_actions.result
-rw-r--r-- 1 root root 21052 Feb 24 03:46 /var/lib/ambari-agent/data/hostcleanup.result

hostcheckfile

[root@node4 ~]# cat /var/lib/ambari-agent/data/hostcheck.result
[metadata]
created = 2017-02-24 02:20:05.757245

[users]
usr_list = hive,zookeeper,ambari-qa,tez,hdfs,yarn,hcat,mapred
usr_homedir_list = /home/hive,/home/zookeeper,/home/ambari-qa,/home/tez,/home/hdfs,/home/yarn,/home/hcat,/home/mapred

[alternatives]
symlink_list =
target_list =

[directories]
dir_list = /etc/hadoop,/etc/hive,/etc/zookeeper,/etc/hive-hcatalog,/etc/tez,/etc/hive-webhcat,/etc/pig,/var/run/hadoop,/var/run/hive,/var/run/zookeeper,/var/run/hive-hcatalog,/var/run/webhcat,/var/run/hadoop-yarn,/var/run/hadoop-mapreduce,/var/log/hadoop,/var/log/hive,/var/log/zookeeper,/var/log/hive-hcatalog,/var/log/hadoop-yarn,/var/log/hadoop-mapreduce,/var/lib/hive,/var/lib/hadoop-hdfs,/var/lib/hadoop-yarn,/var/lib/hadoop-mapreduce,/tmp/hadoop-hdfs,/hadoop/zookeeper,/hadoop/hdfs,/hadoop/yarn,/usr/hdp/current

[processes]
proc_list = 15757,17427


hostcheckfileca

[root@node4 ~]# cat /var/lib/ambari-agent/data/hostcheck_custom_actions.result
[metadata]
created = 2017-02-24 02:20:26.754150

[packages]
pkg_list = hadoop_2_5_3_0_37-hdfs.x86_64,zookeeper_2_5_3_0_37.noarch,hdp-select.noarch,hadoop_2_5_3_0_37-yarn.x86_64,hadoop_2_5_3_0_37-libhdfs.x86_64,atlas-metadata_2_5_3_0_37-hive-plugin.noarch,ranger_2_5_3_0_37-yarn-plugin.x86_64,hive_2_5_3_0_37-hcatalog.noarch,pig_2_5_3_0_37.noarch,spark_2_5_3_0_37-yarn-shuffle.noarch,hive2_2_5_3_0_37.noarch,ranger_2_5_3_0_37-hdfs-plugin.x86_64,zookeeper_2_5_3_0_37-server.noarch,tez_hive2_2_5_3_0_37.noarch,hive_2_5_3_0_37.noarch,hadoop_2_5_3_0_37.x86_64,hive_2_5_3_0_37-webhcat.noarch,spark2_2_5_3_0_37-yarn-shuffle.noarch,tez_2_5_3_0_37.noarch,hadoop_2_5_3_0_37-mapreduce.x86_64,hadoop_2_5_3_0_37-client.x86_64,datafu_2_5_3_0_37.noarch,hive2_2_5_3_0_37-jdbc.noarch,hive_2_5_3_0_37-jdbc.noarch,ranger_2_5_3_0_37-hive-plugin.x86_64,bigtop-jsvc.x86_64

[repositories]
repo_list = HDP-2.5,Updates-ambari-2.4.2.0

Resultファイルを消してみると

[root@node4 ~]# rm /var/lib/ambari-agent/data/hostcheck_custom_actions.result
rm: remove regular file `/var/lib/ambari-agent/data/hostcheck_custom_actions.result'? y
[root@node4 ~]# python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --skip=users
Host Check results not found. There is no /var/lib/ambari-agent/data/hostcheck_custom_actions.result. Do you want to run host checks [ /n] (y)

INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh /var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py ACTIONEXECUTE /tmp/tmpSni9Le /var/lib/ambari-agent/cache/custom_actions /tmp/tmpRX36M4 INFO /var/lib/ambari-agent/tmp

TODO: Host Checksとは?

[root@node4 ~]# cat /tmp/tmpSni9Le
{"commandParams": {"check_execute_list": "*BEFORE_CLEANUP_HOST_CHECKS*"}}

[root@node4 ~]# cat /tmp/tmpRX36M4{"transparentHugePage": {"message": "", "exit_code": 0}, "last_agent_env_check": {"transparentHugePage": "", "hostHealth": {"agentTimeStampAtReporting": 1487908261777, "activeJavaProcs": [], "liveServices": [{"status": "Unhealthy", "name": "ntpd", "desc": "ntpd: unrecognized service\n"}]}, "reverseLookup": true, "alternatives": [], "umask": "18", "firewallName": "iptables", "stackFoldersAndFiles": [], "existingUsers": [{"status": "Available", "name": "hive", "homeDir": "/home/hive"}, {"status": "Available", "name": "zookeeper", "homeDir": "/home/zookeeper"}, {"status": "Available", "name": "ambari-qa", "homeDir": "/home/ambari-qa"}, {"status": "Available", "name": "tez", "homeDir": "/home/tez"}, {"status": "Available", "name": "hdfs", "homeDir": "/home/hdfs"}, {"status": "Available", "name": "yarn", "homeDir": "/home/yarn"}, {"status": "Available", "name": "hcat", "homeDir": "/home/hcat"}, {"status": "Available", "name": "mapred", "homeDir": "/home/mapred"}], "firewallRunning": true}, "installed_packages": [], "existing_repos": ["Updates-ambari-2.4.2.0"]}

注意:
1. HDFS dfs.datanode.data.dir dfs.namenode.name.dir dfs.journalnode.edits.dir
2. 再インストール時に、/etc/hadoop/<version>/0 が作成されなかった
3. /etc/hadoop/conf が /usr/hdp/current/hadoop-client/conf ヘシムリンクされなかった

0 件のコメント:

コメントを投稿