Procházet zdrojové kódy

AMBARI-5735. HDP deployment failed in CentOS5 (dlysnichenko)

Lisnichenko Dmitro před 11 roky
rodič
revize
7e96b3c4c3
27 změnil soubory, kde provedl 138 přidání a 61 odebrání
  1. 7 3
      ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/scripts/shared_initialization.py
  2. 7 3
      ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py
  3. 13 3
      ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/hive.py
  4. 2 1
      ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/files/check_namenodes_ha.sh
  5. 2 1
      ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/files/check_nodemanager_health.sh
  6. 2 1
      ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/files/check_templeton_status.sh
  7. 2 1
      ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/files/check_webui.sh
  8. 7 2
      ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie.py
  9. 4 3
      ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/files/templetonSmoke.sh
  10. 10 4
      ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/shared_initialization.py
  11. 8 4
      ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
  12. 18 7
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py
  13. 2 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/check_namenodes_ha.sh
  14. 2 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/check_nodemanager_health.sh
  15. 2 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/check_templeton_status.sh
  16. 2 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/check_webui.sh
  17. 8 3
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
  18. 4 3
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/files/templetonSmoke.sh
  19. 4 2
      ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_client.py
  20. 4 2
      ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_metastore.py
  21. 4 2
      ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_server.py
  22. 4 2
      ambari-server/src/test/python/stacks/1.3.2/hooks/before-INSTALL/test_before_install.py
  23. 4 2
      ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py
  24. 4 2
      ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
  25. 4 2
      ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
  26. 4 2
      ambari-server/src/test/python/stacks/2.0.6/hooks/before-INSTALL/test_before_install.py
  27. 4 2
      ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py

+ 7 - 3
ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/scripts/shared_initialization.py

@@ -150,11 +150,15 @@ def setup_java():
   if not params.jdk_name:
   if not params.jdk_name:
     return
     return
 
 
+  environment = {
+    "no_proxy": format("{ambari_server_hostname}")
+  }
+
   Execute(format("mkdir -p {artifact_dir} ; curl -kf "
   Execute(format("mkdir -p {artifact_dir} ; curl -kf "
-                 "--noproxy {ambari_server_hostname} "
                  "--retry 10 {jdk_location}/{jdk_name} -o {jdk_curl_target}"),
                  "--retry 10 {jdk_location}/{jdk_name} -o {jdk_curl_target}"),
           path = ["/bin","/usr/bin/"],
           path = ["/bin","/usr/bin/"],
-          not_if = format("test -e {java_exec}"))
+          not_if = format("test -e {java_exec}"),
+          environment = environment)
 
 
   if params.jdk_name.endswith(".bin"):
   if params.jdk_name.endswith(".bin"):
     install_cmd = format("mkdir -p {java_dir} ; chmod +x {jdk_curl_target}; cd {java_dir} ; echo A | {jdk_curl_target} -noregister > /dev/null 2>&1")
     install_cmd = format("mkdir -p {java_dir} ; chmod +x {jdk_curl_target}; cd {java_dir} ; echo A | {jdk_curl_target} -noregister > /dev/null 2>&1")
@@ -169,12 +173,12 @@ def setup_java():
   if params.jce_policy_zip is not None:
   if params.jce_policy_zip is not None:
     jce_curl_target = format("{artifact_dir}/{jce_policy_zip}")
     jce_curl_target = format("{artifact_dir}/{jce_policy_zip}")
     download_jce = format("mkdir -p {artifact_dir}; curl -kf "
     download_jce = format("mkdir -p {artifact_dir}; curl -kf "
-                          "--noproxy {ambari_server_hostname} "
                           "--retry 10 {jce_location}/{jce_policy_zip} "
                           "--retry 10 {jce_location}/{jce_policy_zip} "
                           "-o {jce_curl_target}")
                           "-o {jce_curl_target}")
     Execute( download_jce,
     Execute( download_jce,
              path = ["/bin","/usr/bin/"],
              path = ["/bin","/usr/bin/"],
              not_if =format("test -e {jce_curl_target}"),
              not_if =format("test -e {jce_curl_target}"),
+             environment = environment,
              ignore_failures = True
              ignore_failures = True
     )
     )
   elif params.security_enabled:
   elif params.security_enabled:

+ 7 - 3
ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py

@@ -88,18 +88,22 @@ def setup_database():
   """
   """
   import params
   import params
   db_driver_dload_cmd = ""
   db_driver_dload_cmd = ""
