Browse Source

AMBARI-4361. Rolling restart failure tolerance should be percentage values. (srimanth)

Srimanth Gunturi 11 years ago
parent
commit
18c04fa8ca

+ 1 - 1
ambari-web/app/utils/ajax.js

@@ -1286,7 +1286,7 @@ var urls = {
             }, {
             }, {
               "batch_settings" : {
               "batch_settings" : {
                 "batch_separation_in_seconds" : data.intervalTimeSeconds,
                 "batch_separation_in_seconds" : data.intervalTimeSeconds,
-                "task_failure_tolerance" : data.tolerateSize
+                "task_failure_tolerance" : data.toleratePercentage
               }
               }
             } ]
             } ]
           }
           }

+ 1 - 1
ambari-web/app/utils/batch_scheduled_requests.js

@@ -143,7 +143,7 @@ module.exports = {
       },
       },
       data: {
       data: {
         intervalTimeSeconds: intervalTimeSeconds,
         intervalTimeSeconds: intervalTimeSeconds,
-        tolerateSize: tolerateSize,
+        toleratePercentage : String(Math.round((100 * tolerateSize) / restartHostComponents.length)),
         batches: this.getBatchesForRollingRestartRequest(restartHostComponents, batchSize)
         batches: this.getBatchesForRollingRestartRequest(restartHostComponents, batchSize)
       },
       },
       success: 'successCallback',
       success: 'successCallback',