metadata-service: Handle no user-data
This commit is contained in:
parent
276f0b5d99
commit
ce6fccfb3c
@ -65,7 +65,14 @@ func (ms *metadataService) FetchUserdata() ([]byte, error) {
|
|||||||
} else if _, ok := err.(pkg.ErrTimeout); ok {
|
} else if _, ok := err.(pkg.ErrTimeout); ok {
|
||||||
return data, err
|
return data, err
|
||||||
}
|
}
|
||||||
return client.GetRetry(OpenstackUserdataUrl)
|
|
||||||
|
if data, err := client.GetRetry(OpenstackUserdataUrl); err == nil {
|
||||||
|
return data, err
|
||||||
|
} else if _, ok := err.(pkg.ErrNotFound); ok {
|
||||||
|
return []byte{}, nil
|
||||||
|
} else {
|
||||||
|
return data, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ms *metadataService) Type() string {
|
func (ms *metadataService) Type() string {
|
||||||
|
Loading…
Reference in New Issue
Block a user