Skip to content
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

stages/disks: get filesystem info via device alias #1042

Merged
merged 1 commit into from
Jul 24, 2020
Merged

stages/disks: get filesystem info via device alias #1042

merged 1 commit into from
Jul 24, 2020

Conversation

bgilbert
Copy link
Contributor

We forgot to use the device alias when querying filesystem info, leading to potential races with udev deleting and recreating symlinks if the device node is specified via a /dev/disk link.

https://bugzilla.redhat.com/show_bug.cgi?id=1812233

We forgot to use the device alias when querying filesystem info, leading
to potential races with udev deleting and recreating symlinks if the
device node is specified via a /dev/disk link.

https://bugzilla.redhat.com/show_bug.cgi?id=1812233
Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -91,18 +91,19 @@ func (s stage) createFilesystem(fs types.Filesystem) error {
if fs.Format == nil {
return nil
}
devAlias := util.DeviceAlias(string(fs.Device))
Copy link
Member

Choose a reason for hiding this comment

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

I believe you this fixes it but honestly I hadn't looked at device_alias.go before...would it be fair to say this is basically creating a "snapshot" of the device symlinks at a point in time so they're stable? (OK yes, a quick blame takes me to 521b947 - though that would be a good comment at the top of the file)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, it's a recurring pattern throughout the disks stage.

@bgilbert bgilbert merged commit 839e2bd into coreos:master Jul 24, 2020
@bgilbert bgilbert deleted the devalias branch July 24, 2020 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants