1
0
mirror of https://github.com/rancher/os.git synced 2025-06-28 15:56:58 +00:00

Merge pull request #1694 from SvenDowideit/digital-ocean-datasource-give-up

Don't keep retrying if we can't get to the metadata, we're not doing …
This commit is contained in:
Sven Dowideit 2017-03-14 18:46:26 +10:00 committed by GitHub
commit bcc1aed724

View File

@ -76,6 +76,11 @@ func NewDatasource(root string) *MetadataService {
return &MetadataService{Service: metadata.NewDatasource(root, apiVersion, userdataURL, metadataPath, nil)}
}
func (ms MetadataService) AvailabilityChanges() bool {
// TODO: if it can't find the network, maybe we can start it?
return false
}
// Parse IPv4 netmask written in IP form (e.g. "255.255.255.0").
func ipmask(addr *Address) string {
ip := net.ParseIP(addr.IPAddress)