commit | ccde489a8ef40974e3bf5166c14ddf93f531d1be | [log] [tgz] |
---|---|---|
author | Robert Kolchmeyer <rkolchmeyer@google.com> | Thu Jun 22 12:12:52 2023 -0700 |
committer | Robert Kolchmeyer <rkolchmeyer@google.com> | Thu May 09 01:30:35 2024 +0000 |
tree | 48707fef93e8484e8b33aa252a846f5425212357 | |
parent | 4aaa17f022fd0d47d2e03424bda6e86dbf7ff61b [diff] |
provisioner: explicitly sync state file on writes Scripts sometimes reboot the preload VM with sysrq-trigger. This type of reboot will not sync any pending writes to disk. This can result in the state file not being up to date on the next reboot. One consequence of this is potentially running some steps multiple times, when they shouldn't be run multiple times. Let's avoid this by explicitly syncing the state file on every write. BUG=b/288441792 TEST=`bazel test`, ./run_tests Change-Id: I5f8c641a4f142b02a9dd52e54c73cb9c4c85bb1a Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/71291 Reviewed-by: Sejal Sharma <sejalsharma@google.com> Tested-by: Robert Kolchmeyer <rkolchmeyer@google.com> Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
This is a repository of various tools developed for Container-Optimized OS. Examples include cos-gpu-installer, cos-toolbox, etc.
See CONTRIBUTING.md for how to contribute.