Netflix / SimianArmy

Tools for keeping your cloud operating in top form. Chaos Monkey is a resiliency tool that helps applications tolerate random instance failures.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Defined monkey time never works - "Not Time for CHAOS Monkey"

MihailStopnik opened this issue · comments

Hi,

I need to run monkey all day except of 14:00 - 16:00 time slot, so I set:
simianarmy.calendar.openHour = 16
simianarmy.calendar.closeHour = 14

and I see that monkey starts every hour but throws 'Not Time for CHAOS Monkey' message.
I suppose that happens because 'openHour' biggest than 'closeHour' and runsPerDay gets unexpected value.

long units = freqUnit.convert(close.getTimeInMillis() - open.getTimeInMillis(), TimeUnit.MILLISECONDS);
runsPerDay = units / ctx.scheduler().frequency();

long units = freqUnit.convert(close.getTimeInMillis() - open.getTimeInMillis(), TimeUnit.MILLISECONDS);

Is this expected behavior? Thank you!

You are correct, openHour > closeHour means it never runs. That was a
clever try but Monkeys aren't that smart :)

You will need to roll code to have an exclusion window. Or you could just
set it to run before the window, openHour=0, closeHour=14.

This is really hacky but you could have two monkeys, one with openHour=0,
closeHour=14 and a second with openHour=16, closeHour=23.

On Fri, Jul 22, 2016 at 7:21 AM, MihailStopnik notifications@github.com
wrote:

Hi,

I need to run monkey all day except of 14:00 - 16:00 time slot, so I set:
simianarmy.calendar.openHour = 16
simianarmy.calendar.closeHour = 14

and I see that monkey starts every hour but throws 'Not Time for CHAOS
Monkey' message.
I suppose that happens because 'openHour' biggest than 'closeHour' and
runsPerDay gets unexpected value.

long units = freqUnit.convert(close.getTimeInMillis() -
open.getTimeInMillis(), TimeUnit.MILLISECONDS);
runsPerDay = units / ctx.scheduler().frequency();

long units = freqUnit.convert(close.getTimeInMillis() - open.getTimeInMillis(), TimeUnit.MILLISECONDS);

Is this expected behavior? Thank you!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#264, or mute the thread
https://github.com/notifications/unsubscribe-auth/AKXxgfWH69iP7SKphGlQbam2yKTXN-0pks5qYNH8gaJpZM4JSzd7
.

Thank you for response. Resolved :)