-
Notifications
You must be signed in to change notification settings - Fork 200
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
Fix flapping disk info due to timing differences #369
Conversation
@nyoxi don't know if you want to check this also :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyoxi, any objections to merging this? can anything get wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ost
Looks good to me. |
c75990d
to
66a1e1a
Compare
In commit 45903d0 there was code added to refresh the fs info earlier when a hotplug disk was added. Now this caused some side effect that when only that command was triggered, the info dict never contained 'disk.count', which caused us to change the diskMapping to the parsed data from fsinfo. Some minutes later when the disk command needed to be refreshed, it changed the diskMapping again, because (sometimes) the disks call returns more disks in comparision to the fsinfo call (for ex unmounted disks). Again a bit later, the fsinfo had to be refreshed, and the diskMapping was modified again. This occurs continiously, causing the device hash to change every time, and causing an excessive amount of dumpxml's also due to that. Fixed this by not setting the diskMapping when we have the _QEMU_DISKS_COMMAND in our caps. As this means somewhere else in time this command will refresh the disk info. Also refresh the disk info and not only fs info after a disk hotplug. Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be> Change-Id: I27a30e020a5221237d9d4ae7835a1cc4e69c0c59
66a1e1a
to
6672410
Compare
Fixed the test and lint :) |
@dupondje, please fix the problems reported by the CI. |
Ah, you were faster, great. :-) |
/ost |
1 similar comment
/ost |
/ost |
Thanks for the fix! |
In commit 45903d0 there was code added to refresh the fs info earlier when a hotplug disk was added. Now this caused some side effect that when only that command was triggered, the info dict never contained 'disk.count', which caused us to change the diskMapping to the parsed data from fsinfo.
Some minutes later when the disk command needed to be refreshed, it changed the diskMapping again, because (sometimes) the disks call returns more disks in comparision to the fsinfo call (for ex unmounted disks).
Again a bit later, the fsinfo had to be refreshed, and the diskMapping was modified again.
This occurs continiously, causing the device hash to change every time, and causing an excessive amount of dumpxml's also due to that.
Fixed this by not setting the diskMapping when we have the _QEMU_DISKS_COMMAND in our caps. As this means somewhere else in time this command will refresh the disk info.
Also refresh the disk info and not only fs info after a disk hotplug.
Signed-off-by: Jean-Louis Dupond jean-louis@dupond.be
Change-Id: I27a30e020a5221237d9d4ae7835a1cc4e69c0c59