Skip to content

Commit

Permalink
fix getent logic
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj committed Jun 27, 2022
1 parent a8d159c commit b24fe15
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/package_lxd_test/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,8 @@ func (c *Container) waitForNetwork() error {

attempts := 0
for {
err := c.client.Exec(c.Name, "getent", "hosts", "influxdata.com")
if err != nil {
return err
if err := c.client.Exec(c.Name, "getent", "hosts", "influxdata.com"); err == nil {
return nil
}

// uses exponetnial backoff to try after 1, 2, 4, 8, and 16 seconds
Expand Down

0 comments on commit b24fe15

Please sign in to comment.