Invalid cron spec gets persisted
Reported by Ben Hood | October 31st, 2011 @ 01:33 PM | in 1.0 (closed)
Specifying an invalid cron specification (in a XML post) appears to get saved to the database and hence causes a ground hog day scenario whereby Diffa cannot restart itself cleanly because the config has become corrupted (see attached stack trace as a symptom).
Furthermore, the agent does not appear to be impervious to bogus XMLs being updated - what seems to happen is that the agent becomes unresponsive to subsequent XML re-uploads.
Caused by: java.text.ParseException: Support for specifying both a day-of-week AND a day-of-month parameter is not implemented.
at org.quartz.CronExpression.buildExpression(CronExpression.java:490) ~[quartz-2.1.0.jar:na]
at org.quartz.CronExpression.<init>(CronExpression.java:276) ~[quartz-2.1.0.jar:na]
at org.quartz.CronExpression.validateExpression(CronExpression.java:403) ~[quartz-2.1.0.jar:na]
at org.quartz.CronScheduleBuilder.cronSchedule(CronScheduleBuilder.java:105) ~[quartz-2.1.0.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler.assertSchedule$1(QuartzScanScheduler.scala:105) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler$$anonfun$onUpdatePair$1.apply(QuartzScanScheduler.scala:134) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler$$anonfun$onUpdatePair$1.apply(QuartzScanScheduler.scala:132) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at scala.collection.immutable.Map$Map2.foreach(Map.scala:139) ~[scala-library-2.9.0-1.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler.onUpdatePair(QuartzScanScheduler.scala:132) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler$$anonfun$1.apply(QuartzScanScheduler.scala:85) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler$$anonfun$1.apply(QuartzScanScheduler.scala:85) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:60) ~[scala-library-2.9.0-1.jar:na]
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:44) ~[scala-library-2.9.0-1.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler.<init>(QuartzScanScheduler.scala:85) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.6.0_16]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) ~[na:1.6.0_16]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) ~[na:1.6.0_16]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513) ~[na:1.6.0_16]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126) ~[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]
... 24 common frames omitted
Comments and changes to this ticket
-

Ben Hood October 31st, 2011 @ 01:33 PM
- no changes were found...
-

Ben Hood November 1st, 2011 @ 12:37 AM
(from [81c1e3255664751931909d8fd85f54e9420e01db]) [#400] Validate cron specs on views. https://github.com/lshift/diffa/commit/81c1e3255664751931909d8fd85f...
-

Paul Jones November 1st, 2011 @ 12:39 AM
- Assigned user set to Ben Hood
- State changed from new to resolved
Added validation on the configuration frontend to ensure that cron specs provided are valid.
Pull request raised.
-

Ben Hood November 1st, 2011 @ 08:33 AM
(from [41ff75dfa7d942ce659fa74bd2fbbb2872435eb2]) Merge pull request #97 from lshift/400
[#400] Validate cron specs on views. https://github.com/lshift/diffa/commit/41ff75dfa7d942ce659fa74bd2fb...
-

-

Ben Hood November 5th, 2011 @ 11:35 AM
- Milestone set to 1.0
- Milestone order changed from 139 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A Real Time Differencing Tool.
People watching this ticket
Tags
Referenced by
-
410
Integration test for config application
Bogus configurations, e.g. when attributes are deliberate...