|
|
|
|
@ -122,9 +122,11 @@ func (r ExecRunner) Run(ctx context.Context, args ...string) ([]byte, error) {
|
|
|
|
|
// opaque transport failure and therefore uncertain.
|
|
|
|
|
func virshReportsMissingDomain(data []byte) bool {
|
|
|
|
|
message := strings.ToLower(string(data))
|
|
|
|
|
return strings.Contains(message, "domain not found") ||
|
|
|
|
|
strings.Contains(message, "no domain with matching uuid") ||
|
|
|
|
|
strings.Contains(message, "no domain with matching name")
|
|
|
|
|
// The UUID-targeted dumpxml form used by this adapter emits the second
|
|
|
|
|
// phrase below with LC_ALL=C. Do not match a broad "domain not found"
|
|
|
|
|
// substring: unrelated storage/transport diagnostics could contain those
|
|
|
|
|
// words and would otherwise turn an ambiguous failure into false absence.
|
|
|
|
|
return strings.Contains(message, "no domain with matching uuid")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// VirshBackend is a host-local implementation of Backend. It never changes
|
|
|
|
|
|