+  environment = {
+    "no_proxy": format("{ambari_server_hostname}")
+  }
   if params.server_db_name == 'oracle' and params.oracle_driver_url != "":
   if params.server_db_name == 'oracle' and params.oracle_driver_url != "":
     db_driver_dload_cmd = format(
     db_driver_dload_cmd = format(
-      "curl -kf --noproxy {ambari_server_hostname} --retry 5 {oracle_driver_url}"
+      "curl -kf --retry 5 {oracle_driver_url}"
       " -o {hadoop_lib_home}/{db_driver_filename}")
       " -o {hadoop_lib_home}/{db_driver_filename}")
   elif params.server_db_name == 'mysql' and params.mysql_driver_url != "":
   elif params.server_db_name == 'mysql' and params.mysql_driver_url != "":
     db_driver_dload_cmd = format(
     db_driver_dload_cmd = format(
-      "curl -kf --noproxy {ambari_server_hostname} --retry 5 {mysql_driver_url} "
+      "curl -kf --retry 5 {mysql_driver_url} "
       "-o {hadoop_lib_home}/{db_driver_filename}")
       "-o {hadoop_lib_home}/{db_driver_filename}")
 
 
   if db_driver_dload_cmd:
   if db_driver_dload_cmd:
     Execute(db_driver_dload_cmd,
     Execute(db_driver_dload_cmd,
-            not_if =format("test -e {hadoop_lib_home}/{db_driver_filename}")
+            not_if =format("test -e {hadoop_lib_home}/{db_driver_filename}"),
+            environment = environment
     )
     )
 
 
 
 

+ 13 - 3
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/hive.py

@@ -61,13 +61,18 @@ def hive(name=None):
             mode=config_file_mode
             mode=config_file_mode
   )
   )
 
 
+  environment = {
+    "no_proxy": format("{ambari_server_hostname}")
+  }
+
   cmd = format("/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf "
   cmd = format("/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf "
-               "--noproxy {ambari_server_hostname} --retry 5 "
+               "--retry 5 "
                "{jdk_location}{check_db_connection_jar_name} "
                "{jdk_location}{check_db_connection_jar_name} "
                "-o {check_db_connection_jar_name}'")
                "-o {check_db_connection_jar_name}'")
 
 
   Execute(cmd,
   Execute(cmd,
-          not_if=format("[ -f {check_db_connection_jar_name}]"))
+          not_if=format("[ -f {check_db_connection_jar_name}]"),
+          environment = environment)
 
 
   if name == 'metastore':
   if name == 'metastore':
     File(params.start_metastore_path,
     File(params.start_metastore_path,
@@ -167,10 +172,15 @@ def jdbc_connector():
             path=["/bin", "usr/bin/"])
             path=["/bin", "usr/bin/"])
 
 
   elif params.hive_jdbc_driver == "oracle.jdbc.driver.OracleDriver":
   elif params.hive_jdbc_driver == "oracle.jdbc.driver.OracleDriver":
+    environment = {
+      "no_proxy": format("{ambari_server_hostname}")
+    }
+
     cmd = format(
     cmd = format(
       "mkdir -p {artifact_dir} ; curl -kf --retry 10 {driver_curl_source} -o {driver_curl_target} &&  "
       "mkdir -p {artifact_dir} ; curl -kf --retry 10 {driver_curl_source} -o {driver_curl_target} &&  "
       "cp {driver_curl_target} {target}")
       "cp {driver_curl_target} {target}")
 
 
     Execute(cmd,
     Execute(cmd,
             not_if=format("test -f {target}"),
             not_if=format("test -f {target}"),
-            path=["/bin", "/usr/bin/"])
+            path=["/bin", "/usr/bin/"],
+            environment=environment)

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/files/check_namenodes_ha.sh

@@ -29,7 +29,8 @@ unavailableNN=()
 
 
 for nn in "${namenodes[@]}"
 for nn in "${namenodes[@]}"
 do
 do
