Skip to content

Watchdog - Relay - Add maintenance mode #324

@fe51

Description

@fe51

We must avoid a situation where, during manual maintenance, the camera API is restarted/down and the Pi Zero detects the service as unreachable. In such a case, the Pi Zero could interpret this as a failure and trigger a reboot of the Pi, which would interrupt the ongoing maintenance operation.

To prevent this behavior, the following mechanism should be implemented:

  • Maintenance flag script on the Pi
    A script running on the Pi will send or write a timestamp to the Pi Zero indicating that a maintenance period has started.

  • Maintenance window validation on the Pi Zero
    Before performing any service check or triggering a reboot, the Pi Zero must verify whether the system is currently within a maintenance window.
    The maintenance window is defined as:

maintenance_timestamp + 4 hours

If the current time falls within this window, the Pi Zero must not trigger a reboot.

  • Integration with automated maintenance
    This script must also be callable during automated maintenance procedures (e.g., through Ansible) so that the maintenance window is automatically set before maintenance tasks are executed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions