You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by zm...@apache.org on 2016/11/04 18:45:55 UTC

aurora git commit: Log TaskInfo and Assigned Task on task startup.

Repository: aurora
Updated Branches:
  refs/heads/master 35435cba9 -> fb936b545


Log TaskInfo and Assigned Task on task startup.

The executor logs `ExecutorInfo`, `FrameworkInfo`, `SlaveInfo` on startup. This
adds logging of `TaskInfo` and the Assigned Task object when it is received.

Testing Done:
Launched a task in vagrant and checked the logs. Example output:
````
I1103 09:55:40.991879 24713 executor_base.py:45] Executor [None]: TaskInfo: name: "www-data/prod/hello"
task_id {
  value: "www-data-prod-hello-0-f33684f5-58a7-4dbe-af8c-a4fe08a862b6"
}
slave_id {
  value: "d8988ce6-c900-49a1-897d-bc141f390394-S0"
}
resources {
  name: "disk"
  type: SCALAR
  scalar {
    value: 128.0
  }
  role: "*"
}
resources {
  name: "cpus"
  type: SCALAR
  scalar {
    value: 0.5
  }
  role: "aurora-role"
}
resources {
  name: "cpus"
  type: SCALAR
  scalar {
    value: 0.5
  }
  role: "*"
}
resources {
  name: "mem"
  type: SCALAR
  scalar {
    value: 128.0
  }
  role: "aurora-role"
}
executor {
  executor_id {
    value: "thermos-www-data-prod-hello-0-f33684f5-58a7-4dbe-af8c-a4fe08a862b6"
  }
  resources {
    name: "cpus"
    type: SCALAR
    scalar {
      value: 0.25
    }
    role: "*"
  }
  resources {
    name: "mem"
    type: SCALAR
    scalar {
      value: 128.0
    }
    role: "aurora-role"
  }
  command {
    uris {
      value: "/home/vagrant/aurora/dist/thermos_executor.pex"
      executable: true
    }
    value: "${MESOS_SANDBOX=.}/thermos_executor.pex --announcer-ensemble localhost:2181 --announcer-zookeeper-auth-config /home/vagrant/aurora/examples/vagrant/config/announcer-auth.json --mesos-containerizer-path=/usr/libexec/mesos/mesos-containerizer"
  }
  framework_id {
    value: "d8988ce6-c900-49a1-897d-bc141f390394-0000"
  }
  name: "AuroraExecutor"
  source: "www-data.prod.hello.0"
  labels {
    labels {
      key: "source"
      value: "www-data.prod.hello.0"
    }
  }
}
data: "\013\000\001\000\000\000:www-data-prod-hello-0-f33684f5-58a7-4dbe-af8c-a4fe08a862b6\013\000\002\000\000\000\'d8988ce6-c900-49a1-897d-bc141f390394-S0\013\000\003\000\000\000\014192.168.33.7\014\000\004\002\000\007\001\004\000\010?\360\000\000\000\000\000\000\n\000\t\000\000\000\000\000\000\000\200\n\000\n\000\000\000\000\000\000\000\200\010\000\013\000\000\000\000\010\000\r\000\000\000\001\014\000\021\013\000\002\000\000\000\007vagrant\000\002\000\022\000\016\000\024\014\000\000\000\000\016\000\025\013\000\000\000\000\r\000\026\013\013\000\000\000\000\014\000\031\013\000\001\000\000\000\016AuroraExecutor\013\000\002\000\000\004\021{\"environment\": \"prod\", \"health_check_config\": {\"initial_interval_secs\": 15.0, \"health_checker\": {\"http\": {\"expected_response_code\": 0, \"endpoint\": \"/health\", \"expected_response\": \"ok\"}}, \"interval_secs\": 10.0, \"timeout_secs\": 1.0, \"max_consecutive_failures\": 0}, \"name\": \"hello\", \"service\": true, \"max_task_failures\"
 : 1, \"cron_collision_policy\": \"KILL_EXISTING\", \"enable_hooks\": false, \"cluster\": \"devcluster\", \"task\": {\"processes\": [{\"daemon\": false, \"name\": \"hello\", \"ephemeral\": false, \"max_failures\": 1, \"min_duration\": 5, \"cmdline\": \"\n    while true; do\n      echo hello world\n      sleep 10\n    done\n  \", \"final\": false}], \"name\": \"hello\", \"finalization_wait\": 30, \"max_failures\": 1, \"max_concurrency\": 0, \"resources\": {\"gpu\": 0, \"disk\": 134217728, \"ram\": 134217728, \"cpu\": 1.0}, \"constraints\": [{\"order\": [\"hello\"]}]}, \"production\": false, \"role\": \"www-data\", \"tier\": \"preemptible\", \"lifecycle\": {\"http\": {\"graceful_shutdown_endpoint\": \"/quitquitquit\", \"port\": \"health\", \"shutdown_endpoint\": \"/abortabortabort\"}}, \"priority\": 0}\000\016\000\033\014\000\000\000\000\014\000\034\013\000\001\000\000\000\010www-data\013\000\002\000\000\000\004prod\013\000\003\000\000\000\005hello\000\014\000\035\014\000\001\017\000\0
 02\014\000\000\000\000\000\000\013\000\036\000\000\000\013preemptible\016\000 \014\000\000\000\003\004\000\001?\360\000\000\000\000\000\000\000\n\000\003\000\000\000\000\000\000\000\200\000\n\000\002\000\000\000\000\000\000\000\200\000\016\000!\014\000\000\000\000\000\r\000\005\013\010\000\000\000\000\010\000\006\000\000\000\000\000"
