Skip to content

Commit

Permalink
core: Persist hotunplug via VmDevicesMonitoring
Browse files Browse the repository at this point in the history
Hot unplug should also avoid races between direct update and monitoring
update.
See Change-Id I5873195053b2ca5ee7b20efa92870bb6f82a7e0e

Change-Id: I19e47adf52b3353bf28ed37156ab8da73caf266f
Signed-off-by: Eitan Raviv <eraviv@redhat.com>
  • Loading branch information
erav committed Jun 26, 2022
1 parent e07b190 commit f447e8b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,7 @@ private NetworkProviderProxy getProviderProxy() {
}

private void updateDevice() {
if (getParameters().getAction() == PlugAction.PLUG
&& hotPlugVmNicRequired(getVm().getStatus())) {
if (hotPlugVmNicRequired(getVm().getStatus())) {
VmDevicesMonitoring.Change change = vmDevicesMonitoring.createChange(getVdsId(), System.nanoTime());
change.updateVm(getVmId(), VmDevicesMonitoring.UPDATE_HASH);
change.flush();
Expand Down

0 comments on commit f447e8b

Please sign in to comment.