[
https://issues.apache.org/jira/browse/AMBARI-9828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14340119#comment-14340119
]
Hudson commented on AMBARI-9828:
--------------------------------
FAILURE: Integrated in Ambari-trunk-Commit #1887 (See
[https://builds.apache.org/job/Ambari-trunk-Commit/1887/])
AMBARI-9828. Ability to handle envs where sudo is not available (aonishuk)
(aonishuk:
http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=6076060d7608140b400b7ea2670c070fa9619972)
* ambari-server/src/test/python/stacks/2.0.6/GANGLIA/test_ganglia_monitor.py
*
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
* ambari-common/src/main/python/resource_management/core/shell.py
*
ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py
* ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py
* ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
* ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
* ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
* ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py
* ambari-agent/src/test/python/resource_management/TestGroupResource.py
*
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/files/checkForFormat.sh
* ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
* ambari-agent/src/test/python/ambari_agent/TestMain.py
* ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py
* ambari-server/src/test/python/stacks/2.0.6/HDFS/test_snamenode.py
*
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/templetonSmoke.sh
*
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
*
ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
*
ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
*
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/removeMysqlUser.sh
* ambari-server/src/test/python/stacks/2.0.6/HDFS/test_zkfc.py
* ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py
*
ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/package/templates/gangliaLib.sh.j2
* ambari-server/src/test/python/stacks/2.0.6/GANGLIA/test_ganglia_server.py
*
ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py
*
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
*
ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkSmoke.sh
* ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py
*
ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm.py
* ambari-server/conf/unix/ambari-env.sh
*
ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkService.sh
*
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
* ambari-agent/conf/unix/ambari-env.sh
*
ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params.py
* ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
* ambari-agent/src/test/python/tmp_hostcheck.result
* ambari-agent/pom.xml
* ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
*
ambari-server/src/test/python/stacks/2.0.6/hooks/before-INSTALL/test_before_install.py
* ambari-common/src/main/python/ambari_commons/constants.py
*
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
* ambari-agent/src/main/python/ambari_agent/HostCleanup.py
*
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
*
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/params.py
* ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
* ambari-agent/src/main/python/ambari_agent/main.py
* ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
*
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/shared_initialization.py
* ambari-agent/conf/unix/ambari-sudo.sh
* ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py
* ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
*
ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/package/files/setupGanglia.sh
* ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
* ambari-agent/src/test/python/resource_management/TestUserResource.py
*
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params.py
*
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh
* ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
* ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
*
ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh
* ambari-agent/conf/unix/ambari-agent
* ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
* ambari-agent/src/main/python/ambari_agent/Hardware.py
*
ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py
* ambari-agent/src/test/python/resource_management/TestExecuteResource.py
> Ability to handle envs where sudo is not available
> --------------------------------------------------
>
> Key: AMBARI-9828
> URL: https://issues.apache.org/jira/browse/AMBARI-9828
> Project: Ambari
> Issue Type: Bug
> Reporter: Andrew Onischuk
> Assignee: Andrew Onischuk
> Fix For: 2.0.0
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)