You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix race condition when destroying VBD after VM power_state change.
A client of XenServer attempted to destroy a VBD immediately after
receiving an event triggered by a VM power_state change, resulting in
a failure. The root cause is below:
1. The update to VM's power_state and the update to VBDs are not
performed atomically, so the client may receive the event from the
update to VM's power_state and attempt to operate VBDs before their
state is updated.
2. If the VM is running on a supporter, database operations require
sending RPCs to the coordinator, introducing additional latency.
3. Between the updates to the VM's power_state and the VBDs, xapi also
updates the pending_guidences fields, which requires at least eight
database operations and then further delays the VBD update.
It's not straightforward to add transactions for these DB operations.
The workaround is to move the update to pending_guildences to the end
of the relevant database operations (VBDs, VIFs, GPUs, etc), ensuring
that VBDs are updated immediately after the VM's power_state change.
This is related to XSI-1915 where Citrix deploy tool MCS triggered
the issue.
Signed-off-by: Bengang Yuan <[email protected]>
0 commit comments