Skip to content

Commit

Permalink
wip: ping external ip to verify connectivity
Browse files Browse the repository at this point in the history
Signed-off-by: Quique Llorente <[email protected]>
  • Loading branch information
qinqon committed Oct 4, 2019
1 parent 05f0208 commit efec0a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/helper/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,16 @@ func ApplyDesiredState(nodeNetworkState *nmstatev1alpha1.NodeNetworkState) (stri
}
}

err = exec.Command("ping", "-c", "3", "8.8.8.8").Run()
if err != nil {
return commandOutput, rollback(fmt.Errorf("error pinging external address after network reconfiguration"))
}

_, err = commit()
if err != nil {
return commandOutput, rollback(err)
}

commandOutput += fmt.Sprintf("setOutput: %s \n", setOutput)
return commandOutput, nil
}
Expand Down

0 comments on commit efec0a2

Please sign in to comment.