Skip to content

Commit

Permalink
VM: Don't fail event sending on missing agent (from Incus) (#13856)
Browse files Browse the repository at this point in the history
This PR adds a check for a missing/offline qemu agent in the
notification logic, so that we can avoid returning an error when
updating instance config.

Cherry picked from lxc/incus#324.
  • Loading branch information
tomponline authored Aug 2, 2024
2 parents 0d5349f + 07b6454 commit a75ba9f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lxd/instance/drivers/driver_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -8593,6 +8593,11 @@ func (d *qemu) devlxdEventSend(eventType string, eventMessage map[string]any) er

client, err := d.getAgentClient()
if err != nil {
// Don't fail if the VM simply doesn't have an agent.
if err == errQemuAgentOffline {
return nil
}

return err
}

Expand Down

0 comments on commit a75ba9f

Please sign in to comment.