Skip to content

Commit

Permalink
Merge pull request kubevirt#2793 from kubevirt-bot/cherry-pick-2791-t…
Browse files Browse the repository at this point in the history
…o-release-0.13

[release-0.13] Fix nil exception when agent polling can't reach libvirt
  • Loading branch information
kubevirt-bot authored Oct 11, 2019
2 parents 50e3790 + 6279867 commit 4aa55e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/virt-launcher/virtwrap/cli/libvirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,13 @@ func (l *LibvirtConnection) ListAllDomains(flags libvirt.ConnectListAllDomainsFl
// command - the qemu command, for example this gets the interfaces: {"execute":"guest-network-get-interfaces"}
// domainName - the qemu domain name
func (l *LibvirtConnection) QemuAgentCommand(command string, domainName string) (string, error) {
if err := l.reconnectIfNecessary(); err != nil {
return "", err
}
domain, err := l.Connect.LookupDomainByName(domainName)
if err != nil {
return "", err
}
result, err := domain.QemuAgentCommand(command, libvirt.DOMAIN_QEMU_AGENT_COMMAND_DEFAULT, uint32(0))
return result, err
}
Expand Down

0 comments on commit 4aa55e5

Please sign in to comment.