aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Raimbert <>
Subject Review Request 58167: Fix Thermos Health Check for MesosContainerizer with `--nosetuid-health-checks`
Date Tue, 04 Apr 2017 05:47:47 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for Aurora, Stephan Erb and Zameer Manji.

Bugs: AURORA-1909

Repository: aurora


With MesosContainerizer, the health check is performed using a "mesos-containerizer launch"
process, but there is actually a code bug in the way of getting the user under which to run
the health check process:
health_check_user = (os.getusername() if self._nosetuid_health_checks
            else assigned_task.task.job.role)

If the scheduler is configured with `--nosetuid-health-checks` then "os.getusername()" is
executed, but the "os" python module does not present any "getusername()" function, which
leads the Thermos execution to abort as follow:
D0323 01:08:15.453372 16] Task started.
E0323 01:08:15.571124 16] Traceback (most recent call last):
File "apache/aurora/executor/", line 119, in _run
self._start_status_manager(driver, assigned_task)
File "apache/aurora/executor/", line 168, in _start_status_manager
status_checker = status_provider.from_assigned_task(assigned_task, self._sandbox)
File "apache/aurora/executor/common/", line 370, in from_assigned_task
health_check_user = (os.getusername() if self._nosetuid_health_checks
AttributeError: 'module' object has no attribute 'getusername'

Following the existing unit testing pattern from, a test case was added
to cover the `--nosetuid-health-checks` case for MesosContainerizer.


  src/main/python/apache/aurora/executor/common/ 5bb4768ee3cf571f72580777c291448d372223c0

  src/test/python/apache/aurora/executor/common/ adf3ac070c9121d0c6b09bc4dcaee2dc2eb89bc2



With Vagrant:
- ./pants test.pytest src/{test,main}/python:: -- -v
- ./build-support/jenkins/
- ./src/test/sh/org/apache/aurora/e2e/


Charles Raimbert

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message