mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-09 07:54:28 +08:00
fix(region): return sql error
This commit is contained in:
@@ -83,7 +83,7 @@ func (p *CloudregionSchedtagPredicate) GetCandidateResource(c core.Candidater) I
|
||||
if zone == nil {
|
||||
return nil
|
||||
}
|
||||
region := zone.GetRegion()
|
||||
region, _ := zone.GetRegion()
|
||||
if region == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -185,10 +185,13 @@ func IsNetworkAvailable(
|
||||
}
|
||||
}
|
||||
|
||||
if wire != "" && !utils.HasPrefix(wire, n.WireId) && !utils.HasPrefix(wire, n.GetWire().GetName()) {
|
||||
return FailReason{
|
||||
Reason: fmt.Sprintf("Wire %s != %s", wire, n.WireId),
|
||||
Type: NetworkWire,
|
||||
if wire != "" && !utils.HasPrefix(wire, n.WireId) {
|
||||
_wire, _ := n.GetWire()
|
||||
if !utils.HasPrefix(wire, _wire.GetName()) {
|
||||
return FailReason{
|
||||
Reason: fmt.Sprintf("Wire %s != %s", wire, n.WireId),
|
||||
Type: NetworkWire,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user