ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-18317) ambari-agent script does not check for unset variables. (Leading to chown root:root /)
Date Mon, 19 Sep 2016 19:41:20 GMT

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

Hudson commented on AMBARI-18317:
---------------------------------

FAILURE: Integrated in Jenkins build Ambari-branch-2.5 #56 (See [https://builds.apache.org/job/Ambari-branch-2.5/56/])
AMBARI-18360. ambari-agent check for unset variables (AMBARI-18317) (aonishuk: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=793dd571b9244fc892c972c703cdf3f0d63ac73c])
* (edit) ambari-agent/conf/unix/ambari-agent
* (edit) ambari-server/sbin/ambari-server


> ambari-agent script does not check for unset variables. (Leading to chown root:root /)
> --------------------------------------------------------------------------------------
>
>                 Key: AMBARI-18317
>                 URL: https://issues.apache.org/jira/browse/AMBARI-18317
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-agent
>    Affects Versions: 2.4.0
>         Environment: Ubuntu 14.04
> Hortonworks provided package: ambari-agent 4.2.0.1-1
>            Reporter: Ryan Walder
>             Fix For: 2.4.2
>
>
> Using the following config (unchanged from a previous install, so missing options relevant
to 2.4.0.1) with ambari-agent 2.4.0.1 causes the ambari-agent script to chown the entire filesystem
as root.
> {noformat}
> [logging]
> syslog_enabled=0
> [agent]
> ping_port=8670
> data_cleanup_max_size_MB=100
> prefix=/var/lib/ambari-agent/data
> cache_dir=/var/lib/ambari-agent/cache
> tolerate_download_failures=true
> parallel_execution=0
> data_cleanup_interval=86400
> tolerate_download_failuresf=false
> data_cleanup_max_age=2592000
> loglevel=INFO
> run_as_user=root
> [server]
> secured_url_port=8441
> hostname=cs-vagrant-hadoop-ambarimaster-01.gel.zone
> url_port=8440
> [services]
> pidLookupPath=/var/run/
> [heartbeat]
> dirs=/etc/hadoop,/etc/hadoop/conf,/etc/hbase,/etc/hcatalog,/etc/hive,/etc/oozie,/etc/sqoop,/etc/ganglia,/var/run/hadoop,/var/run/zookeeper,/var/run/hbase,/var/run/templeton,/var/run/oozie,/var/log/hadoop,/var/log/zookeeper,/var/log/hbase,/var/run/templeton,/var/log/hive
> log_lines_count=300
> state_interval=6
> [security]
> server_crt=ca.crt
> keysdir=/var/lib/ambari-agent/keys
> passphrase_env_var_name=AMBARI_PASSPHRASE
> ryanwalder@ryanwlaptop:~$ vi old 
> ryanwalder@ryanwlaptop:~$ vi old 
> ryanwalder@ryanwlaptop:~$ vi old 
> ryanwalder@ryanwlaptop:~$ cat old 
> [logging]
> syslog_enabled=0
> [agent]
> ping_port=8670
> data_cleanup_max_size_MB=100
> prefix=/var/lib/ambari-agent/data
> cache_dir=/var/lib/ambari-agent/cache
> tolerate_download_failures=true
> parallel_execution=0
> data_cleanup_interval=86400
> tolerate_download_failuresf=false
> data_cleanup_max_age=2592000
> loglevel=INFO
> run_as_user=root
> [server]
> secured_url_port=8441
> hostname=cs-vagrant-hadoop-ambarimaster-01.gel.zone
> url_port=8440
> [services]
> pidLookupPath=/var/run/
> [heartbeat]
> dirs=/etc/hadoop,/etc/hadoop/conf,/etc/hbase,/etc/hcatalog,/etc/hive,/etc/oozie,/etc/sqoop,/etc/ganglia,/var/run/hadoop,/var/run/zookeeper,/var/run/hbase,/var/run/templeton,/var/run/oozie,/var/log/hadoop,/var/log/zookeeper,/var/log/hbase,/var/run/templeton,/var/log/hive
> log_lines_count=300
> state_interval=6
> [security]
> server_crt=ca.crt
> keysdir=/var/lib/ambari-agent/keys
> passphrase_env_var_name=AMBARI_PASSPHRASE
> {noformat}
> It looks like the following lines are to blame
> {noformat}
>         ambari-sudo.sh chown -R $current_user "$AMBARI_PID_DIR/"
>         ambari-sudo.sh mkdir -p "$AMBARI_AGENT_LOG_DIR"
>         ambari-sudo.sh chown -R $current_user:$current_group "$AMBARI_AGENT_LOG_DIR/"
> {noformat}
> No checking for unset variables in 2016? Top notch.
> http://www.davidpashley.com/articles/writing-robust-shell-scripts/



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

Mime
View raw message