oresat / oresat-c3-software

Main application for Octavo A8 version of the C3 card
https://oresat-c3-software.readthedocs.io/en/latest/
GNU General Public License v3.0
3 stars 1 forks source link

OreSat0.5 24 hour reset did not happen #38

Open ryanpdx opened 3 months ago

ryanpdx commented 3 months ago

Looking at the beacon from OreSat0.5, the 24 hour reset did not happen.

This could be an issue with this app or the watchdog app.

Need to test on FlatSat with a C3 with the OreSat0.5 flight image without the watchdog surrogate.

ThirteenFish commented 1 month ago

This was caused by passing a list of arguments for stopping the watchdog to subprocess.run() with shell=True here. The docs say:

On POSIX with shell=True, ... if args is a sequence, the first item specifies the command string, and any additional items will be treated as additional arguments to the shell itself.

In our case then we were running just systemctl but then passing stop and oresat-c3-watchdog to /bin/sh as arguments. Fixed by deleting the shell=True line as seen in this commit and will be applied in the c3 patch 1.

I've verified that this fixes the problem as part of testing the patch by setting 0x4001 reset_timeout to 300s and watching flatsat successfully reset.