labels {
  labels {
    key: "org.apache.aurora.tier"
    value: "preemptible"
  }
}
discovery {
  visibility: CLUSTER
  name: "hello.prod.www-data"
  environment: "prod"
  location: "devcluster"
}

I1103 09:55:40.991996 24713 executor_base.py:45] Executor [None]: launchTask got task: www-data/prod/hello:www-data-prod-hello-0-f33684f5-58a7-4dbe-af8c-a4fe08a862b6
I1103 09:55:40.993160 24713 executor_base.py:45] Executor [d8988ce6-c900-49a1-897d-bc141f390394-S0]: Assigned task: AssignedTask(task=TaskConfig(isService=True, contactEmail=None, taskLinks={}, tier='preemptible', mesosFetcherUris=set([]), executorConfig=ExecutorConfig(data='{"environment": "prod", "health_check_config": {"initial_interval_secs": 15.0, "health_checker": {"http": {"expected_response_code": 0, "endpoint": "/health", "expected_response": "ok"}}, "interval_secs": 10.0, "timeout_secs": 1.0, "max_consecutive_failures": 0}, "name": "hello", "service": true, "max_task_failures": 1, "cron_collision_policy": "KILL_EXISTING", "enable_hooks": false, "cluster": "devcluster", "task": {"processes": [{"daemon": false, "name": "hello", "ephemeral": false, "max_failures": 1, "min_duration": 5, "cmdline": "\n    while true; do\n      echo hello world\n      sleep 10\n    done\n  ", "final": false}], "name": "hello", "finalization_wait": 30, "max_failures": 1, "max_concurrency": 0, "res
 ources": {"gpu": 0, "disk": 134217728, "ram": 134217728, "cpu": 1.0}, "constraints": [{"order": ["hello"]}]}, "production": false, "role": "www-data", "tier": "preemptible", "lifecycle": {"http": {"graceful_shutdown_endpoint": "/quitquitquit", "port": "health", "shutdown_endpoint": "/abortabortabort"}}, "priority": 0}', name='AuroraExecutor'), requestedPorts=set([]), maxTaskFailures=1, priority=0, ramMb=128, job=JobKey(environment='prod', role='www-data', name='hello'), production=False, diskMb=128, resources=set([Resource(ramMb=None, numGpus=None, namedPort=None, diskMb=None, numCpus=1.0), Resource(ramMb=128, numGpus=None, namedPort=None, diskMb=None, numCpus=None), Resource(ramMb=None, numGpus=None, namedPort=None, diskMb=128, numCpus=None)]), owner=Identity(user='vagrant'), container=Container(docker=None, mesos=MesosContainer(image=None, volumes=[])), metadata=set([]), numCpus=1.0, constraints=set([])), taskId='www-data-prod-hello-0-f33684f5-58a7-4dbe-af8c-a4fe08a862b6', instanc
 eId=0, assignedPorts={}, slaveHost='192.168.33.7', slaveId='d8988ce6-c900-49a1-897d-bc141f390394-S0')
````

Bugs closed: AURORA-1792

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


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

Branch: refs/heads/master
Commit: fb936b5453fe447e226fbb4ea8d44433b4b95228
Parents: 35435cb
Author: Zameer Manji <zm...@apache.org>
Authored: Fri Nov 4 11:45:45 2016 -0700
Committer: Zameer Manji <zm...@apache.org>
Committed: Fri Nov 4 11:45:45 2016 -0700

----------------------------------------------------------------------
 src/main/python/apache/aurora/executor/aurora_executor.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/fb936b54/src/main/python/apache/aurora/executor/aurora_executor.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/executor/aurora_executor.py b/src/main/python/apache/aurora/executor/aurora_executor.py
index ce5ef68..aee5e56 100644
--- a/src/main/python/apache/aurora/executor/aurora_executor.py
+++ b/src/main/python/apache/aurora/executor/aurora_executor.py
@@ -255,6 +255,7 @@ class AuroraExecutor(ExecutorBase, Observable):
       however, no other callbacks will be invoked on this executor until this callback has returned.
     """
     self.launched.set()
+    self.log('TaskInfo: %s' % task)
     self.log('launchTask got task: %s:%s' % (task.name, task.task_id.value))
 
     # TODO(wickman)  Update the tests to call registered(), then remove this line and issue
@@ -271,6 +272,7 @@ class AuroraExecutor(ExecutorBase, Observable):
     self._task_id = task.task_id.value
 
     assigned_task = self.validate_task(task)
+    self.log("Assigned task: %s" % assigned_task)
     if not assigned_task:
       self.send_update(driver, self._task_id, mesos_pb2.TASK_FAILED,
           'Could not deserialize task.')