You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "Stephan Erb (JIRA)" <ji...@apache.org> on 2017/02/01 07:54:53 UTC

[jira] [Updated] (AURORA-1684) Cron tasks are sanitized multiple times (once when being created via the API, and again when actually being triggered)

     [ https://issues.apache.org/jira/browse/AURORA-1684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephan Erb updated AURORA-1684:
--------------------------------
    Fix Version/s: 0.17.0

> Cron tasks are sanitized multiple times (once when being created via the API, and again when actually being triggered)
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: AURORA-1684
>                 URL: https://issues.apache.org/jira/browse/AURORA-1684
>             Project: Aurora
>          Issue Type: Bug
>            Reporter: Steve Niemitz
>            Assignee: Steve Niemitz
>             Fix For: 0.17.0
>
>
> This can cause issues in the following scenario:
> - An operator sets default_docker_parameters on the scheduler
> - The operator DOES NOT allow docker paramters (via allow_docker_parameters)
> - A user schedules a cron job using a docker container.
> Because the first pass of ConfigurationManager.validateAndPopulate will mutate the task to have docker parameters (the defaults), the second pass in SanitizedCronJob.fromUnsanitized will fail validation.
> A solution here may be to remove fromUnsanitized and instead pass the job configuration directly, since we know it will always be safe.
> {code}
> W0427 17:01:35.286 [QuartzScheduler_Worker-5, AuroraCronJob:134] Invalid cron job for IJobKey{role=tcdc-infra, environment=prod, name=security-group-alerter} in storage - failed to parse with {} org.apache.aurora.scheduler.configuration.ConfigurationManager$TaskDescriptionException: Docker parameters not allowed.
> 	at org.apache.aurora.scheduler.configuration.ConfigurationManager.validateAndPopulate(ConfigurationManager.java:249) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.configuration.ConfigurationManager.validateAndPopulate(ConfigurationManager.java:166) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.configuration.SanitizedConfiguration.fromUnsanitized(SanitizedConfiguration.java:60) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.cron.SanitizedCronJob.<init>(SanitizedCronJob.java:45) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.cron.SanitizedCronJob.fromUnsanitized(SanitizedCronJob.java:102) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.cron.quartz.AuroraCronJob.lambda$doExecute$163(AuroraCronJob.java:132) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.storage.log.LogStorage.lambda$doInTransaction$222(LogStorage.java:524) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.storage.db.DbStorage.transactionedWrite(DbStorage.java:160) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.storage.db.DbStorage$$EnhancerByGuice$$dd3bfcb4.CGLIB$transactionedWrite$2(<generated>) ~[guice-3.0.jar:na]
> 	at org.apache.aurora.scheduler.storage.db.DbStorage$$EnhancerByGuice$$dd3bfcb4$$FastClassByGuice$$e3e3ff55.invoke(<generated>) ~[guice-3.0.jar:na]
> 	at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) ~[guice-3.0.jar:na]
> 	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) ~[guice-3.0.jar:na]
> 	at org.mybatis.guice.transactional.TransactionalMethodInterceptor.invoke(TransactionalMethodInterceptor.java:101) ~[mybatis-guice-3.7.jar:3.7]
> 	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) ~[guice-3.0.jar:na]
> 	at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) ~[guice-3.0.jar:na]
> 	at org.apache.aurora.scheduler.storage.db.DbStorage$$EnhancerByGuice$$dd3bfcb4.transactionedWrite(<generated>) ~[guice-3.0.jar:na]
> 	at org.apache.aurora.scheduler.storage.db.DbStorage.lambda$write$188(DbStorage.java:174) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.async.GatingDelayExecutor.closeDuring(GatingDelayExecutor.java:62) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.storage.db.DbStorage.write(DbStorage.java:172) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.storage.db.DbStorage$$EnhancerByGuice$$dd3bfcb4.CGLIB$write$3(<generated>) ~[guice-3.0.jar:na]
> 	at org.apache.aurora.scheduler.storage.db.DbStorage$$EnhancerByGuice$$dd3bfcb4$$FastClassByGuice$$e3e3ff55.invoke(<generated>) ~[guice-3.0.jar:na]
> 	at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) ~[guice-3.0.jar:na]
> 	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) ~[guice-3.0.jar:na]
> 	at org.apache.aurora.common.inject.TimedInterceptor.invoke(TimedInterceptor.java:83) ~[commons-0.13.0-SNAPSHOT.jar:na]
> 	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) ~[guice-3.0.jar:na]
> 	at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) ~[guice-3.0.jar:na]
> 	at org.apache.aurora.scheduler.storage.db.DbStorage$$EnhancerByGuice$$dd3bfcb4.write(<generated>) ~[guice-3.0.jar:na]
> 	at org.apache.aurora.scheduler.storage.log.LogStorage.doInTransaction(LogStorage.java:523) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.storage.log.LogStorage.write(LogStorage.java:553) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.storage.CallOrderEnforcingStorage.write(CallOrderEnforcingStorage.java:120) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.cron.quartz.AuroraCronJob.doExecute(AuroraCronJob.java:119) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.apache.aurora.scheduler.cron.quartz.AuroraCronJob.execute(AuroraCronJob.java:112) ~[aurora-0.13.0-SNAPSHOT.jar:na]
> 	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.2.jar:na]
> 	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) ~[quartz-2.2.2.jar:na]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)