1
0
mirror of https://github.com/rancher/os.git synced 2025-05-11 09:35:30 +00:00

Fix exoscale race condition

Signed-off-by: Pierre-Emmanuel Jacquier <pierre-emmanuel.jacquier@exoscale.ch>
This commit is contained in:
Pierre-Emmanuel Jacquier 2019-09-17 15:06:05 +00:00 committed by niusmallnan
parent 869559924b
commit ce9d497890

View File

@ -39,6 +39,16 @@ func NewDatasource(root string) *MetadataService {
}
}
func (ms MetadataService) IsAvailable() bool {
checkURL := ms.Root + ms.IsAvailableCheckPath
var err error
_, err = ms.Client.GetRetry(checkURL)
if err != nil {
log.Errorf("%s: %s (lastError: %v)", "IsAvailable", checkURL, err)
}
return (err == nil)
}
func (ms MetadataService) AvailabilityChanges() bool {
// TODO: if it can't find the network, maybe we can start it?
return false