Skip to content

Conversation

n1hility
Copy link
Member

@n1hility n1hility commented Apr 3, 2023

Fixes #18011

Updates container configuration and machine configuration state saving to be atomic on Linux, Mac, and Windows.

Fixes possible configuration state corruption with podman machine during system failures on Mac, Linux, and Windows

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: n1hility

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 3, 2023
@n1hility
Copy link
Member Author

n1hility commented Apr 3, 2023

PTAL @containers/podman-maintainers

@n1hility n1hility force-pushed the flush-config branch 2 times, most recently from c70870d to 611ad9e Compare April 4, 2023 03:38
@n1hility
Copy link
Member Author

n1hility commented Apr 4, 2023

Updated impl to use the same routine I am posting a PR for in containers/common

Once that change merges this code can be updated to share it instead of keeping a local func.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we instead use https://github.com/containers/storage/blob/main/pkg/ioutils/fswriters.go#L33?

If there's something missing for Windows, we should probably update the package there.

I am asking since there seem to be more code paths where we need to write atomically on Windows.

@n1hility
Copy link
Member Author

n1hility commented Apr 5, 2023

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 5, 2023
@n1hility n1hility changed the title Windows: Flush config writes before renaming Update podman to use atomic container and machine config updates Apr 7, 2023
@n1hility
Copy link
Member Author

n1hility commented Apr 7, 2023

/remove-hold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 7, 2023
@n1hility n1hility added the bloat_approved Approve a PR in which binary file size grows by over 50k label Apr 7, 2023
@n1hility
Copy link
Member Author

n1hility commented Apr 7, 2023

Looks like the updates to common and storage pull in 512K . Not sure if this is expected, adding bloat approved tag for now since this is unrelated to my changes and seeing if we get a test pass.

@TomSweeneyRedHat
Copy link
Member

CHanges LGTM
The bloat is worrisome, and the tests are very unhappy.

@n1hility
Copy link
Member Author

n1hility commented Apr 8, 2023

I suspect this regression is from something else in either common or storage. When I am back at the keyboard will try and find the source

@n1hility n1hility force-pushed the flush-config branch 3 times, most recently from 5c24169 to baf1571 Compare April 9, 2023 05:39
@n1hility
Copy link
Member Author

n1hility commented Apr 9, 2023

Got a clean pass, but updated common to v0.52.0 since that was released and rerunning but no real difference so should be clean baring any flakes

@n1hility
Copy link
Member Author

n1hility commented Apr 9, 2023

PTAL @containers/podman-maintainers

I noticed there is a couple other PRs for the vendoring that this PR dups, if those end up merging first, I can rebase this one.

@ashley-cui ashley-cui added the 4.5 label Apr 10, 2023
@ashley-cui
Copy link
Member

ashley-cui commented Apr 10, 2023

Let's wait for #18130 to merge, and then rebase on top of that, if that's okay!

Other than that, LGTM, TY!

@n1hility
Copy link
Member Author

sure sgtm!

Windows: Flush machine config writes before renaming
Windows: Previously this code was changed to improve atomicity by changing
the persitence approach to a two-step process (write + rename).
However, the first-step write operation was not fully flushed,
leading to the possibility of incomplete writes.

[NO NEW TESTS NEEDED]

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
@n1hility n1hility removed the bloat_approved Approve a PR in which binary file size grows by over 50k label Apr 10, 2023
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 11, 2023
@openshift-merge-robot openshift-merge-robot merged commit 4857c65 into containers:main Apr 11, 2023
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman-machine-default.json gets corrupted on improper Windows shutdown
5 participants