ソースを参照

AMBARI-1862. Nagios credentials are freely available at ambari-agent.log. (smohanty)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1466297 13f79535-47bb-0310-9956-ffa450edef68
Sumit Mohanty 12 年 前
コミット
b1b15007d8

+ 3 - 0
CHANGES.txt

@@ -677,6 +677,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1862. Nagios credentials are freely available at ambari-agent.log. 
+ (smohanty)
+
  AMBARI-1726. It seems upgrades available at the FE is hard-coded to 1.3.0. 
  (yusaku via srimanth)
 

+ 1 - 1
ambari-agent/src/main/python/ambari_agent/Heartbeat.py

@@ -59,7 +59,7 @@ class Heartbeat:
       heartbeat['reports'] = queueResult['reports']
       heartbeat['componentStatus'] = queueResult['componentStatus']
       pass
-    logger.info("Heartbeat : " + pformat(heartbeat))
+    logger.debug("Heartbeat : " + pformat(heartbeat))
 
     if (int(id) >= 0) and state_interval > 0 and (int(id) % state_interval) == 0:
       hostInfo = HostInfo()

+ 1 - 1
ambari-agent/src/main/python/ambari_agent/PuppetExecutor.py

@@ -194,7 +194,7 @@ class PuppetExecutor:
     else:
       result["stderr"] = str(error)
     puppetOutput = open(tmpoutfile, 'r').read()
-    logger.info("Output from puppet :\n" + puppetOutput)
+    logger.debug("Output from puppet :\n" + puppetOutput)
     logger.info("Puppet exit code is " + str(returncode))
     if result.has_key("exitcode"):
       result["exitcode"] = max(returncode, result["exitcode"])

+ 4 - 0
ambari-agent/src/main/python/ambari_agent/manifestGenerator.py

@@ -27,6 +27,7 @@ from datetime import datetime
 import AmbariConfig
 import pprint
 import hostname
+import stat
 
 logger = logging.getLogger()
 
@@ -75,6 +76,9 @@ def generateManifest(parsedJson, fileName, modulesdir, ambariconfig):
             'roleParams' : roleParams}]
   #writing manifest
   manifest = open(fileName, 'w')
+  #Change mode to make site.pp files readable to owner and group only
+  os.chmod(fileName, stat.S_IRWXU)
+
   #Check for Ambari Config and make sure you pick the right imports file
     
   #writing imports from external static file

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java

@@ -401,7 +401,7 @@ class ActionScheduler implements Runnable {
     }
     s.setLastAttemptTime(hostname, roleStr, now);
     s.incrementAttemptCount(hostname, roleStr);
-    LOG.info("Scheduling command: "+cmd.toString()+" for host: "+hostname);
+    LOG.debug("Scheduling command: "+cmd.toString()+" for host: "+hostname);
     /** change the hostname in the command for the host itself **/
     cmd.setHostname(hostsMap.getHostMap(hostname));
     actionQueue.enqueue(hostname, cmd);

+ 2 - 2
ambari-server/src/main/java/org/apache/ambari/server/api/services/PersistKeyValueService.java

@@ -50,7 +50,7 @@ public class PersistKeyValueService {
   public Response update(String keyValues)
       throws WebApplicationException, InvalidStateTransitionException,
       JAXBException, IOException {
-    LOG.info("Received message from UI " + keyValues);
+    LOG.debug("Received message from UI " + keyValues);
     Map<String, String> keyValuesMap = StageUtils.fromJson(keyValues, Map.class);
     /* Call into the heartbeat handler */
 
@@ -88,7 +88,7 @@ public class PersistKeyValueService {
   public String getAllKeyValues() throws JAXBException, IOException {
     Map<String, String> ret = persistKeyVal.getAllKeyValues();
     String stringRet = StageUtils.jaxbToString(ret);
-    LOG.info("Returning " + stringRet);
+    LOG.debug("Returning " + stringRet);
     return stringRet;
   }
 }