You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by ma...@apache.org on 2014/05/28 23:21:24 UTC

git commit: Dropping restart_threshold > watch_secs check.

Repository: incubator-aurora
Updated Branches:
  refs/heads/master 7277525a3 -> 80950844e


Dropping restart_threshold > watch_secs check.

Bugs closed: AURORA-479

Reviewed at https://reviews.apache.org/r/21952/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/80950844
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/80950844
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/80950844

Branch: refs/heads/master
Commit: 80950844ee86697cad11438b77a016b5659cfa02
Parents: 7277525
Author: Maxim Khutornenko <ma...@apache.org>
Authored: Wed May 28 14:21:06 2014 -0700
Committer: Maxim Khutornenko <ma...@apache.org>
Committed: Wed May 28 14:21:06 2014 -0700

----------------------------------------------------------------------
 src/main/python/apache/aurora/client/config.py      |  8 --------
 src/test/python/apache/aurora/client/test_config.py | 11 -----------
 2 files changed, 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/80950844/src/main/python/apache/aurora/client/config.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/config.py b/src/main/python/apache/aurora/client/config.py
index b4b9a96..3b01792 100644
--- a/src/main/python/apache/aurora/client/config.py
+++ b/src/main/python/apache/aurora/client/config.py
@@ -132,10 +132,6 @@ UpdateConfig.watch_secs must be greater than %d seconds to account for an initia
 health check interval (%d seconds) plus %d consecutive failures at a check interval of %d seconds.
 '''
 
-RESTART_THRESHOLD_INSUFFICIENT_ERROR = '''
-restart_threshold in update_config must be greater than watch_secs.
-'''
-
 def _validate_update_config(config):
   job_size = config.instances()
   update_config = config.update_config()
@@ -143,7 +139,6 @@ def _validate_update_config(config):
 
   max_failures = update_config.max_total_failures().get()
   watch_secs = update_config.watch_secs().get()
-  restart_threshold = update_config.restart_threshold().get()
   initial_interval_secs = health_check_config.initial_interval_secs().get()
   max_consecutive_failures = health_check_config.max_consecutive_failures().get()
   interval_secs = health_check_config.interval_secs().get()
@@ -161,9 +156,6 @@ def _validate_update_config(config):
     die(WATCH_SECS_INSUFFICIENT_ERROR_FORMAT %
         (watch_secs, target_watch, initial_interval_secs, max_consecutive_failures, interval_secs))
 
-  if restart_threshold <= watch_secs:
-    die(RESTART_THRESHOLD_INSUFFICIENT_ERROR)
-
 
 HEALTH_CHECK_INTERVAL_SECS_ERROR = '''
 health_check_interval_secs paramater to Job has been deprecated. Please specify health_check_config

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/80950844/src/test/python/apache/aurora/client/test_config.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/test_config.py b/src/test/python/apache/aurora/client/test_config.py
index 4eb081a..4b3e149 100644
--- a/src/test/python/apache/aurora/client/test_config.py
+++ b/src/test/python/apache/aurora/client/test_config.py
@@ -203,14 +203,3 @@ def test_update_config_fails_insufficient_watch_secs_equal_to_target():
 
   with pytest.raises(SystemExit):
     config._validate_update_config(AuroraConfig(base_job))
-
-
-def test_update_config_fails_insufficient_restart_threshold():
-  base_job = Job(
-    name='hello_world', role='john_doe', cluster='test-cluster',
-    update_config = UpdateConfig(watch_secs=70),
-    task=Task(name='main', processes=[],
-              resources=Resources(cpu=0.1, ram=64 * MB, disk=64 * MB)))
-
-  with pytest.raises(SystemExit):
-    config._validate_update_config(AuroraConfig(base_job))