mirror of
https://github.com/rancher/os.git
synced 2025-08-30 21:26:09 +00:00
Merge pull request #1788 from rancher/emit-init-error-messages-to-console
Log all init func errors to console, and panic if we can't loadImage …
This commit is contained in:
commit
7b2b3a3fb8
@ -16,7 +16,7 @@ func ChainCfgFuncs(cfg *CloudConfig, cfgFuncs ...CfgFunc) (*CloudConfig, error)
|
|||||||
log.Debugf("[%d/%d] Starting", i+1, len(cfgFuncs))
|
log.Debugf("[%d/%d] Starting", i+1, len(cfgFuncs))
|
||||||
var err error
|
var err error
|
||||||
if cfg, err = cfgFunc(cfg); err != nil {
|
if cfg, err = cfgFunc(cfg); err != nil {
|
||||||
log.Errorf("Failed [%d/%d] %d%%", i+1, len(cfgFuncs), ((i + 1) * 100 / len(cfgFuncs)))
|
log.Errorf("Failed [%d/%d] %s", i+1, len(cfgFuncs), err)
|
||||||
return cfg, err
|
return cfg, err
|
||||||
}
|
}
|
||||||
log.Debugf("[%d/%d] Done %d%%", i+1, len(cfgFuncs), ((i + 1) * 100 / len(cfgFuncs)))
|
log.Debugf("[%d/%d] Done %d%%", i+1, len(cfgFuncs), ((i + 1) * 100 / len(cfgFuncs)))
|
||||||
|
@ -84,7 +84,7 @@ func loadImages(cfg *config.CloudConfig) (*config.CloudConfig, error) {
|
|||||||
|
|
||||||
log.Infof("Loading images from %s", inputFileName)
|
log.Infof("Loading images from %s", inputFileName)
|
||||||
if _, err = client.ImageLoad(context.Background(), input, true); err != nil {
|
if _, err = client.ImageLoad(context.Background(), input, true); err != nil {
|
||||||
return cfg, err
|
log.Fatalf("FATAL: failed loading images from %s: %s", inputFileName, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("Done loading images from %s", inputFileName)
|
log.Infof("Done loading images from %s", inputFileName)
|
||||||
|
Loading…
Reference in New Issue
Block a user