Jing Chen commented on AURORA-1737:

Hi Joshua, I create a cron job as following:
jobs = [
    cluster = 'devcluster',
    role = 'www-data',
    environment = 'devel',
    name = 'cron_hello_jing',
    cron_schedule = '*/5 * * * *',
    task = Task(
           cmdline="echo 'hello jing'")],
      resources=Resources(cpu=1, ram=1*MB, disk=8*MB)
However, when I try to deschedule the cron job with a non-existent role
aurora cron deschedule devcluster/abc/devel/cron_hello_jing
It returns as:
 INFO] Removing cron schedule for job 
 INFO] Job abc/devel/cron_hello_world is not scheduled with cron
Cron descheduling succeeded.

Can you tell me how to reproduce the bug? 


> Descheduling a cron job checks role access before job key existence
> -------------------------------------------------------------------
>                 Key: AURORA-1737
>                 URL: https://issues.apache.org/jira/browse/AURORA-1737
>             Project: Aurora
>          Issue Type: Bug
>          Components: Scheduler
>            Reporter: Joshua Cohen
>            Assignee: Jing Chen
>            Priority: Minor
> Trying to deschedule a cron job for a non-existent role returns a permission 
> error rather than a no-such-job error. This leads to confusion for users in 
> the event of a typo in the role.
> Given that jobs are world-readable, we should check for a valid job key 
> before applying permissions.

This message was sent by Atlassian JIRA

Reply via email to