mirror of
https://github.com/rancher/os.git
synced 2025-08-19 15:26:49 +00:00
Fix exoscale race condition
Signed-off-by: Pierre-Emmanuel Jacquier <pierre-emmanuel.jacquier@exoscale.ch>
This commit is contained in:
parent
869559924b
commit
ce9d497890
@ -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 {
|
func (ms MetadataService) AvailabilityChanges() bool {
|
||||||
// TODO: if it can't find the network, maybe we can start it?
|
// TODO: if it can't find the network, maybe we can start it?
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user