New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run command fails with exit code 2, while succeeded in rundeck #65

Closed
shamil opened this Issue Feb 2, 2017 · 7 comments

Comments

Projects
None yet
2 participants
@shamil

shamil commented Feb 2, 2017

I think it's related to #39

using rundeck-cli version: 1.0.5

@gschueler

This comment has been minimized.

Show comment
Hide comment
@gschueler

gschueler Feb 2, 2017

Member

is this running a job, or an adhoc command?

Can you run using RD_DEBUG=3 to capture all of the http responses?

I'm primarily interested in the final response when this occurs for an execution.

example:

 {"id":"715","offset":"539","completed":true,"execCompleted":true,"hasFailedNodes":false,"execState":"succeeded","lastModified":"1486057830000","execDuration":30459,"percentLoaded":98.89908256880734,"totalSize":545,"entries":[{"time":"09:50:00","absolute_time":"2017-02-02T17:50:00Z","log":"the time is *boing*","level":"NORMAL","user":"greg","command":null,"stepctx":"1","node":"ecto1.local"},{"time":"09:50:00","absolute_time":"2017-02-02T17:50:00Z","log":"Thu Feb  2 09:50:00 PST 2017","level":"NORMAL","user":"greg","command":null,"stepctx":"1","node":"ecto1.local"}]}
Member

gschueler commented Feb 2, 2017

is this running a job, or an adhoc command?

Can you run using RD_DEBUG=3 to capture all of the http responses?

I'm primarily interested in the final response when this occurs for an execution.

example:

 {"id":"715","offset":"539","completed":true,"execCompleted":true,"hasFailedNodes":false,"execState":"succeeded","lastModified":"1486057830000","execDuration":30459,"percentLoaded":98.89908256880734,"totalSize":545,"entries":[{"time":"09:50:00","absolute_time":"2017-02-02T17:50:00Z","log":"the time is *boing*","level":"NORMAL","user":"greg","command":null,"stepctx":"1","node":"ecto1.local"},{"time":"09:50:00","absolute_time":"2017-02-02T17:50:00Z","log":"Thu Feb  2 09:50:00 PST 2017","level":"NORMAL","user":"greg","command":null,"stepctx":"1","node":"ecto1.local"}]}
@shamil

This comment has been minimized.

Show comment
Hide comment
@shamil

shamil Feb 2, 2017

Here is the final response, when I get exit code 2

{
  "id": "233855",
  "offset": "0",
  "completed": false,
  "message": "Pending",
  "execCompleted": false,
  "hasFailedNodes": false,
  "execState": "scheduled",
  "execDuration": -115,
  "entries": []
}

shamil commented Feb 2, 2017

Here is the final response, when I get exit code 2

{
  "id": "233855",
  "offset": "0",
  "completed": false,
  "message": "Pending",
  "execCompleted": false,
  "hasFailedNodes": false,
  "execState": "scheduled",
  "execDuration": -115,
  "entries": []
}
@shamil

This comment has been minimized.

Show comment
Hide comment
@shamil

shamil Feb 2, 2017

And yes, I run a specific job not adhoc command

shamil commented Feb 2, 2017

And yes, I run a specific job not adhoc command

@gschueler

This comment has been minimized.

Show comment
Hide comment
@gschueler

gschueler Feb 2, 2017

Member

huh, ok thanks

Member

gschueler commented Feb 2, 2017

huh, ok thanks

@gschueler

This comment has been minimized.

Show comment
Hide comment
@gschueler

gschueler Feb 2, 2017

Member

can you paste your full rd commandline when you run the job?

Member

gschueler commented Feb 2, 2017

can you paste your full rd commandline when you run the job?

@shamil

This comment has been minimized.

Show comment
Hide comment
@shamil

shamil Feb 2, 2017

rd run --project Tasks --job "Backup DB" -f -- -type full -clear true

shamil commented Feb 2, 2017

rd run --project Tasks --job "Backup DB" -f -- -type full -clear true

@gschueler

This comment has been minimized.

Show comment
Hide comment
@gschueler

gschueler Feb 2, 2017

Member

that's very strange. the execState: scheduled indicates it has a start date in the future, which would occur if you use the -@/--at commandline flag to schedule it, but hopefully not happen if you ask it to run immediately.

I was able to reproduce it using -@, so I will fix the issue if it has not started yet

Member

gschueler commented Feb 2, 2017

that's very strange. the execState: scheduled indicates it has a start date in the future, which would occur if you use the -@/--at commandline flag to schedule it, but hopefully not happen if you ask it to run immediately.

I was able to reproduce it using -@, so I will fix the issue if it has not started yet

gschueler added a commit that referenced this issue Feb 2, 2017

@gschueler gschueler closed this in 0041170 Feb 2, 2017

gschueler added a commit that referenced this issue Feb 2, 2017

Merge pull request #70 from rundeck/rundeck-cli-65
Fix #65 run -f halts before job execution finishes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment