-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the rollback mechanism #102
Comments
We can leverage the result of |
There are confusion though as how to determine when an update is actually deployed. as the json seems to only have timestamp of when the update is staged. |
I think the idea of the status to show the deployment time, is that that is the actual time when the commit is added to the system, however I understand that you might need the actual deployment(finalization) time. I did not find a rpm-ostree or ostree output that shows it. But I might be overlooking something obvious... however, you can take the timeline were the latest deployment was added to
Then running
You can see that the Birth/Modify are the same but Change is when it was added to this directory. I think you could use that Change timestamp on the latest deployment you find in the /ostree directory. However maybe @cgwalters knows a better way and something I am overlooking. |
I am not fully following but if the goal is to know a timestamp for when a deployment was created, then it's closer to the birth time right? In theory the deployment directory inode could be modified for other reasons although in practice usually isn't. Note though the birth time may not available on all linux filesystems I believe but may be on the ones we care about. greenboot perhaps could add xattrs on the deployment directory? Though doing so would require temporarily lifting the immutable bit, which is a bit racy unfortunately... |
There is also the origin file which is arbitrary metadata associated with a deployment. |
@cgwalters The goal is actually to calculate the grace period to mark the update as successful and no rollbacck will be triggered post that even if the health check fails. The time needs to be calculated from the moment the system restarts after a commit is staged. Since there can be a gap between |
@jmarrero I looked into the your suggested method, I did
This might require some investigation of what all cases can modify the timestamp, and find ways that it wont hurt greenboot's functionality. |
Does it need to be on first boot, can't it be when finalization finishes? If so maybe looking at the |
I'd be fine to add an xattr upstream in ostree for when a deployment is first booted. I think it'd be a pretty easy change because we already as of lately run a systemd unit on boot. |
@jmarrero @cgwalters Consolidated Challenges or information that will be useful.
|
Currently greenboot rollback is dependent on ostree-finallized-stage.service which is be triggered only on first reboot, after an update is deployed in ostree. So time delayed failure can not trigger any rollback which may hamper certain use cases.Also this helps greenboot to be more closely integrated with the ostree architecture.
It will also reduce dependency on systemd service orchestration.
Example:
/usr/lib/greenboot/check.d/required.d/02_watchdog.sh
failure will not have any rollback triggered for cases after first reboot, which can happen in an edge scenario.The text was updated successfully, but these errors were encountered: