You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "Bill Farner (JIRA)" <ji...@apache.org> on 2014/09/25 03:48:34 UTC
[jira] [Created] (AURORA-753) aurora cron show aborts early
Bill Farner created AURORA-753:
----------------------------------
Summary: aurora cron show aborts early
Key: AURORA-753
URL: https://issues.apache.org/jira/browse/AURORA-753
Project: Aurora
Issue Type: Bug
Components: Client
Reporter: Bill Farner
Priority: Blocker
Symptom: {{aurora cron show}} exits with "No cron entry found for job" when cron job does indeed exist.
Error is in cron.py:
{code}
jobkey = context.options.jobspec
api = context.get_api(jobkey.cluster)
resp = api.get_jobs(jobkey.role)
context.check_and_log_response(resp, err_code=EXIT_INVALID_PARAMETER,
err_msg=("Error getting cron status for %s; see log for details" % jobkey))
for job in resp.result.getJobsResult.configs:
if job.key.environment == jobkey.env and job.key.name == jobkey.name:
if job.cronSchedule is None or job.cronSchedule == "":
context.print_err("No cron entry found for job %s" % jobkey)
return EXIT_INVALID_PARAMETER
else:
context.print_out('%s\t %s' % (jobkey, job.cronSchedule))
return EXIT_OK
else:
context.print_err("No cron entry found for job %s" % jobkey)
return EXIT_INVALID_PARAMETER
return EXIT_OK
{code}
A request is made for a summary of all jobs in a role, and the loop iterates exactly once and always fails if it encounters a job other than the requested job first.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)