-  status=$(curl --noproxy $nn -m 5 -s http://$nn:$port/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem | grep -i "tag.HAState" | grep -o -E "standby|active")
+  export no_proxy=$nn
+  status=$(curl -m 5 -s http://$nn:$port/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem | grep -i "tag.HAState" | grep -o -E "standby|active")
   if [ "$status" == "active" ]; then
   if [ "$status" == "active" ]; then
     activeNN[${#activeNN[*]}]="$nn"
     activeNN[${#activeNN[*]}]="$nn"
   elif [ "$status" == "standby" ]; then
   elif [ "$status" == "standby" ]; then

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/files/check_nodemanager_health.sh

@@ -35,7 +35,8 @@ if [[ "$SEC_ENABLED" == "true" ]]; then
   fi
   fi
 fi
 fi
 
 
-RESPONSE=`curl --noproxy $HOST --negotiate -u : -s $NODEMANAGER_URL`
+export no_proxy=$HOST
+RESPONSE=`curl --negotiate -u : -s $NODEMANAGER_URL`
 if [[ "$RESPONSE" == *'"nodeHealthy":true'* ]]; then 
 if [[ "$RESPONSE" == *'"nodeHealthy":true'* ]]; then 
   echo "OK: NodeManager healthy";
   echo "OK: NodeManager healthy";
   exit 0;
   exit 0;

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/files/check_templeton_status.sh

@@ -35,7 +35,8 @@ if [[ "$SEC_ENABLED" == "true" ]]; then
   fi
   fi
 fi
 fi
 regex="^.*\"status\":\"ok\".*<status_code:200>$"
 regex="^.*\"status\":\"ok\".*<status_code:200>$"
-out=`curl --noproxy $HOST --negotiate -u : -s -w '<status_code:%{http_code}>' http://$HOST:$PORT/templeton/$VERSION/status 2>&1`
+export no_proxy=$HOST
+out=`curl --negotiate -u : -s -w '<status_code:%{http_code}>' http://$HOST:$PORT/templeton/$VERSION/status 2>&1`
 if [[ $out =~ $regex ]]; then
 if [[ $out =~ $regex ]]; then
   out=`echo "$out" | sed -e 's/{/[/g' | sed -e 's/}/]/g'` 
   out=`echo "$out" | sed -e 's/{/[/g' | sed -e 's/}/]/g'` 
   echo "OK: WebHCat Server status [$out]";
   echo "OK: WebHCat Server status [$out]";

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/files/check_webui.sh

@@ -26,7 +26,8 @@ port=$3
 
 
 checkurl () {
 checkurl () {
   url=$1
   url=$1
-  curl $url --noproxy $host -o /dev/null
+  export no_proxy=$host
+  curl $url -o /dev/null
   echo $?
   echo $?
 }
 }
 
 

+ 7 - 2
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie.py

@@ -62,14 +62,19 @@ def oozie(is_server=False
          owner=params.oozie_user
          owner=params.oozie_user
     )
     )
 
 
+  environment = {
+    "no_proxy": format("{ambari_server_hostname}")
+  }
+
   if params.jdbc_driver_name == "com.mysql.jdbc.Driver" or \
   if params.jdbc_driver_name == "com.mysql.jdbc.Driver" or \
      params.jdbc_driver_name == "org.postgresql.Driver" or \
      params.jdbc_driver_name == "org.postgresql.Driver" or \
      params.jdbc_driver_name == "oracle.jdbc.driver.OracleDriver":
      params.jdbc_driver_name == "oracle.jdbc.driver.OracleDriver":
     Execute(format("/bin/sh -c 'cd /usr/lib/ambari-agent/ &&\
     Execute(format("/bin/sh -c 'cd /usr/lib/ambari-agent/ &&\
-    curl -kf --noproxy {ambari_server_hostname} \
+    curl -kf \
     --retry 5 {jdk_location}{check_db_connection_jar_name}\
     --retry 5 {jdk_location}{check_db_connection_jar_name}\
      -o {check_db_connection_jar_name}'"),
      -o {check_db_connection_jar_name}'"),
-      not_if  = format("[ -f {check_db_connection_jar} ]")
+      not_if  = format("[ -f {check_db_connection_jar} ]"),
+      environment=environment
     )
     )
     
     
   oozie_ownership( )
   oozie_ownership( )

+ 4 - 3
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/files/templetonSmoke.sh

@@ -33,7 +33,8 @@ else
   kinitcmd=""
   kinitcmd=""
 fi
 fi
 
 
-cmd="${kinitcmd}curl --noproxy ${ttonhost} --negotiate -u : -s -w 'http_code <%{http_code}>'    $ttonurl/status 2>&1"
+export no_proxy=$ttonhost
+cmd="${kinitcmd}curl --negotiate -u : -s -w 'http_code <%{http_code}>'    $ttonurl/status 2>&1"
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 
 
@@ -47,7 +48,7 @@ exit 0
 
 
 #try hcat ddl command
 #try hcat ddl command
 echo "user.name=${smoke_test_user}&exec=show databases;" /tmp/show_db.post.txt
 echo "user.name=${smoke_test_user}&exec=show databases;" /tmp/show_db.post.txt
-cmd="${kinitcmd}curl --noproxy ${ttonhost} --negotiate -u : -s -w 'http_code <%{http_code}>' -d  \@${destdir}/show_db.post.txt  $ttonurl/ddl 2>&1"
+cmd="${kinitcmd}curl --negotiate -u : -s -w 'http_code <%{http_code}>' -d  \@${destdir}/show_db.post.txt  $ttonurl/ddl 2>&1"
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 
 
@@ -83,7 +84,7 @@ su - ${smoke_test_user} -c "hadoop dfs -copyFromLocal /etc/passwd $ttonTestInput
 echo -n "user.name=${smoke_test_user}&file=/tmp/$ttonTestScript" > /tmp/pig_post.txt
 echo -n "user.name=${smoke_test_user}&file=/tmp/$ttonTestScript" > /tmp/pig_post.txt
 
 
 #submit pig query
 #submit pig query
-cmd="curl --noproxy ${ttonhost} -s -w 'http_code <%{http_code}>' -d  \@${destdir}/pig_post.txt  $ttonurl/pig 2>&1"
+cmd="curl -s -w 'http_code <%{http_code}>' -d  \@${destdir}/pig_post.txt  $ttonurl/pig 2>&1"
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 if [[ "$httpExitCode" -ne "200" ]] ; then
 if [[ "$httpExitCode" -ne "200" ]] ; then

+ 10 - 4
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/shared_initialization.py

@@ -171,11 +171,16 @@ def setup_java():
   if not params.jdk_name:
   if not params.jdk_name:
     return
     return
 
 
+  environment = {
+    "no_proxy": format("{ambari_server_hostname}")
+  }
+
   Execute(format("mkdir -p {artifact_dir} ; \
   Execute(format("mkdir -p {artifact_dir} ; \
-  curl --noproxy {ambari_server_hostname} -kf \
+  curl -kf \
   --retry 10 {jdk_location}/{jdk_name} -o {jdk_curl_target}"),
   --retry 10 {jdk_location}/{jdk_name} -o {jdk_curl_target}"),
           path = ["/bin","/usr/bin/"],
           path = ["/bin","/usr/bin/"],
-          not_if = format("test -e {java_exec}"))
+          not_if = format("test -e {java_exec}"),
+          environment = environment)
 
 
   if params.jdk_name.endswith(".bin"):
   if params.jdk_name.endswith(".bin"):
     install_cmd = format("mkdir -p {java_dir} ; chmod +x {jdk_curl_target}; cd {java_dir} ; echo A | {jdk_curl_target} -noregister > /dev/null 2>&1")
     install_cmd = format("mkdir -p {java_dir} ; chmod +x {jdk_curl_target}; cd {java_dir} ; echo A | {jdk_curl_target} -noregister > /dev/null 2>&1")
@@ -190,12 +195,13 @@ def setup_java():
   if params.jce_policy_zip is not None:
   if params.jce_policy_zip is not None:
     jce_curl_target = format("{artifact_dir}/{jce_policy_zip}")
     jce_curl_target = format("{artifact_dir}/{jce_policy_zip}")
     download_jce = format("mkdir -p {artifact_dir}; \
     download_jce = format("mkdir -p {artifact_dir}; \
-    curl --noproxy {ambari_server_hostname} -kf --retry 10 \
+    curl -kf --retry 10 \
     {jce_location}/{jce_policy_zip} -o {jce_curl_target}")
     {jce_location}/{jce_policy_zip} -o {jce_curl_target}")
     Execute( download_jce,
     Execute( download_jce,
              path = ["/bin","/usr/bin/"],
              path = ["/bin","/usr/bin/"],
              not_if =format("test -e {jce_curl_target}"),
              not_if =format("test -e {jce_curl_target}"),
-             ignore_failures = True
+             ignore_failures = True,
+             environment = environment
     )
     )
   elif params.security_enabled:
   elif params.security_enabled:
     # Something weird is happening
     # Something weird is happening

+ 8 - 4
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py

@@ -98,18 +98,22 @@ def setup_database():
   """
   """
   import params
   import params
   db_driver_dload_cmd = ""
   db_driver_dload_cmd = ""
+  environment = {
+    "no_proxy": format("{ambari_server_hostname}")
+  }
   if params.server_db_name == 'oracle' and params.oracle_driver_url != "":
   if params.server_db_name == 'oracle' and params.oracle_driver_url != "":
     db_driver_dload_cmd = format(
     db_driver_dload_cmd = format(
-      "curl --noproxy {ambari_server_hostname} -kf \
-      --retry 5 {oracle_driver_url} -o {hadoop_lib_home}/{db_driver_filename}")
+      "curl -kf \
+      --retry 5 {oracle_driver_url} -o {hadoop_lib_home}/{db_driver_filename}",)
   elif params.server_db_name == 'mysql' and params.mysql_driver_url != "":
   elif params.server_db_name == 'mysql' and params.mysql_driver_url != "":
     db_driver_dload_cmd = format(
     db_driver_dload_cmd = format(
-      "curl --noproxy {ambari_server_hostname} -kf \
+      "curl -kf \
       --retry 5 {mysql_driver_url} -o {hadoop_lib_home}/{db_driver_filename}")
       --retry 5 {mysql_driver_url} -o {hadoop_lib_home}/{db_driver_filename}")
 
 
   if db_driver_dload_cmd:
   if db_driver_dload_cmd:
     Execute(db_driver_dload_cmd,
     Execute(db_driver_dload_cmd,
-            not_if =format("test -e {hadoop_lib_home}/{db_driver_filename}")
+            not_if =format("test -e {hadoop_lib_home}/{db_driver_filename}"),
+            environment = environment
     )
     )
 
 
 
 

+ 18 - 7
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py

@@ -67,12 +67,18 @@ def hive(name=None):
             group=params.user_group,
             group=params.user_group,
             mode=config_file_mode)
             mode=config_file_mode)
 
 
-  cmd = format("/bin/sh -c 'cd /usr/lib/ambari-agent/ && "
-               "curl --noproxy {ambari_server_hostname} -kf --retry 5 "
-               "{jdk_location}{check_db_connection_jar_name} -o {check_db_connection_jar_name}'")
+  environment = {
+    "no_proxy": format("{ambari_server_hostname}")
+  }
+
+  cmd = format("/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf "
+               "--retry 5 "
+               "{jdk_location}{check_db_connection_jar_name} "
+               "-o {check_db_connection_jar_name}'")
 
 
   Execute(cmd,
   Execute(cmd,
-          not_if=format("[ -f {check_db_connection_jar_name}]"))
+          not_if=format("[ -f {check_db_connection_jar_name}]"),
+          environment = environment)
 
 
   File(format("{hive_config_dir}/hive-env.sh"),
   File(format("{hive_config_dir}/hive-env.sh"),
        owner=params.hive_user,
        owner=params.hive_user,
@@ -186,11 +192,16 @@ def jdbc_connector():
             path=["/bin", "usr/bin/"])
             path=["/bin", "usr/bin/"])
 
 
   elif params.hive_jdbc_driver == "oracle.jdbc.driver.OracleDriver":
   elif params.hive_jdbc_driver == "oracle.jdbc.driver.OracleDriver":
+    environment = {
+      "no_proxy": format("{ambari_server_hostname}")
+    }
+
     cmd = format(
     cmd = format(
-      "mkdir -p {artifact_dir} ; curl --noproxy {ambari_server_hostname} "
-      "-kf --retry 10 {driver_curl_source} -o {driver_curl_target} &&  "
+      "mkdir -p {artifact_dir} ; "
+      "curl -kf --retry 10 {driver_curl_source} -o {driver_curl_target} &&  "
       "cp {driver_curl_target} {target}")
       "cp {driver_curl_target} {target}")
 
 
     Execute(cmd,
     Execute(cmd,
             not_if=format("test -f {target}"),
             not_if=format("test -f {target}"),
-            path=["/bin", "/usr/bin/"])
+            path=["/bin", "/usr/bin/"],
+            environment=environment)

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/check_namenodes_ha.sh

@@ -29,7 +29,8 @@ unavailableNN=()
 
 
 for nn in "${namenodes[@]}"
 for nn in "${namenodes[@]}"
 do
 do
-  status=$(curl --noproxy $nn -m 5 -s http://$nn:$port/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem | grep -i "tag.HAState" | grep -o -E "standby|active")
+  export no_proxy=$nn
+  status=$(curl -m 5 -s http://$nn:$port/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem | grep -i "tag.HAState" | grep -o -E "standby|active")
   if [ "$status" == "active" ]; then
   if [ "$status" == "active" ]; then
     activeNN[${#activeNN[*]}]="$nn"
     activeNN[${#activeNN[*]}]="$nn"
   elif [ "$status" == "standby" ]; then
   elif [ "$status" == "standby" ]; then

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/check_nodemanager_health.sh

@@ -35,7 +35,8 @@ if [[ "$SEC_ENABLED" == "true" ]]; then
   fi
   fi
 fi
 fi
 
 
-RESPONSE=`curl --noproxy $HOST --negotiate -u : -s $NODEMANAGER_URL`
+export no_proxy=$HOST
+RESPONSE=`curl --negotiate -u : -s $NODEMANAGER_URL`
 if [[ "$RESPONSE" == *'"nodeHealthy":true'* ]]; then 
 if [[ "$RESPONSE" == *'"nodeHealthy":true'* ]]; then 
   echo "OK: NodeManager healthy";
   echo "OK: NodeManager healthy";
   exit 0;
   exit 0;

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/check_templeton_status.sh

@@ -35,7 +35,8 @@ if [[ "$SEC_ENABLED" == "true" ]]; then
   fi
   fi
 fi
 fi
 regex="^.*\"status\":\"ok\".*<status_code:200>$"
 regex="^.*\"status\":\"ok\".*<status_code:200>$"
-out=`curl --noproxy $HOST --negotiate -u : -s -w '<status_code:%{http_code}>' http://$HOST:$PORT/templeton/$VERSION/status 2>&1`
+export no_proxy=$HOST
+out=`curl --negotiate -u : -s -w '<status_code:%{http_code}>' http://$HOST:$PORT/templeton/$VERSION/status 2>&1`
 if [[ $out =~ $regex ]]; then
 if [[ $out =~ $regex ]]; then
   out=`echo "$out" | sed -e 's/{/[/g' | sed -e 's/}/]/g'` 
   out=`echo "$out" | sed -e 's/{/[/g' | sed -e 's/}/]/g'` 
   echo "OK: WebHCat Server status [$out]";
   echo "OK: WebHCat Server status [$out]";

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/check_webui.sh

@@ -26,7 +26,8 @@ port=$3
 
 
 checkurl () {
 checkurl () {
   url=$1
   url=$1
-  curl $url --noproxy $host -o /dev/null
+  export no_proxy=$host
+  curl $url -o /dev/null
   echo $?
   echo $?
 }
 }
 
 

+ 8 - 3
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py

@@ -64,14 +64,19 @@ def oozie(is_server=False # TODO: see if see can remove this
       owner=params.oozie_user
       owner=params.oozie_user
     )
     )
 
 
+  environment = {
+    "no_proxy": format("{ambari_server_hostname}")
+  }
+
   if params.jdbc_driver_name == "com.mysql.jdbc.Driver" or \
   if params.jdbc_driver_name == "com.mysql.jdbc.Driver" or \
      params.jdbc_driver_name == "org.postgresql.Driver" or \
      params.jdbc_driver_name == "org.postgresql.Driver" or \
      params.jdbc_driver_name == "oracle.jdbc.driver.OracleDriver":
      params.jdbc_driver_name == "oracle.jdbc.driver.OracleDriver":
     Execute(format("/bin/sh -c 'cd /usr/lib/ambari-agent/ &&\
     Execute(format("/bin/sh -c 'cd /usr/lib/ambari-agent/ &&\
-    curl --noproxy {ambari_server_hostname} \
-    -kf --retry 5 {jdk_location}{check_db_connection_jar_name}\
+    curl -kf \
+    --retry 5 {jdk_location}{check_db_connection_jar_name}\
      -o {check_db_connection_jar_name}'"),
      -o {check_db_connection_jar_name}'"),
-      not_if  = format("[ -f {check_db_connection_jar} ]")
+      not_if  = format("[ -f {check_db_connection_jar} ]"),
+      environment=environment
     )
     )
     
     
   oozie_ownership( )
   oozie_ownership( )

+ 4 - 3
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/files/templetonSmoke.sh

@@ -33,7 +33,8 @@ else
   kinitcmd=""
   kinitcmd=""
 fi
 fi
 
 
-cmd="${kinitcmd}curl --noproxy ${ttonhost} --negotiate -u : -s -w 'http_code <%{http_code}>'    $ttonurl/status 2>&1"
+export no_proxy=$ttonhost
+cmd="${kinitcmd}curl --negotiate -u : -s -w 'http_code <%{http_code}>'    $ttonurl/status 2>&1"
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 
 
@@ -47,7 +48,7 @@ exit 0
 
 
 #try hcat ddl command
 #try hcat ddl command
 echo "user.name=${smoke_test_user}&exec=show databases;" /tmp/show_db.post.txt
 echo "user.name=${smoke_test_user}&exec=show databases;" /tmp/show_db.post.txt
-cmd="${kinitcmd}curl --noproxy ${ttonhost} --negotiate -u : -s -w 'http_code <%{http_code}>' -d  \@${destdir}/show_db.post.txt  $ttonurl/ddl 2>&1"
+cmd="${kinitcmd}curl --negotiate -u : -s -w 'http_code <%{http_code}>' -d  \@${destdir}/show_db.post.txt  $ttonurl/ddl 2>&1"
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 
 
@@ -83,7 +84,7 @@ su - ${smoke_test_user} -c "hadoop dfs -copyFromLocal /etc/passwd $ttonTestInput
 echo -n "user.name=${smoke_test_user}&file=/tmp/$ttonTestScript" > /tmp/pig_post.txt
 echo -n "user.name=${smoke_test_user}&file=/tmp/$ttonTestScript" > /tmp/pig_post.txt
 
 
 #submit pig query
 #submit pig query
-cmd="curl --noproxy ${ttonhost} -s -w 'http_code <%{http_code}>' -d  \@${destdir}/pig_post.txt  $ttonurl/pig 2>&1"
+cmd="curl -s -w 'http_code <%{http_code}>' -d  \@${destdir}/pig_post.txt  $ttonurl/pig 2>&1"
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 retVal=`su - ${smoke_test_user} -c "$cmd"`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
 if [[ "$httpExitCode" -ne "200" ]] ; then
 if [[ "$httpExitCode" -ne "200" ]] ; then

+ 4 - 2
ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_client.py

@@ -40,8 +40,9 @@ class TestHiveClient(RMFTestCase):
       conf_dir = '/etc/hive/conf',
       conf_dir = '/etc/hive/conf',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --noproxy c6401.ambari.apache.org --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
     self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf"),
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf"),
@@ -92,8 +93,9 @@ class TestHiveClient(RMFTestCase):
       conf_dir = '/etc/hive/conf',
       conf_dir = '/etc/hive/conf',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', u"/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --noproxy c6401.ambari.apache.org --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
     self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf"),
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf"),

+ 4 - 2
ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_metastore.py

@@ -176,8 +176,9 @@ class TestHiveMetastore(RMFTestCase):
       conf_dir = '/etc/hive/conf.server',
       conf_dir = '/etc/hive/conf.server',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --noproxy c6401.ambari.apache.org --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/tmp/start_metastore_script',
     self.assertResourceCalled('File', '/tmp/start_metastore_script',
       content = StaticFile('startMetastore.sh'),
       content = StaticFile('startMetastore.sh'),
@@ -233,8 +234,9 @@ class TestHiveMetastore(RMFTestCase):
       conf_dir = '/etc/hive/conf.server',
       conf_dir = '/etc/hive/conf.server',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --noproxy c6401.ambari.apache.org --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/tmp/start_metastore_script',
     self.assertResourceCalled('File', '/tmp/start_metastore_script',
       content = StaticFile('startMetastore.sh'),
       content = StaticFile('startMetastore.sh'),

+ 4 - 2
ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_server.py

@@ -205,8 +205,9 @@ class TestHiveServer(RMFTestCase):
       conf_dir = '/etc/hive/conf.server',
       conf_dir = '/etc/hive/conf.server',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --noproxy c6401.ambari.apache.org --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/tmp/start_hiveserver2_script',
     self.assertResourceCalled('File', '/tmp/start_hiveserver2_script',
       content = StaticFile('startHiveserver2.sh'),
       content = StaticFile('startHiveserver2.sh'),
@@ -290,8 +291,9 @@ class TestHiveServer(RMFTestCase):
       conf_dir = '/etc/hive/conf.server',
       conf_dir = '/etc/hive/conf.server',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --noproxy c6401.ambari.apache.org --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/tmp/start_hiveserver2_script',
     self.assertResourceCalled('File', '/tmp/start_hiveserver2_script',
       content = StaticFile('startHiveserver2.sh'),
       content = StaticFile('startHiveserver2.sh'),

+ 4 - 2
ambari-server/src/test/python/stacks/1.3.2/hooks/before-INSTALL/test_before_install.py

@@ -28,18 +28,20 @@ class TestHookBeforeInstall(RMFTestCase):
                        command="hook",
                        command="hook",
                        config_file="default.json"
                        config_file="default.json"
     )
     )
-    self.assertResourceCalled('Execute', 'mkdir -p /tmp/HDP-artifacts/ ; curl -kf --noproxy c6401.ambari.apache.org --retry 10 http://c6401.ambari.apache.org:8080/resources//jdk-7u45-linux-x64.tar.gz -o /tmp/HDP-artifacts//jdk-7u45-linux-x64.tar.gz',
+    self.assertResourceCalled('Execute', 'mkdir -p /tmp/HDP-artifacts/ ; curl -kf --retry 10 http://c6401.ambari.apache.org:8080/resources//jdk-7u45-linux-x64.tar.gz -o /tmp/HDP-artifacts//jdk-7u45-linux-x64.tar.gz',
         not_if = 'test -e /usr/jdk64/jdk1.7.0_45/bin/java',
         not_if = 'test -e /usr/jdk64/jdk1.7.0_45/bin/java',
         path = ['/bin', '/usr/bin/'],
         path = ['/bin', '/usr/bin/'],
+        environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('Execute', 'mkdir -p /usr/jdk64 ; cd /usr/jdk64 ; tar -xf /tmp/HDP-artifacts//jdk-7u45-linux-x64.tar.gz > /dev/null 2>&1',
     self.assertResourceCalled('Execute', 'mkdir -p /usr/jdk64 ; cd /usr/jdk64 ; tar -xf /tmp/HDP-artifacts//jdk-7u45-linux-x64.tar.gz > /dev/null 2>&1',
         not_if = 'test -e /usr/jdk64/jdk1.7.0_45/bin/java',
         not_if = 'test -e /usr/jdk64/jdk1.7.0_45/bin/java',
         path = ['/bin', '/usr/bin/'],
         path = ['/bin', '/usr/bin/'],
     )
     )
-    self.assertResourceCalled('Execute', 'mkdir -p /tmp/HDP-artifacts/; curl -kf --noproxy c6401.ambari.apache.org --retry 10 http://c6401.ambari.apache.org:8080/resources//UnlimitedJCEPolicyJDK7.zip -o /tmp/HDP-artifacts//UnlimitedJCEPolicyJDK7.zip',
+    self.assertResourceCalled('Execute', 'mkdir -p /tmp/HDP-artifacts/; curl -kf --retry 10 http://c6401.ambari.apache.org:8080/resources//UnlimitedJCEPolicyJDK7.zip -o /tmp/HDP-artifacts//UnlimitedJCEPolicyJDK7.zip',
         not_if = 'test -e /tmp/HDP-artifacts//UnlimitedJCEPolicyJDK7.zip',
         not_if = 'test -e /tmp/HDP-artifacts//UnlimitedJCEPolicyJDK7.zip',
         ignore_failures = True,
         ignore_failures = True,
         path = ['/bin', '/usr/bin/'],
         path = ['/bin', '/usr/bin/'],
+        environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('Group', 'hadoop',
     self.assertResourceCalled('Group', 'hadoop',
         ignore_failures = False,
         ignore_failures = False,

+ 4 - 2
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py

@@ -48,8 +48,9 @@ class TestHiveClient(RMFTestCase):
       conf_dir = '/etc/hive/conf',
       conf_dir = '/etc/hive/conf',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl --noproxy c6401.ambari.apache.org -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
     self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf"),
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf"),
@@ -108,8 +109,9 @@ class TestHiveClient(RMFTestCase):
       conf_dir = '/etc/hive/conf',
       conf_dir = '/etc/hive/conf',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl --noproxy c6401.ambari.apache.org -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
     self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf"),
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf"),

+ 4 - 2
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py

@@ -168,8 +168,9 @@ class TestHiveMetastore(RMFTestCase):
       conf_dir = '/etc/hive/conf.server',
       conf_dir = '/etc/hive/conf.server',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl --noproxy c6401.ambari.apache.org -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),
@@ -232,8 +233,9 @@ class TestHiveMetastore(RMFTestCase):
       conf_dir = '/etc/hive/conf.server',
       conf_dir = '/etc/hive/conf.server',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl --noproxy c6401.ambari.apache.org -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),

+ 4 - 2
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py

@@ -259,8 +259,9 @@ class TestHiveServer(RMFTestCase):
       conf_dir = '/etc/hive/conf.server',
       conf_dir = '/etc/hive/conf.server',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl --noproxy c6401.ambari.apache.org -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),
@@ -352,8 +353,9 @@ class TestHiveServer(RMFTestCase):
       conf_dir = '/etc/hive/conf.server',
       conf_dir = '/etc/hive/conf.server',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl --noproxy c6401.ambari.apache.org -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'}
     )
     )
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),

+ 4 - 2
ambari-server/src/test/python/stacks/2.0.6/hooks/before-INSTALL/test_before_install.py

@@ -30,18 +30,20 @@ class TestHookBeforeInstall(RMFTestCase):
     )
     )
     self.assertResourceCalled('Package', 'unzip',)
     self.assertResourceCalled('Package', 'unzip',)
     self.assertResourceCalled('Package', 'curl',)
     self.assertResourceCalled('Package', 'curl',)
-    self.assertResourceCalled('Execute', 'mkdir -p /tmp/HDP-artifacts/ ;   curl --noproxy c6401.ambari.apache.org -kf   --retry 10 http://c6401.ambari.apache.org:8080/resources//jdk-7u45-linux-x64.tar.gz -o /tmp/HDP-artifacts//jdk-7u45-linux-x64.tar.gz',
+    self.assertResourceCalled('Execute', 'mkdir -p /tmp/HDP-artifacts/ ;   curl -kf   --retry 10 http://c6401.ambari.apache.org:8080/resources//jdk-7u45-linux-x64.tar.gz -o /tmp/HDP-artifacts//jdk-7u45-linux-x64.tar.gz',
         not_if = 'test -e /usr/jdk64/jdk1.7.0_45/bin/java',
         not_if = 'test -e /usr/jdk64/jdk1.7.0_45/bin/java',
         path = ['/bin', '/usr/bin/'],
         path = ['/bin', '/usr/bin/'],
+        environment = {'no_proxy': 'c6401.ambari.apache.org'},
     )
     )
     self.assertResourceCalled('Execute', 'mkdir -p /usr/jdk64 ; cd /usr/jdk64 ; tar -xf /tmp/HDP-artifacts//jdk-7u45-linux-x64.tar.gz > /dev/null 2>&1',
     self.assertResourceCalled('Execute', 'mkdir -p /usr/jdk64 ; cd /usr/jdk64 ; tar -xf /tmp/HDP-artifacts//jdk-7u45-linux-x64.tar.gz > /dev/null 2>&1',
         not_if = 'test -e /usr/jdk64/jdk1.7.0_45/bin/java',
         not_if = 'test -e /usr/jdk64/jdk1.7.0_45/bin/java',
         path = ['/bin', '/usr/bin/'],
         path = ['/bin', '/usr/bin/'],
     )
     )
-    self.assertResourceCalled('Execute', 'mkdir -p /tmp/HDP-artifacts/;     curl --noproxy c6401.ambari.apache.org -kf --retry 10     http://c6401.ambari.apache.org:8080/resources//UnlimitedJCEPolicyJDK7.zip -o /tmp/HDP-artifacts//UnlimitedJCEPolicyJDK7.zip',
+    self.assertResourceCalled('Execute', 'mkdir -p /tmp/HDP-artifacts/;     curl -kf --retry 10     http://c6401.ambari.apache.org:8080/resources//UnlimitedJCEPolicyJDK7.zip -o /tmp/HDP-artifacts//UnlimitedJCEPolicyJDK7.zip',
         not_if = 'test -e /tmp/HDP-artifacts//UnlimitedJCEPolicyJDK7.zip',
         not_if = 'test -e /tmp/HDP-artifacts//UnlimitedJCEPolicyJDK7.zip',
         ignore_failures = True,
         ignore_failures = True,
         path = ['/bin', '/usr/bin/'],
         path = ['/bin', '/usr/bin/'],
+        environment = {'no_proxy': 'c6401.ambari.apache.org'},
     )
     )
     self.assertResourceCalled('Group', 'hadoop',
     self.assertResourceCalled('Group', 'hadoop',
         ignore_failures = False,
         ignore_failures = False,

+ 4 - 2
ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py

@@ -126,8 +126,9 @@ class TestHiveMetastore(RMFTestCase):
       conf_dir = '/etc/hive/conf.server',
       conf_dir = '/etc/hive/conf.server',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl --noproxy c6401.ambari.apache.org -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'},
     )
     )
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),
@@ -193,8 +194,9 @@ class TestHiveMetastore(RMFTestCase):
       conf_dir = '/etc/hive/conf.server',
       conf_dir = '/etc/hive/conf.server',
       configurations = self.getConfig()['configurations']['hive-site'],
       configurations = self.getConfig()['configurations']['hive-site'],
     )
     )
-    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl --noproxy c6401.ambari.apache.org -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
+    self.assertResourceCalled('Execute', "/bin/sh -c 'cd /usr/lib/ambari-agent/ && curl -kf --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar -o DBConnectionVerification.jar'",
       not_if = '[ -f DBConnectionVerification.jar]',
       not_if = '[ -f DBConnectionVerification.jar]',
+      environment = {'no_proxy': 'c6401.ambari.apache.org'},
     )
     )
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
     self.assertResourceCalled('File', '/etc/hive/conf.server/hive-env.sh',
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),
       content = Template('hive-env.sh.j2', conf_dir="/etc/hive/conf.server"),