Benjamin Bannier created MESOS-7805:
---------------------------------------

             Summary: mesos-execute has incorrect example TaskInfo in help 
string
                 Key: MESOS-7805
                 URL: https://issues.apache.org/jira/browse/MESOS-7805
             Project: Mesos
          Issue Type: Bug
          Components: documentation
    Affects Versions: 1.4.0
            Reporter: Benjamin Bannier


{{mesos-execute}} documents that a task can be defined via JSON as
{noformat}
{
  "name": "Name of the task",
  "task_id": {"value" : "Id of the task"},
  "agent_id": {"value" : ""},
  "resources": [
    {
      "name": "cpus",
      "type": "SCALAR",
      "scalar": {
        "value": 0.1
      },
      "role": "*"
    },
    {
      "name": "mem",
      "type": "SCALAR",
      "scalar": {
        "value": 32
      },
      "role": "*"
    }
  ],
  "command": {
    "value": "sleep 1000"
  }
}
{noformat}

If one actually uses that example task definition one gets
{noformat}
% ./build/src/mesos-execute --master=127.0.0.1:5050 --task=task.json
WARNING: Logging before InitGoogleLogging() is written to STDERR
W0719 17:08:17.909696 3291313088 parse.hpp:114] Specifying an absolute filename 
to read a command line option out of without using 'file:// is deprecated and 
will be removed in a future release. Simply adding 'file://' to the beginning 
of the path should eliminate this warning.
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
I0719 17:08:17.919190 119246848 scheduler.cpp:184] Version: 1.4.0
I0719 17:08:17.923991 119783424 scheduler.cpp:470] New master detected at 
master@127.0.0.1:5050
Subscribed with ID bb0d36b4-fee0-4412-9cd9-1fa4e330355c-0000
F0719 17:08:18.137984 119783424 resources.cpp:1081] Check failed: 
!resource.has_role()
*** Check failure stack trace: ***
    @        0x101d65f5f  google::LogMessageFatal::~LogMessageFatal()
    @        0x101d62609  google::LogMessageFatal::~LogMessageFatal()
    @        0x1016ef3a3  mesos::v1::Resources::isEmpty()
    @        0x1016ed267  mesos::v1::Resources::add()
    @        0x1016f05af  mesos::v1::Resources::operator+=()
    @        0x1016f08fb  mesos::v1::Resources::Resources()
    @        0x100c0d89f  CommandScheduler::offers()
    @        0x100c085e4  CommandScheduler::received()
    @        0x100c0ae06  
_ZZN7process8dispatchI16CommandSchedulerNSt3__15queueIN5mesos2v19scheduler5EventENS2_5dequeIS7_NS2_9allocatorIS7_EEEEEESC_EEvRKNS_3PIDIT_EEMSE_FvT0_ET1_ENKUlPNS_11ProcessBaseEE_clESN_
    @        0x101ce5a21  process::ProcessBase::visit()
    @        0x101ce3747  process::ProcessManager::resume()
    @        0x101d0e243  
_ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN7process14ProcessManager12init_threadsEvE3$_0EEEEEPvSB_
    @     0x7fffbb5d693b  _pthread_body
    @     0x7fffbb5d6887  _pthread_start
    @     0x7fffbb5d608d  thread_start
[1]    73521 abort      ./build/src/mesos-execute --master=127.0.0.1:5050 
--task=task.json
{noformat}

Removing the resource role field allows the task to execute.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to