Skip to content
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

Importing events with "Catch-Up" #246

Closed
alexpanas opened this issue Dec 20, 2019 · 1 comment
Closed

Importing events with "Catch-Up" #246

alexpanas opened this issue Dec 20, 2019 · 1 comment

Comments

@alexpanas
Copy link

Summary

I was playing with importing and exporting configurations using /opt/cronicle/bin/control.sh import/export and noticed that if an event with Catch-Up enabled is imported to a new environment - the event gets imported successfully, can be run manually, will be shown in schedule - but will not be run according to the schedule

I understand that import/export feature of control.sh not necessary should be used for copying parts of configuration to new installations - and probably I was shooting my own leg here - but I nevertheless decided to share the issue and possible workaround.

Using time machine feature to reset event clock seems to fix the issue.

Would it be possible to perform this reset during import - if there is no associated time machine data for an event?

Steps to reproduce the problem

  1. Export the config using /opt/cronicle/bin/control.sh
  2. Import the config into a new cronicle environment using /opt/cronicle/bin/control.sh
  3. Notice that events get created and can be run manually
  4. Notice that the event is shown in schedule - but is not actually being run (and unfortunately - nothing in the logs seems to indicate why they are not actually being run)

You can see event ID in /opt/cronicle/logs/Cronicle.log in [Checking event queues] lines - but the event will not be executed, see example log excerpt.

If you copy the event using "Copy Event" button - the copy starts being scheduled and executed as expected.

Setting event clock to "now", saving the event, unchecking the "Time Machine" button and saving the event again seems to fix the issue for existing event.

Your Setup

3-server setup with Couchbase as a backend

Operating system and version?

Centos 7.7

Node.js version?

v12.13.1

Cronicle software version?

Version 0.8.37

Are you using a multi-server setup, or just a single server?

Multi-server setup

Are you using the filesystem as back-end storage, or S3/Couchbase?

Couchbase

Can you reproduce the crash consistently?

I have encountered it on several environments (as they were setup using the same import/export procedure) - I have not tried reproducing it deliberately though

Log Excerpts

ek3utwbyb15 - is the ID of the event, it has been configured to be run every minute

[1576800300.561][2019-12-20 00:05:00][sjc06-c01-esa01][12226][Cronicle][debug][9][Checking event queues][["ek3utzdqc17","ek3utwbyb15","ek3utp9as0y","ek3tikq9902"]]
[1576800360.617][2019-12-20 00:06:00][sjc06-c01-esa01][12226][Cronicle][debug][4][Scheduler Minute Tick: Advancing time up to: 2019/12/20 00:06:00][]
[1576800360.618][2019-12-20 00:06:00][sjc06-c01-esa01][12226][Cronicle][debug][9][Checking event queues][["ek3utzdqc17","ek3utwbyb15","ek3utp9as0y","ek3tikq9902"]]
[1576800420.673][2019-12-20 00:07:00][sjc06-c01-esa01][12226][Cronicle][debug][4][Scheduler Minute Tick: Advancing time up to: 2019/12/20 00:07:00][]

Resetting event cursor seemed to help:

[1576804284.818][2019-12-20 01:11:24][sjc06-c01-esa01][12226][Cronicle][debug][6][Resetting event cursor to: 2019/12/20 01:10:00][]
[1576804284.819][2019-12-20 01:11:24][sjc06-c01-esa01][12226][Cronicle][debug][6][Successfully updated event: ek3utwbyb15 (Couchbase garbage collection)][]
[1576804284.82][2019-12-20 01:11:24][sjc06-c01-esa01][12226][Cronicle][debug][4][Scheduler catching events up to: 2019/12/20 01:11:00][]
[1576804284.822][2019-12-20 01:11:24][sjc06-c01-esa01][12226][Cronicle][debug][4][Auto-launching scheduled item: ek3utwbyb15 (Couchbase garbage collection) for timestamp: Fri, Dec 20, 2019 1:11 AM UTC][]
[1576804284.825][2019-12-20 01:11:24][sjc06-c01-esa01][12226][Cronicle][debug][9][Choosing server for event using algo: least_cpu][["sjc06-c01-esa01","sjc06-c01-esa02","sjc06-c01-esa03"]]

@jhuckaby
Copy link
Owner

Should be fixed in v0.8.38. Thanks for the detailed issue report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants