Bynar icon indicating copy to clipboard operation
Bynar copied to clipboard

Maintenance Mode

Open cholcombe973 opened this issue 6 years ago • 2 comments

Anything better we can come up with besides just disabling the cron job while maintenance is being performed on a server?

cholcombe973 avatar Feb 12 '19 16:02 cholcombe973

Other alternatives are a) store a flag in the database b) A lock on the shared file (if read-only file system this will not work) API need to be exposed to a) write the flag to database. b) remove the flag. Bynar needs to re-evaluate if flag set is for too long.

sdandam avatar Feb 27 '19 16:02 sdandam

We may need to following changes:

  • In protobuf, add two messages: one for putting a Bynar daemon into "maintenance mode"; another for getting it out of maintenance mode.

If we go with the DB-centric way: Use Case: Set to Maintenance

  1. Upon receiving a setMaintenance message, the daemon will call the SQL DB to set the 'status' column to "maintenance" or some string.
  2. Whenever the daemon accepts a request, it will then check the SQL db to see if itself is in maintenance mode, if so, log it and get out without doing anything (ignore all request).

Use Case: Unset Maintenance

  1. Upon receiving a unsetMaintenance message, the daemon will call the SQL DB to set the status back to "running"(?)
  2. From then on, the daemon will perform usual duties to check disks/etc as usual.

lcao0319 avatar Mar 19 '19 18:03 lcao0319