I am using createJob api  to create a job but not able to create a job,
getting the following. someone please let me know the correct json
message": "Job configuration does not have instanceCount set."
My aurora schedule running at -> http://myserver.com:8081/apibeta/createJob
Using - Post
Content-Type -> application/json
Json used ->
BODY <http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3>

{
  "description": {
    "instanceCount" : 1,
    "key": {
      "role": "root",
      "environment": "test",
      "name": "abc_1"
    },
    "owner": {
      "role": "root",
      "user": "root"
    },
    "cronSchedule": null,
    "cronCollisionPolicy":"KILL_EXISTING",
    "taskConfig": {
      "owner": {
        "role": "root",
        "user": "root"
      },
      "environment": "test",
      "jobName": "abc_1",
      "isService": true,
      "numCpus": 0.2,
      "ramMb": 1000,
      "diskMb": 1000,
      "priority": 0,
      "maxTaskFailures": 1,
      "production": false,
      "constraints": [],
      "requestedPorts": [],
      "taskLinks": {},
      "contactEmail" : "prd...@ebay.com",
      "executorConfig": {
        "name": "AuroraExecutor",
        "data": "{\"priority\": 0, \"health_check_config\":
{\"initial_interval_secs\": 15.0, \"interval_secs\": 10.0,
\"timeout_secs\": 1.0, \"max_consecutive_failures\": 0}, \"name\":
\"abc_1\", \"environment\": \"test\", \"max_task_failures\": 1,
\"task\": {\"processes\": [{\"daemon\": false, \"name\":
\"fetch_package\", \"ephemeral\": false, \"max_failures\": 1,
\"min_duration\": 5, \"cmdline\": \"cp
/ci-master-home/ciapi/jenkins-master-config-scripts/create_ci.bash .
\u0026\u0026 chmod +x create_ci.bash\", \"final\": false},
{\"daemon\": false, \"name\": \"jenkins_world\", \"ephemeral\": false,
\"max_failures\": 1, \"min_duration\": 5, \"cmdline\": \"bash
create_ci.bash start abc_1 qa\", \"final\": false}], \"name\":
\"fetch_package\", \"finalization_wait\": 30, \"max_failures\": 1,
\"max_concurrency\": 0, \"resources\": {\"disk\": 1048576000, \"ram\":
1048576000, \"cpu\": 0.2}, \"constraints\": [{\"order\":
[\"fetch_package\", \"jenkins_world\"]}]}, \"enable_hooks\": false,
\"cluster\": \"ciaas\", \"production\": false, \"role\": \"root\"}"
      },
      "metadata": []
    }
  },
  "session": {
    "mechanism": "UNAUTHENTICATED",
    "data": "YW55IGNhcm5hbCBwbGVhcw"
  },
  "lock":null
}


200 OK <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1>
{
"responseCode": "INVALID_REQUEST",
"messageDEPRECATED": "Job configuration does not have instanceCount set.",
"DEPRECATEDversion":{
"major": 3
},
"serverInfo":{
"clusterName": "ciaas",
"thriftAPIVersion": 3,
"statsUrlPrefix": ""
},
"details":[
{
"message": "Job configuration does not have instanceCount set."
}
]
}

Reply via email to