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

Check zvols existence in zfsmanager #2712

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

giggsoff
Copy link
Contributor

I can see "Error converting ... to zfs zvol ...: qemu-img failed: exit
status 1, qemu-img: Could not open '...': Could not open '...': No such
file or directory". We rely onto fsnotify and mdev to properly create
symlinks to zvols, but seems we should check existence explicitly and
publish only if we have zvol.
Mdev log indicates that we do add-remove-add sequence, seems we should
enforce sequence handling for mdev.
Also we should not use persist publisher as devices may changed on
reboot and should align Key to not have '/' which leads to problems with
publishing.

Signed-off-by: Petr Fedchenkov giggsoff@gmail.com

I can see "Error converting ... to zfs zvol ...: qemu-img failed: exit
status 1, qemu-img: Could not open '...': Could not open '...': No such
file or directory". We rely onto fsnotify and mdev to properly create
symlinks to zvols, but seems we should check existence explicitly and
publish only if we have zvol.
Mdev log indicates that we do add-remove-add sequence, seems we should
enforce sequence handling for mdev.
Also we should not use persist publisher as devices may changed on
reboot and should align Key to not have '/' which leads to problems with
 publishing.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
func (status ZVolStatus) Key() string {
return status.Device
return strings.ReplaceAll(status.Dataset, "/", "_")
Copy link
Contributor

Choose a reason for hiding this comment

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

How did the old code work at all? Did it fail to write the checkpoint files inside pubsub but continued anyhow?

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

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

LGTM

@eriknordmark eriknordmark merged commit 23ccf5d into lf-edge:master Jul 20, 2022
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