1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

Make datasource.AvailabilityChanges() able to be dynamic so fail out for configdrive mount and url 404's faster

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-03-02 11:52:29 +10:00
parent 78051c2814
commit 10a4c59385
5 changed files with 96 additions and 97 deletions

View File

@@ -46,7 +46,9 @@ func (f *RemoteFile) String() string {
func (f *RemoteFile) AvailabilityChanges() bool {
if f.lastError != nil {
if _, ok := f.lastError.(pkg.ErrNotFound); ok {
// if we have a Network error, then we should retry.
// otherwise, we've made a request to the server, and its said nope.
if _, ok := f.lastError.(pkg.ErrNetwork); !ok {
return false
}
}