PlanktoScope icon indicating copy to clipboard operation
PlanktoScope copied to clipboard

os: v2023.9.0-beta.1 has weird interactions between Cockpit, GPS, and system time

Open ethanjli opened this issue 2 years ago • 1 comments

Describe the bug In the #6-dev-software channel on the PlanktoScope Slack, Ana Fernandez Carrera filed a test report (attached at the end) in which the GPS with a 3D fix set a correct date and time of Sept 14 2023 at 7:25 PM in the Node-RED backend (though of course the backend log files still had names with incorrect timestamps, as described in #218); then when Ana tried to manually change the system time in Cockpit to Sept 20 2028 at 4 PM, she found that it changed the system time but didn't change the date, resulting in Cockpit showing a system time of Sept 14 2023 at 4 PM. When Ana restarted the Python hardware controller, it created a new log at Sept 14 2023 at 4:04 PM; and when she attempted to use Cockpit to upgrade system packages with APT, APT complained that the distro release files were 5 days and 18 hours in the future (which would be consistent with the system time being at Sept 14).

This suggests that the GPS module isn't actually updating the system clock even when it has a fix and is sending the time directly to the Node-RED dashboard via gpsd and Node-RED's gpsd node. It's also possible that the PPS kernel module is doing something weird to prevent the system time from being changed by 5 years, and maybe even by more reasonable increments (this was not described in Ana's test report, but it seems likely to me that she tried a smaller change before trying to change the year to 2028)

To Reproduce I am not yet able to try to reproduce this behavior due to lack of GPS modules.

Expected behavior When a GPS fix is acquired, it should update the system time correctly. When a GPS fix is not possible, it should be possible to use Cockpit to fix the system time. When a GPS fix is acquired but a user tries to use Cockpit to change the system time to something incorrect, I don't know what the expected behavior should be.

Screenshots Screenshots can be found in Ana's test report, which I have also uploaded here: Trial_Planktoscope_v2023.09.0-beta.1_180923_afc.pdf

Additional Context This issue may result from potential regressions introduced in v2023.9.0-alpha.0 with #137 (which tried to reimplement and simplify the setup process for the adjusting system time from GPS).

ethanjli avatar Sep 26 '23 20:09 ethanjli

Note: it was decided in the 2023-10-19 software meeting that we will allow the v2023.9.0 software to be released without fixing this issue, if this is the last issue blocking the release. Currently there are other blocking issues, so I won't remove it from the v2023.9.0 software milestone yet. But I will probably move it out of the milestone eventually.

ethanjli avatar Nov 22 '23 04:11 ethanjli