ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitro Lisnichenko" <dlysniche...@hortonworks.com>
Subject Re: Review Request 31541: Ability to handle envs where sudo is not available
Date Fri, 27 Feb 2015 12:44:14 GMT

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

Ship it!


Ship It!

- Dmitro Lisnichenko


On Feb. 27, 2015, 12:40 p.m., Andrew Onischuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31541/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2015, 12:40 p.m.)
> 
> 
> Review request for Ambari and Dmitro Lisnichenko.
> 
> 
> Bugs: AMBARI-9828
>     https://issues.apache.org/jira/browse/AMBARI-9828
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Attempted to start "ambari-agent start" as root but it fails with "You can't
> perform this operation as non-sudoer user. Please, re-login as one" message.
> Commented out this code and start worked...
> 
>     
>     
>     
>     echo "" | sudo -S -l > /dev/null 2>&1
>     if [ "$?" != "0" ]; then
>      echo "You can't perform this operation as non-sudoer user. Please, re-login as one"
>      exit 0
>     fi
>     
>     current_user=`awk -v val=$EUID -F ":" '$3==val{print $1}' /etc/passwd`
>     
>     change_files_permissions() {
>     	sudo chown -R $current_user "/var/run/ambari-agent"
>     	sudo chown -R $current_user "/var/log/ambari-agent"
>     	sudo chown -R $current_user "/var/lib/ambari-agent/data"
>     	sudo chown -R $current_user "/var/lib/ambari-agent/cache"
>     	sudo chown 	  $current_user "/usr/lib/ambari-agent"
>     }
>     
> 
> I think there is a broader issue here with sudo in certain envs.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/conf/unix/ambari-agent aef9e16 
>   ambari-agent/conf/unix/ambari-env.sh 50c8fa4 
>   ambari-agent/conf/unix/ambari-sudo.sh PRE-CREATION 
>   ambari-agent/pom.xml 0952456 
>   ambari-agent/src/main/python/ambari_agent/Hardware.py ba53e12 
>   ambari-agent/src/main/python/ambari_agent/HostCleanup.py e4a4754 
>   ambari-agent/src/main/python/ambari_agent/main.py a907823 
>   ambari-agent/src/test/python/ambari_agent/TestMain.py 3cf36f5 
>   ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py cabfab5 
>   ambari-agent/src/test/python/resource_management/TestExecuteResource.py d9f1a60 
>   ambari-agent/src/test/python/resource_management/TestGroupResource.py 850690f 
>   ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py 26c2ef7

>   ambari-agent/src/test/python/resource_management/TestUserResource.py ca7e669 
>   ambari-agent/src/test/python/tmp_hostcheck.result PRE-CREATION 
>   ambari-common/src/main/python/ambari_commons/constants.py PRE-CREATION 
>   ambari-common/src/main/python/resource_management/core/shell.py f41bdde 
>   ambari-server/conf/unix/ambari-env.sh cb6c028 
>   ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/package/files/setupGanglia.sh
b5b6762 
>   ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/package/templates/gangliaLib.sh.j2
9d62ef6 
>   ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
99cae6a 
>   ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params.py
7f50440 
>   ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
9581d76 
>   ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
1c47caf 
>   ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/removeMysqlUser.sh
b035517 
>   ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/templetonSmoke.sh
34b78f5 
>   ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
04ac066 
>   ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
61043da 
>   ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh
0695701 
>   ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
172fd79 
>   ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py
a129a6c 
>   ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params.py
8ad95cc 
>   ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py
2822ef6 
>   ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm.py
50ee65b 
>   ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkService.sh
46296df 
>   ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkSmoke.sh
39916d3 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/params.py
5aee113 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
3b7bc54 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh
08ddec8 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
9b8dd12 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/shared_initialization.py
5c2e29e 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/files/checkForFormat.sh
eea9847 
>   ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py 6442902 
>   ambari-server/src/test/python/stacks/2.0.6/GANGLIA/test_ganglia_monitor.py cc15126

>   ambari-server/src/test/python/stacks/2.0.6/GANGLIA/test_ganglia_server.py cfe788d 
>   ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py 433ad6e 
>   ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py 0b5f985

>   ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py 90c0ca0 
>   ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py ae09321 
>   ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py 18722be 
>   ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py e48f7f6 
>   ambari-server/src/test/python/stacks/2.0.6/HDFS/test_snamenode.py e750406 
>   ambari-server/src/test/python/stacks/2.0.6/HDFS/test_zkfc.py 911a19b 
>   ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py e302cba 
>   ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py 1d3f4cb 
>   ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py 45e9dc4 
>   ambari-server/src/test/python/stacks/2.0.6/hooks/before-INSTALL/test_before_install.py
e6db6c7 
>   ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py 5b3c9d5 
>   ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py 87fc953 
>   ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py 069c2d3 
>   ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py d6b26da

>   ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py f954219 
>   ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py 301d6a3

>   ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py 251eae5 
>   ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py bc16c01 
> 
> Diff: https://reviews.apache.org/r/31541/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message