fix deploy iso failed

This commit is contained in:
wanyaoqi
2020-01-15 20:56:07 +08:00
parent 358ce8e6e6
commit 52ad575184
@@ -66,12 +66,12 @@ func (*DeployerServer) DeployGuestFs(ctx context.Context, req *deployapi.DeployP
defer disk.Disconnect()
if !disk.Connect() {
log.Infof("Failed to connect %s disk", req.GuestDesc.Hypervisor)
return new(deployapi.DeployGuestFsResponse), errors.Error("disk connect failed")
return new(deployapi.DeployGuestFsResponse), nil
}
root := disk.MountRootfs()
if root == nil {
log.Infof("Failed mounting rootfs for %s disk", req.GuestDesc.Hypervisor)
return new(deployapi.DeployGuestFsResponse), errors.Error("rootfs mount failed")
return new(deployapi.DeployGuestFsResponse), nil
}
defer disk.UmountRootfs(root)