Skip to content

Commit

Permalink
fix(alibaba): fix query instance status debug info
Browse files Browse the repository at this point in the history
Signed-off-by: NewGr8Player <273221594@qq.com>
  • Loading branch information
NewGr8Player authored and rancher-sy-bot committed Oct 14, 2020
1 parent 17beffe commit 8d04469
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/providers/alibaba/alibaba.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,16 +677,16 @@ func (p *Alibaba) getInstanceStatus(aimStatus string) error {
})

if len(ids) > 0 {
p.logger.Debugf("[%s] waiting for the instances %s to be in `Running` status...\n", p.GetProviderName(), ids)
p.logger.Debugf("[%s] waiting for the instances %s to be in `%s` status...\n", p.GetProviderName(), ids, aimStatus)
request := ecs.CreateDescribeInstanceStatusRequest()
request.Scheme = "https"
request.InstanceId = &ids
if p.Zone != "" {
request.ZoneId = p.Zone
}

wait.ErrWaitTimeout = fmt.Errorf("[%s] calling getInstanceStatus error. region: %s, zone: %s, instanceName: %s, message: not `Running` status",
p.GetProviderName(), p.Region, p.Zone, ids)
wait.ErrWaitTimeout = fmt.Errorf("[%s] calling getInstanceStatus error. region: %s, zone: %s, instanceName: %s, message: not `%s` status",
p.GetProviderName(), p.Region, p.Zone, ids, aimStatus)

if err := wait.ExponentialBackoff(common.Backoff, func() (bool, error) {
response, err := p.c.DescribeInstanceStatus(request)
Expand Down Expand Up @@ -744,7 +744,7 @@ func (p *Alibaba) getInstanceStatus(aimStatus string) error {
return true
})

p.logger.Debugf("[%s] instances %s are in `Running` status\n", p.GetProviderName(), ids)
p.logger.Debugf("[%s] instances %s are in `%s` status\n", p.GetProviderName(), ids, aimStatus)

return nil
}
Expand Down

0 comments on commit 8d04469

Please sign in to comment.