mesosphere / marathon

Deploy and manage containers (including Docker) on top of Apache Mesos at scale.
https://mesosphere.github.io/marathon/
Apache License 2.0
4.07k stars 845 forks source link

cmdline switch --mesos_user has no effect #2285

Closed metskem closed 9 years ago

metskem commented 9 years ago

I am running marathon 0.10.1 and would like to run mesos tasks with a non-root user. I first tried with specifying "user" in the json like:

{
  "id": "user",
  "cmd": "echo \"running with user `id`\" && python -m SimpleHTTPServer $PORT0",
  "user":"taskuser"
}

This works fine, I checkes with the ps command and the process is running with the OS userid "taskuser".

Now I want this to be the default behavior and start marathon with the cmdline option "--mesos_user taskuser" .

Checking /v2/info confirms the option has been seen :

{
    "name": "marathon",
    "http_config": {
        "assets_path": null,
        "http_port": 8080,
        "https_port": 8443
    },
    "frameworkId": "20150920-144245-16842879-5050-19-0000",
    "leader": "athena:8080",
    "event_subscriber": null,
    "marathon_config": {
        "local_port_max": 20000,
        "local_port_min": 10000,
        "hostname": "athena",
        "master": "zk://localhost:2181/mesos",
        "reconciliation_interval": 300000,
        "leader_proxy_read_timeout_ms": 10000,
        "leader_proxy_connection_timeout_ms": 5000,
        "mesos_role": null,
        "task_launch_timeout": 300000,
        "reconciliation_initial_delay": 15000,
        "ha": true,
        "failover_timeout": 604800,
        "checkpoint": true,
        "webui_url": null,
        "executor": "//cmd",
        "marathon_store_timeout": 2000,
        "mesos_user": "taskuser",
        "framework_name": "marathon"
    },
    "version": "0.10.1",
    "zookeeper_config": {
        "zk": "zk://localhost:2181/marathon",
        "zk_timeout": 10000,
        "zk_session_timeout": 1800000,
        "zk_max_versions": 25
    },
    "elected": true
}

However, when running tasks without the "user" specified in the POSTed json, the tasks still run with the root user.

Am I missing something here? kind regards, Harry

metskem commented 9 years ago

Today I recycled the complete cluster and all slaves, now I see it just works, so closing the issue again, sorry for the disturbance.