-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix VM validity check for cached VM objects
Qubes().domains.refresh_cache() tries to preserve cached VM objects if the class matches - this way if an application keeps reference to any, it will still be the same as freshly obtained from the collection, and also it will receive cache updates/invalidates based on events. The check for class change was invalid - on core-admin-client side we have just one QubesVM class with 'klass' attribute. This leads to VM objects being disconnected from VMCollection and stale properties cache there (because they no longer receive events). Fix the check. And also add a test if indeed the same object is returned.
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters