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

core: Refresh ISO cache when new guest agent installed #635

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

smelamud
Copy link
Member

@smelamud smelamud commented Sep 6, 2022

The latest available guest tools version is figured out by analyzing ISO
disks available on ISO and data storage domains. The list of available
ISO disks is cached and this cache is refreshed when user queries the
list of images on a storage domain. At that moment, the latest guest
tools version is refreshed and the guest agent installation hint
(presented to the user) is updated.

But ISO cache refresh does not happen after a new guest agent is
installed. That's why the guest agent installation hint is still shown
after installing the latest guest agent in the VM.

To fix that, this patch adds ISO cache refresh when the list of
applications for a particular VM is changed.

Change-Id: I6c25a97ae14cc40d073b3873c6bae9db3216204d
Bug-Url: https://bugzilla.redhat.com/1983401
Bug-Url: https://bugzilla.redhat.com/2120381
Signed-off-by: Shmuel Melamud smelamud@redhat.com

Copy link
Member

@mz-pdm mz-pdm left a comment

Choose a reason for hiding this comment

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

It probably deserves some explanation (perhaps also in the code) how the guest info relates to a data ISO domain. Without it, the fix looks somewhat mysterious, at least to me.

@@ -746,7 +746,9 @@ private void updateRuntimeData() {
vmGuestAgentNics = filterGuestAgentInterfaces(nullToEmptyList(vdsmVm.getVmGuestAgentInterfaces()));
dbVm.setIp(extractVmIps(vmGuestAgentNics));
}

if (!Objects.equals(vdsmVm.getVmDynamic().getAppList(), dbVm.getAppList())) {
resourceManager.refreshIsoCache(vdsManager.getCopyVds().getStoragePoolId());
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to call getCopyVds() just to get the storage pool id?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, AFAIK. There is no other place where the storage pool ID is stored.

@smelamud
Copy link
Member Author

Updated the description in the commit message with more details.

Copy link
Member

@mz-pdm mz-pdm left a comment

Choose a reason for hiding this comment

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

Thanks, makes sense now.

@smelamud
Copy link
Member Author

/ost

The latest available guest tools version is figured out by analyzing ISO
disks available on ISO and data storage domains. The list of available
ISO disks is cached and this cache is refreshed when user queries the
list of images on a storage domain. At that moment, the latest guest
tools version is refreshed and the guest agent installation hint
(presented to the user) is updated.

But ISO cache refresh does not happen after a new guest agent is
installed. That's why the guest agent installation hint is still shown
after installing the latest guest agent in the VM.

To fix that, this patch adds ISO cache refresh when the list of
applications for a particular VM is changed.

Change-Id: I6c25a97ae14cc40d073b3873c6bae9db3216204d
Bug-Url: https://bugzilla.redhat.com/1983401
Bug-Url: https://bugzilla.redhat.com/2120381
Signed-off-by: Shmuel Melamud <smelamud@redhat.com>
@mwperina
Copy link
Member

/ost

@mwperina mwperina merged commit 89a8939 into oVirt:master Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants