fact-project / shifthelper

So we can sleep at night.
4 stars 0 forks source link

parker mode does not work #257

Open dneise opened 6 years ago

dneise commented 6 years ago

today we wanted to test the "parker mode", which goes like this:

The shifter performs the normal startup and is available during the night for calls. In the morning, the "parker" clicks the "Ready for shutdown!" button on the SH website (https://shifthelper.app.tu-dortmund.de/) in the time window between 30min and 20min before shutdown.

This way the SH would not call the shifter, since it assumes the shifter is already awake and "ready for shutdown". The parker would then observe/supervise the shutdown and fill the checklist. Any problems during the shutdown, which normally would lead to a call to the shifter, still lead to a call to the shifter. E.g. if during shutdown main.js throws an exception due to a drive problem, then the shifter is still called.

We believe the parker mode is especially important for the short nights in summer, where startup is very late and shutdown is very early.

The test failed, because ...

... the SH code is too strict. It does not only check if anybody is "ready for shutdown" but that the shifter is ready for shutdown. This was done to avoid that somebody in the FACT collaboration clicks this button in the morning accidentally and this way a SH-call is not send out.

So for parker mode, we have to change the SH code here:

https://github.com/fact-project/shifthelper/blob/a94949748acd2aa5221d573a568d2346437f4254/shifthelper/conditions.py#L275-L278

to simply:

   return not awake

This way anybody in the collaboration can press the "Ready for Shutdown!" button in the time window between 30min and 20min before shutdown and thus take the role of the parker.

To assert everything still works after this minor change, the SH will still undergo the manual test suite here:

https://github.com/fact-project/shifthelper_smartfact_mockup_test

The modification in the SH and the following manual test will be conducted today around 9 UTC.

So tomorrow we can test the parker mode again.