mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): qga ping don't report error on host return error
Signed-off-by: wanyaoqi <wanyaoqi@yunion.cn>
This commit is contained in:
@@ -79,8 +79,13 @@ func (self *SGuest) PerformQgaPing(
|
||||
return nil, httperrors.NewBadRequestError("can't use qga in vm status: %s", self.Status)
|
||||
}
|
||||
|
||||
res := jsonutils.NewDict()
|
||||
host, _ := self.GetHost()
|
||||
return nil, self.GetDriver().QgaRequestGuestPing(ctx, mcclient.GetTokenHeaders(userCred), host, self, false, input)
|
||||
err := self.GetDriver().QgaRequestGuestPing(ctx, mcclient.GetTokenHeaders(userCred), host, self, false, input)
|
||||
if err != nil {
|
||||
res.Set("ping_error", jsonutils.NewString(err.Error()))
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func (self *SGuest) PerformQgaCommand(
|
||||
|
||||
Reference in New Issue
Block a user